Skip to content

EcsTaskProperties

Source code in docs_src/capo_batch/types/ecs_task_properties.py
class EcsTaskProperties(TypedDict, closed=True):
    containers: NotRequired[
        "capo_batch.types.list_task_container_properties.ListTaskContainerProperties"
    ]
    """<p>This object is a list of containers.</p>"""
    ephemeral_storage: NotRequired[
        "capo_batch.types.ephemeral_storage.EphemeralStorage"
    ]
    """<p>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 Fargate.</p>"""
    execution_role_arn: NotRequired["capo_batch.types.string.String"]
    """<p>The Amazon Resource Name (ARN) of the execution role that Batch can assume. For jobs that run on Fargate resources, you must provide an execution role. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/execution-IAM-role.html">Batch execution IAM role</a> in the <i>Batch User Guide</i>.</p>"""
    platform_version: NotRequired["capo_batch.types.string.String"]
    """<p>The Fargate platform version where the jobs are running. A platform version is specified only for jobs that are running on Fargate resources. If one isn't specified, the <code>LATEST</code> platform version is used by default. This uses a recent, approved version of the Fargate platform for compute resources. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">Fargate platform versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>"""
    ipc_mode: NotRequired["capo_batch.types.string.String"]
    """<p>The IPC resource namespace to use for the containers in the task. The valid values are <code>host</code>, <code>task</code>, or <code>none</code>.</p> <p>If <code>host</code> is specified, all containers within the tasks that specified the <code>host</code> IPC mode on the same container instance share the same IPC resources with the host Amazon EC2 instance.</p> <p>If <code>task</code> is specified, all containers within the specified <code>task</code> share the same IPC resources.</p> <p>If <code>none</code> is specified, the IPC resources within the containers of a task are private, and are not shared with other containers in a task or on the container instance. </p> <p>If no value is specified, then the IPC resource namespace sharing depends on the Docker daemon setting on the container instance. For more information, see <a href="https://docs.docker.com/engine/reference/run/#ipc-settings---ipc">IPC settings</a> in the Docker run reference.</p> <note> <p>This parameter is not supported for jobs that run on Fargate resources.</p> </note>"""
    task_role_arn: NotRequired["capo_batch.types.string.String"]
    """<p>The Amazon Resource Name (ARN) that's associated with the Amazon ECS task.</p> <note> <p>This is object is comparable to <a href="https://docs.aws.amazon.com/batch/latest/APIReference/API_ContainerProperties.html">ContainerProperties:jobRoleArn</a>.</p> </note>"""
    pid_mode: NotRequired["capo_batch.types.string.String"]
    """<p>The process namespace to use for the containers in the task. The valid values are <code>host</code> or <code>task</code>. For example, monitoring sidecars might need <code>pidMode</code> to access information about other containers running in the same task.</p> <p>If <code>host</code> is specified, all containers within the tasks that specified the <code>host</code> PID mode on the same container instance share the process namespace with the host Amazon EC2 instance.</p> <p>If <code>task</code> is specified, all containers within the specified task share the same process namespace.</p> <p>If no value is specified, the default is a private namespace for each container. For more information, see <a href="https://docs.docker.com/engine/reference/run/#pid-settings---pid">PID settings</a> in the Docker run reference.</p>"""
    network_configuration: NotRequired[
        "capo_batch.types.network_configuration.NetworkConfiguration"
    ]
    """<p>The network configuration for jobs that are running on Fargate resources. Jobs that are running on Amazon EC2 resources or Amazon ECS Managed Instances must not specify this parameter.</p>"""
    runtime_platform: NotRequired["capo_batch.types.runtime_platform.RuntimePlatform"]
    """<p>An object that represents the compute environment architecture for Batch jobs on Fargate or Amazon ECS Managed Instances. Use this to specify the operating system family (<code>operatingSystemFamily</code>) and CPU architecture (<code>cpuArchitecture</code>).</p> <p>For Amazon ECS Managed Instances, the valid value for <code>operatingSystemFamily</code> is <code>LINUX</code> (default). The valid values for <code>cpuArchitecture</code> are <code>X86_64</code> and <code>ARM64</code>.</p>"""
    volumes: NotRequired["capo_batch.types.volumes.Volumes"]
    """<p>A list of volumes that are associated with the job.</p>"""
    enable_execute_command: NotRequired["capo_batch.types.boolean.Boolean"]
    """<p>Determines whether execute command functionality is turned on for this task. If <code>true</code>, execute command functionality is turned on all the containers in the task.</p>"""
    network_mode: NotRequired["capo_batch.types.string.String"]
    """<p>The network mode to use for the task. Valid values: <code>host</code>. When not specified, the default is <code>host</code>.</p> <p>With <code>host</code> mode, the container shares the host instance's network stack directly. When running tasks that use the <code>host</code> network mode, do not run containers using the root user (UID 0). Running as root grants unrestricted access to host resources and increases the attack surface.</p> <p>This parameter only applies to jobs running on Amazon ECS Managed Instances (<code>MANAGED_INSTANCES</code> platform capability). It cannot be specified for Fargate or Amazon EC2 platform job definitions.</p>"""

containers instance-attribute

containers: NotRequired[ListTaskContainerProperties]

This object is a list of containers.

enable_execute_command instance-attribute

enable_execute_command: NotRequired[Boolean]

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.

ephemeral_storage instance-attribute

ephemeral_storage: NotRequired[EphemeralStorage]

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

execution_role_arn instance-attribute

execution_role_arn: NotRequired[String]

The Amazon Resource Name (ARN) of the execution role that Batch can assume. For jobs that run on Fargate resources, you must provide an execution role. For more information, see Batch execution IAM role in the Batch User Guide.

ipc_mode instance-attribute

ipc_mode: NotRequired[String]

The IPC resource namespace to use for the containers in the task. The valid values are host, task, or none.

If host is specified, all containers within the tasks that specified the host IPC mode on the same container instance share the same IPC resources with the host Amazon EC2 instance.

If task is specified, all containers within the specified task share the same IPC resources.

If none is specified, the IPC resources within the containers of a task are private, and are not shared with other containers in a task or on the container instance.

If no value is specified, then the IPC resource namespace sharing depends on the Docker daemon setting on the container instance. For more information, see IPC settings in the Docker run reference.

This parameter is not supported for jobs that run on Fargate resources.

network_configuration instance-attribute

network_configuration: NotRequired[NetworkConfiguration]

The network configuration for jobs that are running on Fargate resources. Jobs that are running on Amazon EC2 resources or Amazon ECS Managed Instances must not specify this parameter.

network_mode instance-attribute

network_mode: NotRequired[String]

The network mode to use for the task. Valid values: host. When not specified, the default is host.

With host mode, the container shares the host instance's network stack directly. When running tasks that use the host network mode, do not run containers using the root user (UID 0). Running as root grants unrestricted access to host resources and increases the attack surface.

This parameter only applies to jobs running on Amazon ECS Managed Instances (MANAGED_INSTANCES platform capability). It cannot be specified for Fargate or Amazon EC2 platform job definitions.

pid_mode instance-attribute

pid_mode: NotRequired[String]

The process namespace to use for the containers in the task. The valid values are host or task. For example, monitoring sidecars might need pidMode to access information about other containers running in the same task.

If host is specified, all containers within the tasks that specified the host PID mode on the same container instance share the process namespace with the host Amazon EC2 instance.

If task is specified, all containers within the specified task share the same process namespace.

If no value is specified, the default is a private namespace for each container. For more information, see PID settings in the Docker run reference.

platform_version instance-attribute

platform_version: NotRequired[String]

The Fargate platform version where the jobs are running. A platform version is specified only for jobs that are running on Fargate resources. If one isn't specified, the LATEST platform version is used by default. This uses a recent, approved version of the Fargate platform for compute resources. For more information, see Fargate platform versions in the Amazon Elastic Container Service Developer Guide.

runtime_platform instance-attribute

runtime_platform: NotRequired[RuntimePlatform]

An object that represents the compute environment architecture for Batch jobs on Fargate or Amazon ECS Managed Instances. Use this to specify the operating system family (operatingSystemFamily) and CPU architecture (cpuArchitecture).

For Amazon ECS Managed Instances, the valid value for operatingSystemFamily is LINUX (default). The valid values for cpuArchitecture are X86_64 and ARM64.

task_role_arn instance-attribute

task_role_arn: NotRequired[String]

The Amazon Resource Name (ARN) that's associated with the Amazon ECS task.

This is object is comparable to ContainerProperties:jobRoleArn.

volumes instance-attribute

volumes: NotRequired[Volumes]

A list of volumes that are associated with the job.