interface TargetBaseProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Events.Targets.TargetBaseProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awseventstargets#TargetBaseProps |
Java | software.amazon.awscdk.services.events.targets.TargetBaseProps |
Python | aws_cdk.aws_events_targets.TargetBaseProps |
TypeScript (source) | aws-cdk-lib » aws_events_targets » TargetBaseProps |
The generic properties for an RuleTarget.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_events_targets as events_targets } from 'aws-cdk-lib';
import { aws_sqs as sqs } from 'aws-cdk-lib';
declare const queue: sqs.Queue;
const targetBaseProps: events_targets.TargetBaseProps = {
deadLetterQueue: queue,
maxEventAge: cdk.Duration.minutes(30),
retryAttempts: 123,
};
Properties
Name | Type | Description |
---|---|---|
dead | IQueue | The SQS queue to be used as deadLetterQueue. Check out the considerations for using a dead-letter queue. |
max | Duration | The maximum age of a request that Lambda sends to a function for processing. |
retry | number | The maximum number of times to retry when the function returns an error. |
deadLetterQueue?
Type:
IQueue
(optional, default: no dead-letter queue)
The SQS queue to be used as deadLetterQueue. Check out the considerations for using a dead-letter queue.
The events not successfully delivered are automatically retried for a specified period of time, depending on the retry policy of the target. If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue.
maxEventAge?
Type:
Duration
(optional, default: Duration.hours(24))
The maximum age of a request that Lambda sends to a function for processing.
Minimum value of 60. Maximum value of 86400.
retryAttempts?
Type:
number
(optional, default: 185)
The maximum number of times to retry when the function returns an error.
Minimum value of 0. Maximum value of 185.