TagResource - Quick Setup

TagResource

Assigns key-value pairs of metadata to AWS resources.

Request Syntax

PUT /tags/ResourceArn HTTP/1.1 Content-type: application/json { "Tags": { "string" : "string" } }

URI Request Parameters

The request uses the following URI parameters.

ResourceArn

The ARN of the resource to tag.

Required: Yes

Request Body

The request accepts the following data in JSON format.

Tags

Key-value pairs of metadata to assign to the resource.

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^[A-Za-z0-9 _=@:.+-/]+$

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: ^[A-Za-z0-9 _=@:.+-/]+$

Required: Yes

Response Syntax

HTTP/1.1 200

Response Elements

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

Errors

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

AccessDeniedException

The requester has insufficient permissions to perform the operation.

HTTP Status Code: 403

ConflictException

Another request is being processed. Wait a few minutes and try again.

HTTP Status Code: 409

InternalServerException

An error occurred on the server side.

HTTP Status Code: 500

ResourceNotFoundException

The resource couldn't be found. Check the ID or name and try again.

HTTP Status Code: 404

ThrottlingException

The request or operation exceeds the maximum allowed request rate per AWS account and AWS Region.

HTTP Status Code: 429

ValidationException

The request is invalid. Verify the values provided for the request parameters are accurate.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: