interface RuleTargetConfig
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Events.RuleTargetConfig |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsevents#RuleTargetConfig |
![]() | software.amazon.awscdk.services.events.RuleTargetConfig |
![]() | aws_cdk.aws_events.RuleTargetConfig |
![]() | aws-cdk-lib » aws_events » RuleTargetConfig |
Obtainable from
Api
.bind()
, Api
.bind()
, App
.bind()
, Aws
.bind()
, Batch
.bind()
, Cloud
.bind()
, Code
.bind()
, Code
.bind()
, Ecs
.bind()
, Event
.bind()
, Kinesis
.bind()
, Kinesis
.bind()
, Kinesis
.bind()
, Lambda
.bind()
, Redshift
.bind()
, Sfn
.bind()
, Sns
.bind()
, Sqs
.bind()
Properties for an event rule target.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_events as events } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
import * as constructs from 'constructs';
declare const construct: constructs.Construct;
declare const role: iam.Role;
declare const ruleTargetInput: events.RuleTargetInput;
const ruleTargetConfig: events.RuleTargetConfig = {
arn: 'arn',
// the properties below are optional
appSyncParameters: {
graphQlOperation: 'graphQlOperation',
},
batchParameters: {
jobDefinition: 'jobDefinition',
jobName: 'jobName',
// the properties below are optional
arrayProperties: {
size: 123,
},
retryStrategy: {
attempts: 123,
},
},
deadLetterConfig: {
arn: 'arn',
},
ecsParameters: {
taskDefinitionArn: 'taskDefinitionArn',
// the properties below are optional
capacityProviderStrategy: [{
capacityProvider: 'capacityProvider',
// the properties below are optional
base: 123,
weight: 123,
}],
enableEcsManagedTags: false,
enableExecuteCommand: false,
group: 'group',
launchType: 'launchType',
networkConfiguration: {
awsVpcConfiguration: {
subnets: ['subnets'],
// the properties below are optional
assignPublicIp: 'assignPublicIp',
securityGroups: ['securityGroups'],
},
},
placementConstraints: [{
expression: 'expression',
type: 'type',
}],
placementStrategies: [{
field: 'field',
type: 'type',
}],
platformVersion: 'platformVersion',
propagateTags: 'propagateTags',
referenceId: 'referenceId',
tagList: [{
key: 'key',
value: 'value',
}],
taskCount: 123,
},
httpParameters: {
headerParameters: {
headerParametersKey: 'headerParameters',
},
pathParameterValues: ['pathParameterValues'],
queryStringParameters: {
queryStringParametersKey: 'queryStringParameters',
},
},
input: ruleTargetInput,
kinesisParameters: {
partitionKeyPath: 'partitionKeyPath',
},
redshiftDataParameters: {
database: 'database',
// the properties below are optional
dbUser: 'dbUser',
secretManagerArn: 'secretManagerArn',
sql: 'sql',
sqls: ['sqls'],
statementName: 'statementName',
withEvent: false,
},
retryPolicy: {
maximumEventAgeInSeconds: 123,
maximumRetryAttempts: 123,
},
role: role,
runCommandParameters: {
runCommandTargets: [{
key: 'key',
values: ['values'],
}],
},
sqsParameters: {
messageGroupId: 'messageGroupId',
},
targetResource: construct,
};
Properties
Name | Type | Description |
---|---|---|
arn | string | The Amazon Resource Name (ARN) of the target. |
app | App | Contains the GraphQL operation to be parsed and executed, if the event target is an AWS AppSync API. |
batch | Batch | Parameters used when the rule invokes Amazon AWS Batch Job/Queue. |
dead | Dead | Contains information about a dead-letter queue configuration. |
ecs | Ecs | The Amazon ECS task definition and task count to use, if the event target is an Amazon ECS task. |
http | Http | Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge API destination. |
input? | Rule | What input to send to the event target. |
kinesis | Kinesis | Settings that control shard assignment, when the target is a Kinesis stream. |
redshift | Redshift | Parameters used when the rule invokes Amazon Redshift Queries. |
retry | Retry | A RetryPolicy object that includes information about the retry policy settings. |
role? | IRole | Role to use to invoke this event target. |
run | Run | Parameters used when the rule invokes Amazon EC2 Systems Manager Run Command. |
sqs | Sqs | Parameters used when the FIFO sqs queue is used an event target by the rule. |
target | IConstruct | The resource that is backing this target. |
arn
Type:
string
The Amazon Resource Name (ARN) of the target.
appSyncParameters?
Type:
App
(optional, default: None)
Contains the GraphQL operation to be parsed and executed, if the event target is an AWS AppSync API.
batchParameters?
Type:
Batch
(optional, default: no parameters set)
Parameters used when the rule invokes Amazon AWS Batch Job/Queue.
deadLetterConfig?
Type:
Dead
(optional, default: no dead-letter queue set)
Contains information about a dead-letter queue configuration.
ecsParameters?
Type:
Ecs
(optional)
The Amazon ECS task definition and task count to use, if the event target is an Amazon ECS task.
httpParameters?
Type:
Http
(optional, default: None)
Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge API destination.
input?
Type:
Rule
(optional, default: the entire event)
What input to send to the event target.
kinesisParameters?
Type:
Kinesis
(optional)
Settings that control shard assignment, when the target is a Kinesis stream.
If you don't include this parameter, eventId is used as the partition key.
redshiftDataParameters?
Type:
Redshift
(optional, default: no parameters set)
Parameters used when the rule invokes Amazon Redshift Queries.
retryPolicy?
Type:
Retry
(optional, default: EventBridge default retry policy)
A RetryPolicy object that includes information about the retry policy settings.
role?
Type:
IRole
(optional)
Role to use to invoke this event target.
runCommandParameters?
Type:
Run
(optional)
Parameters used when the rule invokes Amazon EC2 Systems Manager Run Command.
sqsParameters?
Type:
Sqs
(optional)
Parameters used when the FIFO sqs queue is used an event target by the rule.
targetResource?
Type:
IConstruct
(optional, default: the target is not backed by any resource)
The resource that is backing this target.
This is the resource that will actually have some action performed on it when used as a target (for example, start a build for a CodeBuild project). We need it to determine whether the rule belongs to a different account than the target - if so, we generate a more complex setup, including an additional stack containing the EventBusPolicy.