Cloud Functions Triggers Service, gRPC: TriggerService.Get
- gRPC request
- GetTriggerRequest
- Trigger
- Rule
- Timer
- InvokeFunctionOnce
- InvokeFunctionWithRetry
- RetrySettings
- PutQueueMessage
- InvokeContainerWithRetry
- GatewayWebsocketBroadcast
- MessageQueue
- BatchSettings
- InvokeContainerOnce
- IoTMessage
- IoTBrokerMessage
- ObjectStorage
- ContainerRegistry
- CloudLogs
- CloudLogsBatchSettings
- Logging
- LoggingBatchSettings
- BillingBudget
- DataStream
- DataStreamBatchSettings
- ObjectStorageBucketSettings
Returns the specified trigger.
To get the list of all available triggers, make a List request.
gRPC request
rpc Get (GetTriggerRequest) returns (Trigger)
GetTriggerRequest
{
"triggerId": "string"
}
Field |
Description |
triggerId |
string Required field. ID of the trigger to return. To get a trigger ID make a TriggerService.List request. |
Trigger
{
"id": "string",
"folderId": "string",
"createdAt": "google.protobuf.Timestamp",
"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": "int64",
"interval": "google.protobuf.Duration"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainerWithRetry": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "int64",
"interval": "google.protobuf.Duration"
},
"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": "int64",
"cutoff": "google.protobuf.Duration"
},
"visibilityTimeout": "google.protobuf.Duration",
// 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": "int64",
"cutoff": "google.protobuf.Duration"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "int64",
"interval": "google.protobuf.Duration"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "int64",
"interval": "google.protobuf.Duration"
},
"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": "int64",
"cutoff": "google.protobuf.Duration"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "int64",
"interval": "google.protobuf.Duration"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "int64",
"interval": "google.protobuf.Duration"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"objectStorage": {
"eventType": [
"ObjectStorageEventType"
],
"bucketId": "string",
"prefix": "string",
"suffix": "string",
"batchSettings": {
"size": "int64",
"cutoff": "google.protobuf.Duration"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "int64",
"interval": "google.protobuf.Duration"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "int64",
"interval": "google.protobuf.Duration"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"containerRegistry": {
"eventType": [
"ContainerRegistryEventType"
],
"registryId": "string",
"imageName": "string",
"tag": "string",
"batchSettings": {
"size": "int64",
"cutoff": "google.protobuf.Duration"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "int64",
"interval": "google.protobuf.Duration"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "int64",
"interval": "google.protobuf.Duration"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"cloudLogs": {
"logGroupId": [
"string"
],
"batchSettings": {
"size": "int64",
"cutoff": "google.protobuf.Duration"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "int64",
"interval": "google.protobuf.Duration"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "int64",
"interval": "google.protobuf.Duration"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
}
// end of the list of possible fields
},
"logging": {
"logGroupId": "string",
"resourceType": [
"string"
],
"resourceId": [
"string"
],
"streamName": [
"string"
],
"levels": [
"Level"
],
"batchSettings": {
"size": "int64",
"cutoff": "google.protobuf.Duration"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "int64",
"interval": "google.protobuf.Duration"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "int64",
"interval": "google.protobuf.Duration"
},
"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": "int64",
"interval": "google.protobuf.Duration"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "int64",
"interval": "google.protobuf.Duration"
},
"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": "int64",
"cutoff": "google.protobuf.Duration"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "int64",
"interval": "google.protobuf.Duration"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "int64",
"interval": "google.protobuf.Duration"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"gatewayWebsocketBroadcast": {
"gatewayId": "string",
"path": "string",
"serviceAccountId": "string"
}
// end of the list of possible fields
},
"mail": {
"email": "string",
"batchSettings": {
"size": "int64",
"cutoff": "google.protobuf.Duration"
},
"attachmentsBucket": {
"bucketId": "string",
"serviceAccountId": "string"
},
// Includes only one of the fields `invokeFunction`, `invokeContainer`, `gatewayWebsocketBroadcast`
"invokeFunction": {
"functionId": "string",
"functionTag": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "int64",
"interval": "google.protobuf.Duration"
},
"deadLetterQueue": {
"queueId": "string",
"serviceAccountId": "string"
}
},
"invokeContainer": {
"containerId": "string",
"path": "string",
"serviceAccountId": "string",
"retrySettings": {
"retryAttempts": "int64",
"interval": "google.protobuf.Duration"
},
"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": "Status"
}
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 |
Creation timestamp for the trigger. |
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 |
int64 Maximum number of retries (extra invokes) before the action is considered failed. |
interval |
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 |
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 |
int64 Batch size. Trigger will send the batch of messages to the function |
cutoff |
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 |
int64 Batch size. Trigger will send the batch of messages to the function |
cutoff |
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 |
int64 Batch size. Trigger will send the batch of messages to the associated function |
cutoff |
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 |
int64 Batch size in bytes. Trigger will send the batch of messages to the associated function |
cutoff |
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. |