ECRPublic.Client.
tag_resource
(**kwargs)¶Associates the specified tags to a resource with the specified resourceArn
. If existing tags on a resource aren't specified in the request parameters, they aren't changed. When a resource is deleted, the tags associated with that resource are also deleted.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
resourceArn='string',
tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource to add tags to. Currently, the supported resource is an Amazon ECR Public repository.
[REQUIRED]
The tags to add to the resource. A tag is an array of key-value pairs. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value. You define both. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
One part of a key-value pair that make up a tag. A key
is a general label that acts like a category for more specific tag values.
The optional part of a key-value pair that make up a tag. A value
acts as a descriptor within a tag category (key).
dict
Response Syntax
{}
Response Structure
Exceptions
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.InvalidTagParameterException
ECRPublic.Client.exceptions.TooManyTagsException
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.UnsupportedCommandException
ECRPublic.Client.exceptions.ServerException