Skip to content

ContainerInstance

Source code in docs_src/capo_ecs/types/container_instance.py
class ContainerInstance(TypedDict, closed=True):
    container_instance_arn: NotRequired["capo_ecs.types.string.String"]
    """<p>The Amazon Resource Name (ARN) of the container instance. For more information about the ARN format, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids">Amazon Resource Name (ARN)</a> in the <i>Amazon ECS Developer Guide</i>.</p>"""
    ec2_instance_id: NotRequired["capo_ecs.types.string.String"]
    """<p>The ID of the container instance. For Amazon EC2 instances, this value is the Amazon EC2 instance ID. For external instances, this value is the Amazon Web Services Systems Manager managed instance ID.</p>"""
    capacity_provider_name: NotRequired["capo_ecs.types.string.String"]
    """<p>The capacity provider that's associated with the container instance.</p>"""
    version: "capo_ecs.types.long.Long"
    """<p>The version counter for the container instance. Every time a container instance experiences a change that triggers a CloudWatch event, the version counter is incremented. If you're replicating your Amazon ECS container instance state with CloudWatch Events, you can compare the version of a container instance reported by the Amazon ECS APIs with the version reported in CloudWatch Events for the container instance (inside the <code>detail</code> object) to verify that the version in your event stream is current.</p>"""
    version_info: NotRequired["capo_ecs.types.version_info.VersionInfo"]
    """<p>The version information for the Amazon ECS container agent and Docker daemon running on the container instance.</p>"""
    remaining_resources: NotRequired["capo_ecs.types.resources.Resources"]
    """<p>For CPU and memory resource types, this parameter describes the remaining CPU and memory that wasn't already allocated to tasks and is therefore available for new tasks. For port resource types, this parameter describes the ports that were reserved by the Amazon ECS container agent (at instance registration time) and any task containers that have reserved port mappings on the host (with the <code>host</code> or <code>bridge</code> network mode). Any port that's not specified here is available for new tasks.</p>"""
    registered_resources: NotRequired["capo_ecs.types.resources.Resources"]
    """<p>For CPU and memory resource types, this parameter describes the amount of each resource that was available on the container instance when the container agent registered it with Amazon ECS. This value represents the total amount of CPU and memory that can be allocated on this container instance to tasks. For port resource types, this parameter describes the ports that were reserved by the Amazon ECS container agent when it registered the container instance with Amazon ECS.</p>"""
    status: NotRequired["capo_ecs.types.string.String"]
    """<p>The status of the container instance. The valid values are <code>REGISTERING</code>, <code>REGISTRATION_FAILED</code>, <code>ACTIVE</code>, <code>INACTIVE</code>, <code>DEREGISTERING</code>, or <code>DRAINING</code>.</p> <p>If your account has opted in to the <code>awsvpcTrunking</code> account setting, then any newly registered container instance will transition to a <code>REGISTERING</code> status while the trunk elastic network interface is provisioned for the instance. If the registration fails, the instance will transition to a <code>REGISTRATION_FAILED</code> status. You can describe the container instance and see the reason for failure in the <code>statusReason</code> parameter. Once the container instance is terminated, the instance transitions to a <code>DEREGISTERING</code> status while the trunk elastic network interface is deprovisioned. The instance then transitions to an <code>INACTIVE</code> status.</p> <p>The <code>ACTIVE</code> status indicates that the container instance can accept tasks. The <code>DRAINING</code> indicates that new tasks aren't placed on the container instance and any service tasks running on the container instance are removed if possible. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-instance-draining.html">Container instance draining</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>"""
    status_reason: NotRequired["capo_ecs.types.string.String"]
    """<p>The reason that the container instance reached its current status.</p>"""
    agent_connected: "capo_ecs.types.boolean.Boolean"
    """<p>This parameter returns <code>true</code> if the agent is connected to Amazon ECS. An instance with an agent that may be unhealthy or stopped return <code>false</code>. Only instances connected to an agent can accept task placement requests.</p>"""
    running_tasks_count: "capo_ecs.types.integer.Integer"
    """<p>The number of tasks on the container instance that have a desired status (<code>desiredStatus</code>) of <code>RUNNING</code>.</p>"""
    pending_tasks_count: "capo_ecs.types.integer.Integer"
    """<p>The number of tasks on the container instance that are in the <code>PENDING</code> status.</p>"""
    agent_update_status: NotRequired[
        "capo_ecs.types.agent_update_status.AgentUpdateStatus"
    ]
    """<p>The status of the most recent agent update. If an update wasn't ever requested, this value is <code>NULL</code>.</p>"""
    attributes: NotRequired["capo_ecs.types.attributes.Attributes"]
    """<p>The attributes set for the container instance, either by the Amazon ECS container agent at instance registration or manually with the <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAttributes.html">PutAttributes</a> operation.</p>"""
    registered_at: NotRequired["capo_ecs.types.timestamp.Timestamp"]
    """<p>The Unix timestamp for the time when the container instance was registered.</p>"""
    attachments: NotRequired["capo_ecs.types.attachments.Attachments"]
    """<p>The resources attached to a container instance, such as an elastic network interface.</p>"""
    tags: NotRequired["capo_ecs.types.tags.Tags"]
    """<p>The metadata that you apply to the container instance to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.</p> <p>The following basic restrictions apply to tags:</p> <ul> <li> <p>Maximum number of tags per resource - 50</p> </li> <li> <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p> </li> <li> <p>Maximum key length - 128 Unicode characters in UTF-8</p> </li> <li> <p>Maximum value length - 256 Unicode characters in UTF-8</p> </li> <li> <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p> </li> <li> <p>Tag keys and values are case-sensitive.</p> </li> <li> <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p> </li> </ul>"""
    health_status: NotRequired[
        "capo_ecs.types.container_instance_health_status.ContainerInstanceHealthStatus"
    ]
    """<p>An object representing the health status of the container instance.</p>"""

agent_connected instance-attribute

agent_connected: Boolean

This parameter returns true if the agent is connected to Amazon ECS. An instance with an agent that may be unhealthy or stopped return false. Only instances connected to an agent can accept task placement requests.

agent_update_status instance-attribute

agent_update_status: NotRequired[AgentUpdateStatus]

The status of the most recent agent update. If an update wasn't ever requested, this value is NULL.

attachments instance-attribute

attachments: NotRequired[Attachments]

The resources attached to a container instance, such as an elastic network interface.

attributes instance-attribute

attributes: NotRequired[Attributes]

The attributes set for the container instance, either by the Amazon ECS container agent at instance registration or manually with the PutAttributes operation.

capacity_provider_name instance-attribute

capacity_provider_name: NotRequired[String]

The capacity provider that's associated with the container instance.

container_instance_arn instance-attribute

container_instance_arn: NotRequired[String]

The Amazon Resource Name (ARN) of the container instance. For more information about the ARN format, see Amazon Resource Name (ARN) in the Amazon ECS Developer Guide.

ec2_instance_id instance-attribute

ec2_instance_id: NotRequired[String]

The ID of the container instance. For Amazon EC2 instances, this value is the Amazon EC2 instance ID. For external instances, this value is the Amazon Web Services Systems Manager managed instance ID.

health_status instance-attribute

health_status: NotRequired[ContainerInstanceHealthStatus]

An object representing the health status of the container instance.

pending_tasks_count instance-attribute

pending_tasks_count: Integer

The number of tasks on the container instance that are in the PENDING status.

registered_at instance-attribute

registered_at: NotRequired[Timestamp]

The Unix timestamp for the time when the container instance was registered.

registered_resources instance-attribute

registered_resources: NotRequired[Resources]

For CPU and memory resource types, this parameter describes the amount of each resource that was available on the container instance when the container agent registered it with Amazon ECS. This value represents the total amount of CPU and memory that can be allocated on this container instance to tasks. For port resource types, this parameter describes the ports that were reserved by the Amazon ECS container agent when it registered the container instance with Amazon ECS.

remaining_resources instance-attribute

remaining_resources: NotRequired[Resources]

For CPU and memory resource types, this parameter describes the remaining CPU and memory that wasn't already allocated to tasks and is therefore available for new tasks. For port resource types, this parameter describes the ports that were reserved by the Amazon ECS container agent (at instance registration time) and any task containers that have reserved port mappings on the host (with the host or bridge network mode). Any port that's not specified here is available for new tasks.

running_tasks_count instance-attribute

running_tasks_count: Integer

The number of tasks on the container instance that have a desired status (desiredStatus) of RUNNING.

status instance-attribute

status: NotRequired[String]

The status of the container instance. The valid values are REGISTERING, REGISTRATION_FAILED, ACTIVE, INACTIVE, DEREGISTERING, or DRAINING.

If your account has opted in to the awsvpcTrunking account setting, then any newly registered container instance will transition to a REGISTERING status while the trunk elastic network interface is provisioned for the instance. If the registration fails, the instance will transition to a REGISTRATION_FAILED status. You can describe the container instance and see the reason for failure in the statusReason parameter. Once the container instance is terminated, the instance transitions to a DEREGISTERING status while the trunk elastic network interface is deprovisioned. The instance then transitions to an INACTIVE status.

The ACTIVE status indicates that the container instance can accept tasks. The DRAINING indicates that new tasks aren't placed on the container instance and any service tasks running on the container instance are removed if possible. For more information, see Container instance draining in the Amazon Elastic Container Service Developer Guide.

status_reason instance-attribute

status_reason: NotRequired[String]

The reason that the container instance reached its current status.

tags instance-attribute

tags: NotRequired[Tags]

The metadata that you apply to the container instance to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.

The following basic restrictions apply to tags:

  • Maximum number of tags per resource - 50

  • For each resource, each tag key must be unique, and each tag key can have only one value.

  • Maximum key length - 128 Unicode characters in UTF-8

  • Maximum value length - 256 Unicode characters in UTF-8

  • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.

  • Tag keys and values are case-sensitive.

  • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

version instance-attribute

version: Long

The version counter for the container instance. Every time a container instance experiences a change that triggers a CloudWatch event, the version counter is incremented. If you're replicating your Amazon ECS container instance state with CloudWatch Events, you can compare the version of a container instance reported by the Amazon ECS APIs with the version reported in CloudWatch Events for the container instance (inside the detail object) to verify that the version in your event stream is current.

version_info instance-attribute

version_info: NotRequired[VersionInfo]

The version information for the Amazon ECS container agent and Docker daemon running on the container instance.