tag_resource
¶
tag_resource(
resource_arn: DeviceFarmArn,
tags: TagList,
*,
config_overrides: Optional[DeviceFarmClientConfig] = None,
) -> TagResourceResponse
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.
Parameters:
-
resource_arn(DeviceFarmArn) –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,TESTGRID_PROJECT,RUN,NETWORK_PROFILE,INSTANCE_PROFILE,DEVICE_INSTANCE,SESSION,DEVICE_POOL,DEVICE, andVPCE_CONFIGURATION. -
tags(TagList) –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.
Raises:
-
ArgumentException–An invalid argument was specified.
-
NotFoundException–The specified entity was not found.
-
TagOperationException–The operation was not successful. Try again.
-
TagPolicyException–The request doesn't comply with the AWS Identity and Access Management (IAM) tag policy. Correct your request and then retry it.
-
TooManyTagsException–The list of tags on the repository is over the limit. The maximum number of tags that can be applied to a repository is 50.
-
UnknownServiceError–The service returned an error code this client does not model.