Class: Aws::Batch::Types::TaskContainerDetails

Inherits:
Struct
  • Object
show all
Includes:
Structure
Defined in:
lib/aws-sdk-batch/types.rb

Overview

The details for the container in this task attempt.

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#commandArray<String>

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 [docs.docker.com/engine/reference/builder/#cmd][4].

[1]: docs.docker.com/engine/api/v1.23/#create-a-container [2]: docs.docker.com/engine/api/v1.23/ [3]: docs.docker.com/engine/reference/run/ [4]: docs.docker.com/engine/reference/builder/#cmd

Returns:

  • (Array<String>)


7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end

#depends_onArray<Types::TaskContainerDependency>

A list of containers that this container depends on.

Returns:



7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end

#environmentArray<Types::KeyValuePair>

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.

[1]: docs.docker.com/engine/api/v1.23/#create-a-container [2]: docs.docker.com/engine/api/v1.23/ [3]: docs.docker.com/engine/reference/run/

Returns:



7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end

#essentialBoolean

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 the `essential` 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*.

[1]: docs.aws.amazon.com/AmazonECS/latest/developerguide/application_architecture.html

Returns:

  • (Boolean)


7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end

#exit_codeInteger

The exit code returned upon completion.

Returns:

  • (Integer)


7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end

#imageString

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` or `repository-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 to `Image` in the [Create a container] section of the [Docker Remote API] and the `IMAGE` parameter of the [ *docker run* ][3].

[1]: docs.docker.com/engine/api/v1.35/#operation/ContainerCreate [2]: docs.docker.com/engine/api/v1.35/ [3]: docs.docker.com/engine/reference/run/#security-configuration

Returns:

  • (String)


7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end

#linux_parametersTypes::LinuxParameters

Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more information, see [KernelCapabilities].

<note markdown=“1”> This parameter is not supported for Windows containers.

</note>

[1]: docs.aws.amazon.com/AmazonECS/latest/APIReference/API_KernelCapabilities.html



7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end

#log_configurationTypes::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 ][4] in the *Docker documentation*.

<note markdown=“1”> 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.

</note>

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 ’Aws::Batch::Types::TaskContainerDetails.{{.Server{.Server.APIVersion}‘`

<note markdown=“1”> 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*.

</note>

[1]: docs.docker.com/engine/api/v1.35/#operation/ContainerCreate [2]: docs.docker.com/engine/api/v1.35/ [3]: docs.docker.com/engine/reference/run/#security-configuration [4]: docs.docker.com/engine/admin/logging/overview/ [5]: docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html



7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end

#log_stream_nameString

The name of the CloudWatch Logs log stream that’s associated with the container. The log group for Batch jobs is /aws/batch/job. Each container attempt receives a log stream name when they reach the ‘RUNNING` status.

Returns:

  • (String)


7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end

#mount_pointsArray<Types::MountPoint>

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.

[1]: docs.docker.com/engine/api/v1.35/#operation/ContainerCreate [2]: docs.docker.com/engine/api/v1.35/ [3]: docs.docker.com/engine/reference/run/#security-configuration

Returns:



7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end

#nameString

The name of a container.

Returns:

  • (String)


7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end

#network_interfacesArray<Types::NetworkInterface>

The network interfaces that are associated with the job.

Returns:



7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end

#privilegedBoolean

When this parameter is ‘true`, the container is given elevated privileges 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].

<note markdown=“1”> This parameter is not supported for Windows containers or tasks run on Fargate.

</note>

[1]: docs.docker.com/engine/api/v1.35/#operation/ContainerCreate [2]: docs.docker.com/engine/api/v1.35/ [3]: docs.docker.com/engine/reference/run/#security-configuration

Returns:

  • (Boolean)


7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end

#readonly_root_filesystemBoolean

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].

<note markdown=“1”> This parameter is not supported for Windows containers.

</note>

[1]: docs.docker.com/engine/api/v1.35/#operation/ContainerCreate [2]: docs.docker.com/engine/api/v1.35/ [3]: docs.docker.com/engine/reference/run/#security-configuration

Returns:

  • (Boolean)


7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end

#reasonString

A short (255 max characters) human-readable string to provide additional details for a running or stopped container.

Returns:

  • (String)


7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end

#repository_credentialsTypes::RepositoryCredentials

The private repository authentication credentials to use.



7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end

#resource_requirementsArray<Types::ResourceRequirement>

The type and amount of a resource to assign to a container. The only supported resource is a GPU.

Returns:



7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end

#secretsArray<Types::Secret>

The secrets to pass to the container. For more information, see

Specifying Sensitive Data][1

in the Amazon Elastic Container

Service Developer Guide.

[1]: docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html

Returns:



7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end

#ulimitsArray<Types::Ulimit>

A list of ‘ulimits` to set in the container. If a `ulimit` value is specified in a task definition, it overrides the default values set by Docker. This parameter maps to `Ulimits` 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 default `nofile` soft limit is `1024` and the default hard limit is `65535`.

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 ’Aws::Batch::Types::TaskContainerDetails.{{.Server{.Server.APIVersion}‘`

<note markdown=“1”> This parameter is not supported for Windows containers.

</note>

[1]: docs.docker.com/engine/api/v1.35/#operation/ContainerCreate [2]: docs.docker.com/engine/api/v1.35/ [3]: docs.docker.com/engine/reference/run/#security-configuration

Returns:



7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end

#userString

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.

<note markdown=“1”> When running tasks using the ‘host` network mode, don’t run containers using the ‘root user (UID 0)`. We recommend using a non-root user for better security.

</note>

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`

<note markdown=“1”> This parameter is not supported for Windows containers.

</note>

Returns:

  • (String)


7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
# File 'lib/aws-sdk-batch/types.rb', line 7614

class TaskContainerDetails < Struct.new(
  :command,
  :depends_on,
  :environment,
  :essential,
  :image,
  :linux_parameters,
  :log_configuration,
  :mount_points,
  :name,
  :privileged,
  :readonly_root_filesystem,
  :repository_credentials,
  :resource_requirements,
  :secrets,
  :ulimits,
  :user,
  :exit_code,
  :reason,
  :log_stream_name,
  :network_interfaces)
  SENSITIVE = []
  include Aws::Structure
end