Class: AWSCDK::StepFunctionsTasks::ContainerOverrides
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::StepFunctionsTasks::ContainerOverrides
- Defined in:
- step_functions_tasks/container_overrides.rb
Overview
The overrides that should be sent to a container.
Instance Attribute Summary collapse
-
#command ⇒ Array<String>?
readonly
The command to send to the container that overrides the default command from the Docker image or the job definition.
-
#environment ⇒ Hash{String => String}?
readonly
The environment variables to send to the container.
-
#gpu_count ⇒ Numeric?
readonly
The number of physical GPUs to reserve for the container.
-
#instance_type ⇒ AWSCDK::EC2::InstanceType?
readonly
The instance type to use for a multi-node parallel job.
-
#memory ⇒ Numeric?
readonly
The number of MiB of memory reserved for the job.
-
#vcpus ⇒ Numeric?
readonly
The number of vCPUs to reserve for the container.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(command: nil, environment: nil, gpu_count: nil, instance_type: nil, memory: nil, vcpus: nil) ⇒ ContainerOverrides
constructor
A new instance of ContainerOverrides.
- #to_jsii ⇒ Object
Constructor Details
#initialize(command: nil, environment: nil, gpu_count: nil, instance_type: nil, memory: nil, vcpus: nil) ⇒ ContainerOverrides
Returns a new instance of ContainerOverrides.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'step_functions_tasks/container_overrides.rb', line 13 def initialize(command: nil, environment: nil, gpu_count: nil, instance_type: nil, memory: nil, vcpus: nil) @command = command Jsii::Type.check_type(@command, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "command") unless @command.nil? @environment = environment Jsii::Type.check_type(@environment, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "environment") unless @environment.nil? @gpu_count = gpu_count Jsii::Type.check_type(@gpu_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "gpuCount") unless @gpu_count.nil? @instance_type = instance_type Jsii::Type.check_type(@instance_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkluc3RhbmNlVHlwZSJ9")), "instanceType") unless @instance_type.nil? @memory = memory Jsii::Type.check_type(@memory, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "memory") unless @memory.nil? @vcpus = vcpus Jsii::Type.check_type(@vcpus, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "vcpus") unless @vcpus.nil? end |
Instance Attribute Details
#command ⇒ Array<String>? (readonly)
Default: - No command overrides
The command to send to the container that overrides the default command from the Docker image or the job definition.
32 33 34 |
# File 'step_functions_tasks/container_overrides.rb', line 32 def command @command end |
#environment ⇒ Hash{String => String}? (readonly)
Default: - No environment overrides
The environment variables to send to the container.
You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the job definition.
41 42 43 |
# File 'step_functions_tasks/container_overrides.rb', line 41 def environment @environment end |
#gpu_count ⇒ Numeric? (readonly)
Default: - No GPU reservation
The number of physical GPUs to reserve for the container.
The number of GPUs reserved for all containers in a job should not exceed the number of available GPUs on the compute resource that the job is launched on.
50 51 52 |
# File 'step_functions_tasks/container_overrides.rb', line 50 def gpu_count @gpu_count end |
#instance_type ⇒ AWSCDK::EC2::InstanceType? (readonly)
Default: - No instance type overrides
The instance type to use for a multi-node parallel job.
This parameter is not valid for single-node container jobs.
57 58 59 |
# File 'step_functions_tasks/container_overrides.rb', line 57 def instance_type @instance_type end |
#memory ⇒ Numeric? (readonly)
Default: - No memory overrides
The number of MiB of memory reserved for the job.
This value overrides the value set in the job definition.
64 65 66 |
# File 'step_functions_tasks/container_overrides.rb', line 64 def memory @memory end |
#vcpus ⇒ Numeric? (readonly)
Default: - No vCPUs overrides
The number of vCPUs to reserve for the container.
This value overrides the value set in the job definition.
71 72 73 |
# File 'step_functions_tasks/container_overrides.rb', line 71 def vcpus @vcpus end |
Class Method Details
.jsii_properties ⇒ Object
73 74 75 76 77 78 79 80 81 82 |
# File 'step_functions_tasks/container_overrides.rb', line 73 def self.jsii_properties { :command => "command", :environment => "environment", :gpu_count => "gpuCount", :instance_type => "instanceType", :memory => "memory", :vcpus => "vcpus", } end |
Instance Method Details
#to_jsii ⇒ Object
84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'step_functions_tasks/container_overrides.rb', line 84 def to_jsii result = {} result.merge!({ "command" => @command, "environment" => @environment, "gpuCount" => @gpu_count, "instanceType" => @instance_type, "memory" => @memory, "vcpus" => @vcpus, }) result.compact end |