pydo.functions.create_trigger()
Generated on 8 May 2026
from pydo version
v0.34.0
Usage
client.functions.create_trigger(
namespace_id="fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
body={
"name": "my trigger",
"function": "hello",
"type": "SCHEDULED",
...,
},
)Description
Creates a new trigger for a given function in a namespace. To create a trigger, send a POST request to /v2/functions/namespaces/{namespace_id}/triggers with the name, function, type, is_enabled and scheduled_details properties.
Parameters
namespace_idstring requiredThe ID of the namespace to be managed.
namestring requiredExample:
my triggerThe trigger's unique name within the namespace.
functionstring requiredExample:
helloName of function(action) that exists in the given namespace.
typestring requiredExample:
SCHEDULEDOne of different type of triggers. Currently only SCHEDULED is supported.
is_enabledboolean requiredExample:
TrueIndicates weather the trigger is paused or unpaused.
scheduled_detailsobject requiredTrigger details for SCHEDULED type, where body is optional.
Show child properties
cronstring requiredExample:
* * * * *valid cron expression string which is required for SCHEDULED type triggers.
bodyobject or null optionalOptional data to be sent to function while triggering the function.
Show child properties
namestring optionalExample:
Welcome to DO!
Request Sample
Response Example
More Information
See /v2/functions/namespaces/{namespace_id}/triggers in the API reference for additional detail on responses, headers, parameters, and more.