AWS Glue
Developer Guide

Tagging APIs in AWS Glue

Data Types

Tag Structure

The Tag object represents a label that you can assign to an AWS 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 AWS Glue, see AWS Tags in AWS Glue and Specifying AWS 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 AWS resource. In AWS Glue, you can tag only certain resources. For information about what resources you can tag, see AWS Tags in AWS Glue.

Request

  • ResourceArnRequired: UTF-8 string, not less than 1 or more than 10240 bytes long, matching the AWS Glue ARN string pattern.

    The ARN of the AWS Glue resource to which to add the tags. For more information about AWS Glue resource ARNs, see the AWS Glue ARN string pattern.

  • TagsToAddRequired: 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

  • InvalidInputException

  • InternalServiceException

  • OperationTimeoutException

  • EntityNotFoundException

UntagResource Action (Python: untag_resource)

Removes tags from a resource.

Request

  • ResourceArnRequired: UTF-8 string, not less than 1 or more than 10240 bytes long, matching the AWS Glue ARN string pattern.

    The Amazon Resource Name (ARN) of the resource from which to remove the tags.

  • TagsToRemoveRequired: An array of UTF-8 strings, not more than 50 strings.

    Tags to remove from this resource.

Response

  • No Response parameters.

Errors

  • InvalidInputException

  • InternalServiceException

  • OperationTimeoutException

  • EntityNotFoundException

GetTags Action (Python: get_tags)

Retrieves a list of tags associated with a resource.

Request

  • ResourceArnRequired: UTF-8 string, not less than 1 or more than 10240 bytes long, matching the AWS Glue ARN string pattern.

    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