Tagging APIs in Amazon Glue
Data types
Tag structure
The Tag
object represents a label that you can assign to
an Amazon resource. Each tag consists of a key and an optional value,
both of which you define.
For more information about tags, and controlling access to resources in Amazon Glue, see Amazon Tags in Amazon Glue and Specifying Amazon Glue Resource ARNs in the developer guide.
Fields
-
key
– UTF-8 string, not less than 1 or more than 128 bytes long.The tag key. The key is required when you create a tag on an object. The key is case-sensitive, and must not contain the prefix aws.
-
value
– UTF-8 string, not more than 256 bytes long.The tag value. The value is optional when you create a tag on an object. The value is case-sensitive, and must not contain the prefix aws.
Operations
TagResource action (Python: tag_resource)
Adds tags to a resource. A tag is a label you can assign to an Amazon resource. In Amazon Glue, you can tag only certain resources. For information about what resources you can tag, see Amazon Tags in Amazon Glue.
In addition to the tagging permissions to call tag related APIs, you also
need the glue:GetConnection
permission to call tagging APIs
on connections, and the glue:GetDatabase
permission to call
tagging APIs on databases.
Request
-
ResourceArn
– Required: UTF-8 string, not less than 1 or more than 10240 bytes long, matching the Custom string pattern #49.The ARN of the Amazon Glue resource to which to add the tags. For more information about Amazon Glue resource ARNs, see the Amazon Glue ARN string pattern.
-
TagsToAdd
– Required: A map array of key-value pairs, not more than 50 pairs.Each key is a UTF-8 string, not less than 1 or more than 128 bytes long.
Each value is a UTF-8 string, not more than 256 bytes long.
Tags to add to this resource.
Response
No Response parameters.
Errors
ResourceNotFoundException
UntagResource action (Python: untag_resource)
Removes the specified tags from an integration resource.
Request
-
ResourceArn
– Required: UTF-8 string, not less than 1 or more than 10240 bytes long, matching the Custom string pattern #49.The Amazon Resource Name (ARN) for the integration resource.
-
TagsToRemove
– Required: An array of UTF-8 strings, not more than 50 strings.A list of metadata tags to be removed from the resource.
Response
No Response parameters.
Errors
ResourceNotFoundException
GetTags action (Python: get_tags)
Retrieves a list of tags associated with a resource.
Request
-
ResourceArn
– Required: UTF-8 string, not less than 1 or more than 10240 bytes long, matching the Custom string pattern #49.The Amazon Resource Name (ARN) of the resource for which to retrieve tags.
Response
-
Tags
– A map array of key-value pairs, not more than 50 pairs.Each key is a UTF-8 string, not less than 1 or more than 128 bytes long.
Each value is a UTF-8 string, not more than 256 bytes long.
The requested tags.
Errors
InvalidInputException
InternalServiceException
OperationTimeoutException
EntityNotFoundException