Class RuleTargetInput

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.events.RuleTargetInput
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:07.464Z") @Stability(Stable) public abstract class RuleTargetInput extends software.amazon.jsii.JsiiObject
The input to send to the event target.

Example:

 import software.amazon.awscdk.services.iam.*;
 import software.amazon.awscdk.services.stepfunctions.*;
 Rule rule = Rule.Builder.create(this, "Rule")
         .schedule(Schedule.rate(Duration.minutes(1)))
         .build();
 Queue dlq = new Queue(this, "DeadLetterQueue");
 Role role = Role.Builder.create(this, "Role")
         .assumedBy(new ServicePrincipal("events.amazonaws.com"))
         .build();
 StateMachine stateMachine = StateMachine.Builder.create(this, "SM")
         .definition(Wait.Builder.create(this, "Hello").time(WaitTime.duration(Duration.seconds(10))).build())
         .build();
 rule.addTarget(SfnStateMachine.Builder.create(stateMachine)
         .input(RuleTargetInput.fromObject(Map.of("SomeParam", "SomeValue")))
         .deadLetterQueue(dlq)
         .role(role)
         .build());
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    RuleTargetInput(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    RuleTargetInput(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    bind(IRule rule)
    Return the input properties for this input object.
    Take the event target input from a path in the event JSON.
    Pass text to the event target, splitting on newlines.
    Pass a JSON object to the event target.
    Pass text to the event target.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • RuleTargetInput

      protected RuleTargetInput(software.amazon.jsii.JsiiObjectRef objRef)
    • RuleTargetInput

      protected RuleTargetInput(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • RuleTargetInput

      @Stability(Stable) protected RuleTargetInput()
  • Method Details

    • fromEventPath

      @Stability(Stable) @NotNull public static RuleTargetInput fromEventPath(@NotNull String path)
      Take the event target input from a path in the event JSON.

      Parameters:
      path - This parameter is required.
    • fromMultilineText

      @Stability(Stable) @NotNull public static RuleTargetInput fromMultilineText(@NotNull String text)
      Pass text to the event target, splitting on newlines.

      This is only useful when passing to a target that does not take a single argument.

      May contain strings returned by EventField.from() to substitute in parts of the matched event.

      Parameters:
      text - This parameter is required.
    • fromObject

      @Stability(Stable) @NotNull public static RuleTargetInput fromObject(@NotNull Object obj)
      Pass a JSON object to the event target.

      May contain strings returned by EventField.from() to substitute in parts of the matched event.

      Parameters:
      obj - This parameter is required.
    • fromText

      @Stability(Stable) @NotNull public static RuleTargetInput fromText(@NotNull String text)
      Pass text to the event target.

      May contain strings returned by EventField.from() to substitute in parts of the matched event.

      The Rule Target input value will be a single string: the string you pass here. Do not use this method to pass a complex value like a JSON object to a Rule Target. Use RuleTargetInput.fromObject() instead.

      Parameters:
      text - This parameter is required.
    • bind

      @Stability(Stable) @NotNull public abstract RuleTargetInputProperties bind(@NotNull IRule rule)
      Return the input properties for this input object.

      Parameters:
      rule - This parameter is required.