TagResource - AWS Elemental Inference

TagResource

Associates the specified tags to the resource identified by the specified resourceArn in the current region. If existing tags on a resource are not specified in the request parameters, they are not changed. When a resource is deleted, the tags associated with that resource are also deleted.

Request Syntax

POST /v1/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 where you want to add tags.

Required: Yes

Request Body

The request accepts the following data in JSON format.

tags

A list of tags to add to the resource.

Type: String to string map

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

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

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.

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 403

ConflictException

The request could not be completed due to a conflict.

HTTP Status Code: 409

InternalServerErrorException

An internal server error occurred. This is a temporary condition and the request can be retried. If the problem persists, contact AWS Support.

HTTP Status Code: 500

ResourceNotFoundException

The resource specified in the action doesn't exist.

HTTP Status Code: 404

TooManyRequestException

The request was denied due to request throttling. Too many requests have been made within a given time period. Reduce the frequency of requests and use exponential backoff when retrying.

HTTP Status Code: 429

ValidationException

The input fails to satisfy the constraints specified by the service. Check the error message for details about which parameter or field is invalid and correct the request before retrying.

HTTP Status Code: 400

See Also

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