Interface RuleTargetConfig

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
RuleTargetConfig.Jsii$Proxy

@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-04-10T22:22:28.249Z") @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
         .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())
         .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();
 
  • Method Details

    • getArn

      @Stability(Stable) @NotNull String getArn()
      The Amazon Resource Name (ARN) of the target.
    • getBatchParameters

      @Stability(Stable) @Nullable default CfnRule.BatchParametersProperty getBatchParameters()
      Parameters used when the rule invokes Amazon AWS Batch Job/Queue.

      Default: no parameters set

    • getDeadLetterConfig

      @Stability(Stable) @Nullable default CfnRule.DeadLetterConfigProperty getDeadLetterConfig()
      Contains information about a dead-letter queue configuration.

      Default: no dead-letter queue set

    • getEcsParameters

      @Stability(Stable) @Nullable default CfnRule.EcsParametersProperty getEcsParameters()
      The Amazon ECS task definition and task count to use, if the event target is an Amazon ECS task.
    • getHttpParameters

      @Stability(Stable) @Nullable default CfnRule.HttpParametersProperty getHttpParameters()
      Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge API destination.

      Default: - None

    • getInput

      @Stability(Stable) @Nullable default RuleTargetInput getInput()
      What input to send to the event target.

      Default: the entire event

    • getKinesisParameters

      @Stability(Stable) @Nullable default CfnRule.KinesisParametersProperty 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.

    • getRetryPolicy

      @Stability(Stable) @Nullable default CfnRule.RetryPolicyProperty getRetryPolicy()
      A RetryPolicy object that includes information about the retry policy settings.

      Default: EventBridge default retry policy

    • getRole

      @Stability(Stable) @Nullable default IRole getRole()
      Role to use to invoke this event target.
    • getRunCommandParameters

      @Stability(Stable) @Nullable default CfnRule.RunCommandParametersProperty getRunCommandParameters()
      Parameters used when the rule invokes Amazon EC2 Systems Manager Run Command.
    • getSqsParameters

      @Stability(Stable) @Nullable default CfnRule.SqsParametersProperty 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

      @Stability(Stable) static RuleTargetConfig.Builder builder()
      Returns:
      a RuleTargetConfig.Builder of RuleTargetConfig