Trigger for Yandex Data Streams
Written by
Triggers for Yandex Data Streams launch a function in Cloud Functions or a container in Serverless Containers when data is sent to the stream.
Roles required for the proper operation of a trigger for Data Streams
- To create a trigger, you need a permission for a service account that runs the trigger executing the operation. This permission is included in the roles iam.serviceAccounts.user, editor, and higher.
- For a trigger to work, the service account needs:
serverless.functions.invoker
for the function that the trigger invokes.serverless-containers-invoker
for the container that the trigger invokes.yds.admin
for the stream that invokes the trigger when data is sent there.
Format of the message from the trigger for Data Streams
After the trigger is activated, it sends a message to the function or the container. The message format depends on the source and is an array of messages
:
{
"messages":[
{
"key1":"value1"
},
{
"key2":"value2"
}
]
}