All Products
Search
Document Center

Global Accelerator:ListTagResources

Last Updated:Oct 14, 2026

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

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 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:

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

  • If a subsequent query is required, set the value to the NextToken value returned by the previous API call.

FFmyTO70tTpLG6I3FmYAXGKPd****

ResourceType

string

Yes

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

  • accelerator: standard Global Accelerator instance.

  • basicaccelerator: basic Global Accelerator instance.

  • bandwidthpackage: bandwidth plan.

  • acl: access control policy group.

  • endpointgroup: endpoint group.

accelerator

ResourceId

array

No

The 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 Global Accelerator instance.

  • If ResourceType is set to basicaccelerator, set this parameter to the instance ID of a basic Global Accelerator 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 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 Global Accelerator instance.

  • If ResourceType is set to basicaccelerator, set this parameter to the instance ID of a basic Global Accelerator 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 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 aliyun or acs:, and 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, it can be an empty string.

The tag value can be up to 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://.

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:

  • If NextToken is empty, no subsequent query is required.

  • If NextToken returns a value, the value indicates the token for the next query.

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: standard Global Accelerator instance.

  • basicaccelerator: basic Global Accelerator instance.

  • bandwidthpackage: bandwidth plan.

  • acl: access control policy group.

  • endpointgroup: endpoint group.

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.