Class: AWSCDK::StepFunctions::TaskInput
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::StepFunctions::TaskInput
- Defined in:
- step_functions/task_input.rb
Overview
Type union for task classes that accept multiple types of payload.
Class Method Summary collapse
-
.from_json_path_at(path) ⇒ AWSCDK::StepFunctions::TaskInput
Use a part of the execution data or task context as task input.
-
.from_object(obj) ⇒ AWSCDK::StepFunctions::TaskInput
Use an object as task input.
-
.from_text(text) ⇒ AWSCDK::StepFunctions::TaskInput
Use a literal string as task input.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#initialize(*args) ⇒ TaskInput
constructor
A new instance of TaskInput.
-
#type ⇒ AWSCDK::StepFunctions::InputType
type of task input.
-
#value ⇒ Object
payload for the corresponding input type.
Constructor Details
#initialize(*args) ⇒ TaskInput
Returns a new instance of TaskInput.
8 9 10 |
# File 'step_functions/task_input.rb', line 8 def initialize(*args) raise NoMethodError, "aws-cdk-lib.aws_stepfunctions.TaskInput does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.from_json_path_at(path) ⇒ AWSCDK::StepFunctions::TaskInput
Use a part of the execution data or task context as task input.
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.
27 28 29 30 |
# File 'step_functions/task_input.rb', line 27 def self.from_json_path_at(path) Jsii::Type.check_type(path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_stepfunctions.TaskInput", "fromJsonPathAt", [path]) end |
.from_object(obj) ⇒ AWSCDK::StepFunctions::TaskInput
Use an object as task input.
This object may contain JSON path fields as object values, if desired.
Use sfn.JsonPath.DISCARD in place of null for languages that do not support null (i.e. Python).
40 41 42 43 |
# File 'step_functions/task_input.rb', line 40 def self.from_object(obj) Jsii::Type.check_type(obj, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "obj") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_stepfunctions.TaskInput", "fromObject", [obj]) end |
.from_text(text) ⇒ AWSCDK::StepFunctions::TaskInput
Use a literal string as task input.
This might be a JSON-encoded object, or just a text.
51 52 53 54 |
# File 'step_functions/task_input.rb', line 51 def self.from_text(text) Jsii::Type.check_type(text, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "text") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_stepfunctions.TaskInput", "fromText", [text]) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 17 |
# File 'step_functions/task_input.rb', line 12 def self.jsii_overridable_methods { :type => { kind: :property, name: "type", is_optional: false }, :value => { kind: :property, name: "value", is_optional: false }, } end |
Instance Method Details
#type ⇒ AWSCDK::StepFunctions::InputType
type of task input.
59 60 61 |
# File 'step_functions/task_input.rb', line 59 def type() jsii_get_property("type") end |
#value ⇒ Object
payload for the corresponding input type.
It can be a JSON-encoded object, context, data, etc.
68 69 70 |
# File 'step_functions/task_input.rb', line 68 def value() jsii_get_property("value") end |