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

TagResource

Add tags to a CloudFront resource.

Request Syntax

POST /2016-09-29/tagging?Operation=Tag?Resource=Resource HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<TagResourceRequest>
   <Tags>
      <Items>
         <Tag>
            <Key>string</Key>
            <Value>string</Value>
         </Tag></Items>
   </Tags>
</TagResourceRequest>

URI Request Parameters

The request requires the following URI parameters.

Resource

An ARN of a CloudFront resource.

Pattern: arn:aws:cloudfront::[0-9]+:.*

Request Body

The request requires the following data in XML format.

TagResourceRequest

Root level tag for the TagResourceRequest parameters.

Required: Yes

Tags

A complex type that contains zero or more Tag elements.

Type: Tags object

Required: Yes

Response Syntax

HTTP/1.1 204

Response Elements

If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDenied

Access denied.

HTTP Status Code: 403

InvalidArgument

The argument is invalid.

HTTP Status Code: 400

InvalidTagging

HTTP Status Code: 400

NoSuchResource

HTTP Status Code: 404