ListTagsForResource
Returns all the tags associated with an Amazon resource.
Request Syntax
{
"MaxResults": number
,
"NextToken": "string
",
"ResourceArn": "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.
- MaxResults
-
Specifies how many results that you want in the response.
Type: Integer
Valid Range: Minimum value of 0. Maximum value of 100.
Required: No
- NextToken
-
Specifies an opaque string that indicates the position to begin the next list of results in the response.
Type: String
Length Constraints: Maximum length of 65535.
Pattern:
[a-zA-Z0-9=_-]+
Required: No
- ResourceArn
-
Specifies the Amazon Resource Name (ARN) of the resource that you want tag information on.
Type: String
Length Constraints: Maximum length of 128.
Pattern:
^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\-0-9]+:[0-9]{12}:(agent|task|location|system)/((agent|task|loc)-[a-f0-9]{17}|storage-system-[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})(/execution/exec-[a-f0-9]{17})?$
Required: Yes
Response Syntax
{
"NextToken": "string",
"Tags": [
{
"Key": "string",
"Value": "string"
}
]
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- NextToken
-
The opaque string that indicates the position to begin the next list of results in the response.
Type: String
Length Constraints: Maximum length of 65535.
Pattern:
[a-zA-Z0-9=_-]+
- Tags
-
An array of tags applied to the specified resource.
Type: Array of TagListEntry objects
Array Members: Minimum number of 0 items. Maximum number of 55 items.
Errors
For information about the errors that are common to all actions, see Common Errors.
- InternalException
-
This exception is thrown when an error occurs in the Amazon DataSync service.
HTTP Status Code: 500
- InvalidRequestException
-
This exception is thrown when the client submits a malformed request.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific Amazon SDKs, see the following: