All Products
Search
Document Center

Global Accelerator:ListTagResources

Last Updated:Sep 17, 2026

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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:

  • If this is the first query or no subsequent query is to be sent, you do not need to specify this parameter.

  • If a subsequent query is to be sent, set the value to the NextToken value returned in the previous API call.

FFmyTO70tTpLG6I3FmYAXGKPd****

ResourceType

string

Yes

The type of the Global Accelerator resource for which you want to query label information. Valid values:

  • accelerator: a standard Alibaba Cloud Global Accelerator (GA) instance.

  • basicaccelerator: a basic Alibaba Cloud Global Accelerator (GA) instance.

  • bandwidthpackage: a bandwidth plan.

  • acl: an access control policy group.

  • endpointgroup: an endpoint group.

accelerator

ResourceId

array

No

The instance ID of the Global Accelerator resource for which you want to query tag information.

  • If ResourceType is set to accelerator, set this parameter to the instance ID of a standard Alibaba Cloud Global Accelerator (GA) instance.

  • If ResourceType is set to basicaccelerator, set this parameter to the instance ID of a basic Alibaba Cloud Global Accelerator (GA) instance.

  • If ResourceType is set to bandwidthpackage, set this parameter to the ID of a bandwidth plan.

  • If ResourceType is set to acl, set this parameter to the ID of an access control policy group.

  • If ResourceType is set to endpointgroup, set this parameter to the ID of an endpoint group.

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.

  • If ResourceType is set to accelerator, set this parameter to the instance ID of a standard Alibaba Cloud Global Accelerator (GA) instance.

  • If ResourceType is set to basicaccelerator, set this parameter to the instance ID of a basic Alibaba Cloud Global Accelerator (GA) instance.

  • If ResourceType is set to bandwidthpackage, set this parameter to the ID of a bandwidth plan.

  • If ResourceType is set to acl, set this parameter to the ID of an access control policy group.

  • If ResourceType is set to endpointgroup, set this parameter to the ID of an endpoint group.

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 aliyun or acs:. It cannot contain http:// or https://.

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 aliyun or acs:. It cannot contain http:// or https://.

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:

  • If NextToken is empty, no subsequent query is to be sent.

  • If NextToken is returned, the value indicates the token for the next query.

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: a standard Alibaba Cloud Global Accelerator (GA) instance.

  • basicaccelerator: a basic Alibaba Cloud Global Accelerator (GA) instance.

  • bandwidthpackage: a bandwidth plan.

  • acl: an access control policy group.

  • endpointgroup: an endpoint group.

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.