register_container_instance
¶
register_container_instance(
*,
config_overrides: Optional[ECSClientConfig] = 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/ecs.py
3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 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 | |