Queries the list of tags bound to Global Accelerator resources.
Operation description
Specify at least the ResourceId or Tag (Key and Value) parameter in the request to determine the objects to be retrieved.
A Tag is a tag of a resource and consists of a key-value pair. If only the Key is specified, all tag values associated with the tag key are returned. If only the Value is specified, an error is reported.
If you specify both Tag and ResourceId to filter tags, the ResourceId must match all the specified tag key-value pairs.
If you specify multiple tag key-value pairs, the returned resources are those that contain all the 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 Global Accelerator instance. Only cn-hangzhou is supported. |
cn-hangzhou |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can generate the value from your client and make sure that the value is unique across different requests. The ClientToken parameter supports only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the RequestId of the API request as the ClientToken. The RequestId of each API request is unique. |
123e4567-e89b-12d3-a456-426655440000 |
| NextToken |
string |
No |
The token for the next query. Valid values:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| ResourceType |
string |
Yes |
The type of the Global Accelerator resource for which you want to query tag information. Valid values:
|
accelerator |
| ResourceId |
array |
No |
The 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 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 resource. You can specify up to 20 tags. |
|
|
object |
No |
The tags of the Global Accelerator resource. You can specify up to 20 tags. |
||
| Key |
string |
No |
The tag key of the Global Accelerator resource. If you specify this parameter, it cannot be an empty string. The tag key can be up to 64 characters in length. It 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, it can be an empty string. The tag value can be up to 128 characters in length. It cannot start with You can specify up to 20 tag values. |
valueTest |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| NextToken |
string |
The token for the next query. Valid values:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| RequestId |
string |
The request ID. |
54B48E3D-DF70-471B-AA93-08E683A1B45 |
| TagResources |
object |
||
| TagResource |
array<object> |
The information about the Global Accelerator resources that are associated with tags. |
|
|
object |
The information about the Global Accelerator resources that are associated with tags. |
||
| ResourceId |
string |
The ID of the Global Accelerator resource. |
ga-bp149u6o36qt1as9b**** |
| ResourceType |
string |
The type of the Global Accelerator resource. Valid values:
|
accelerator |
| TagKey |
string |
The tag key. |
valueTest |
| TagValue |
string |
The tag value. |
KeyTest |
| TotalCount |
integer |
The total number of entries. |
1 |
Examples
Success response
JSON format
{
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45",
"TagResources": {
"TagResource": [
{
"ResourceId": "ga-bp149u6o36qt1as9b****",
"ResourceType": "accelerator",
"TagKey": "valueTest",
"TagValue": "KeyTest"
}
]
},
"TotalCount": 1
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.