ListTagResources
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 codeInvalidResourceType.Invalidis returned.- You must specify at least one of ResourceId.N and Tag.N. If neither is specified, the error code
MissingParameter.ResourceIdsOrTagsis 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.KeyInvalidis 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
Call ListAppInstanceGroup to obtain the delivery group ID.
Call TagResources to bind tags to the delivery group.
Call this operation to query the binding relationships by resource ID or tag condition.
Try it now
Test
RAM authorization
|
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:
The value is not case-sensitive. Only this value is supported. If you specify other values, the error code |
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 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 |
| 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.