Class: AWSCDK::StepFunctions::TaskStateBaseOptions

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

Overview

Base options for all task states.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(credentials: nil, heartbeat: nil, heartbeat_timeout: nil, integration_pattern: nil, task_timeout: nil, timeout: nil) ⇒ TaskStateBaseOptions

Returns a new instance of TaskStateBaseOptions.

Parameters:



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

def initialize(credentials: nil, heartbeat: nil, heartbeat_timeout: nil, integration_pattern: nil, task_timeout: nil, timeout: nil)
  @credentials = credentials.is_a?(Hash) ? ::AWSCDK::StepFunctions::Credentials.new(**credentials.transform_keys(&:to_sym)) : credentials
  Jsii::Type.check_type(@credentials, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9ucy5DcmVkZW50aWFscyJ9")), "credentials") unless @credentials.nil?
  @heartbeat = heartbeat
  Jsii::Type.check_type(@heartbeat, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "heartbeat") unless @heartbeat.nil?
  @heartbeat_timeout = heartbeat_timeout
  Jsii::Type.check_type(@heartbeat_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9ucy5UaW1lb3V0In0=")), "heartbeatTimeout") unless @heartbeat_timeout.nil?
  @integration_pattern = integration_pattern
  Jsii::Type.check_type(@integration_pattern, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9ucy5JbnRlZ3JhdGlvblBhdHRlcm4ifQ==")), "integrationPattern") unless @integration_pattern.nil?
  @task_timeout = task_timeout
  Jsii::Type.check_type(@task_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9ucy5UaW1lb3V0In0=")), "taskTimeout") unless @task_timeout.nil?
  @timeout = timeout
  Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "timeout") unless @timeout.nil?
end

Instance Attribute Details

#credentialsAWSCDK::StepFunctions::Credentials? (readonly)

Note:

Default: - None (Task is executed using the State Machine's execution role)

Credentials for an IAM Role that the State Machine assumes for executing the task.

This enables cross-account resource invocations.



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

def credentials
  @credentials
end

#heartbeatAWSCDK::Duration? (readonly)

Deprecated.

use heartbeatTimeout

Note:

Default: - None

Timeout for the heartbeat.

Returns:



41
42
43
# File 'step_functions/task_state_base_options.rb', line 41

def heartbeat
  @heartbeat
end

#heartbeat_timeoutAWSCDK::StepFunctions::Timeout? (readonly)

Note:

Default: - None

Timeout for the heartbeat.

[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface



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

def heartbeat_timeout
  @heartbeat_timeout
end

#integration_patternAWSCDK::StepFunctions::IntegrationPattern? (readonly)

Note:

Default: - IntegrationPattern.REQUEST_RESPONSE for most tasks. IntegrationPattern.RUN_JOB for the following exceptions: BatchSubmitJob, EmrAddStep, EmrCreateCluster, EmrTerminationCluster, and EmrContainersStartJobRun.

AWS Step Functions integrates with services directly in the Amazon States Language.

You can control these AWS services using service integration patterns.

Depending on the AWS Service, the Service Integration Pattern availability will vary.



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

def integration_pattern
  @integration_pattern
end

#task_timeoutAWSCDK::StepFunctions::Timeout? (readonly)

Note:

Default: - None

Timeout for the task.

[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface



67
68
69
# File 'step_functions/task_state_base_options.rb', line 67

def task_timeout
  @task_timeout
end

#timeoutAWSCDK::Duration? (readonly)

Deprecated.

use taskTimeout

Note:

Default: - None

Timeout for the task.

Returns:



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

def timeout
  @timeout
end

Class Method Details

.jsii_propertiesObject



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

def self.jsii_properties
  {
    :credentials => "credentials",
    :heartbeat => "heartbeat",
    :heartbeat_timeout => "heartbeatTimeout",
    :integration_pattern => "integrationPattern",
    :task_timeout => "taskTimeout",
    :timeout => "timeout",
  }
end

Instance Method Details

#to_jsiiObject



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

def to_jsii
  result = {}
  result.merge!({
    "credentials" => @credentials,
    "heartbeat" => @heartbeat,
    "heartbeatTimeout" => @heartbeat_timeout,
    "integrationPattern" => @integration_pattern,
    "taskTimeout" => @task_timeout,
    "timeout" => @timeout,
  })
  result.compact
end