Skip to content

ECS  >  Operations  >  register_container_instance

register_container_instance

Operation

register_container_instance async

register_container_instance(input: RegisterContainerInstanceInput, plugins: list[Plugin] | None = None) -> RegisterContainerInstanceOutput
Note

This action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent.

Registers an EC2 instance into the specified cluster. This instance becomes available to place containers on.

Parameters:

Name Type Description Default
input RegisterContainerInstanceInput

An instance of RegisterContainerInstanceInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
RegisterContainerInstanceOutput

An instance of RegisterContainerInstanceOutput.

Input

RegisterContainerInstanceInput dataclass

Bases: _SerdeShape

Attributes

attributes class-attribute instance-attribute
attributes: list[Attribute] | None = ...

The container instance attributes that this container instance supports.

cluster class-attribute instance-attribute
cluster: str | None = ...

The short name or full Amazon Resource Name (ARN) of the cluster to register your container instance with. If you do not specify a cluster, the default cluster is assumed.

container_instance_arn class-attribute instance-attribute
container_instance_arn: str | None = ...

The ARN of the container instance (if it was previously registered).

instance_identity_document class-attribute instance-attribute
instance_identity_document: str | None = ...

The instance identity document for the EC2 instance to register. This document can be found by running the following command from the instance: curl http://169.254.169.254/latest/dynamic/instance-identity/document/

instance_identity_document_signature class-attribute instance-attribute
instance_identity_document_signature: str | None = ...

The instance identity document signature for the EC2 instance to register. This signature can be found by running the following command from the instance: curl http://169.254.169.254/latest/dynamic/instance-identity/signature/

platform_devices class-attribute instance-attribute
platform_devices: list[PlatformDevice] | None = ...

The devices that are available on the container instance. The supported device types are GPUs and Neuron devices.

tags class-attribute instance-attribute
tags: list[Tag] | None = ...

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.

total_resources class-attribute instance-attribute
total_resources: list[Resource] | None = ...

The resources available on the instance.

version_info class-attribute instance-attribute
version_info: VersionInfo | None = ...

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

Output

RegisterContainerInstanceOutput dataclass

Bases: _SerdeShape

Attributes

container_instance class-attribute instance-attribute
container_instance: ContainerInstance | None = ...

The container instance that was registered.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.