aws-cdk-lib.aws_events_targets.CodePipelineTargetOptions

interface CodePipelineTargetOptions

LanguageType name
.NETAmazon.CDK.AWS.Events.Targets.CodePipelineTargetOptions
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awseventstargets#CodePipelineTargetOptions
Javasoftware.amazon.awscdk.services.events.targets.CodePipelineTargetOptions
Pythonaws_cdk.aws_events_targets.CodePipelineTargetOptions
TypeScript (source)aws-cdk-lib » aws_events_targets » CodePipelineTargetOptions

Customization options when creating a CodePipeline event target.

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_iam as iam } from 'aws-cdk-lib';
import { aws_sqs as sqs } from 'aws-cdk-lib';

declare const queue: sqs.Queue;
declare const role: iam.Role;
const codePipelineTargetOptions: events_targets.CodePipelineTargetOptions = {
  deadLetterQueue: queue,
  eventRole: role,
  maxEventAge: cdk.Duration.minutes(30),
  retryAttempts: 123,
};

Properties

NameTypeDescription
deadLetterQueue?IQueueThe SQS queue to be used as deadLetterQueue. Check out the considerations for using a dead-letter queue.
eventRole?IRoleThe role to assume before invoking the target (i.e., the pipeline) when the given rule is triggered.
maxEventAge?DurationThe maximum age of a request that Lambda sends to a function for processing.
retryAttempts?numberThe 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.


eventRole?

Type: IRole (optional, default: a new role will be created)

The role to assume before invoking the target (i.e., the pipeline) when the given rule is triggered.


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.