TagResource
Adds tags to a resource.
Request Syntax
POST /tags HTTP/1.1
Content-type: application/json
{
"resourceARN": "string
",
"tags": {
"string
" : "string
"
}
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- resourceARN
-
The ARN of the resource.
Type: String
Length Constraints: Minimum length of 20. Maximum length of 2048.
Pattern:
arn:((aws)|(aws-cn)|(aws-us-gov)):iottwinmaker:[a-z0-9-]+:[0-9]{12}:[\/a-zA-Z0-9_\-\.:]+
Required: Yes
-
Metadata to add to this resource.
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.
Key Pattern:
([\p{L}\p{Z}\p{N}_.:/=+\-@]*)
Value Length Constraints: Minimum length of 1. Maximum length of 256.
Value Pattern:
.*
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
-
Access is denied.
HTTP Status Code: 403
- ResourceNotFoundException
-
The resource wasn't found.
HTTP Status Code: 404
- TooManyTagsException
-
The number of tags exceeds the limit.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific Amazon SDKs, see the following: