ListTagResources

Updated at:

Queries the tags bound to one or more delivery groups, or filters delivery groups that are bound to specified tags by tag keys and values.

Operation description

This operation follows the Alibaba Cloud tagging specification and is used to query tags bound to Wuying Cloud App delivery groups. You can view the tags bound to resources by resource ID, or filter resources bound to specified tags by tag keys and values.

Before you begin

  • A delivery group is created. You can obtain the delivery group ID by calling the ListAppInstanceGroup operation.

  • Tags are bound to the delivery group. You can bind tags by calling the TagResources operation, or bind them in the console or Tag service.

Parameter description

  • ResourceType is required. Only APPINSTANCEGROUP (delivery group) is supported. If you specify other values, the error code InvalidResourceType.Invalid is returned.

  • You must specify at least one of ResourceId.N and Tag.N. If neither is specified, the error code MissingParameter.ResourceIdsOrTags is returned.
    • If only ResourceId.N is specified: all tags bound to these resources are returned.

    • If only Tag.N is specified: all resources bound to the specified tags and their matched tags are returned.

    • If both are specified: only records of the specified resources bound to the specified tags are returned.

  • Tag.N.Key is required. If it is empty, the error code InvalidTagPolicy.KeyInvalid is returned. Tag.N.Value is optional. If it is not specified, the value corresponding to the tag key is not limited.

  • Multiple Tag.N parameters have an AND relationship. A resource is returned only if it is bound to all specified tags.

Response description

  • The response returns one record for each resource and tag key-value pair. If a resource is bound to multiple tags, multiple records are returned.

  • TotalCount indicates the number of records returned in the current request.

  • This operation returns all matched results at once. An empty NextToken in the response indicates that no more data is available.

Procedure

  1. Call ListAppInstanceGroup to obtain the delivery group ID.

  2. Call TagResources to bind tags to the delivery group.

  3. Call this operation to query the binding relationships by resource ID or tag condition.

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

appstreaming:ListTagResources

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID.

cn-hangzhou

ResourceType

string

Yes

The resource type. Valid values:

  • APPINSTANCEGROUP: delivery group.

The value is not case-sensitive. Only this value is supported. If you specify other values, the error code InvalidResourceType.Invalid is returned.

APPINSTANCEGROUP

ResourceId

array

No

The list of resource IDs. You can specify up to 50 resource IDs.

If the resource type is delivery group, specify the delivery group ID, which starts with aig-. You can obtain the ID by calling the ListAppInstanceGroup operation.

Note

You must specify at least one of ResourceId.N and Tag.N. If only ResourceId.N is specified, all tags bound to these resources are returned.

string

Yes

The resource ID. If the resource type is delivery group, this parameter specifies the delivery group ID.

aig-9ciijz60n4xsv****

Tag

array<object>

No

The list of tag conditions. You can specify up to 20 tag conditions.

Note

You must specify at least one of ResourceId.N and Tag.N. Multiple tags have an AND relationship. Only resources bound to all specified tags are returned.

object

No

The tag condition.

Key

string

Yes

The tag key. This parameter is required. The value is case-sensitive and must be 1 to 128 characters in length.

Resolution

Value

string

No

The tag value. The value is case-sensitive and can be up to 256 characters in length. If this parameter is not specified, the value corresponding to the tag key is not limited, which means any tag value under the key is matched.

720p

NextToken

string

No

The pagination token for paged queries. You do not need to specify this parameter when you call this operation for the first time. If a non-empty NextToken is returned in the previous call, pass it as is to obtain subsequent results.

AAAAAYRHtOLVQzCYj17y+OP7LZRrUJaF4rnBGQkWwMiVHlLZBB1w3Us37CVvhvyM0TXavA==

Response elements

Element

Type

Description

Example

object

Schema of Response

NextToken

string

The pagination token for the next query. An empty value indicates that no more data is available. This operation returns all matched results at once, so this field is usually empty.

AAAAAYRHtOLVQzCYj17y+OP7LZRrUJaF4rnBGQkWwMiVHlLZBB1w3Us37CVvhvyM0TXavA==

RequestId

string

The request ID.

1CBAFFAB-B697-4049-A9B1-67E1FC5F****

TagResources

array<object>

The list of binding records between resources and tags. Each record corresponds to a tag key-value pair on a resource.

object

The binding record between a resource and a tag.

ResourceId

string

The resource ID. If the resource type is delivery group, this parameter specifies the delivery group ID.

aig-9ciijz60n4xsv****

ResourceType

string

The resource type. Valid values:

  • APPINSTANCEGROUP: delivery group.

APPINSTANCEGROUP

TagKey

string

The tag key.

Resolution

TagValue

string

The tag value.

720p

TotalCount

integer

The number of tag records returned in the current request. If a resource is bound to multiple tags, each tag key-value pair is counted as one record.

2

Examples

Success response

JSON format

{
  "NextToken": "AAAAAYRHtOLVQzCYj17y+OP7LZRrUJaF4rnBGQkWwMiVHlLZBB1w3Us37CVvhvyM0TXavA==",
  "RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
  "TagResources": [
    {
      "ResourceId": "aig-9ciijz60n4xsv****",
      "ResourceType": "APPINSTANCEGROUP",
      "TagKey": "Resolution",
      "TagValue": "720p"
    }
  ],
  "TotalCount": 2
}

Error codes

HTTP status code

Error code

Error message

Description

500 ServiceUnavailable Service unavailable. Please try again later. Service unavailable. Please try again later.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.