register_container_instance
async
¶
register_container_instance(
*,
config_overrides: Optional[AsyncECSClientConfig] = None,
cluster: Optional[String] = None,
instance_identity_document: Optional[String] = None,
instance_identity_document_signature: Optional[String] = None,
total_resources: Optional[Resources] = None,
version_info: Optional[VersionInfo] = None,
container_instance_arn: Optional[String] = None,
attributes: Optional[Attributes] = None,
platform_devices: Optional[PlatformDevices] = None,
tags: Optional[Tags] = None,
) -> RegisterContainerInstanceResponse
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:
-
cluster(Optional[String], default: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.
-
instance_identity_document(Optional[String], default: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(Optional[String], default: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/ -
total_resources(Optional[Resources], default:None) –The resources available on the instance.
-
version_info(Optional[VersionInfo], default:None) –The version information for the Amazon ECS container agent and Docker daemon that runs on the container instance.
-
container_instance_arn(Optional[String], default:None) –The ARN of the container instance (if it was previously registered).
-
attributes(Optional[Attributes], default:None) –The container instance attributes that this container instance supports.
-
platform_devices(Optional[PlatformDevices], default:None) –The devices that are available on the container instance. The supported device types are GPUs and Neuron devices.
-
tags(Optional[Tags], default: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.
-
Raises:
-
AccessDeniedException–You don't have authorization to perform the requested action.
-
ClientException–These errors are usually caused by a client action. This client action might be using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Or, it might be specifying an identifier that isn't valid.
-
ClusterNotFoundException–The specified cluster wasn't found. You can view your available clusters with ListClusters. Amazon ECS clusters are Region specific.
-
InvalidParameterException–The specified parameter isn't valid. Review the available parameters for the API request.
For more information about service event errors, see Amazon ECS service event messages.
-
ServerException–These errors are usually caused by a server issue.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ecs/_services/async_ecs.py
3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 | |