Class: AWSCDK::StepFunctionsTasks::ECSEC2LaunchTarget

Inherits:
Jsii::Object
  • Object
show all
Includes:
IECSLaunchTarget
Defined in:
step_functions_tasks/ecsec2_launch_target.rb

Overview

Configuration for running an ECS task on EC2.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = nil) ⇒ ECSEC2LaunchTarget

Returns a new instance of ECSEC2LaunchTarget.

Parameters:



12
13
14
15
16
# File 'step_functions_tasks/ecsec2_launch_target.rb', line 12

def initialize(options = nil)
  options = options.is_a?(Hash) ? ::AWSCDK::StepFunctionsTasks::ECSEC2LaunchTargetOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9uc190YXNrcy5FY3NFYzJMYXVuY2hUYXJnZXRPcHRpb25zIn0=")), "options") unless options.nil?
  Jsii::Object.instance_method(:initialize).bind(self).call(options)
end

Class Method Details

.jsii_overridable_methodsObject



18
19
20
21
22
# File 'step_functions_tasks/ecsec2_launch_target.rb', line 18

def self.jsii_overridable_methods
  {
    :bind => { kind: :method, name: "bind", is_optional: false },
  }
end

Instance Method Details

#bind(task, launch_target_options) ⇒ AWSCDK::StepFunctionsTasks::ECSLaunchTargetConfig

Called when the EC2 launch type is configured on RunTask.



29
30
31
32
33
34
# File 'step_functions_tasks/ecsec2_launch_target.rb', line 29

def bind(task, launch_target_options)
  Jsii::Type.check_type(task, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9uc190YXNrcy5FY3NSdW5UYXNrIn0=")), "task")
  launch_target_options = launch_target_options.is_a?(Hash) ? ::AWSCDK::StepFunctionsTasks::LaunchTargetBindOptions.new(**launch_target_options.transform_keys(&:to_sym)) : launch_target_options
  Jsii::Type.check_type(launch_target_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9uc190YXNrcy5MYXVuY2hUYXJnZXRCaW5kT3B0aW9ucyJ9")), "launchTargetOptions")
  jsii_call_method("bind", [task, launch_target_options])
end