Queries one or more tag values of a specified tag key.
In this example, the tag values of TagKey1
that is added to a stack in the China (Hangzhou) region are queried.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListTagValues |
The operation that you want to perform. Set the value to ListTagValues. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the tag value. You can call the DescribeRegions operation to query the most recent region list. |
ResourceType | String | Yes | stack |
The type of the resource. Valid values:
|
NextToken | String | No | caeba0bbb2be03f84eb48b699f0***** |
The token that determines the start point of the next query. |
Key | String | Yes | TagKey1 |
The tag key. |
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
NextToken | String | caeba0bbb2be03f84eb48b699f0***** |
The token that is used to start the next query. |
RequestId | String | C429473A-5C66-4661-B5F8-4F900CD4330A |
The ID of the request. |
Values | Array of String | TagValue1 |
The tag values. |
Examples
Sample requests
http(s)://ros.aliyuncs.com/?Action=ListTagValues
&Key=TagKey1
&RegionId=cn-hangzhou
&ResourceType=stack
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListTagValuesResponse>
<NextToken></NextToken>
<RequestId>BD1EB89F-F2CD-4663-B602-26868A49EAFD</RequestId>
<Values>TagValue1</Values>
</ListTagValuesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"NextToken" : "",
"RequestId" : "BD1EB89F-F2CD-4663-B602-26868A49EAFD",
"Values" : [ "TagValue1" ]
}
Error codes
For a list of error codes, see Service error codes.