Class: AWSCDK::StepFunctions::StateMachineProps

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

Overview

Properties for defining a State Machine.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(comment: nil, definition: nil, definition_body: nil, definition_substitutions: nil, encryption_configuration: nil, logs: nil, query_language: nil, removal_policy: nil, role: nil, state_machine_name: nil, state_machine_type: nil, timeout: nil, tracing_enabled: nil) ⇒ StateMachineProps

Returns a new instance of StateMachineProps.

Parameters:

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

    Comment that describes this state machine.

  • definition (AWSCDK::StepFunctions::IChainable, nil) (defaults to: nil)

    Definition for this state machine.

  • definition_body (AWSCDK::StepFunctions::DefinitionBody, nil) (defaults to: nil)

    Definition for this state machine.

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

    substitutions for the definition body as a key-value map.

  • encryption_configuration (AWSCDK::StepFunctions::EncryptionConfiguration, nil) (defaults to: nil)

    Configures server-side encryption of the state machine definition and execution history.

  • logs (AWSCDK::StepFunctions::LogOptions, nil) (defaults to: nil)

    Defines what execution history events are logged and where they are logged.

  • query_language (AWSCDK::StepFunctions::QueryLanguage, nil) (defaults to: nil)

    The name of the query language used by the state machine.

  • removal_policy (AWSCDK::RemovalPolicy, nil) (defaults to: nil)

    The removal policy to apply to state machine.

  • role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    The execution role for the state machine service.

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

    A name for the state machine.

  • state_machine_type (AWSCDK::StepFunctions::StateMachineType, nil) (defaults to: nil)

    Type of the state machine.

  • timeout (AWSCDK::Duration, nil) (defaults to: nil)

    Maximum run time for this state machine.

  • tracing_enabled (Boolean, nil) (defaults to: nil)

    Specifies whether Amazon X-Ray tracing is enabled for this state machine.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'step_functions/state_machine_props.rb', line 20

def initialize(comment: nil, definition: nil, definition_body: nil, definition_substitutions: nil, encryption_configuration: nil, logs: nil, query_language: nil, removal_policy: nil, role: nil, state_machine_name: nil, state_machine_type: nil, timeout: nil, tracing_enabled: nil)
  @comment = comment
  Jsii::Type.check_type(@comment, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "comment") unless @comment.nil?
  @definition = definition
  Jsii::Type.check_type(@definition, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9ucy5JQ2hhaW5hYmxlIn0=")), "definition") unless @definition.nil?
  @definition_body = definition_body
  Jsii::Type.check_type(@definition_body, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9ucy5EZWZpbml0aW9uQm9keSJ9")), "definitionBody") unless @definition_body.nil?
  @definition_substitutions = definition_substitutions
  Jsii::Type.check_type(@definition_substitutions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "definitionSubstitutions") unless @definition_substitutions.nil?
  @encryption_configuration = encryption_configuration
  Jsii::Type.check_type(@encryption_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9ucy5FbmNyeXB0aW9uQ29uZmlndXJhdGlvbiJ9")), "encryptionConfiguration") unless @encryption_configuration.nil?
  @logs = logs.is_a?(Hash) ? ::AWSCDK::StepFunctions::LogOptions.new(**logs.transform_keys(&:to_sym)) : logs
  Jsii::Type.check_type(@logs, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9ucy5Mb2dPcHRpb25zIn0=")), "logs") unless @logs.nil?
  @query_language = query_language
  Jsii::Type.check_type(@query_language, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9ucy5RdWVyeUxhbmd1YWdlIn0=")), "queryLanguage") unless @query_language.nil?
  @removal_policy = removal_policy
  Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil?
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil?
  @state_machine_name = state_machine_name
  Jsii::Type.check_type(@state_machine_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stateMachineName") unless @state_machine_name.nil?
  @state_machine_type = state_machine_type
  Jsii::Type.check_type(@state_machine_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9ucy5TdGF0ZU1hY2hpbmVUeXBlIn0=")), "stateMachineType") unless @state_machine_type.nil?
  @timeout = timeout
  Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "timeout") unless @timeout.nil?
  @tracing_enabled = tracing_enabled
  Jsii::Type.check_type(@tracing_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "tracingEnabled") unless @tracing_enabled.nil?
end

Instance Attribute Details

#commentString? (readonly)

Note:

Default: - No comment

Comment that describes this state machine.

Returns:

  • (String, nil)


53
54
55
# File 'step_functions/state_machine_props.rb', line 53

def comment
  @comment
end

#definitionAWSCDK::StepFunctions::IChainable? (readonly)

Deprecated.

use definitionBody: DefinitionBody.fromChainable()

Definition for this state machine.



58
59
60
# File 'step_functions/state_machine_props.rb', line 58

def definition
  @definition
end

#definition_bodyAWSCDK::StepFunctions::DefinitionBody? (readonly)

Definition for this state machine.



62
63
64
# File 'step_functions/state_machine_props.rb', line 62

def definition_body
  @definition_body
end

#definition_substitutionsHash{String => String}? (readonly)

substitutions for the definition body as a key-value map.

Returns:

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


66
67
68
# File 'step_functions/state_machine_props.rb', line 66

def definition_substitutions
  @definition_substitutions
end

#encryption_configurationAWSCDK::StepFunctions::EncryptionConfiguration? (readonly)

Note:

Default: - data is transparently encrypted using an AWS owned key

Configures server-side encryption of the state machine definition and execution history.



71
72
73
# File 'step_functions/state_machine_props.rb', line 71

def encryption_configuration
  @encryption_configuration
end

#logsAWSCDK::StepFunctions::LogOptions? (readonly)

Note:

Default: No logging

Defines what execution history events are logged and where they are logged.



76
77
78
# File 'step_functions/state_machine_props.rb', line 76

def logs
  @logs
end

#query_languageAWSCDK::StepFunctions::QueryLanguage? (readonly)

Note:

Default: - JSON_PATH

The name of the query language used by the state machine.

If the state does not contain a query_language field, then it will use the query language specified in this query_language field.



84
85
86
# File 'step_functions/state_machine_props.rb', line 84

def query_language
  @query_language
end

#removal_policyAWSCDK::RemovalPolicy? (readonly)

Note:

Default: RemovalPolicy.DESTROY

The removal policy to apply to state machine.

Returns:



89
90
91
# File 'step_functions/state_machine_props.rb', line 89

def removal_policy
  @removal_policy
end

#roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: A role is automatically created

The execution role for the state machine service.

Returns:



94
95
96
# File 'step_functions/state_machine_props.rb', line 94

def role
  @role
end

#state_machine_nameString? (readonly)

Note:

Default: A name is automatically generated

A name for the state machine.

Returns:

  • (String, nil)


99
100
101
# File 'step_functions/state_machine_props.rb', line 99

def state_machine_name
  @state_machine_name
end

#state_machine_typeAWSCDK::StepFunctions::StateMachineType? (readonly)

Note:

Default: StateMachineType.STANDARD

Type of the state machine.



104
105
106
# File 'step_functions/state_machine_props.rb', line 104

def state_machine_type
  @state_machine_type
end

#timeoutAWSCDK::Duration? (readonly)

Note:

Default: No timeout

Maximum run time for this state machine.

Returns:



109
110
111
# File 'step_functions/state_machine_props.rb', line 109

def timeout
  @timeout
end

#tracing_enabledBoolean? (readonly)

Note:

Default: false

Specifies whether Amazon X-Ray tracing is enabled for this state machine.

Returns:

  • (Boolean, nil)


114
115
116
# File 'step_functions/state_machine_props.rb', line 114

def tracing_enabled
  @tracing_enabled
end

Class Method Details

.jsii_propertiesObject



116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'step_functions/state_machine_props.rb', line 116

def self.jsii_properties
  {
    :comment => "comment",
    :definition => "definition",
    :definition_body => "definitionBody",
    :definition_substitutions => "definitionSubstitutions",
    :encryption_configuration => "encryptionConfiguration",
    :logs => "logs",
    :query_language => "queryLanguage",
    :removal_policy => "removalPolicy",
    :role => "role",
    :state_machine_name => "stateMachineName",
    :state_machine_type => "stateMachineType",
    :timeout => "timeout",
    :tracing_enabled => "tracingEnabled",
  }
end

Instance Method Details

#to_jsiiObject



134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# File 'step_functions/state_machine_props.rb', line 134

def to_jsii
  result = {}
  result.merge!({
    "comment" => @comment,
    "definition" => @definition,
    "definitionBody" => @definition_body,
    "definitionSubstitutions" => @definition_substitutions,
    "encryptionConfiguration" => @encryption_configuration,
    "logs" => @logs,
    "queryLanguage" => @query_language,
    "removalPolicy" => @removal_policy,
    "role" => @role,
    "stateMachineName" => @state_machine_name,
    "stateMachineType" => @state_machine_type,
    "timeout" => @timeout,
    "tracingEnabled" => @tracing_enabled,
  })
  result.compact
end