Class: AWSCDK::Batch::CfnJobDefinition::ContainerPropertiesProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
batch/cfn_job_definition.rb

Overview

Container properties are used for Amazon ECS based job definitions.

These properties to describe the container that's launched as part of a job.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(image:, command: nil, enable_execute_command: nil, environment: nil, ephemeral_storage: nil, execution_role_arn: nil, fargate_platform_configuration: nil, instance_type: nil, job_role_arn: nil, linux_parameters: nil, log_configuration: nil, memory: nil, mount_points: nil, network_configuration: nil, privileged: nil, readonly_root_filesystem: nil, repository_credentials: nil, resource_requirements: nil, runtime_platform: nil, secrets: nil, ulimits: nil, user: nil, vcpus: nil, volumes: nil) ⇒ ContainerPropertiesProperty

Returns a new instance of ContainerPropertiesProperty.

Parameters:



846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
# File 'batch/cfn_job_definition.rb', line 846

def initialize(image:, command: nil, enable_execute_command: nil, environment: nil, ephemeral_storage: nil, execution_role_arn: nil, fargate_platform_configuration: nil, instance_type: nil, job_role_arn: nil, linux_parameters: nil, log_configuration: nil, memory: nil, mount_points: nil, network_configuration: nil, privileged: nil, readonly_root_filesystem: nil, repository_credentials: nil, resource_requirements: nil, runtime_platform: nil, secrets: nil, ulimits: nil, user: nil, vcpus: nil, volumes: nil)
  @image = image
  Jsii::Type.check_type(@image, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "image")
  @command = command
  Jsii::Type.check_type(@command, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "command") unless @command.nil?
  @enable_execute_command = enable_execute_command
  Jsii::Type.check_type(@enable_execute_command, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableExecuteCommand") unless @enable_execute_command.nil?
  @environment = environment
  Jsii::Type.check_type(@environment, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guQ2ZuSm9iRGVmaW5pdGlvbi5FbnZpcm9ubWVudFByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "environment") unless @environment.nil?
  @ephemeral_storage = ephemeral_storage.is_a?(Hash) ? ::AWSCDK::Batch::CfnJobDefinition::EphemeralStorageProperty.new(**ephemeral_storage.transform_keys(&:to_sym)) : ephemeral_storage
  Jsii::Type.check_type(@ephemeral_storage, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iYXRjaC5DZm5Kb2JEZWZpbml0aW9uLkVwaGVtZXJhbFN0b3JhZ2VQcm9wZXJ0eSJ9XX19")), "ephemeralStorage") unless @ephemeral_storage.nil?
  @execution_role_arn = execution_role_arn
  Jsii::Type.check_type(@execution_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "executionRoleArn") unless @execution_role_arn.nil?
  @fargate_platform_configuration = fargate_platform_configuration.is_a?(Hash) ? ::AWSCDK::Batch::CfnJobDefinition::FargatePlatformConfigurationProperty.new(**fargate_platform_configuration.transform_keys(&:to_sym)) : fargate_platform_configuration
  Jsii::Type.check_type(@fargate_platform_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iYXRjaC5DZm5Kb2JEZWZpbml0aW9uLkZhcmdhdGVQbGF0Zm9ybUNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "fargatePlatformConfiguration") unless @fargate_platform_configuration.nil?
  @instance_type = instance_type
  Jsii::Type.check_type(@instance_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceType") unless @instance_type.nil?
  @job_role_arn = job_role_arn
  Jsii::Type.check_type(@job_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "jobRoleArn") unless @job_role_arn.nil?
  @linux_parameters = linux_parameters.is_a?(Hash) ? ::AWSCDK::Batch::CfnJobDefinition::LinuxParametersProperty.new(**linux_parameters.transform_keys(&:to_sym)) : linux_parameters
  Jsii::Type.check_type(@linux_parameters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iYXRjaC5DZm5Kb2JEZWZpbml0aW9uLkxpbnV4UGFyYW1ldGVyc1Byb3BlcnR5In1dfX0=")), "linuxParameters") unless @linux_parameters.nil?
  @log_configuration = log_configuration.is_a?(Hash) ? ::AWSCDK::Batch::CfnJobDefinition::LogConfigurationProperty.new(**log_configuration.transform_keys(&:to_sym)) : log_configuration
  Jsii::Type.check_type(@log_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iYXRjaC5DZm5Kb2JEZWZpbml0aW9uLkxvZ0NvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "logConfiguration") unless @log_configuration.nil?
  @memory = memory
  Jsii::Type.check_type(@memory, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "memory") unless @memory.nil?
  @mount_points = mount_points
  Jsii::Type.check_type(@mount_points, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guQ2ZuSm9iRGVmaW5pdGlvbi5Nb3VudFBvaW50c1Byb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "mountPoints") unless @mount_points.nil?
  @network_configuration = network_configuration.is_a?(Hash) ? ::AWSCDK::Batch::CfnJobDefinition::NetworkConfigurationProperty.new(**network_configuration.transform_keys(&:to_sym)) : network_configuration
  Jsii::Type.check_type(@network_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iYXRjaC5DZm5Kb2JEZWZpbml0aW9uLk5ldHdvcmtDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "networkConfiguration") unless @network_configuration.nil?
  @privileged = privileged
  Jsii::Type.check_type(@privileged, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "privileged") unless @privileged.nil?
  @readonly_root_filesystem = readonly_root_filesystem
  Jsii::Type.check_type(@readonly_root_filesystem, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "readonlyRootFilesystem") unless @readonly_root_filesystem.nil?
  @repository_credentials = repository_credentials.is_a?(Hash) ? ::AWSCDK::Batch::CfnJobDefinition::RepositoryCredentialsProperty.new(**repository_credentials.transform_keys(&:to_sym)) : repository_credentials
  Jsii::Type.check_type(@repository_credentials, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iYXRjaC5DZm5Kb2JEZWZpbml0aW9uLlJlcG9zaXRvcnlDcmVkZW50aWFsc1Byb3BlcnR5In1dfX0=")), "repositoryCredentials") unless @repository_credentials.nil?
  @resource_requirements = resource_requirements
  Jsii::Type.check_type(@resource_requirements, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guQ2ZuSm9iRGVmaW5pdGlvbi5SZXNvdXJjZVJlcXVpcmVtZW50UHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "resourceRequirements") unless @resource_requirements.nil?
  @runtime_platform = runtime_platform.is_a?(Hash) ? ::AWSCDK::Batch::CfnJobDefinition::RuntimePlatformProperty.new(**runtime_platform.transform_keys(&:to_sym)) : runtime_platform
  Jsii::Type.check_type(@runtime_platform, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iYXRjaC5DZm5Kb2JEZWZpbml0aW9uLlJ1bnRpbWVQbGF0Zm9ybVByb3BlcnR5In1dfX0=")), "runtimePlatform") unless @runtime_platform.nil?
  @secrets = secrets
  Jsii::Type.check_type(@secrets, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guQ2ZuSm9iRGVmaW5pdGlvbi5TZWNyZXRQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "secrets") unless @secrets.nil?
  @ulimits = ulimits
  Jsii::Type.check_type(@ulimits, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guQ2ZuSm9iRGVmaW5pdGlvbi5VbGltaXRQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "ulimits") unless @ulimits.nil?
  @user = user
  Jsii::Type.check_type(@user, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "user") unless @user.nil?
  @vcpus = vcpus
  Jsii::Type.check_type(@vcpus, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "vcpus") unless @vcpus.nil?
  @volumes = volumes
  Jsii::Type.check_type(@volumes, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guQ2ZuSm9iRGVmaW5pdGlvbi5Wb2x1bWVzUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "volumes") unless @volumes.nil?
end

Instance Attribute Details

#commandArray<String>? (readonly)

The command that's passed to the container.

This parameter maps to Cmd in the Create a container section of the Docker Remote API and the COMMAND parameter to docker run . For more information, see https://docs.docker.com/engine/reference/builder/#cmd .



918
919
920
# File 'batch/cfn_job_definition.rb', line 918

def command
  @command
end

#enable_execute_commandBoolean, ... (readonly)

Determines whether execute command functionality is turned on for this task.

If true , execute command functionality is turned on all the containers in the task.



925
926
927
# File 'batch/cfn_job_definition.rb', line 925

def enable_execute_command
  @enable_execute_command
end

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

The environment variables to pass to a container.

This parameter maps to Env in the Create a container section of the Docker Remote API and the --env option to docker run .

We don't recommend using plaintext environment variables for sensitive information, such as credential data. > Environment variables cannot start with " AWS_BATCH ". This naming convention is reserved for variables that AWS Batch sets.



934
935
936
# File 'batch/cfn_job_definition.rb', line 934

def environment
  @environment
end

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

The amount of ephemeral storage to allocate for the task.

This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate .



941
942
943
# File 'batch/cfn_job_definition.rb', line 941

def ephemeral_storage
  @ephemeral_storage
end

#execution_role_arnString? (readonly)

The Amazon Resource Name (ARN) of the execution role that AWS Batch can assume.

For jobs that run on Fargate resources, you must provide an execution role. For more information, see AWS Batch execution IAM role in the AWS Batch User Guide .



948
949
950
# File 'batch/cfn_job_definition.rb', line 948

def execution_role_arn
  @execution_role_arn
end

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

The platform configuration for jobs that are running on Fargate resources.

Jobs that are running on Amazon EC2 resources must not specify this parameter.



955
956
957
# File 'batch/cfn_job_definition.rb', line 955

def fargate_platform_configuration
  @fargate_platform_configuration
end

#imageString (readonly)

Required.

The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker Hub registry are available by default. Other repositories are specified with *repository-url* / *image* : *tag* . It can be 255 characters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), underscores (_), colons (:), periods (.), forward slashes (/), and number signs (#). This parameter maps to Image in the Create a container section of the Docker Remote API and the IMAGE parameter of docker run .

Docker image architecture must match the processor architecture of the compute resources that they're scheduled on. For example, ARM-based Docker images can only run on ARM-based compute resources.

  • Images in Amazon ECR Public repositories use the full registry/repository[:tag] or registry/repository[@digest] naming conventions. For example, public.ecr.aws/ *registry_alias* / *my-web-app* : *latest* .
  • Images in Amazon ECR repositories use the full registry and repository URI (for example, 123456789012.dkr.ecr.<region-name>.amazonaws.com/<repository-name> ).
  • Images in official repositories on Docker Hub use a single name (for example, ubuntu or mongo ).
  • Images in other repositories on Docker Hub are qualified with an organization name (for example, amazon/amazon-ecs-agent ).
  • Images in other online repositories are qualified further by a domain name (for example, quay.io/assemblyline/ubuntu ).


911
912
913
# File 'batch/cfn_job_definition.rb', line 911

def image
  @image
end

#instance_typeString? (readonly)



958
959
960
# File 'batch/cfn_job_definition.rb', line 958

def instance_type
  @instance_type
end

#job_role_arnString? (readonly)

The Amazon Resource Name (ARN) of the IAM role that the container can assume for AWS permissions.

For more information, see IAM roles for tasks in the Amazon Elastic Container Service Developer Guide .



965
966
967
# File 'batch/cfn_job_definition.rb', line 965

def job_role_arn
  @job_role_arn
end

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

Linux-specific modifications that are applied to the container, such as details for device mappings.



970
971
972
# File 'batch/cfn_job_definition.rb', line 970

def linux_parameters
  @linux_parameters
end

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

The log configuration specification for the container.

This parameter maps to LogConfig in the Create a container section of the Docker Remote API and the --log-driver option to docker run . By default, containers use the same logging driver that the Docker daemon uses. However the container might use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information on the options for different supported log drivers, see Configure logging drivers in the Docker documentation.

AWS Batch currently supports a subset of the logging drivers available to the Docker daemon (shown in the LogConfiguration data type).

This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version | grep "Server API version"

The Amazon ECS container agent running on a container instance must register the logging drivers available on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS environment variable before containers placed on that instance can use these log configuration options. For more information, see Amazon ECS container agent configuration in the Amazon Elastic Container Service Developer Guide .



983
984
985
# File 'batch/cfn_job_definition.rb', line 983

def log_configuration
  @log_configuration
end

#memoryNumeric? (readonly)

This parameter is deprecated, use resourceRequirements to specify the memory requirements for the job definition.

It's not supported for jobs running on Fargate resources. For jobs that run on Amazon EC2 resources, it specifies the memory hard limit (in MiB) for a container. If your container attempts to exceed the specified number, it's terminated. You must specify at least 4 MiB of memory for a job using this parameter. The memory hard limit can be specified in several places. It must be specified for each node at least once.



990
991
992
# File 'batch/cfn_job_definition.rb', line 990

def memory
  @memory
end

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

The mount points for data volumes in your container.

This parameter maps to Volumes in the Create a container section of the Docker Remote API and the --volume option to docker run .



997
998
999
# File 'batch/cfn_job_definition.rb', line 997

def mount_points
  @mount_points
end

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

The network configuration for jobs that are running on Fargate resources.

Jobs that are running on Amazon EC2 resources must not specify this parameter.



1004
1005
1006
# File 'batch/cfn_job_definition.rb', line 1004

def network_configuration
  @network_configuration
end

#privilegedBoolean, ... (readonly)

When this parameter is true, the container is given elevated permissions on the host container instance (similar to the root user).

This parameter maps to Privileged in the Create a container section of the Docker Remote API and the --privileged option to docker run . The default value is false.

This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided, or specified as false.



1013
1014
1015
# File 'batch/cfn_job_definition.rb', line 1013

def privileged
  @privileged
end

#readonly_root_filesystemBoolean, ... (readonly)

When this parameter is true, the container is given read-only access to its root file system.

This parameter maps to ReadonlyRootfs in the Create a container section of the Docker Remote API and the --read-only option to docker run .



1020
1021
1022
# File 'batch/cfn_job_definition.rb', line 1020

def readonly_root_filesystem
  @readonly_root_filesystem
end

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

The private repository authentication credentials to use.



1025
1026
1027
# File 'batch/cfn_job_definition.rb', line 1025

def repository_credentials
  @repository_credentials
end

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

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

The supported resources include GPU , MEMORY , and VCPU .



1032
1033
1034
# File 'batch/cfn_job_definition.rb', line 1032

def resource_requirements
  @resource_requirements
end

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

An object that represents the compute environment architecture for AWS Batch jobs on Fargate.



1037
1038
1039
# File 'batch/cfn_job_definition.rb', line 1037

def runtime_platform
  @runtime_platform
end

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

The secrets for the container.

For more information, see Specifying sensitive data in the AWS Batch User Guide .



1044
1045
1046
# File 'batch/cfn_job_definition.rb', line 1044

def secrets
  @secrets
end

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

A list of ulimits to set in the container.

This parameter maps to Ulimits in the Create a container section of the Docker Remote API and the --ulimit option to docker run .

This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided.



1053
1054
1055
# File 'batch/cfn_job_definition.rb', line 1053

def ulimits
  @ulimits
end

#userString? (readonly)

The user name to use inside the container.

This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run .



1060
1061
1062
# File 'batch/cfn_job_definition.rb', line 1060

def user
  @user
end

#vcpusNumeric? (readonly)

This parameter is deprecated, use resourceRequirements to specify the vCPU requirements for the job definition.

It's not supported for jobs running on Fargate resources. For jobs running on Amazon EC2 resources, it specifies the number of vCPUs reserved for the job.

Each vCPU is equivalent to 1,024 CPU shares. This parameter maps to CpuShares in the Create a container section of the Docker Remote API and the --cpu-shares option to docker run . The number of vCPUs must be specified but can be specified in several places. You must specify it at least once for each node.



1069
1070
1071
# File 'batch/cfn_job_definition.rb', line 1069

def vcpus
  @vcpus
end

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

A list of data volumes used in a job.



1074
1075
1076
# File 'batch/cfn_job_definition.rb', line 1074

def volumes
  @volumes
end

Class Method Details

.jsii_propertiesObject



1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
# File 'batch/cfn_job_definition.rb', line 1076

def self.jsii_properties
  {
    :image => "image",
    :command => "command",
    :enable_execute_command => "enableExecuteCommand",
    :environment => "environment",
    :ephemeral_storage => "ephemeralStorage",
    :execution_role_arn => "executionRoleArn",
    :fargate_platform_configuration => "fargatePlatformConfiguration",
    :instance_type => "instanceType",
    :job_role_arn => "jobRoleArn",
    :linux_parameters => "linuxParameters",
    :log_configuration => "logConfiguration",
    :memory => "memory",
    :mount_points => "mountPoints",
    :network_configuration => "networkConfiguration",
    :privileged => "privileged",
    :readonly_root_filesystem => "readonlyRootFilesystem",
    :repository_credentials => "repositoryCredentials",
    :resource_requirements => "resourceRequirements",
    :runtime_platform => "runtimePlatform",
    :secrets => "secrets",
    :ulimits => "ulimits",
    :user => "user",
    :vcpus => "vcpus",
    :volumes => "volumes",
  }
end

Instance Method Details

#to_jsiiObject



1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
# File 'batch/cfn_job_definition.rb', line 1105

def to_jsii
  result = {}
  result.merge!({
    "image" => @image,
    "command" => @command,
    "enableExecuteCommand" => @enable_execute_command,
    "environment" => @environment,
    "ephemeralStorage" => @ephemeral_storage,
    "executionRoleArn" => @execution_role_arn,
    "fargatePlatformConfiguration" => @fargate_platform_configuration,
    "instanceType" => @instance_type,
    "jobRoleArn" => @job_role_arn,
    "linuxParameters" => @linux_parameters,
    "logConfiguration" => @log_configuration,
    "memory" => @memory,
    "mountPoints" => @mount_points,
    "networkConfiguration" => @network_configuration,
    "privileged" => @privileged,
    "readonlyRootFilesystem" => @readonly_root_filesystem,
    "repositoryCredentials" => @repository_credentials,
    "resourceRequirements" => @resource_requirements,
    "runtimePlatform" => @runtime_platform,
    "secrets" => @secrets,
    "ulimits" => @ulimits,
    "user" => @user,
    "vcpus" => @vcpus,
    "volumes" => @volumes,
  })
  result.compact
end