Trigger for Data Streams that invokes a Serverless Containers container
Written by
Updated at December 5, 2024
Trigger for Data Streams calls a Serverless Containers container when data is sent to a stream.
A trigger for Data Streams needs service accounts to manage a stream and invoke a container. You can use the same service account for both operations.
For more information about creating a trigger for Data Streams, see Creating a trigger for Data Streams that invokes a Serverless Containers container.
Roles required for the proper operation of a trigger for Data Streams
- To create a trigger, you need a permission for the service account under which the trigger executes the operation. This permission comes with the iam.serviceAccounts.user and editor roles or higher.
- For the trigger to fire, service accounts need the following roles:
serverless.containers.invoker
for the container the trigger invokes.yds.admin
for the stream that invokes the trigger when data is sent to it.
Format of the message from the trigger for Data Streams
After the trigger is activated, it sends a message to the container. The message format depends on the source and is represented by an array of messages
:
{
"messages":[
{
"key1":"value1"
},
{
"key2":"value2"
}
]
}