RuleTargetConfig Struct
Properties for an event rule target.
Example
ts
// 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
appSyncParametersoptionalCfnRule.AppSyncParametersPropertyapp_sync_parametersoptionalAppSyncParametersPropertyappSyncParametersoptionalAppSyncParametersPropertyAppSyncParametersoptionalAppSyncParametersPropertyAppSyncParametersoptionalAppSyncParametersProperty= None#Contains the GraphQL operation to be parsed and executed, if the event target is an AWS AppSync API.
The Amazon Resource Name (ARN) of the target.
batchParametersoptionalCfnRule.BatchParametersPropertybatch_parametersoptionalBatchParametersPropertybatchParametersoptionalBatchParametersPropertyBatchParametersoptionalBatchParametersPropertyBatchParametersoptionalBatchParametersProperty#Parameters used when the rule invokes Amazon AWS Batch Job/Queue.
Default: no parameters set
deadLetterConfigoptionalCfnRule.DeadLetterConfigPropertydead_letter_configoptionalDeadLetterConfigPropertydeadLetterConfigoptionalDeadLetterConfigPropertyDeadLetterConfigoptionalDeadLetterConfigPropertyDeadLetterConfigoptionalDeadLetterConfigProperty#Contains information about a dead-letter queue configuration.
Default: no dead-letter queue set
ecsParametersoptionalCfnRule.EcsParametersPropertyecs_parametersoptionalEcsParametersPropertyecsParametersoptionalEcsParametersPropertyEcsParametersoptionalEcsParametersPropertyEcsParametersoptionalEcsParametersProperty#The Amazon ECS task definition and task count to use, if the event target is an Amazon ECS task.
httpParametersoptionalCfnRule.HttpParametersPropertyhttp_parametersoptionalHttpParametersPropertyhttpParametersoptionalHttpParametersPropertyHttpParametersoptionalHttpParametersPropertyHttpParametersoptionalHttpParametersProperty= None#Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge API destination.
inputoptionalRuleTargetInputinputoptionalRuleTargetInputinputoptionalRuleTargetInputInputoptionalRuleTargetInputInputoptionalRuleTargetInput#What input to send to the event target.
Default: the entire event
kinesisParametersoptionalCfnRule.KinesisParametersPropertykinesis_parametersoptionalKinesisParametersPropertykinesisParametersoptionalKinesisParametersPropertyKinesisParametersoptionalKinesisParametersPropertyKinesisParametersoptionalKinesisParametersProperty#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.
redshiftDataParametersoptionalCfnRule.RedshiftDataParametersPropertyredshift_data_parametersoptionalRedshiftDataParametersPropertyredshiftDataParametersoptionalRedshiftDataParametersPropertyRedshiftDataParametersoptionalRedshiftDataParametersPropertyRedshiftDataParametersoptionalRedshiftDataParametersProperty#Parameters used when the rule invokes Amazon Redshift Queries.
Default: no parameters set
retryPolicyoptionalCfnRule.RetryPolicyPropertyretry_policyoptionalRetryPolicyPropertyretryPolicyoptionalRetryPolicyPropertyRetryPolicyoptionalRetryPolicyPropertyRetryPolicyoptionalRetryPolicyProperty#A RetryPolicy object that includes information about the retry policy settings.
Default: EventBridge default retry policy
Role to use to invoke this event target.
runCommandParametersoptionalCfnRule.RunCommandParametersPropertyrun_command_parametersoptionalRunCommandParametersPropertyrunCommandParametersoptionalRunCommandParametersPropertyRunCommandParametersoptionalRunCommandParametersPropertyRunCommandParametersoptionalRunCommandParametersProperty#Parameters used when the rule invokes Amazon EC2 Systems Manager Run Command.
sqsParametersoptionalCfnRule.SqsParametersPropertysqs_parametersoptionalSqsParametersPropertysqsParametersoptionalSqsParametersPropertySqsParametersoptionalSqsParametersPropertySqsParametersoptionalSqsParametersProperty#Parameters used when the FIFO sqs queue is used an event target by the rule.
targetResourceoptionalIConstructtarget_resourceoptionalIConstructtargetResourceoptionalIConstructTargetResourceoptionalIConstructTargetResourceoptionalIConstruct#The resource that is backing this target.
Default: the target is not backed by any resource
notes
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.