Class: AWSCDK::StepFunctions::CatchProps

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

Overview

Error handler details.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(assign: nil, errors: nil, outputs: nil, result_path: nil) ⇒ CatchProps

Returns a new instance of CatchProps.

Parameters:

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

    Workflow variables to store in this step.

  • errors (Array<String>, nil) (defaults to: nil)

    Errors to recover from by going to the given state.

  • outputs (Object, nil) (defaults to: nil)

    This option for JSONata only.

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

    JSONPath expression to indicate where to inject the error data.



11
12
13
14
15
16
17
18
19
20
# File 'step_functions/catch_props.rb', line 11

def initialize(assign: nil, errors: nil, outputs: nil, result_path: nil)
  @assign = assign
  Jsii::Type.check_type(@assign, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "assign") unless @assign.nil?
  @errors = errors
  Jsii::Type.check_type(@errors, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "errors") unless @errors.nil?
  @outputs = outputs
  Jsii::Type.check_type(@outputs, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "outputs") unless @outputs.nil?
  @result_path = result_path
  Jsii::Type.check_type(@result_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resultPath") unless @result_path.nil?
end

Instance Attribute Details

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

Note:

Default: - Not assign variables

Workflow variables to store in this step.

Using workflow variables, you can store data in a step and retrieve that data in future steps.

Returns:

  • (Hash{String => Object}, nil)

See Also:



29
30
31
# File 'step_functions/catch_props.rb', line 29

def assign
  @assign
end

#errorsArray<String>? (readonly)

Note:

Default: All errors

Errors to recover from by going to the given state.

A list of error strings to retry, which can be either predefined errors (for example Errors.NoChoiceMatched) or a self-defined error.

Returns:

  • (Array<String>, nil)


37
38
39
# File 'step_functions/catch_props.rb', line 37

def errors
  @errors
end

#outputsObject? (readonly)

Note:

Default: - $states.result or $states.errorOutput

This option for JSONata only.

When you use JSONPath, then the state ignores this property. Used to specify and transform output from the state. When specified, the value overrides the state output default. The output field accepts any JSON value (object, array, string, number, boolean, null). Any string value, including those inside objects or arrays, will be evaluated as JSONata if surrounded by % characters. Output also accepts a JSONata expression directly.



51
52
53
# File 'step_functions/catch_props.rb', line 51

def outputs
  @outputs
end

#result_pathString? (readonly)

Note:

Default: $

JSONPath expression to indicate where to inject the error data.

May also be the special value JsonPath.DISCARD, which will cause the error data to be discarded.

Returns:

  • (String, nil)


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

def result_path
  @result_path
end

Class Method Details

.jsii_propertiesObject



61
62
63
64
65
66
67
68
# File 'step_functions/catch_props.rb', line 61

def self.jsii_properties
  {
    :assign => "assign",
    :errors => "errors",
    :outputs => "outputs",
    :result_path => "resultPath",
  }
end

Instance Method Details

#to_jsiiObject



70
71
72
73
74
75
76
77
78
79
# File 'step_functions/catch_props.rb', line 70

def to_jsii
  result = {}
  result.merge!({
    "assign" => @assign,
    "errors" => @errors,
    "outputs" => @outputs,
    "resultPath" => @result_path,
  })
  result.compact
end