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.104.0 (build e79254c)", date="2024-12-06T14:43:19.352Z") @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.appsync.*;
 GraphqlApi api = GraphqlApi.Builder.create(this, "api")
         .name("api")
         .definition(Definition.fromFile("schema.graphql"))
         .authorizationConfig(AuthorizationConfig.builder()
                 .defaultAuthorization(AuthorizationMode.builder().authorizationType(AuthorizationType.IAM).build())
                 .build())
         .build();
 Rule rule = Rule.Builder.create(this, "Rule")
         .schedule(Schedule.rate(Duration.hours(1)))
         .build();
 rule.addTarget(AppSync.Builder.create(api)
         .graphQLOperation("mutation Publish($message: String!){ publish(message: $message) { message } }")
         .variables(RuleTargetInput.fromObject(Map.of(
                 "message", "hello world")))
         .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.