tag_resource
(**kwargs)¶Associates the specified tags to a resource with the specified resourceArn
. If existing tags on a resource are not specified in the request parameters, they are not 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 or resources to which to add tags. You can associate tags with the following Device Farm resources: PROJECT
, RUN
, NETWORK_PROFILE
, INSTANCE_PROFILE
, DEVICE_INSTANCE
, SESSION
, DEVICE_POOL
, DEVICE
, and VPCE_CONFIGURATION
.
[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. Tag values can have a maximum length of 256 characters.
The metadata that you apply to a resource to help you categorize and organize it. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters. Tag values can have a maximum length of 256 characters.
One part of a key-value pair that makes 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 makes up a tag. A value
acts as a descriptor in a tag category (key).
dict
Response Syntax
{}
Response Structure
Exceptions
DeviceFarm.Client.exceptions.ArgumentException
DeviceFarm.Client.exceptions.NotFoundException
DeviceFarm.Client.exceptions.TagOperationException
DeviceFarm.Client.exceptions.TooManyTagsException
DeviceFarm.Client.exceptions.TagPolicyException