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
ModifierConstructorDescriptionprotected
protected
RuleTargetInput
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
RuleTargetInput
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionabstract RuleTargetInputProperties
Return the input properties for this input object.static RuleTargetInput
fromEventPath
(String path) Take the event target input from a path in the event JSON.static RuleTargetInput
fromMultilineText
(String text) Pass text to the event target, splitting on newlines.static RuleTargetInput
fromObject
(Object obj) Pass a JSON object to the event target.static RuleTargetInput
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
Take the event target input from a path in the event JSON.- Parameters:
path
- This parameter is required.
-
fromMultilineText
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
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
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
Return the input properties for this input object.- Parameters:
rule
- This parameter is required.
-