Class: AWSCDK::StepFunctions::MapBaseJsonPathOptions

Inherits:
JsonPathCommonOptions
  • Object
show all
Defined in:
step_functions/map_base_json_path_options.rb

Overview

Base properties for defining a Map state that using JSONPath.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input_path: nil, output_path: nil, items_path: nil, max_concurrency_path: nil, result_path: nil, result_selector: nil) ⇒ MapBaseJsonPathOptions

Returns a new instance of MapBaseJsonPathOptions.

Parameters:

  • input_path (String, nil) (defaults to: nil)

    JSONPath expression to select part of the state to be the input to this state.

  • output_path (String, nil) (defaults to: nil)

    JSONPath expression to select part of the state to be the output to this state.

  • items_path (String, nil) (defaults to: nil)

    JSONPath expression to select the array to iterate over.

  • max_concurrency_path (String, nil) (defaults to: nil)

    MaxConcurrencyPath.

  • result_path (String, nil) (defaults to: nil)

    JSONPath expression to indicate where to inject the state's output.

  • result_selector (Hash{String => Object}, nil) (defaults to: nil)

    The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'step_functions/map_base_json_path_options.rb', line 13

def initialize(input_path: nil, output_path: nil, items_path: nil, max_concurrency_path: nil, result_path: nil, result_selector: nil)
  @input_path = input_path
  Jsii::Type.check_type(@input_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "inputPath") unless @input_path.nil?
  @output_path = output_path
  Jsii::Type.check_type(@output_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "outputPath") unless @output_path.nil?
  @items_path = items_path
  Jsii::Type.check_type(@items_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "itemsPath") unless @items_path.nil?
  @max_concurrency_path = max_concurrency_path
  Jsii::Type.check_type(@max_concurrency_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "maxConcurrencyPath") unless @max_concurrency_path.nil?
  @result_path = result_path
  Jsii::Type.check_type(@result_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resultPath") unless @result_path.nil?
  @result_selector = result_selector
  Jsii::Type.check_type(@result_selector, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "resultSelector") unless @result_selector.nil?
end

Instance Attribute Details

#input_pathString? (readonly)

Note:

Default: $

JSONPath expression to select part of the state to be the input to this state.

May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}.

Returns:

  • (String, nil)


35
36
37
# File 'step_functions/map_base_json_path_options.rb', line 35

def input_path
  @input_path
end

#items_pathString? (readonly)

Note:

Default: $

JSONPath expression to select the array to iterate over.

Returns:

  • (String, nil)


48
49
50
# File 'step_functions/map_base_json_path_options.rb', line 48

def items_path
  @items_path
end

#max_concurrency_pathString? (readonly)

Note:

Default: - full concurrency

MaxConcurrencyPath.

A JsonPath that specifies the maximum concurrency dynamically from the state input.



56
57
58
# File 'step_functions/map_base_json_path_options.rb', line 56

def max_concurrency_path
  @max_concurrency_path
end

#output_pathString? (readonly)

Note:

Default: $

JSONPath expression to select part of the state to be the output to this state.

May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}.

Returns:

  • (String, nil)


43
44
45
# File 'step_functions/map_base_json_path_options.rb', line 43

def output_path
  @output_path
end

#result_pathString? (readonly)

Note:

Default: $

JSONPath expression to indicate where to inject the state's output.

May also be the special value JsonPath.DISCARD, which will cause the state's input to become its output.

Returns:

  • (String, nil)


64
65
66
# File 'step_functions/map_base_json_path_options.rb', line 64

def result_path
  @result_path
end

#result_selectorHash{String => Object}? (readonly)

Note:

Default: - None

The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.

You can use ResultSelector to create a payload with values that are static or selected from the state's raw result.



73
74
75
# File 'step_functions/map_base_json_path_options.rb', line 73

def result_selector
  @result_selector
end

Class Method Details

.jsii_propertiesObject



75
76
77
78
79
80
81
82
83
84
# File 'step_functions/map_base_json_path_options.rb', line 75

def self.jsii_properties
  {
    :input_path => "inputPath",
    :output_path => "outputPath",
    :items_path => "itemsPath",
    :max_concurrency_path => "maxConcurrencyPath",
    :result_path => "resultPath",
    :result_selector => "resultSelector",
  }
end

Instance Method Details

#to_jsiiObject



86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'step_functions/map_base_json_path_options.rb', line 86

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "inputPath" => @input_path,
    "outputPath" => @output_path,
    "itemsPath" => @items_path,
    "maxConcurrencyPath" => @max_concurrency_path,
    "resultPath" => @result_path,
    "resultSelector" => @result_selector,
  })
  result.compact
end