ListTagsForResource - Amazon IoT TwinMaker
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

ListTagsForResource

Lists all tags associated with a resource.

Request Syntax

POST /tags-list HTTP/1.1 Content-type: application/json { "maxResults": number, "nextToken": "string", "resourceARN": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

maxResults

The maximum number of results to return at one time. The default is 25.

Valid Range: Minimum value of 1. Maximum value of 250.

Type: Integer

Valid Range: Minimum value of 0. Maximum value of 200.

Required: No

nextToken

The string that specifies the next page of results.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 17880.

Pattern: .*

Required: No

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

Response Syntax

HTTP/1.1 200 Content-type: application/json { "nextToken": "string", "tags": { "string" : "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 string that specifies the next page of results.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 17880.

Pattern: .*

tags

Metadata that you can use to manage a 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: .*

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

See Also

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