Class: AWSCDK::Pipes::CfnPipe::ECSContainerOverrideProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Pipes::CfnPipe::ECSContainerOverrideProperty
- Defined in:
- pipes/cfn_pipe.rb
Overview
The overrides that are sent to a container.
An empty container override can be passed in. An example of an empty container override is {"containerOverrides": [ ] } . If a non-empty container override is specified, the name parameter must be included.
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 task definition.
-
#cpu ⇒ Numeric?
readonly
The number of
cpuunits reserved for the container, instead of the default value from the task definition. -
#environment ⇒ AWSCDK::IResolvable, ...
readonly
The environment variables to send to the container.
-
#environment_files ⇒ AWSCDK::IResolvable, ...
readonly
A list of files containing the environment variables to pass to a container, instead of the value from the container definition.
-
#memory ⇒ Numeric?
readonly
The hard limit (in MiB) of memory to present to the container, instead of the default value from the task definition.
-
#memory_reservation ⇒ Numeric?
readonly
The soft limit (in MiB) of memory to reserve for the container, instead of the default value from the task definition.
-
#name ⇒ String?
readonly
The name of the container that receives the override.
-
#resource_requirements ⇒ AWSCDK::IResolvable, ...
readonly
The type and amount of a resource to assign to a container, instead of the default value from the task definition.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(command: nil, cpu: nil, environment: nil, environment_files: nil, memory: nil, memory_reservation: nil, name: nil, resource_requirements: nil) ⇒ ECSContainerOverrideProperty
constructor
A new instance of ECSContainerOverrideProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(command: nil, cpu: nil, environment: nil, environment_files: nil, memory: nil, memory_reservation: nil, name: nil, resource_requirements: nil) ⇒ ECSContainerOverrideProperty
Returns a new instance of ECSContainerOverrideProperty.
1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 |
# File 'pipes/cfn_pipe.rb', line 1292 def initialize(command: nil, cpu: nil, environment: nil, environment_files: nil, memory: nil, memory_reservation: nil, name: nil, resource_requirements: nil) @command = command Jsii::Type.check_type(@command, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "command") unless @command.nil? @cpu = cpu Jsii::Type.check_type(@cpu, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "cpu") unless @cpu.nil? @environment = environment Jsii::Type.check_type(@environment, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcGlwZXMuQ2ZuUGlwZS5FY3NFbnZpcm9ubWVudFZhcmlhYmxlUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "environment") unless @environment.nil? @environment_files = environment_files Jsii::Type.check_type(@environment_files, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcGlwZXMuQ2ZuUGlwZS5FY3NFbnZpcm9ubWVudEZpbGVQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "environmentFiles") unless @environment_files.nil? @memory = memory Jsii::Type.check_type(@memory, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "memory") unless @memory.nil? @memory_reservation = memory_reservation Jsii::Type.check_type(@memory_reservation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "memoryReservation") unless @memory_reservation.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? @resource_requirements = resource_requirements Jsii::Type.check_type(@resource_requirements, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcGlwZXMuQ2ZuUGlwZS5FY3NSZXNvdXJjZVJlcXVpcmVtZW50UHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "resourceRequirements") unless @resource_requirements.nil? end |
Instance Attribute Details
#command ⇒ Array<String>? (readonly)
The command to send to the container that overrides the default command from the Docker image or the task definition.
You must also specify a container name.
1317 1318 1319 |
# File 'pipes/cfn_pipe.rb', line 1317 def command @command end |
#cpu ⇒ Numeric? (readonly)
The number of cpu units reserved for the container, instead of the default value from the task definition.
You must also specify a container name.
1324 1325 1326 |
# File 'pipes/cfn_pipe.rb', line 1324 def cpu @cpu end |
#environment ⇒ AWSCDK::IResolvable, ... (readonly)
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 task definition. You must also specify a container name.
1331 1332 1333 |
# File 'pipes/cfn_pipe.rb', line 1331 def environment @environment end |
#environment_files ⇒ AWSCDK::IResolvable, ... (readonly)
A list of files containing the environment variables to pass to a container, instead of the value from the container definition.
1336 1337 1338 |
# File 'pipes/cfn_pipe.rb', line 1336 def environment_files @environment_files end |
#memory ⇒ Numeric? (readonly)
The hard limit (in MiB) of memory to present to the container, instead of the default value from the task definition.
If your container attempts to exceed the memory specified here, the container is killed. You must also specify a container name.
1343 1344 1345 |
# File 'pipes/cfn_pipe.rb', line 1343 def memory @memory end |
#memory_reservation ⇒ Numeric? (readonly)
The soft limit (in MiB) of memory to reserve for the container, instead of the default value from the task definition.
You must also specify a container name.
1350 1351 1352 |
# File 'pipes/cfn_pipe.rb', line 1350 def memory_reservation @memory_reservation end |
#name ⇒ String? (readonly)
The name of the container that receives the override.
This parameter is required if any override is specified.
1357 1358 1359 |
# File 'pipes/cfn_pipe.rb', line 1357 def name @name end |
#resource_requirements ⇒ AWSCDK::IResolvable, ... (readonly)
The type and amount of a resource to assign to a container, instead of the default value from the task definition.
The only supported resource is a GPU.
1364 1365 1366 |
# File 'pipes/cfn_pipe.rb', line 1364 def resource_requirements @resource_requirements end |
Class Method Details
.jsii_properties ⇒ Object
1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 |
# File 'pipes/cfn_pipe.rb', line 1366 def self.jsii_properties { :command => "command", :cpu => "cpu", :environment => "environment", :environment_files => "environmentFiles", :memory => "memory", :memory_reservation => "memoryReservation", :name => "name", :resource_requirements => "resourceRequirements", } end |
Instance Method Details
#to_jsii ⇒ Object
1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 |
# File 'pipes/cfn_pipe.rb', line 1379 def to_jsii result = {} result.merge!({ "command" => @command, "cpu" => @cpu, "environment" => @environment, "environmentFiles" => @environment_files, "memory" => @memory, "memoryReservation" => @memory_reservation, "name" => @name, "resourceRequirements" => @resource_requirements, }) result.compact end |