Queries tags. You can call the ListTagResources operation to query tags that are added to Auto Scaling resources, thereby clarifying resource utilization and facilitating efficient management. This operation aids in the automation of resource categorization and permission management processes.
Operation description
- Specify at least one of the following request parameters:
ResourceIds
andTags
.Tags.Key
andTags.Value
are used to specify the query objects. - If you provide both
ResourceIds
andTags
in your request, the response will exclusively include Auto Scaling resources that satisfy the criteria set by these parameters, ensuring targeted and precise information retrieval.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ess:ListTagResources | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the resource. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
ResourceType | string | Yes | The resource type. Set the value to scalinggroup. | scalinggroup |
NextToken | string | No | The token that determines the start point of the next query. | caeba0bbb2be03f84eb48b699f0a4883 |
ResourceIds | array | No | The IDs of the Auto Scaling resources. You can specify 1 to 50 resource IDs. | |
string | No | The IDs of the Auto Scaling resources. You can specify 1 to 50 resource IDs. | asg-bp17xb4x1vr29lgt**** | |
Tags | array<object> | No | Details of the tags. | |
object | No | Details of the tags. | ||
Key | string | No | The key of the tag. The key is used to perform an exact match of Auto Scaling resources. The key must be 1 to 128 characters in length.
| TestKey |
Value | string | No | The value of the tag. The value is used to perform an exact match of Auto Scaling resources. The value can be up to 128 characters in length. | TestValue |
Response parameters
Examples
Sample success responses
JSON
format
{
"NextToken": "caeba0bbb2be03f84eb48b699f0a4883",
"RequestId": "DE65F6B7-7566-4802-9007-96F2494A****",
"TagResources": [
{
"TagValue": "TestValue",
"ResourceType": "ALIYUN::ESS::SCALINGGROUP",
"ResourceId": "asg-bp17xb4x1vr29lgt****",
"TagKey": "TestKey",
"Propagate": false
}
]
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|