Menu
Resource Groups Tagging API
API Reference (API Version 2017-01-26)

GetTagValues

Returns all tag values for the specified key in the specified region for the AWS account.

Request Syntax

{ "Key": "string", "PaginationToken": "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.

Key

The key for which you want to list all existing values in the specified region for the AWS account.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Required: Yes

PaginationToken

A string that indicates that additional data is available. Leave this value empty for your initial request. If the response includes a PaginationToken, use that string for this value to request an additional page of data.

Type: String

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

Required: No

Response Syntax

{ "PaginationToken": "string", "TagValues": [ "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.

PaginationToken

A string that indicates that the response contains more data than can be returned in a single response. To receive additional data, specify this string for the PaginationToken value in a subsequent request.

Type: String

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

TagValues

A list of all tag values for the specified key in the AWS account.

Type: Array of strings

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

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServiceException

The request processing failed because of an unknown error, exception, or failure. You can retry the request.

HTTP Status Code: 500

InvalidParameterException

A parameter is missing or a malformed string or invalid or out-of-range value was supplied for the request parameter.

HTTP Status Code: 400

PaginationTokenExpiredException

A PaginationToken is valid for a maximum of 15 minutes. Your request was denied because the specified PaginationToken has expired.

HTTP Status Code: 400

ThrottledException

The request was denied to limit the frequency of submitted requests.

HTTP Status Code: 400

Example

Sample Request

POST / HTTP/1.1 Host: tagging.us-west-2.amazonaws.com Accept-Encoding: identity Content-Length: 18 X-Amz-Target: ResourceGroupsTaggingAPI_20170126.GetTagValues X-Amz-Date: 20170421T214524Z User-Agent: aws-cli/1.11.79 Python/2.7.9 Windows/7 botocore/1.5.42 Content-Type: application/x-amz-json-1.1 Authorization: AUTHPARAMS { "Key": "Example_key" }

Sample Response

HTTP/1.1 200 OK x-amzn-RequestId: d3cf21f0-26db-11e7-a532-75e05382c8b1 Content-Type: application/x-amz-json-1.1 Content-Length: 42 Date: Fri, 21 Apr 2017 21:45:25 GMT { "PaginationToken": "", "TagValues": [ "Example_value" ] }

See Also

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