TagResource
Tags an Amazon FSx resource.
Request Syntax
{
"ResourceARN": "string
",
"Tags": [
{
"Key": "string
",
"Value": "string
"
}
]
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- ResourceARN
-
The Amazon Resource Name (ARN) of the Amazon FSx resource that you want to tag.
Type: String
Length Constraints: Minimum length of 8. Maximum length of 512.
Pattern:
^arn:(?=[^:]+:fsx:[^:]+:\d{12}:)((|(?=[a-z0-9-.]{1,63})(?!\d{1,3}(\.\d{1,3}){3})(?![^:]*-{2})(?![^:]*-\.)(?![^:]*\.-)[a-z0-9].*(?<!-)):){4}(?!/).{0,1024}$
Required: Yes
- Tags
-
A list of tags for the resource. If a tag with a given key already exists, the value is replaced by the one specified in this parameter.
Type: Array of Tag objects
Array Members: Minimum number of 1 item. Maximum number of 50 items.
Required: Yes
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.
- BadRequest
-
A generic error indicating a failure with a client request.
- Message
-
A detailed error message.
HTTP Status Code: 400
- InternalServerError
-
A generic error indicating a server-side failure.
- Message
-
A detailed error message.
HTTP Status Code: 500
- NotServiceResourceError
-
The resource specified for the tagging operation is not a resource type owned by Amazon FSx. Use the API of the relevant service to perform the operation.
- Message
-
A detailed error message.
- ResourceARN
-
The Amazon Resource Name (ARN) of the non-Amazon FSx resource.
HTTP Status Code: 400
- ResourceDoesNotSupportTagging
-
The resource specified does not support tagging.
- Message
-
A detailed error message.
- ResourceARN
-
The Amazon Resource Name (ARN) of the resource that doesn't support tagging.
HTTP Status Code: 400
- ResourceNotFound
-
The resource specified by the Amazon Resource Name (ARN) can't be found.
- Message
-
A detailed error message.
- ResourceARN
-
The resource ARN of the resource that can't be found.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: