Class: AWSCDK::Pipes::CfnPipe::BatchContainerOverridesProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
pipes/cfn_pipe.rb

Overview

The overrides that are sent to a container.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command: nil, environment: nil, instance_type: nil, resource_requirements: nil) ⇒ BatchContainerOverridesProperty

Returns a new instance of BatchContainerOverridesProperty.

Parameters:



812
813
814
815
816
817
818
819
820
821
# File 'pipes/cfn_pipe.rb', line 812

def initialize(command: nil, environment: nil, instance_type: nil, resource_requirements: 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("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcGlwZXMuQ2ZuUGlwZS5CYXRjaEVudmlyb25tZW50VmFyaWFibGVQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "environment") unless @environment.nil?
  @instance_type = instance_type
  Jsii::Type.check_type(@instance_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceType") unless @instance_type.nil?
  @resource_requirements = resource_requirements
  Jsii::Type.check_type(@resource_requirements, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcGlwZXMuQ2ZuUGlwZS5CYXRjaFJlc291cmNlUmVxdWlyZW1lbnRQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "resourceRequirements") unless @resource_requirements.nil?
end

Instance Attribute Details

#commandArray<String>? (readonly)

The command to send to the container that overrides the default command from the Docker image or the task definition.



827
828
829
# File 'pipes/cfn_pipe.rb', line 827

def command
  @command
end

#environmentAWSCDK::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.

Environment variables cannot start with " AWS Batch ". This naming convention is reserved for variables that AWS Batch sets.



836
837
838
# File 'pipes/cfn_pipe.rb', line 836

def environment
  @environment
end

#instance_typeString? (readonly)

The instance type to use for a multi-node parallel job.

This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and shouldn't be provided.



843
844
845
# File 'pipes/cfn_pipe.rb', line 843

def instance_type
  @instance_type
end

#resource_requirementsAWSCDK::IResolvable, ... (readonly)

The type and amount of resources to assign to a container.

This overrides the settings in the job definition. The supported resources include GPU , MEMORY , and VCPU .



850
851
852
# File 'pipes/cfn_pipe.rb', line 850

def resource_requirements
  @resource_requirements
end

Class Method Details

.jsii_propertiesObject



852
853
854
855
856
857
858
859
# File 'pipes/cfn_pipe.rb', line 852

def self.jsii_properties
  {
    :command => "command",
    :environment => "environment",
    :instance_type => "instanceType",
    :resource_requirements => "resourceRequirements",
  }
end

Instance Method Details

#to_jsiiObject



861
862
863
864
865
866
867
868
869
870
# File 'pipes/cfn_pipe.rb', line 861

def to_jsii
  result = {}
  result.merge!({
    "command" => @command,
    "environment" => @environment,
    "instanceType" => @instance_type,
    "resourceRequirements" => @resource_requirements,
  })
  result.compact
end