Class: AWSCDK::StepFunctions::TaskInput

Inherits:
Jsii::Object
  • Object
show all
Defined in:
step_functions/task_input.rb

Overview

Type union for task classes that accept multiple types of payload.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ TaskInput

Returns a new instance of TaskInput.

Raises:

  • (NoMethodError)


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.

Parameters:

  • path (String)

Returns:

  • (AWSCDK::StepFunctions::TaskInput)


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).

Parameters:

  • obj (Hash{String => Object})

Returns:

  • (AWSCDK::StepFunctions::TaskInput)


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.

Parameters:

  • text (String)

Returns:

  • (AWSCDK::StepFunctions::TaskInput)


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_methodsObject



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

#typeAWSCDK::StepFunctions::InputType

type of task input.



59
60
61
# File 'step_functions/task_input.rb', line 59

def type()
  jsii_get_property("type")
end

#valueObject

payload for the corresponding input type.

It can be a JSON-encoded object, context, data, etc.

Returns:

  • (Object)


68
69
70
# File 'step_functions/task_input.rb', line 68

def value()
  jsii_get_property("value")
end