Scaleway logo
Serverless Functions API

Triggers enable to trigger your Functions using events from a message queue.


List all triggers

GET
https://api.scaleway.com
/functions/v1beta1/regions/{region}/triggers

List all triggers belonging to a specified Organization or Project.

List all triggers › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw

List all triggers › query Parameters

page
​integer · int32

Page number to return.

page_size
​integer · uint32

Maximum number of triggers to return per page.

Order in which to return results.

Enum values:
created_at_asc
created_at_desc
Default: created_at_asc
function_id
​string

ID of the function the triggers belongs to.

namespace_id
​string

ID of the namespace the triggers belongs to.

project_id
​string

ID of the project the triggers belongs to.

List all triggers › Responses

200
total_count
​integer · uint32

Total count of existing triggers (matching any filters specified).

Triggers on this page.


Create a trigger

POST
https://api.scaleway.com
/functions/v1beta1/regions/{region}/triggers

Create a new trigger for a specified function.

Create a trigger › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw

Create a trigger › Request Body

name
​string · required

Name of the trigger.

function_id
​string · required

ID of the function to trigger.

description
​string | null

Description of the trigger.

​

Configuration for a Scaleway Messaging and Queuing SQS queue.

​

Configuration for a Scaleway Messaging and Queuing NATS subject.

Create a trigger › Responses

200
id
​string

ID of the trigger.

srn
​string · pattern: ^srn://functions\.[^…

SRN of the trigger.

name
​string

Name of the trigger.

description
​string

Description of the trigger.

function_id
​string

ID of the function to trigger.

input_type
​scaleway.functions.v1beta1.Trigger.InputType · enum

Type of the input.

Enum values:
unknown_input_type
sqs
scw_sqs
nats
scw_nats
Default: unknown_input_type
status
​scaleway.functions.v1beta1.Trigger.Status · enum

Status of the trigger.

Enum values:
unknown_status
ready
deleting
error
creating
pending
Default: unknown_status
error_message
​string | null

Error message of the trigger.

​

Configuration for a Scaleway Messaging and Queuing SQS queue.

​

Configuration for a Scaleway Messaging and Queuing NATS subject.

region
​string

Region in which the trigger is located.


Get a trigger

GET
https://api.scaleway.com
/functions/v1beta1/regions/{region}/triggers/{trigger_id}

Get a trigger with a specified ID.

Get a trigger › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
trigger_id
​string · required

ID of the trigger to get.

Get a trigger › Responses

200
id
​string

ID of the trigger.

srn
​string · pattern: ^srn://functions\.[^…

SRN of the trigger.

name
​string

Name of the trigger.

description
​string

Description of the trigger.

function_id
​string

ID of the function to trigger.

input_type
​scaleway.functions.v1beta1.Trigger.InputType · enum

Type of the input.

Enum values:
unknown_input_type
sqs
scw_sqs
nats
scw_nats
Default: unknown_input_type
status
​scaleway.functions.v1beta1.Trigger.Status · enum

Status of the trigger.

Enum values:
unknown_status
ready
deleting
error
creating
pending
Default: unknown_status
error_message
​string | null

Error message of the trigger.

​

Configuration for a Scaleway Messaging and Queuing SQS queue.

​

Configuration for a Scaleway Messaging and Queuing NATS subject.

region
​string

Region in which the trigger is located.


Update a trigger

PATCH
https://api.scaleway.com
/functions/v1beta1/regions/{region}/triggers/{trigger_id}

Update a trigger with a specified ID.

Update a trigger › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
trigger_id
​string · required

ID of the trigger to update.

Update a trigger › Request Body

name
​string | null

Name of the trigger.

description
​string | null

Description of the trigger.

Update a trigger › Responses

200
id
​string

ID of the trigger.

srn
​string · pattern: ^srn://functions\.[^…

SRN of the trigger.

name
​string

Name of the trigger.

description
​string

Description of the trigger.

function_id
​string

ID of the function to trigger.

input_type
​scaleway.functions.v1beta1.Trigger.InputType · enum

Type of the input.

Enum values:
unknown_input_type
sqs
scw_sqs
nats
scw_nats
Default: unknown_input_type
status
​scaleway.functions.v1beta1.Trigger.Status · enum

Status of the trigger.

Enum values:
unknown_status
ready
deleting
error
creating
pending
Default: unknown_status
error_message
​string | null

Error message of the trigger.

​

Configuration for a Scaleway Messaging and Queuing SQS queue.

​

Configuration for a Scaleway Messaging and Queuing NATS subject.

region
​string

Region in which the trigger is located.


Delete a trigger

DELETE
https://api.scaleway.com
/functions/v1beta1/regions/{region}/triggers/{trigger_id}

Delete a trigger with a specified ID.

Delete a trigger › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
trigger_id
​string · required

ID of the trigger to delete.

Delete a trigger › Responses

200
id
​string

ID of the trigger.

srn
​string · pattern: ^srn://functions\.[^…

SRN of the trigger.

name
​string

Name of the trigger.

description
​string

Description of the trigger.

function_id
​string

ID of the function to trigger.

input_type
​scaleway.functions.v1beta1.Trigger.InputType · enum

Type of the input.

Enum values:
unknown_input_type
sqs
scw_sqs
nats
scw_nats
Default: unknown_input_type
status
​scaleway.functions.v1beta1.Trigger.Status · enum

Status of the trigger.

Enum values:
unknown_status
ready
deleting
error
creating
pending
Default: unknown_status
error_message
​string | null

Error message of the trigger.

​

Configuration for a Scaleway Messaging and Queuing SQS queue.

​

Configuration for a Scaleway Messaging and Queuing NATS subject.

region
​string

Region in which the trigger is located.