Update Trigger
Updates the details of the given trigger. To update a trigger, send a PUT request to /v2/functions/namespaces/$NAMESPACE_ID/triggers/$TRIGGER_NAME with new values for the is_enabled or scheduled_details properties.
Path parameters
The ID of the namespace to be managed.
The name of the trigger to be managed.
Request body
Example request
{
"is_enabled": true,
"scheduled_details": {
"cron": "* * * * *",
"body": {
"name": "Welcome to DO!"
}
}
}Response
A JSON response object with a key called trigger. The object contains the properties associated with the trigger.
Example response
{
"trigger": {
"namespace": "fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "my trigger",
"function": "hello",
"type": "SCHEDULED",
"is_enabled": true,
"created_at": "2022-11-11T04:16:45Z",
"updated_at": "2022-11-11T04:16:45Z",
"scheduled_details": {
"cron": "* * * * *",
"body": {
"name": "Welcome to DO!"
}
},
"scheduled_runs": {
"last_run_at": "2022-11-11T04:16:45Z",
"next_run_at": "2022-11-11T04:16:45Z"
}
}
}Changes
Changed in 4 of the 8 revisions of this API.14
- ○
api tag
DigitalOcean-public.v2-new_Functionsaddedapi-tag-added
- ○
api tag
Functionsremovedapi-tag-removed
This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
endpoint added
endpoint-added
This revision also has 70 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ▲
api path removed without deprecation
api-path-removed-without-deprecation
This revision also has 436 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ○
endpoint added
endpoint-added
This revision also has 70 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○