Queries the tags that are bound to Global Accelerator resources.
Operation description
Specify at least the ResourceId or Tag (Key and Value) parameter in the request to determine the object to query.
A Tag is a label of a resource and consists of a key-value pair. If you specify only Key, all tag values associated with the tag key are returned. If you specify only Value, an error is returned.
If you specify both Tag and ResourceId to filter tags, ResourceId must match all specified tag key-value pairs.
If you specify multiple tag key-value pairs, the returned results contain resources that match all specified key-value pairs.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ga:ListTagResources |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the Alibaba Cloud Global Accelerator (GA) instance. Set the value to cn-hangzhou. |
cn-hangzhou |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. Generate a parameter value from your client to ensure that the value is unique among different requests. The ClientToken value supports only ASCII characters. Note
If you do not specify this parameter, the system uses the RequestId of the API request as the ClientToken. The RequestId may be different for each API request. |
123e4567-e89b-12d3-a456-426655440000 |
| NextToken |
string |
No |
The token that determines the start point of the next query. Valid values:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| ResourceType |
string |
Yes |
The type of the Global Accelerator resource for which you want to query label information. Valid values:
|
accelerator |
| ResourceId |
array |
No |
The instance ID of the Global Accelerator resource for which you want to query tag information.
You can specify up to 50 Global Accelerator resource IDs. |
|
|
string |
No |
The instance ID of the Global Accelerator resource for which you want to query tag information.
You can specify up to 50 Global Accelerator resource IDs. |
ga-bp149u6o36qt1as9b**** |
|
| Tag |
array<object> |
No |
The tags of the Global Accelerator resources. You can specify up to 20 tags. |
|
|
object |
No |
The tags of the Global Accelerator resources. You can specify up to 20 tags. |
||
| Key |
string |
No |
The tag key of the Global Accelerator resource. If you specify this parameter, the value cannot be an empty string. The tag key can be up to 64 characters in length and cannot start with You can specify up to 20 tag keys. |
KeyTest |
| Value |
string |
No |
The tag value of the Global Accelerator resource. If you specify this parameter, the value can be an empty string. The tag value can be up to 128 characters in length and cannot start with You can specify up to 20 tag values. |
valueTest |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
54B48E3D-DF70-471B-AA93-08E683A1B45 |
| TotalCount |
integer |
The total number of entries returned. |
1 |
| NextToken |
string |
The token that determines the start point of the next query. Valid values:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| TagResources |
object |
||
| TagResource |
array<object> |
The information about the Global Accelerator resources to which tags are bound. |
|
|
object |
The information about the Global Accelerator resources to which tags are bound. |
||
| ResourceType |
string |
The type of the Alibaba Cloud Global Accelerator (GA) resource.
|
accelerator |
| TagValue |
string |
The tag value. |
KeyTest |
| ResourceId |
string |
The ID of the Global Accelerator resource. |
ga-bp149u6o36qt1as9b**** |
| TagKey |
string |
The tag key. |
valueTest |
Examples
Success response
JSON format
{
"RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45",
"TotalCount": 1,
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"TagResources": {
"TagResource": [
{
"ResourceType": "accelerator",
"TagValue": "KeyTest",
"ResourceId": "ga-bp149u6o36qt1as9b****",
"TagKey": "valueTest"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.