Skip to main content

namespace_triggers

Overview

Namenamespace_triggers
TypeResource
Iddigitalocean.functions.namespace_triggers

Fields

NameDatatypeDescription
namestringThe trigger's unique name within the namespace.
created_atstringUTC time string.
typestringString which indicates the type of trigger source like SCHEDULED.
updated_atstringUTC time string.
scheduled_detailsobjectTrigger details for SCHEDULED type, where body is optional.
functionstringName of function(action) that exists in the given namespace.
is_enabledbooleanIndicates weather the trigger is paused or unpaused.
namespacestringA unique string format of UUID with a prefix fn-.
scheduled_runsobject

Methods

NameAccessible byRequired ParamsDescription
get_triggerSELECTnamespace_id, trigger_nameGets the trigger details. To get the trigger details, send a GET request to /v2/functions/namespaces/$NAMESPACE_ID/triggers/$TRIGGER_NAME.
list_triggersSELECTnamespace_idReturns a list of triggers associated with the current user and namespace. To get all triggers, send a GET request to /v2/functions/namespaces/$NAMESPACE_ID/triggers.
create_triggerINSERTnamespace_id, data__function, data__is_enabled, data__name, data__scheduled_details, data__typeCreates 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.
delete_triggerDELETEnamespace_id, trigger_nameDeletes the given trigger.
To delete trigger, send a DELETE request to /v2/functions/namespaces/$NAMESPACE_ID/triggers/$TRIGGER_NAME.
A successful deletion returns a 204 response.
_get_triggerEXECnamespace_id, trigger_nameGets the trigger details. To get the trigger details, send a GET request to /v2/functions/namespaces/$NAMESPACE_ID/triggers/$TRIGGER_NAME.
_list_triggersEXECnamespace_idReturns a list of triggers associated with the current user and namespace. To get all triggers, send a GET request to /v2/functions/namespaces/$NAMESPACE_ID/triggers.
update_triggerEXECnamespace_id, trigger_nameUpdates 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.