Menu
Amazon CloudFront
API Reference (API Version 2016-09-07)

GET Tags

Description

List the tags for a specified resource. To list tags, submit a GET request to the 2016-09-07/tagging resource. The response includes a Tags element with zero or more child elements.

Requests

Syntax

GET 2016-09-07/tagging?Resource=ARN HTTP/1.1
Host: cloudfront.amazonaws.com
Authorization: AWS authentication string
Date: time stamp
Other required headers

Headers

The request must include the headers required in all CloudFront requests. For more information, see Common REST Headers.

Query Parameters

NameDescriptionRequired

Resource

The Amazon Resource Name (ARN) of the resource that you want to list tags for, in the applicable format:

  • arn:aws:cloudfront::AWS account ID:distribution/distribution ID

  • arn:aws:cloudfront::AWS account ID:streaming-distribution/distribution ID

Type: String

Default: None

Yes

Responses

Syntax

200 OK
x-amz-request-id: Request ID

<?xml version="1.0" encoding="UTF-8"?>
<Tags>
   <Items>
      <Tag>
         <Key>Tag Key</Key>
         <Value>Tag Value</Value>
      </Tag>
      ...
   </Items>
</Tags>

Elements

NameDescription

Tags

A complex type that contains the tags that are associated with the distribution.

Type: Complex

Items

A list that contains one Tag element for each tag that is associated with the distribution. You can add up to 10 tags.

Type: List

Tag

A complex type that contains the Key and a Value element for a tag that is associated with the distribution.

Type: Complex

Key

The key for a tag that is associated with the distribution.

Type: String

Value

The value for a tag that is associated with the distribution.

Type: String

Special Errors

The action returns the following special errors. For information about the common errors that all actions return, see Errors.

ErrorDescriptionHTTP Status Code

InvalidTagging

The specified tagging for a CloudFront resource is invalid. For more information, see the error text.

400

NoSuchResource

The resource specified in the Resource parameter is invalid.

400

Examples

The following example request lists two tags.

Sample Request

GET /2016-09-07/tagging?Resource=arn:aws:cloudfront::123456789012:distribution/E123ABCEXAMPLE HTTP/1.1
Host: cloudfront.amazonaws.com
Authorization: AWS authentication string
Date: Thu, 17 May 2012 19:37:58 GMT
Other required headers

Sample Response

200 OK
x-amz-request-id: request_id

<?xml version="1.0" encoding="UTF-8"?>
<Tags>
   <Items>
      <Tag>
         <Key>CustId</Key>
         <Value>1</Value>
      </Tag>
      <Tag>
         <Key>CustName</Key>
         <Value>Amazon</Value>
      </Tag>
   </Items>
</Tags>