Cloud Functions Triggers Service, REST: Trigger.Create
- HTTP request
- Body parameters
- Rule
- Timer
- InvokeFunctionOnce
- InvokeFunctionWithRetry
- RetrySettings
- PutQueueMessage
- InvokeContainerWithRetry
- GatewayWebsocketBroadcast
- MessageQueue
- BatchSettings
- InvokeContainerOnce
- IoTMessage
- IoTBrokerMessage
- ObjectStorage
- ContainerRegistry
- CloudLogs
- CloudLogsBatchSettings
- Logging
- LoggingBatchSettings
- BillingBudget
- DataStream
- DataStreamBatchSettings
- ObjectStorageBucketSettings
- Response
- CreateTriggerMetadata
- Status
- Trigger
- Rule
- Timer
- InvokeFunctionOnce
- InvokeFunctionWithRetry
- RetrySettings
- PutQueueMessage
- InvokeContainerWithRetry
- GatewayWebsocketBroadcast
- MessageQueue
- BatchSettings
- InvokeContainerOnce
- IoTMessage
- IoTBrokerMessage
- ObjectStorage
- ContainerRegistry
- CloudLogs
- CloudLogsBatchSettings
- Logging
- LoggingBatchSettings
- BillingBudget
- DataStream
- DataStreamBatchSettings
- ObjectStorageBucketSettings
Creates a trigger in the specified folder.
HTTP request
POST https://serverless-triggers.api.cloud.yandex.net/triggers/v1/triggers
Body parameters
{
"folderId": "string",
"name": "string",
"description": "string",
"labels": "string",
"rule": {
// Includes only one of the fields `timer`, `messageQueue`, `iotMessage`, `iotBrokerMessage`, `objectStorage`, `containerRegistry`, `cloudLogs`, `logging`, `billingBudget`, `dataStream`, `mail`
"timer": {
"cronExpression": "string",
"payload": "string",
// Includes only one of the fields `invokeFunction`, `invokeFunctionWithRetry`, `invokeContainerWithRetry`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string"
},
"invokeFunctionWithRetry": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainerWithRetry": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"messageQueue": {
"queueId": "string",
"serviceAccountId": "string",
"batchSettings": {
"size": "string",
"cutoff": "string"
},
"visibilityTimeout": "string",
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string"
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string"
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"iotMessage": {
"registryId": "string",
"deviceId": "string",
"mqttTopic": "string",
"batchSettings": {
"size": "string",
"cutoff": "string"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"iotBrokerMessage": {
"brokerId": "string",
"mqttTopic": "string",
"batchSettings": {
"size": "string",
"cutoff": "string"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"objectStorage": {
"eventType": [
"string"
],
"bucketId": "string",
"prefix": "string",
"suffix": "string",
"batchSettings": {
"size": "string",
"cutoff": "string"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"containerRegistry": {
"eventType": [
"string"
],
"registryId": "string",
"imageName": "string",
"tag": "string",
"batchSettings": {
"size": "string",
"cutoff": "string"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"cloudLogs": {
"logGroupId": [
"string"
],
"batchSettings": {
"size": "string",
"cutoff": "string"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
}
// end of the list of possible fields
},
"logging": {
"logGroupId": "string",
"resourceType": [
"string"
],
"resourceId": [
"string"
],
"streamName": [
"string"
],
"levels": [
"string"
],
"batchSettings": {
"size": "string",
"cutoff": "string"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"billingBudget": {
"billingAccountId": "string",
"budgetId": "string",
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"dataStream": {
"endpoint": "string",
"database": "string",
"stream": "string",
"serviceAccountId": "string",
"batchSettings": {
"size": "string",
"cutoff": "string"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"mail": {
"email": "string",
"batchSettings": {
"size": "string",
"cutoff": "string"
},
"attachmentsBucket": {
"bucketId": "string",
"serviceAccountId": "string"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
}
// end of the list of possible fields
}
}
Field |
Description |
folderId |
string Required field. ID of the folder to create a trigger in. To get a folder ID make a yandex.cloud.resourcemanager.v1.FolderService.List request. |
name |
string Name of the trigger. |
description |
string Description of the trigger. |
labels |
string Resource labels as |
rule |
Required field. Trigger type. |
Rule
Description of a rule for trigger activation.
Field |
Description |
timer |
Rule for a timed trigger. Includes only one of the fields |
messageQueue |
Rule for a message queue trigger. Includes only one of the fields |
iotMessage |
Rule for a IoT Core trigger. Includes only one of the fields |
iotBrokerMessage |
Includes only one of the fields |
objectStorage |
Includes only one of the fields |
containerRegistry |
Includes only one of the fields |
cloudLogs |
Includes only one of the fields |
logging |
Includes only one of the fields |
billingBudget |
Includes only one of the fields |
dataStream |
Includes only one of the fields |
|
Includes only one of the fields |
Timer
Rule for activating a timed trigger.
Field |
Description |
cronExpression |
string Required field. Description of a schedule as a cron expression. |
payload |
string Payload to be passed to function. |
invokeFunction |
Instructions for invoking a function once. Includes only one of the fields Action to be executed when the current time matches the |
invokeFunctionWithRetry |
Instructions for invoking a function with retry. Includes only one of the fields Action to be executed when the current time matches the |
invokeContainerWithRetry |
Instructions for invoking a container with retry. Includes only one of the fields Action to be executed when the current time matches the |
gatewayWebsocketBroadcast |
Instructions for broadcasting to API gateway websocket once. Includes only one of the fields Action to be executed when the current time matches the |
InvokeFunctionOnce
A single function invocation.
Field |
Description |
functionId |
string Required field. ID of the function to invoke. |
functionTag |
string Version tag of the function to execute. |
serviceAccountId |
string ID of the service account that should be used to invoke the function. |
InvokeFunctionWithRetry
A function invocation with retries.
Field |
Description |
functionId |
string Required field. ID of the function to invoke. |
functionTag |
string Version tag of the function to execute. |
serviceAccountId |
string ID of the service account which has permission to invoke the function. |
retrySettings |
Retry policy. If the field is not specified, or the value is empty, no retries will be attempted. |
deadLetterQueue |
DLQ policy (no value means discarding a message). |
RetrySettings
Settings for retrying to invoke a function.
Field |
Description |
retryAttempts |
string (int64) Maximum number of retries (extra invokes) before the action is considered failed. |
interval |
string (duration) Required field. Time in seconds to wait between individual retries. |
PutQueueMessage
Field |
Description |
queueId |
string ID of the queue. |
serviceAccountId |
string Required field. Service account which has write permission on the queue. |
InvokeContainerWithRetry
A container invocation with retries.
Field |
Description |
containerId |
string Required field. ID of the container to invoke. |
path |
string Endpoint HTTP path to invoke. |
serviceAccountId |
string ID of the service account which has permission to invoke the container. |
retrySettings |
Retry policy. If the field is not specified, or the value is empty, no retries will be attempted. |
deadLetterQueue |
DLQ policy (no value means discarding a message). |
GatewayWebsocketBroadcast
Field |
Description |
gatewayId |
string Required field. |
path |
string Required field. |
serviceAccountId |
string Required field. sa which has permission for writing to websockets |
MessageQueue
Rule for activating a message queue trigger.
Field |
Description |
queueId |
string Required field. ID of the message queue in Message Queue. |
serviceAccountId |
string Required field. ID of the service account which has read access to the message queue. |
batchSettings |
Required field. Batch settings for processing messages in the queue. |
visibilityTimeout |
string (duration) Queue visibility timeout override. |
invokeFunction |
Instructions for invoking a function once. Includes only one of the fields Action to be executed when the there's a new message in the queue. |
invokeContainer |
Instructions for invoking a container once. Includes only one of the fields Action to be executed when the there's a new message in the queue. |
gatewayWebsocketBroadcast |
Instructions for broadcasting to API gateway websocket once. Includes only one of the fields Action to be executed when the there's a new message in the queue. |
BatchSettings
Settings for batch processing of messages in a queue.
Field |
Description |
size |
string (int64) Batch size. Trigger will send the batch of messages to the function |
cutoff |
string (duration) Required field. Maximum wait time. Trigger will send the batch of messages to the function when |
InvokeContainerOnce
A single container invocation.
Field |
Description |
containerId |
string Required field. ID of the container to invoke. |
path |
string Endpoint HTTP path to invoke. |
serviceAccountId |
string ID of the service account which has permission to invoke the container. |
IoTMessage
Rule for activating a IoT Core trigger.
Field |
Description |
registryId |
string Required field. ID of the IoT Core registry. |
deviceId |
string ID of the IoT Core device in the registry. |
mqttTopic |
string MQTT topic whose messages activate the trigger. |
batchSettings |
Batch settings for processing events. |
invokeFunction |
Instructions for invoking a function with retries as needed. Includes only one of the fields Action to be executed when the there's a new message in the MQTT topic. |
invokeContainer |
Instructions for invoking a container with retries as needed. Includes only one of the fields Action to be executed when the there's a new message in the MQTT topic. |
gatewayWebsocketBroadcast |
Instructions for broadcasting to API gateway websocket once. Includes only one of the fields Action to be executed when the there's a new message in the MQTT topic. |
IoTBrokerMessage
Rule for activating a IoT Core Broker trigger.
Field |
Description |
brokerId |
string Required field. ID of the IoT Core broker. |
mqttTopic |
string MQTT topic whose messages activate the trigger. |
batchSettings |
Batch settings for processing events. |
invokeFunction |
Instructions for invoking a function with retries as needed. Includes only one of the fields Action to be executed when the there's a new message in the MQTT topic. |
invokeContainer |
Instructions for invoking a container with retries as needed. Includes only one of the fields Action to be executed when the there's a new message in the MQTT topic. |
gatewayWebsocketBroadcast |
Instructions for broadcasting to API gateway websocket once. Includes only one of the fields Action to be executed when the there's a new message in the MQTT topic. |
ObjectStorage
Field |
Description |
eventType[] |
enum (ObjectStorageEventType) Type (name) of events, at least one value is required.
|
bucketId |
string ID of the bucket. |
prefix |
string Prefix of the object key. Filter, optional. |
suffix |
string Suffix of the object key. Filter, optional. |
batchSettings |
Batch settings for processing events. |
invokeFunction |
Instructions for invoking a function with retries as needed. Includes only one of the fields |
invokeContainer |
Instructions for invoking a container with retries as needed. Includes only one of the fields |
gatewayWebsocketBroadcast |
Instructions for broadcasting to API gateway websocket once. Includes only one of the fields |
ContainerRegistry
Field |
Description |
eventType[] |
enum (ContainerRegistryEventType) Type (name) of events, at least one value is required.
|
registryId |
string ID of the registry. |
imageName |
string Docker-image name. Filter, optional. |
tag |
string Docker-image tag. Filter, optional. |
batchSettings |
Batch settings for processing events. |
invokeFunction |
Instructions for invoking a function with retries as needed. Includes only one of the fields |
invokeContainer |
Instructions for invoking a container with retries as needed. Includes only one of the fields |
gatewayWebsocketBroadcast |
Instructions for broadcasting to API gateway websocket once. Includes only one of the fields |
CloudLogs
Field |
Description |
logGroupId[] |
string Log group identifiers, at least one value is required. |
batchSettings |
Required field. Batch settings for processing log events. |
invokeFunction |
Instructions for invoking a function with retries as needed. Includes only one of the fields |
invokeContainer |
Instructions for invoking a container with retries as needed. Includes only one of the fields |
CloudLogsBatchSettings
Field |
Description |
size |
string (int64) Batch size. Trigger will send the batch of messages to the function |
cutoff |
string (duration) Maximum wait time. Trigger will send the batch of messages to the function when |
Logging
Field |
Description |
logGroupId |
string Log events filter settings. |
resourceType[] |
string |
resourceId[] |
string |
streamName[] |
string |
levels[] |
enum (Level)
|
batchSettings |
Required field. Batch settings for processing log events. |
invokeFunction |
Instructions for invoking a function with retries as needed. Includes only one of the fields |
invokeContainer |
Instructions for invoking a container with retries as needed. Includes only one of the fields |
gatewayWebsocketBroadcast |
Instructions for broadcasting to API gateway websocket once. Includes only one of the fields |
LoggingBatchSettings
Field |
Description |
size |
string (int64) Batch size. Trigger will send the batch of messages to the associated function |
cutoff |
string (duration) Maximum wait time. Trigger will send the batch of messages the time since the last batch |
BillingBudget
Field |
Description |
billingAccountId |
string Required field. |
budgetId |
string |
invokeFunction |
Includes only one of the fields |
invokeContainer |
Includes only one of the fields |
gatewayWebsocketBroadcast |
Includes only one of the fields |
DataStream
Field |
Description |
endpoint |
string Data stream endpoint. |
database |
string Data stream database. |
stream |
string Stream name. |
serviceAccountId |
string ID of the service account which has permission to read data stream. |
batchSettings |
Batch settings for processing events. |
invokeFunction |
Includes only one of the fields |
invokeContainer |
Includes only one of the fields |
gatewayWebsocketBroadcast |
Includes only one of the fields |
DataStreamBatchSettings
Field |
Description |
size |
string (int64) Batch size in bytes. Trigger will send the batch of messages to the associated function |
cutoff |
string (duration) Maximum wait time. Trigger will send the batch of messages the time since the last batch |
Field |
Description |
|
string Address to receive emails for trigger activation. |
batchSettings |
Batch settings for processing events. |
attachmentsBucket |
Bucket settings for saving attachments. |
invokeFunction |
Includes only one of the fields |
invokeContainer |
Includes only one of the fields |
gatewayWebsocketBroadcast |
Includes only one of the fields |
ObjectStorageBucketSettings
Field |
Description |
bucketId |
string Bucket for saving. |
serviceAccountId |
string Required field. SA which has write permission on storage. |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": "boolean",
"metadata": {
"triggerId": "string"
},
// Includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": {
"id": "string",
"folderId": "string",
"createdAt": "string",
"name": "string",
"description": "string",
"labels": "string",
"rule": {
// Includes only one of the fields `timer`, `messageQueue`, `iotMessage`, `iotBrokerMessage`, `objectStorage`, `containerRegistry`, `cloudLogs`, `logging`, `billingBudget`, `dataStream`, `mail`
"timer": {
"cronExpression": "string",
"payload": "string",
// Includes only one of the fields `invokeFunction`, `invokeFunctionWithRetry`, `invokeContainerWithRetry`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string"
},
"invokeFunctionWithRetry": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainerWithRetry": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"messageQueue": {
"queueId": "string",
"serviceAccountId": "string",
"batchSettings": {
"size": "string",
"cutoff": "string"
},
"visibilityTimeout": "string",
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string"
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string"
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"iotMessage": {
"registryId": "string",
"deviceId": "string",
"mqttTopic": "string",
"batchSettings": {
"size": "string",
"cutoff": "string"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"iotBrokerMessage": {
"brokerId": "string",
"mqttTopic": "string",
"batchSettings": {
"size": "string",
"cutoff": "string"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"objectStorage": {
"eventType": [
"string"
],
"bucketId": "string",
"prefix": "string",
"suffix": "string",
"batchSettings": {
"size": "string",
"cutoff": "string"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"containerRegistry": {
"eventType": [
"string"
],
"registryId": "string",
"imageName": "string",
"tag": "string",
"batchSettings": {
"size": "string",
"cutoff": "string"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"cloudLogs": {
"logGroupId": [
"string"
],
"batchSettings": {
"size": "string",
"cutoff": "string"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
}
// end of the list of possible fields
},
"logging": {
"logGroupId": "string",
"resourceType": [
"string"
],
"resourceId": [
"string"
],
"streamName": [
"string"
],
"levels": [
"string"
],
"batchSettings": {
"size": "string",
"cutoff": "string"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"billingBudget": {
"billingAccountId": "string",
"budgetId": "string",
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"dataStream": {
"endpoint": "string",
"database": "string",
"stream": "string",
"serviceAccountId": "string",
"batchSettings": {
"size": "string",
"cutoff": "string"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"mail": {
"email": "string",
"batchSettings": {
"size": "string",
"cutoff": "string"
},
"attachmentsBucket": {
"bucketId": "string",
"serviceAccountId": "string"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "string",
"interval": "string"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
}
// end of the list of possible fields
},
"status": "string"
}
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
Field |
Description |
id |
string ID of the operation. |
description |
string Description of the operation. 0-256 characters long. |
createdAt |
string (date-time) Creation timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
createdBy |
string ID of the user or service account who initiated the operation. |
modifiedAt |
string (date-time) The time when the Operation resource was last modified. String in RFC3339 To work with values in this field, use the APIs described in the |
done |
boolean If the value is |
metadata |
Service-specific metadata associated with the operation. |
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
CreateTriggerMetadata
Field |
Description |
triggerId |
string ID of the trigger that is being created. |
Status
The error result of the operation in case of failure or cancellation.
Field |
Description |
code |
integer (int32) Error code. An enum value of google.rpc.Code |
message |
string An error message. |
details[] |
object A list of messages that carry the error details. |
Trigger
A trigger to invoke a serverless function. For more information, see Triggers.
Field |
Description |
id |
string ID of the trigger. Generated at creation time. |
folderId |
string Required field. ID of the folder that the trigger belongs to. |
createdAt |
string (date-time) Creation timestamp for the trigger. String in RFC3339 To work with values in this field, use the APIs described in the |
name |
string Name of the trigger. |
description |
string Description of the trigger. |
labels |
string Trigger labels as |
rule |
Required field. Rule for trigger activation (always consistent with the trigger type). |
status |
enum (Status) Trigger status.
|
Rule
Description of a rule for trigger activation.
Field |
Description |
timer |
Rule for a timed trigger. Includes only one of the fields |
messageQueue |
Rule for a message queue trigger. Includes only one of the fields |
iotMessage |
Rule for a IoT Core trigger. Includes only one of the fields |
iotBrokerMessage |
Includes only one of the fields |
objectStorage |
Includes only one of the fields |
containerRegistry |
Includes only one of the fields |
cloudLogs |
Includes only one of the fields |
logging |
Includes only one of the fields |
billingBudget |
Includes only one of the fields |
dataStream |
Includes only one of the fields |
|
Includes only one of the fields |
Timer
Rule for activating a timed trigger.
Field |
Description |
cronExpression |
string Required field. Description of a schedule as a cron expression. |
payload |
string Payload to be passed to function. |
invokeFunction |
Instructions for invoking a function once. Includes only one of the fields Action to be executed when the current time matches the |
invokeFunctionWithRetry |
Instructions for invoking a function with retry. Includes only one of the fields Action to be executed when the current time matches the |
invokeContainerWithRetry |
Instructions for invoking a container with retry. Includes only one of the fields Action to be executed when the current time matches the |
gatewayWebsocketBroadcast |
Instructions for broadcasting to API gateway websocket once. Includes only one of the fields Action to be executed when the current time matches the |
InvokeFunctionOnce
A single function invocation.
Field |
Description |
functionId |
string Required field. ID of the function to invoke. |
functionTag |
string Version tag of the function to execute. |
serviceAccountId |
string ID of the service account that should be used to invoke the function. |
InvokeFunctionWithRetry
A function invocation with retries.
Field |
Description |
functionId |
string Required field. ID of the function to invoke. |
functionTag |
string Version tag of the function to execute. |
serviceAccountId |
string ID of the service account which has permission to invoke the function. |
retrySettings |
Retry policy. If the field is not specified, or the value is empty, no retries will be attempted. |
deadLetterQueue |
DLQ policy (no value means discarding a message). |
RetrySettings
Settings for retrying to invoke a function.
Field |
Description |
retryAttempts |
string (int64) Maximum number of retries (extra invokes) before the action is considered failed. |
interval |
string (duration) Required field. Time in seconds to wait between individual retries. |
PutQueueMessage
Field |
Description |
queueId |
string ID of the queue. |
serviceAccountId |
string Required field. Service account which has write permission on the queue. |
InvokeContainerWithRetry
A container invocation with retries.
Field |
Description |
containerId |
string Required field. ID of the container to invoke. |
path |
string Endpoint HTTP path to invoke. |
serviceAccountId |
string ID of the service account which has permission to invoke the container. |
retrySettings |
Retry policy. If the field is not specified, or the value is empty, no retries will be attempted. |
deadLetterQueue |
DLQ policy (no value means discarding a message). |
GatewayWebsocketBroadcast
Field |
Description |
gatewayId |
string Required field. |
path |
string Required field. |
serviceAccountId |
string Required field. sa which has permission for writing to websockets |
MessageQueue
Rule for activating a message queue trigger.
Field |
Description |
queueId |
string Required field. ID of the message queue in Message Queue. |
serviceAccountId |
string Required field. ID of the service account which has read access to the message queue. |
batchSettings |
Required field. Batch settings for processing messages in the queue. |
visibilityTimeout |
string (duration) Queue visibility timeout override. |
invokeFunction |
Instructions for invoking a function once. Includes only one of the fields Action to be executed when the there's a new message in the queue. |
invokeContainer |
Instructions for invoking a container once. Includes only one of the fields Action to be executed when the there's a new message in the queue. |
gatewayWebsocketBroadcast |
Instructions for broadcasting to API gateway websocket once. Includes only one of the fields Action to be executed when the there's a new message in the queue. |
BatchSettings
Settings for batch processing of messages in a queue.
Field |
Description |
size |
string (int64) Batch size. Trigger will send the batch of messages to the function |
cutoff |
string (duration) Required field. Maximum wait time. Trigger will send the batch of messages to the function when |
InvokeContainerOnce
A single container invocation.
Field |
Description |
containerId |
string Required field. ID of the container to invoke. |
path |
string Endpoint HTTP path to invoke. |
serviceAccountId |
string ID of the service account which has permission to invoke the container. |
IoTMessage
Rule for activating a IoT Core trigger.
Field |
Description |
registryId |
string Required field. ID of the IoT Core registry. |
deviceId |
string ID of the IoT Core device in the registry. |
mqttTopic |
string MQTT topic whose messages activate the trigger. |
batchSettings |
Batch settings for processing events. |
invokeFunction |
Instructions for invoking a function with retries as needed. Includes only one of the fields Action to be executed when the there's a new message in the MQTT topic. |
invokeContainer |
Instructions for invoking a container with retries as needed. Includes only one of the fields Action to be executed when the there's a new message in the MQTT topic. |
gatewayWebsocketBroadcast |
Instructions for broadcasting to API gateway websocket once. Includes only one of the fields Action to be executed when the there's a new message in the MQTT topic. |
IoTBrokerMessage
Rule for activating a IoT Core Broker trigger.
Field |
Description |
brokerId |
string Required field. ID of the IoT Core broker. |
mqttTopic |
string MQTT topic whose messages activate the trigger. |
batchSettings |
Batch settings for processing events. |
invokeFunction |
Instructions for invoking a function with retries as needed. Includes only one of the fields Action to be executed when the there's a new message in the MQTT topic. |
invokeContainer |
Instructions for invoking a container with retries as needed. Includes only one of the fields Action to be executed when the there's a new message in the MQTT topic. |
gatewayWebsocketBroadcast |
Instructions for broadcasting to API gateway websocket once. Includes only one of the fields Action to be executed when the there's a new message in the MQTT topic. |
ObjectStorage
Field |
Description |
eventType[] |
enum (ObjectStorageEventType) Type (name) of events, at least one value is required.
|
bucketId |
string ID of the bucket. |
prefix |
string Prefix of the object key. Filter, optional. |
suffix |
string Suffix of the object key. Filter, optional. |
batchSettings |
Batch settings for processing events. |
invokeFunction |
Instructions for invoking a function with retries as needed. Includes only one of the fields |
invokeContainer |
Instructions for invoking a container with retries as needed. Includes only one of the fields |
gatewayWebsocketBroadcast |
Instructions for broadcasting to API gateway websocket once. Includes only one of the fields |
ContainerRegistry
Field |
Description |
eventType[] |
enum (ContainerRegistryEventType) Type (name) of events, at least one value is required.
|
registryId |
string ID of the registry. |
imageName |
string Docker-image name. Filter, optional. |
tag |
string Docker-image tag. Filter, optional. |
batchSettings |
Batch settings for processing events. |
invokeFunction |
Instructions for invoking a function with retries as needed. Includes only one of the fields |
invokeContainer |
Instructions for invoking a container with retries as needed. Includes only one of the fields |
gatewayWebsocketBroadcast |
Instructions for broadcasting to API gateway websocket once. Includes only one of the fields |
CloudLogs
Field |
Description |
logGroupId[] |
string Log group identifiers, at least one value is required. |
batchSettings |
Required field. Batch settings for processing log events. |
invokeFunction |
Instructions for invoking a function with retries as needed. Includes only one of the fields |
invokeContainer |
Instructions for invoking a container with retries as needed. Includes only one of the fields |
CloudLogsBatchSettings
Field |
Description |
size |
string (int64) Batch size. Trigger will send the batch of messages to the function |
cutoff |
string (duration) Maximum wait time. Trigger will send the batch of messages to the function when |
Logging
Field |
Description |
logGroupId |
string Log events filter settings. |
resourceType[] |
string |
resourceId[] |
string |
streamName[] |
string |
levels[] |
enum (Level)
|
batchSettings |
Required field. Batch settings for processing log events. |
invokeFunction |
Instructions for invoking a function with retries as needed. Includes only one of the fields |
invokeContainer |
Instructions for invoking a container with retries as needed. Includes only one of the fields |
gatewayWebsocketBroadcast |
Instructions for broadcasting to API gateway websocket once. Includes only one of the fields |
LoggingBatchSettings
Field |
Description |
size |
string (int64) Batch size. Trigger will send the batch of messages to the associated function |
cutoff |
string (duration) Maximum wait time. Trigger will send the batch of messages the time since the last batch |
BillingBudget
Field |
Description |
billingAccountId |
string Required field. |
budgetId |
string |
invokeFunction |
Includes only one of the fields |
invokeContainer |
Includes only one of the fields |
gatewayWebsocketBroadcast |
Includes only one of the fields |
DataStream
Field |
Description |
endpoint |
string Data stream endpoint. |
database |
string Data stream database. |
stream |
string Stream name. |
serviceAccountId |
string ID of the service account which has permission to read data stream. |
batchSettings |
Batch settings for processing events. |
invokeFunction |
Includes only one of the fields |
invokeContainer |
Includes only one of the fields |
gatewayWebsocketBroadcast |
Includes only one of the fields |
DataStreamBatchSettings
Field |
Description |
size |
string (int64) Batch size in bytes. Trigger will send the batch of messages to the associated function |
cutoff |
string (duration) Maximum wait time. Trigger will send the batch of messages the time since the last batch |
Field |
Description |
|
string Address to receive emails for trigger activation. |
batchSettings |
Batch settings for processing events. |
attachmentsBucket |
Bucket settings for saving attachments. |
invokeFunction |
Includes only one of the fields |
invokeContainer |
Includes only one of the fields |
gatewayWebsocketBroadcast |
Includes only one of the fields |
ObjectStorageBucketSettings
Field |
Description |
bucketId |
string Bucket for saving. |
serviceAccountId |
string Required field. SA which has write permission on storage. |