DeviceFarm / Client / tag_resource
tag_resource¶
- DeviceFarm.Client.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' }, ] )
- Parameters:
ResourceARN (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, andVPCE_CONFIGURATION.Tags (list) –
[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.
(dict) –
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.
Key (string) – [REQUIRED]
One part of a key-value pair that makes up a tag. A
keyis a general label that acts like a category for more specific tag values.Value (string) – [REQUIRED]
The optional part of a key-value pair that makes up a tag. A
valueacts as a descriptor in a tag category (key).
- Return type:
dict
- Returns:
Response Syntax
{}Response Structure
(dict) –
Exceptions
DeviceFarm.Client.exceptions.ArgumentExceptionDeviceFarm.Client.exceptions.NotFoundExceptionDeviceFarm.Client.exceptions.TagOperationExceptionDeviceFarm.Client.exceptions.TooManyTagsExceptionDeviceFarm.Client.exceptions.TagPolicyException