TagResource
Adds tags to a profile or profile entry. If the resource already has a tag with the same key, the new value replaces the value of that tag. A tag is a key-value pair that you assign to a resource. Tags help you categorize your resources, for example by purpose, owner, or environment, so that you can find and manage related resources more easily.
Request Syntax
POST /tags/resourceArn HTTP/1.1
Content-type: application/json
{
"tags": {
"string" : "string"
}
}
URI Request Parameters
The request uses the following URI parameters.
- resourceArn
-
The Amazon Resource Name (ARN) of the profile or profile entry to tag.
Length Constraints: Minimum length of 20. Maximum length of 1011.
Pattern:
arn:[a-z0-9-]+:cloudextensions:[a-z0-9-]*:([0-9]{0,12}|aws):[a-z]+/[a-zA-Z0-9/_:-]+Required: Yes
Request Body
The request accepts the following data in JSON format.
-
The tags to add or replace, as a map of tag keys to tag values. A resource can have up to 50 tags.
Type: String to string map
Map Entries: Minimum number of 0 items. Maximum number of 50 items.
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 Error Types.
- AccessDeniedException
-
You don't have permission to perform the operation.
- message
-
A description of why the request was denied.
HTTP Status Code: 403
- InternalServerException
-
The service couldn't process the request because of an internal error. Retry the request with capped exponential backoff and jitter.
- message
-
A short summary that is the same for every
InternalServerException. - retryAfterSeconds
-
The number of seconds to wait before you retry the request, from the
Retry-Afterheader. This value is present only when the service sets the header.
HTTP Status Code: 500
- ResourceNotFoundException
-
The specified resource doesn't exist, or you don't have permission to access it.
- identifier
-
The identifier that was used to look up the resource.
- message
-
A short summary that is the same for every
ResourceNotFoundException. For the details, seeresourceTypeandidentifier. - resourceType
-
The type of the resource that wasn't found.
HTTP Status Code: 404
- ThrottlingException
-
The request rate exceeded a limit. Retry the request with capped exponential backoff and jitter.
- message
-
A description of the error.
- retryAfterSeconds
-
The number of seconds to wait before you retry the request, from the
Retry-Afterheader. This value is present only when the service sets the header.
HTTP Status Code: 429
- ValidationException
-
The request is malformed or contains parameter values that aren't valid.
- errors
-
A list of the specific reasons that the request failed validation, when available.
- message
-
A short summary that is the same for every
ValidationException. For the details, seereasonanderrors. - reason
-
A classification of the validation failure.
FIELD_VALIDATION_FAILEDmeans that one or more input fields failed validation.UNKNOWN_OPERATIONmeans that the requested operation doesn't exist.CANNOT_PARSEmeans that the request body couldn't be parsed, or doesn't have the shape that the operation expects.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: