Interface RuleTargetConfig
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
RuleTargetConfig.Jsii$Proxy
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T10:47:21.011Z")
@Stability(Stable)
public interface RuleTargetConfig
extends software.amazon.jsii.JsiiSerializable
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 software.amazon.awscdk.services.events.*;
import software.amazon.awscdk.services.iam.*;
import software.constructs.*;
Construct construct;
Role role;
RuleTargetInput ruleTargetInput;
RuleTargetConfig ruleTargetConfig = RuleTargetConfig.builder()
.arn("arn")
// 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(ruleTargetInput)
.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())
.role(role)
.runCommandParameters(RunCommandParametersProperty.builder()
.runCommandTargets(List.of(RunCommandTargetProperty.builder()
.key("key")
.values(List.of("values"))
.build()))
.build())
.sqsParameters(SqsParametersProperty.builder()
.messageGroupId("messageGroupId")
.build())
.targetResource(construct)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forRuleTargetConfigstatic final classAn implementation forRuleTargetConfig -
Method Summary
Modifier and TypeMethodDescriptionstatic RuleTargetConfig.Builderbuilder()Contains 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 CfnRule.BatchParametersPropertyParameters used when the rule invokes Amazon AWS Batch Job/Queue.default CfnRule.DeadLetterConfigPropertyContains information about a dead-letter queue configuration.default CfnRule.EcsParametersPropertyThe Amazon ECS task definition and task count to use, if the event target is an Amazon ECS task.default CfnRule.HttpParametersPropertyContains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge API destination.default RuleTargetInputgetInput()What input to send to the event target.Settings that control shard assignment, when the target is a Kinesis stream.Parameters used when the rule invokes Amazon Redshift Queries.default CfnRule.RetryPolicyPropertyA RetryPolicy object that includes information about the retry policy settings.default IRolegetRole()Role to use to invoke this event target.Parameters used when the rule invokes Amazon EC2 Systems Manager Run Command.default CfnRule.SqsParametersPropertyParameters used when the FIFO sqs queue is used an event target by the rule.default software.constructs.IConstructThe resource that is backing this target.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getArn
The Amazon Resource Name (ARN) of the target. -
getAppSyncParameters
Contains the GraphQL operation to be parsed and executed, if the event target is an AWS AppSync API.Default: - None
-
getBatchParameters
Parameters used when the rule invokes Amazon AWS Batch Job/Queue.Default: no parameters set
-
getDeadLetterConfig
Contains information about a dead-letter queue configuration.Default: no dead-letter queue set
-
getEcsParameters
The Amazon ECS task definition and task count to use, if the event target is an Amazon ECS task. -
getHttpParameters
Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge API destination.Default: - None
-
getInput
What input to send to the event target.Default: the entire event
-
getKinesisParameters
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.
-
getRedshiftDataParameters
@Stability(Stable) @Nullable default CfnRule.RedshiftDataParametersProperty getRedshiftDataParameters()Parameters used when the rule invokes Amazon Redshift Queries.Default: - no parameters set
-
getRetryPolicy
A RetryPolicy object that includes information about the retry policy settings.Default: EventBridge default retry policy
-
getRole
Role to use to invoke this event target. -
getRunCommandParameters
Parameters used when the rule invokes Amazon EC2 Systems Manager Run Command. -
getSqsParameters
Parameters used when the FIFO sqs queue is used an event target by the rule. -
getTargetResource
@Stability(Stable) @Nullable default software.constructs.IConstruct getTargetResource()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.
Default: the target is not backed by any resource
- See Also:
-
builder
- Returns:
- a
RuleTargetConfig.BuilderofRuleTargetConfig
-