/AWS1/CL_BTCTASKCONTAINERPRPS¶
Container properties are used for Amazon ECS-based job definitions. These properties to describe the container that's launched as part of a job.
CONSTRUCTOR
¶
IMPORTING¶
Required arguments:¶
iv_image
TYPE /AWS1/BTCSTRING
/AWS1/BTCSTRING
¶
The image used to start a container. This string is passed directly to the Docker daemon. By default, images in the Docker Hub registry are available. Other repositories are specified with either
repository-url/image:tag
orrepository-url/image@digest
. Up to 255 letters (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter maps toImage
in the Create a container section of the Docker Remote API and theIMAGE
parameter of the docker run .
Optional arguments:¶
it_command
TYPE /AWS1/CL_BTCSTRINGLIST_W=>TT_STRINGLIST
TT_STRINGLIST
¶
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 theCOMMAND
parameter to docker run. For more information, see Dockerfile reference: CMD.
it_dependson
TYPE /AWS1/CL_BTCTSKCONTAINERDEPE00=>TT_TASKCONTAINERDEPENDENCYLIST
TT_TASKCONTAINERDEPENDENCYLIST
¶
A list of containers that this container depends on.
it_environment
TYPE /AWS1/CL_BTCKEYVALUEPAIR=>TT_ENVIRONMENTVARIABLES
TT_ENVIRONMENTVARIABLES
¶
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
parameter 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 Batch sets.
iv_essential
TYPE /AWS1/BTCBOOLEAN
/AWS1/BTCBOOLEAN
¶
If the essential parameter of a container is marked as
true
, and that container fails or stops for any reason, all other containers that are part of the task are stopped. If theessential
parameter of a container is marked as false, its failure doesn't affect the rest of the containers in a task. If this parameter is omitted, a container is assumed to be essential.All jobs must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide.
io_firelensconfiguration
TYPE REF TO /AWS1/CL_BTCFIRELENSCONF
/AWS1/CL_BTCFIRELENSCONF
¶
The FireLens configuration for the container. This is used to specify and configure a log router for container logs. For more information, see Custom log routing in the Amazon Elastic Container Service Developer Guide.
io_linuxparameters
TYPE REF TO /AWS1/CL_BTCLINUXPARAMETERS
/AWS1/CL_BTCLINUXPARAMETERS
¶
Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more information, see KernelCapabilities.
io_logconfiguration
TYPE REF TO /AWS1/CL_BTCLOGCONFIGURATION
/AWS1/CL_BTCLOGCONFIGURATION
¶
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 can 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 about the options for different supported log drivers, see Configure logging drivers in the Docker documentation.
Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the
LogConfiguration
data type). Additional log drivers may be available in future releases of the Amazon ECS container agent.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
--format '{{.Server.APIVersion}}'
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.
it_mountpoints
TYPE /AWS1/CL_BTCMOUNTPOINT=>TT_MOUNTPOINTS
TT_MOUNTPOINTS
¶
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.Windows containers can mount whole directories on the same drive as
$env:ProgramData
. Windows containers can't mount directories on a different drive, and mount point can't be across drives.
iv_name
TYPE /AWS1/BTCSTRING
/AWS1/BTCSTRING
¶
The name of a container. The name can be used as a unique identifier to target your
dependsOn
andOverrides
objects.
iv_privileged
TYPE /AWS1/BTCBOOLEAN
/AWS1/BTCBOOLEAN
¶
When this parameter is
true
, the container is given elevated privileges on the host container instance (similar to theroot
user). This parameter maps toPrivileged
in the Create a container section of the Docker Remote API and the--privileged
option to docker run.This parameter is not supported for Windows containers or tasks run on Fargate.
iv_readonlyrootfilesystem
TYPE /AWS1/BTCBOOLEAN
/AWS1/BTCBOOLEAN
¶
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.This parameter is not supported for Windows containers.
io_repositorycredentials
TYPE REF TO /AWS1/CL_BTCREPOSITORYCREDS
/AWS1/CL_BTCREPOSITORYCREDS
¶
The private repository authentication credentials to use.
it_resourcerequirements
TYPE /AWS1/CL_BTCRESRCREQUIREMENT=>TT_RESOURCEREQUIREMENTS
TT_RESOURCEREQUIREMENTS
¶
The type and amount of a resource to assign to a container. The only supported resource is a GPU.
it_secrets
TYPE /AWS1/CL_BTCSECRET=>TT_SECRETLIST
TT_SECRETLIST
¶
The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide.
it_ulimits
TYPE /AWS1/CL_BTCULIMIT=>TT_ULIMITS
TT_ULIMITS
¶
A list of
ulimits
to set in the container. If aulimit
value is specified in a task definition, it overrides the default values set by Docker. This parameter maps toUlimits
in the Create a container section of the Docker Remote API and the--ulimit
option to docker run.Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the exception of the nofile resource limit parameter which Fargate overrides. The
nofile
resource limit sets a restriction on the number of open files that a container can use. The defaultnofile
soft limit is1024
and the default hard limit is65535
.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
--format '{{.Server.APIVersion}}'
This parameter is not supported for Windows containers.
iv_user
TYPE /AWS1/BTCSTRING
/AWS1/BTCSTRING
¶
The user 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.
When running tasks using the
host
network mode, don't run containers using theroot user (UID 0)
. We recommend using a non-root user for better security.You can specify the
user
using the following formats. If specifying a UID or GID, you must specify it as a positive integer.
user
user:group
uid
uid:gid
user:gi
uid:group
This parameter is not supported for Windows containers.
Queryable Attributes¶
command¶
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 theCOMMAND
parameter to docker run. For more information, see Dockerfile reference: CMD.
Accessible with the following methods¶
Method | Description |
---|---|
GET_COMMAND() |
Getter for COMMAND, with configurable default |
ASK_COMMAND() |
Getter for COMMAND w/ exceptions if field has no value |
HAS_COMMAND() |
Determine if COMMAND has a value |
dependsOn¶
A list of containers that this container depends on.
Accessible with the following methods¶
Method | Description |
---|---|
GET_DEPENDSON() |
Getter for DEPENDSON, with configurable default |
ASK_DEPENDSON() |
Getter for DEPENDSON w/ exceptions if field has no value |
HAS_DEPENDSON() |
Determine if DEPENDSON has a value |
environment¶
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
parameter 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 Batch sets.
Accessible with the following methods¶
Method | Description |
---|---|
GET_ENVIRONMENT() |
Getter for ENVIRONMENT, with configurable default |
ASK_ENVIRONMENT() |
Getter for ENVIRONMENT w/ exceptions if field has no value |
HAS_ENVIRONMENT() |
Determine if ENVIRONMENT has a value |
essential¶
If the essential parameter of a container is marked as
true
, and that container fails or stops for any reason, all other containers that are part of the task are stopped. If theessential
parameter of a container is marked as false, its failure doesn't affect the rest of the containers in a task. If this parameter is omitted, a container is assumed to be essential.All jobs must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide.
Accessible with the following methods¶
Method | Description |
---|---|
GET_ESSENTIAL() |
Getter for ESSENTIAL, with configurable default |
ASK_ESSENTIAL() |
Getter for ESSENTIAL w/ exceptions if field has no value |
HAS_ESSENTIAL() |
Determine if ESSENTIAL has a value |
firelensConfiguration¶
The FireLens configuration for the container. This is used to specify and configure a log router for container logs. For more information, see Custom log routing in the Amazon Elastic Container Service Developer Guide.
Accessible with the following methods¶
Method | Description |
---|---|
GET_FIRELENSCONFIGURATION() |
Getter for FIRELENSCONFIGURATION |
image¶
The image used to start a container. This string is passed directly to the Docker daemon. By default, images in the Docker Hub registry are available. Other repositories are specified with either
repository-url/image:tag
orrepository-url/image@digest
. Up to 255 letters (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter maps toImage
in the Create a container section of the Docker Remote API and theIMAGE
parameter of the docker run .
Accessible with the following methods¶
Method | Description |
---|---|
GET_IMAGE() |
Getter for IMAGE, with configurable default |
ASK_IMAGE() |
Getter for IMAGE w/ exceptions if field has no value |
HAS_IMAGE() |
Determine if IMAGE has a value |
linuxParameters¶
Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more information, see KernelCapabilities.
Accessible with the following methods¶
Method | Description |
---|---|
GET_LINUXPARAMETERS() |
Getter for LINUXPARAMETERS |
logConfiguration¶
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 can 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 about the options for different supported log drivers, see Configure logging drivers in the Docker documentation.
Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the
LogConfiguration
data type). Additional log drivers may be available in future releases of the Amazon ECS container agent.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
--format '{{.Server.APIVersion}}'
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.
Accessible with the following methods¶
Method | Description |
---|---|
GET_LOGCONFIGURATION() |
Getter for LOGCONFIGURATION |
mountPoints¶
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.Windows containers can mount whole directories on the same drive as
$env:ProgramData
. Windows containers can't mount directories on a different drive, and mount point can't be across drives.
Accessible with the following methods¶
Method | Description |
---|---|
GET_MOUNTPOINTS() |
Getter for MOUNTPOINTS, with configurable default |
ASK_MOUNTPOINTS() |
Getter for MOUNTPOINTS w/ exceptions if field has no value |
HAS_MOUNTPOINTS() |
Determine if MOUNTPOINTS has a value |
name¶
The name of a container. The name can be used as a unique identifier to target your
dependsOn
andOverrides
objects.
Accessible with the following methods¶
Method | Description |
---|---|
GET_NAME() |
Getter for NAME, with configurable default |
ASK_NAME() |
Getter for NAME w/ exceptions if field has no value |
HAS_NAME() |
Determine if NAME has a value |
privileged¶
When this parameter is
true
, the container is given elevated privileges on the host container instance (similar to theroot
user). This parameter maps toPrivileged
in the Create a container section of the Docker Remote API and the--privileged
option to docker run.This parameter is not supported for Windows containers or tasks run on Fargate.
Accessible with the following methods¶
Method | Description |
---|---|
GET_PRIVILEGED() |
Getter for PRIVILEGED, with configurable default |
ASK_PRIVILEGED() |
Getter for PRIVILEGED w/ exceptions if field has no value |
HAS_PRIVILEGED() |
Determine if PRIVILEGED has a value |
readonlyRootFilesystem¶
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.This parameter is not supported for Windows containers.
Accessible with the following methods¶
Method | Description |
---|---|
GET_READONLYROOTFILESYSTEM() |
Getter for READONLYROOTFILESYSTEM, with configurable default |
ASK_READONLYROOTFILESYSTEM() |
Getter for READONLYROOTFILESYSTEM w/ exceptions if field has |
HAS_READONLYROOTFILESYSTEM() |
Determine if READONLYROOTFILESYSTEM has a value |
repositoryCredentials¶
The private repository authentication credentials to use.
Accessible with the following methods¶
Method | Description |
---|---|
GET_REPOSITORYCREDENTIALS() |
Getter for REPOSITORYCREDENTIALS |
resourceRequirements¶
The type and amount of a resource to assign to a container. The only supported resource is a GPU.
Accessible with the following methods¶
Method | Description |
---|---|
GET_RESOURCEREQUIREMENTS() |
Getter for RESOURCEREQUIREMENTS, with configurable default |
ASK_RESOURCEREQUIREMENTS() |
Getter for RESOURCEREQUIREMENTS w/ exceptions if field has n |
HAS_RESOURCEREQUIREMENTS() |
Determine if RESOURCEREQUIREMENTS has a value |
secrets¶
The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide.
Accessible with the following methods¶
Method | Description |
---|---|
GET_SECRETS() |
Getter for SECRETS, with configurable default |
ASK_SECRETS() |
Getter for SECRETS w/ exceptions if field has no value |
HAS_SECRETS() |
Determine if SECRETS has a value |
ulimits¶
A list of
ulimits
to set in the container. If aulimit
value is specified in a task definition, it overrides the default values set by Docker. This parameter maps toUlimits
in the Create a container section of the Docker Remote API and the--ulimit
option to docker run.Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the exception of the nofile resource limit parameter which Fargate overrides. The
nofile
resource limit sets a restriction on the number of open files that a container can use. The defaultnofile
soft limit is1024
and the default hard limit is65535
.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
--format '{{.Server.APIVersion}}'
This parameter is not supported for Windows containers.
Accessible with the following methods¶
Method | Description |
---|---|
GET_ULIMITS() |
Getter for ULIMITS, with configurable default |
ASK_ULIMITS() |
Getter for ULIMITS w/ exceptions if field has no value |
HAS_ULIMITS() |
Determine if ULIMITS has a value |
user¶
The user 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.
When running tasks using the
host
network mode, don't run containers using theroot user (UID 0)
. We recommend using a non-root user for better security.You can specify the
user
using the following formats. If specifying a UID or GID, you must specify it as a positive integer.
user
user:group
uid
uid:gid
user:gi
uid:group
This parameter is not supported for Windows containers.
Accessible with the following methods¶
Method | Description |
---|---|
GET_USER() |
Getter for USER, with configurable default |
ASK_USER() |
Getter for USER w/ exceptions if field has no value |
HAS_USER() |
Determine if USER has a value |
Public Local Types In This Class¶
Internal table types, representing arrays and maps of this class, are defined as local types:
TT_LISTTASKCONTAINERPROPERTIES
¶
TYPES TT_LISTTASKCONTAINERPROPERTIES TYPE STANDARD TABLE OF REF TO /AWS1/CL_BTCTASKCONTAINERPRPS WITH DEFAULT KEY
.