Queries the tags of cloud computers.
Operation description
You must use at least one of the following parameters in the request to determine the object that you want to query: ResourceId.N
, Tag.N.Key
, and Tag.N.Value
.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
ResourceType | string | Yes | The type of the resource. Valid values:
| ALIYUN::GWS::INSTANCE |
MaxResults | integer | No | The number of entries per page. | 10 |
NextToken | string | No | The pagination token that is used in the next request to retrieve a new page of results. | caeba0bbb2be03f84eb48b699f0a4883 |
ResourceId | array | No | The resource IDs, which are cloud computer IDs. You can specify 1 to 50 IDs. | |
string | No | The resource ID, which is the cloud computer ID. | ecd-ia2zw38bi6cm7**** | |
Tag | object [] | No | The tags that you want to query. | |
Key | string | No | The tag keys. You can specify 1 to 20 tag keys. | TestKey |
Value | string | No | The tag values. You can specify 1 to 20 tag values. | TestValue |
Response parameters
Examples
Sample success responses
JSON
format
{
"NextToken": "caeba0bbb2be03f84eb48b699f0a4883",
"RequestId": "484256DA-D816-44D2-9D86-B6EE4D5BA78C",
"TagResources": [
{
"TagValue": "TestValue",
"ResourceType": "ALIYUN::GWS::INSTANCE",
"ResourceId": "ecd-ia2zw38bi6cm7****",
"TagKey": "TestKey"
}
]
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|