@Generated(value="jsii-pacmak/1.46.0 (build cd08c55)", date="2021-11-25T20:11:08.082Z") @Stability(value=Experimental) public class TaskInput extends software.amazon.jsii.JsiiObject
Example:
Queue queue = new Queue(this, "Queue");
// Use a field from the execution data as message.
SqsSendMessage task1 = SqsSendMessage.Builder.create(this, "Send1")
.queue(queue)
.messageBody(TaskInput.fromJsonPathAt("$.message"))
.build();
// Combine a field from the execution data with
// a literal object.
SqsSendMessage task2 = SqsSendMessage.Builder.create(this, "Send2")
.queue(queue)
.messageBody(TaskInput.fromObject(Map.of(
"field1", "somedata",
"field2", JsonPath.stringAt("$.field2"))))
.build();
| Modifier | Constructor and Description |
|---|---|
protected |
TaskInput(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
TaskInput(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static TaskInput |
fromJsonPathAt(String path)
(experimental) Use a part of the execution data or task context as task input.
|
static TaskInput |
fromObject(Map<String,? extends Object> obj)
(experimental) Use an object as task input.
|
static TaskInput |
fromText(String text)
(experimental) Use a literal string as task input.
|
InputType |
getType()
(experimental) type of task input.
|
Object |
getValue()
(experimental) payload for the corresponding input type.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected TaskInput(software.amazon.jsii.JsiiObjectRef objRef)
protected TaskInput(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental) @NotNull public static TaskInput fromJsonPathAt(@NotNull String path)
Use this when you want to use a subobject or string from the current state machine execution or the current task context as complete payload to a task.
path - This parameter is required.@Stability(value=Experimental) @NotNull public static TaskInput fromObject(@NotNull Map<String,? extends Object> obj)
This object may contain JSON path fields as object values, if desired.
obj - This parameter is required.@Stability(value=Experimental) @NotNull public static TaskInput fromText(@NotNull String text)
This might be a JSON-encoded object, or just a text.
text - This parameter is required.@Stability(value=Experimental) @NotNull public InputType getType()
@Stability(value=Experimental) @NotNull public Object getValue()
It can be a JSON-encoded object, context, data, etc.
Copyright © 2021. All rights reserved.