Class: AWSCDK::Batch::MultiNodeContainer
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Batch::MultiNodeContainer
- Defined in:
- batch/multi_node_container.rb
Overview
Runs the container on nodes [startNode, endNode].
Instance Attribute Summary collapse
-
#container ⇒ AWSCDK::Batch::IECSContainerDefinition
readonly
The container that this node range will run.
-
#end_node ⇒ Numeric
readonly
The index of the last node to run this container.
-
#start_node ⇒ Numeric
readonly
The index of the first node to run this container.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(container:, end_node:, start_node:) ⇒ MultiNodeContainer
constructor
A new instance of MultiNodeContainer.
- #to_jsii ⇒ Object
Constructor Details
#initialize(container:, end_node:, start_node:) ⇒ MultiNodeContainer
Returns a new instance of MultiNodeContainer.
10 11 12 13 14 15 16 17 |
# File 'batch/multi_node_container.rb', line 10 def initialize(container:, end_node:, start_node:) @container = container Jsii::Type.check_type(@container, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guSUVjc0NvbnRhaW5lckRlZmluaXRpb24ifQ==")), "container") @end_node = end_node Jsii::Type.check_type(@end_node, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "endNode") @start_node = start_node Jsii::Type.check_type(@start_node, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "startNode") end |
Instance Attribute Details
#container ⇒ AWSCDK::Batch::IECSContainerDefinition (readonly)
The container that this node range will run.
22 23 24 |
# File 'batch/multi_node_container.rb', line 22 def container @container end |
#end_node ⇒ Numeric (readonly)
The index of the last node to run this container.
The container is run on all nodes in the range startNode, endNode
28 29 30 |
# File 'batch/multi_node_container.rb', line 28 def end_node @end_node end |
#start_node ⇒ Numeric (readonly)
The index of the first node to run this container.
The container is run on all nodes in the range startNode, endNode
34 35 36 |
# File 'batch/multi_node_container.rb', line 34 def start_node @start_node end |
Class Method Details
.jsii_properties ⇒ Object
36 37 38 39 40 41 42 |
# File 'batch/multi_node_container.rb', line 36 def self.jsii_properties { :container => "container", :end_node => "endNode", :start_node => "startNode", } end |
Instance Method Details
#to_jsii ⇒ Object
44 45 46 47 48 49 50 51 52 |
# File 'batch/multi_node_container.rb', line 44 def to_jsii result = {} result.merge!({ "container" => @container, "endNode" => @end_node, "startNode" => @start_node, }) result.compact end |