Interface CfnRule.TargetProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnRule.TargetProperty.Jsii$Proxy
- Enclosing class:
CfnRule
For a complete list of services and resources that can be set as a target, see PutTargets .
If you are setting the event bus of another account as the target, and that account granted permission to your account through an organization instead of directly by the account ID, then you must specify a RoleArn with proper permissions in the Target structure. For more information, see Sending and Receiving Events Between AWS Accounts in the Amazon EventBridge User Guide .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.events.*;
TargetProperty targetProperty = TargetProperty.builder()
.arn("arn")
.id("id")
// the properties below are optional
.appSyncParameters(AppSyncParametersProperty.builder()
.graphQlOperation("graphQlOperation")
.build())
.batchParameters(BatchParametersProperty.builder()
.jobDefinition("jobDefinition")
.jobName("jobName")
// the properties below are optional
.arrayProperties(BatchArrayPropertiesProperty.builder()
.size(123)
.build())
.retryStrategy(BatchRetryStrategyProperty.builder()
.attempts(123)
.build())
.build())
.deadLetterConfig(DeadLetterConfigProperty.builder()
.arn("arn")
.build())
.ecsParameters(EcsParametersProperty.builder()
.taskDefinitionArn("taskDefinitionArn")
// the properties below are optional
.capacityProviderStrategy(List.of(CapacityProviderStrategyItemProperty.builder()
.capacityProvider("capacityProvider")
// the properties below are optional
.base(123)
.weight(123)
.build()))
.enableEcsManagedTags(false)
.enableExecuteCommand(false)
.group("group")
.launchType("launchType")
.networkConfiguration(NetworkConfigurationProperty.builder()
.awsVpcConfiguration(AwsVpcConfigurationProperty.builder()
.subnets(List.of("subnets"))
// the properties below are optional
.assignPublicIp("assignPublicIp")
.securityGroups(List.of("securityGroups"))
.build())
.build())
.placementConstraints(List.of(PlacementConstraintProperty.builder()
.expression("expression")
.type("type")
.build()))
.placementStrategies(List.of(PlacementStrategyProperty.builder()
.field("field")
.type("type")
.build()))
.platformVersion("platformVersion")
.propagateTags("propagateTags")
.referenceId("referenceId")
.tagList(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.taskCount(123)
.build())
.httpParameters(HttpParametersProperty.builder()
.headerParameters(Map.of(
"headerParametersKey", "headerParameters"))
.pathParameterValues(List.of("pathParameterValues"))
.queryStringParameters(Map.of(
"queryStringParametersKey", "queryStringParameters"))
.build())
.input("input")
.inputPath("inputPath")
.inputTransformer(InputTransformerProperty.builder()
.inputTemplate("inputTemplate")
// the properties below are optional
.inputPathsMap(Map.of(
"inputPathsMapKey", "inputPathsMap"))
.build())
.kinesisParameters(KinesisParametersProperty.builder()
.partitionKeyPath("partitionKeyPath")
.build())
.redshiftDataParameters(RedshiftDataParametersProperty.builder()
.database("database")
// the properties below are optional
.dbUser("dbUser")
.secretManagerArn("secretManagerArn")
.sql("sql")
.sqls(List.of("sqls"))
.statementName("statementName")
.withEvent(false)
.build())
.retryPolicy(RetryPolicyProperty.builder()
.maximumEventAgeInSeconds(123)
.maximumRetryAttempts(123)
.build())
.roleArn("roleArn")
.runCommandParameters(RunCommandParametersProperty.builder()
.runCommandTargets(List.of(RunCommandTargetProperty.builder()
.key("key")
.values(List.of("values"))
.build()))
.build())
.sageMakerPipelineParameters(SageMakerPipelineParametersProperty.builder()
.pipelineParameterList(List.of(SageMakerPipelineParameterProperty.builder()
.name("name")
.value("value")
.build()))
.build())
.sqsParameters(SqsParametersProperty.builder()
.messageGroupId("messageGroupId")
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnRule.TargetPropertystatic final classAn implementation forCfnRule.TargetProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default ObjectContains the GraphQL operation to be parsed and executed, if the event target is an AWS AppSync API.getArn()The Amazon Resource Name (ARN) of the target.default ObjectIf the event target is an AWS Batch job, this contains the job definition, job name, and other parameters.default ObjectTheDeadLetterConfigthat defines the target queue to send dead-letter queue events to.default ObjectContains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task.default ObjectContains the HTTP parameters to use when the target is a API Gateway endpoint or EventBridge ApiDestination.getId()The ID of the target within the specified rule.default StringgetInput()Valid JSON text passed to the target.default StringThe value of the JSONPath that is used for extracting part of the matched event when passing it to the target.default ObjectSettings to enable you to provide custom input to a target based on certain event data.default ObjectThe custom parameter you can use to control the shard assignment, when the target is a Kinesis data stream.default ObjectContains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster.default ObjectThe retry policy configuration to use for the dead-letter queue.default StringThe Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered.default ObjectParameters used when you are using the rule to invoke Amazon EC2 Run Command.default ObjectContains the SageMaker AI Model Building Pipeline parameters to start execution of a SageMaker AI Model Building Pipeline.default ObjectContains the message group ID to use when the target is an Amazon SQS fair or FIFO queue.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getArn
The Amazon Resource Name (ARN) of the target.- See Also:
-
getId
The ID of the target within the specified rule.Use this ID to reference the target when updating the rule. We recommend using a memorable and unique string.
- See Also:
-
getAppSyncParameters
Contains the GraphQL operation to be parsed and executed, if the event target is an AWS AppSync API.Returns union: either
IResolvableorCfnRule.AppSyncParametersProperty- See Also:
-
getBatchParameters
If the event target is an AWS Batch job, this contains the job definition, job name, and other parameters.For more information, see Jobs in the AWS Batch User Guide .
Returns union: either
IResolvableorCfnRule.BatchParametersProperty- See Also:
-
getDeadLetterConfig
TheDeadLetterConfigthat defines the target queue to send dead-letter queue events to.Returns union: either
IResolvableorCfnRule.DeadLetterConfigProperty- See Also:
-
getEcsParameters
Contains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task.For more information about Amazon ECS tasks, see Task Definitions in the Amazon EC2 Container Service Developer Guide .
Returns union: either
IResolvableorCfnRule.EcsParametersProperty- See Also:
-
getHttpParameters
Contains the HTTP parameters to use when the target is a API Gateway endpoint or EventBridge ApiDestination.If you specify an API Gateway API or EventBridge ApiDestination as a target, you can use this parameter to specify headers, path parameters, and query string keys/values as part of your target invoking request. If you're using ApiDestinations, the corresponding Connection can also have these values configured. In case of any conflicting keys, values from the Connection take precedence.
Returns union: either
IResolvableorCfnRule.HttpParametersProperty- See Also:
-
getInput
Valid JSON text passed to the target.In this case, nothing from the event itself is passed to the target. For more information, see The JavaScript Object Notation (JSON) Data Interchange Format .
- See Also:
-
getInputPath
The value of the JSONPath that is used for extracting part of the matched event when passing it to the target.You may use JSON dot notation or bracket notation. For more information about JSON paths, see JSONPath .
- See Also:
-
getInputTransformer
Settings to enable you to provide custom input to a target based on certain event data.You can extract one or more key-value pairs from the event and then use that data to send customized input to the target.
Returns union: either
IResolvableorCfnRule.InputTransformerProperty- See Also:
-
getKinesisParameters
The custom parameter you can use to control the shard assignment, when the target is a Kinesis data stream.If you do not include this parameter, the default is to use the
eventIdas the partition key.Returns union: either
IResolvableorCfnRule.KinesisParametersProperty- See Also:
-
getRedshiftDataParameters
Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster.If you specify a Amazon Redshift Cluster as a Target, you can use this to specify parameters to invoke the Amazon Redshift Data API ExecuteStatement based on EventBridge events.
Returns union: either
IResolvableorCfnRule.RedshiftDataParametersProperty- See Also:
-
getRetryPolicy
The retry policy configuration to use for the dead-letter queue.Returns union: either
IResolvableorCfnRule.RetryPolicyProperty- See Also:
-
getRoleArn
The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered.If one rule triggers multiple targets, you can use a different IAM role for each target.
- See Also:
-
getRunCommandParameters
Parameters used when you are using the rule to invoke Amazon EC2 Run Command.Returns union: either
IResolvableorCfnRule.RunCommandParametersProperty- See Also:
-
getSageMakerPipelineParameters
Contains the SageMaker AI Model Building Pipeline parameters to start execution of a SageMaker AI Model Building Pipeline.If you specify a SageMaker AI Model Building Pipeline as a target, you can use this to specify parameters to start a pipeline execution based on EventBridge events.
Returns union: either
IResolvableorCfnRule.SageMakerPipelineParametersProperty- See Also:
-
getSqsParameters
Contains the message group ID to use when the target is an Amazon SQS fair or FIFO queue.If you specify a fair or FIFO queue as a target, the queue must have content-based deduplication enabled.
Returns union: either
IResolvableorCfnRule.SqsParametersProperty- See Also:
-
builder
- Returns:
- a
CfnRule.TargetProperty.BuilderofCfnRule.TargetProperty
-