Module: AWSCDK::StepFunctions::IStateMachine

Includes:
IAM::IGrantable, IResource, Interfaces::AWSStepfunctions::IStateMachineRef
Included in:
StateMachine
Defined in:
step_functions/i_state_machine.rb

Overview

A State Machine.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.jsii_overridable_methodsObject



252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# File 'step_functions/i_state_machine.rb', line 252

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :env => { kind: :property, name: "env", is_optional: false },
    :stack => { kind: :property, name: "stack", is_optional: false },
    :grant_principal => { kind: :property, name: "grantPrincipal", is_optional: false },
    :state_machine_ref => { kind: :property, name: "stateMachineRef", is_optional: false },
    :state_machine_arn => { kind: :property, name: "stateMachineArn", is_optional: false },
    :with => { kind: :method, name: "with", is_optional: false },
    :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false },
    :grant => { kind: :method, name: "grant", is_optional: false },
    :grant_execution => { kind: :method, name: "grantExecution", is_optional: false },
    :grant_read => { kind: :method, name: "grantRead", is_optional: false },
    :grant_redrive_execution => { kind: :method, name: "grantRedriveExecution", is_optional: false },
    :grant_start_execution => { kind: :method, name: "grantStartExecution", is_optional: false },
    :grant_start_sync_execution => { kind: :method, name: "grantStartSyncExecution", is_optional: false },
    :grant_task_response => { kind: :method, name: "grantTaskResponse", is_optional: false },
    :metric => { kind: :method, name: "metric", is_optional: false },
    :metric_aborted => { kind: :method, name: "metricAborted", is_optional: false },
    :metric_failed => { kind: :method, name: "metricFailed", is_optional: false },
    :metric_started => { kind: :method, name: "metricStarted", is_optional: false },
    :metric_succeeded => { kind: :method, name: "metricSucceeded", is_optional: false },
    :metric_throttled => { kind: :method, name: "metricThrottled", is_optional: false },
    :metric_time => { kind: :method, name: "metricTime", is_optional: false },
    :metric_timed_out => { kind: :method, name: "metricTimedOut", is_optional: false },
  }
end

Instance Method Details

#apply_removal_policy(policy) ⇒ void

This method returns an undefined value.

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:



86
87
88
89
# File 'step_functions/i_state_machine.rb', line 86

def apply_removal_policy(policy)
  Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy")
  jsii_call_method("applyRemovalPolicy", [policy])
end

#envAWSCDK::Interfaces::ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.



28
29
30
# File 'step_functions/i_state_machine.rb', line 28

def env()
  jsii_get_property("env")
end

#grant(identity, *actions) ⇒ AWSCDK::IAM::Grant

Grant the given identity custom permissions.

Parameters:

Returns:



96
97
98
99
100
101
102
# File 'step_functions/i_state_machine.rb', line 96

def grant(identity, *actions)
  Jsii::Type.check_type(identity, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "identity")
  actions.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actions[#{index}]")
  end
  jsii_call_method("grant", [identity, *actions])
end

#grant_execution(identity, *actions) ⇒ AWSCDK::IAM::Grant

Grant the given identity permissions for all executions of a state machine.

Parameters:

Returns:



109
110
111
112
113
114
115
# File 'step_functions/i_state_machine.rb', line 109

def grant_execution(identity, *actions)
  Jsii::Type.check_type(identity, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "identity")
  actions.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actions[#{index}]")
  end
  jsii_call_method("grantExecution", [identity, *actions])
end

#grant_principalAWSCDK::IAM::IPrincipal

The principal to grant permissions to.



42
43
44
# File 'step_functions/i_state_machine.rb', line 42

def grant_principal()
  jsii_get_property("grantPrincipal")
end

#grant_read(identity) ⇒ AWSCDK::IAM::Grant

Grant the given identity read permissions for this state machine.

Parameters:

Returns:



121
122
123
124
# File 'step_functions/i_state_machine.rb', line 121

def grant_read(identity)
  Jsii::Type.check_type(identity, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "identity")
  jsii_call_method("grantRead", [identity])
end

#grant_redrive_execution(identity) ⇒ AWSCDK::IAM::Grant

Grant the given identity permission to redrive the execution of the state machine.

Parameters:

Returns:



130
131
132
133
# File 'step_functions/i_state_machine.rb', line 130

def grant_redrive_execution(identity)
  Jsii::Type.check_type(identity, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "identity")
  jsii_call_method("grantRedriveExecution", [identity])
end

#grant_start_execution(identity) ⇒ AWSCDK::IAM::Grant

Grant the given identity permissions to start an execution of this state machine.

Parameters:

Returns:



139
140
141
142
# File 'step_functions/i_state_machine.rb', line 139

def grant_start_execution(identity)
  Jsii::Type.check_type(identity, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "identity")
  jsii_call_method("grantStartExecution", [identity])
end

#grant_start_sync_execution(identity) ⇒ AWSCDK::IAM::Grant

Grant the given identity permissions to start a synchronous execution of this state machine.

Parameters:

Returns:



148
149
150
151
# File 'step_functions/i_state_machine.rb', line 148

def grant_start_sync_execution(identity)
  Jsii::Type.check_type(identity, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "identity")
  jsii_call_method("grantStartSyncExecution", [identity])
end

#grant_task_response(identity) ⇒ AWSCDK::IAM::Grant

Grant the given identity read permissions for this state machine.

Parameters:

Returns:



157
158
159
160
# File 'step_functions/i_state_machine.rb', line 157

def grant_task_response(identity)
  Jsii::Type.check_type(identity, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "identity")
  jsii_call_method("grantTaskResponse", [identity])
end

#metric(metric_name, props = nil) ⇒ AWSCDK::CloudWatch::Metric

Note:

Default: - sum over 5 minutes

Return the given named metric for this State Machine's executions.

Parameters:

Returns:



168
169
170
171
172
173
# File 'step_functions/i_state_machine.rb', line 168

def metric(metric_name, props = nil)
  Jsii::Type.check_type(metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName")
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil?
  jsii_call_method("metric", [metric_name, props])
end

#metric_aborted(props = nil) ⇒ AWSCDK::CloudWatch::Metric

Note:

Default: - sum over 5 minutes

Metric for the number of executions that were aborted.

Parameters:

Returns:



180
181
182
183
184
# File 'step_functions/i_state_machine.rb', line 180

def metric_aborted(props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil?
  jsii_call_method("metricAborted", [props])
end

#metric_failed(props = nil) ⇒ AWSCDK::CloudWatch::Metric

Note:

Default: - sum over 5 minutes

Metric for the number of executions that failed.

Parameters:

Returns:



191
192
193
194
195
# File 'step_functions/i_state_machine.rb', line 191

def metric_failed(props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil?
  jsii_call_method("metricFailed", [props])
end

#metric_started(props = nil) ⇒ AWSCDK::CloudWatch::Metric

Note:

Default: - sum over 5 minutes

Metric for the number of executions that were started.

Parameters:

Returns:



202
203
204
205
206
# File 'step_functions/i_state_machine.rb', line 202

def metric_started(props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil?
  jsii_call_method("metricStarted", [props])
end

#metric_succeeded(props = nil) ⇒ AWSCDK::CloudWatch::Metric

Note:

Default: - sum over 5 minutes

Metric for the number of executions that succeeded.

Parameters:

Returns:



213
214
215
216
217
# File 'step_functions/i_state_machine.rb', line 213

def metric_succeeded(props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil?
  jsii_call_method("metricSucceeded", [props])
end

#metric_throttled(props = nil) ⇒ AWSCDK::CloudWatch::Metric

Note:

Default: sum over 5 minutes

Metric for the number of executions that were throttled.

Parameters:

Returns:



224
225
226
227
228
# File 'step_functions/i_state_machine.rb', line 224

def metric_throttled(props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil?
  jsii_call_method("metricThrottled", [props])
end

#metric_time(props = nil) ⇒ AWSCDK::CloudWatch::Metric

Note:

Default: - sum over 5 minutes

Metric for the interval, in milliseconds, between the time the execution starts and the time it closes.

Parameters:

Returns:



235
236
237
238
239
# File 'step_functions/i_state_machine.rb', line 235

def metric_time(props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil?
  jsii_call_method("metricTime", [props])
end

#metric_timed_out(props = nil) ⇒ AWSCDK::CloudWatch::Metric

Note:

Default: - sum over 5 minutes

Metric for the number of executions that timed out.

Parameters:

Returns:



246
247
248
249
250
# File 'step_functions/i_state_machine.rb', line 246

def metric_timed_out(props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil?
  jsii_call_method("metricTimedOut", [props])
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


13
14
15
# File 'step_functions/i_state_machine.rb', line 13

def node()
  jsii_get_property("node")
end

#stackAWSCDK::Stack

The stack in which this resource is defined.

Returns:



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

def stack()
  jsii_get_property("stack")
end

#state_machine_arnString

The ARN of the state machine.

Returns:

  • (String)


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

def state_machine_arn()
  jsii_get_property("stateMachineArn")
end

#state_machine_refAWSCDK::Interfaces::AWSStepfunctions::StateMachineReference

A reference to a StateMachine resource.



49
50
51
# File 'step_functions/i_state_machine.rb', line 49

def state_machine_ref()
  jsii_get_property("stateMachineRef")
end

#with(*mixins) ⇒ Constructs::IConstruct

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.

Parameters:

  • mixins (Array<Constructs::IMixin>)

    The mixins to apply.

Returns:

  • (Constructs::IConstruct)

    This construct for chaining



67
68
69
70
71
72
# File 'step_functions/i_state_machine.rb', line 67

def with(*mixins)
  mixins.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]")
  end
  jsii_call_method("with", [*mixins])
end