enum InvocationType
Language | Type name |
---|---|
.NET | Amazon.CDK.Triggers.InvocationType |
Go | github.com/aws/aws-cdk-go/awscdk/v2/triggers#InvocationType |
Java | software.amazon.awscdk.triggers.InvocationType |
Python | aws_cdk.triggers.InvocationType |
TypeScript (source) | aws-cdk-lib » triggers » InvocationType |
The invocation type to apply to a trigger.
This determines whether the trigger function should await the result of the to be triggered function or not.
Example
import * as triggers from 'aws-cdk-lib/triggers';
const func = new lambda.Function(this, 'MyFunction', {
handler: 'index.handler',
runtime: lambda.Runtime.NODEJS_18_X,
code: lambda.Code.fromInline('foo'),
});
new triggers.Trigger(this, 'MyTrigger', {
handler: func,
timeout: Duration.minutes(10),
invocationType: triggers.InvocationType.EVENT,
});
Members
Name | Description |
---|---|
EVENT | Invoke the function asynchronously. |
REQUEST_RESPONSE | Invoke the function synchronously. |
DRY_RUN | Validate parameter values and verify that the user or role has permission to invoke the function. |
EVENT
Invoke the function asynchronously.
Send events that fail multiple times to the function's dead-letter queue (if one is configured). The API response only includes a status code.
REQUEST_RESPONSE
Invoke the function synchronously.
Keep the connection open until the function returns a response or times out. The API response includes the function response and additional data.
DRY_RUN
Validate parameter values and verify that the user or role has permission to invoke the function.