Queries the tags that are added resources.
Operation description
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:
- For mandatory resource types, indicate with a prefix of * .
- 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 |
---|---|---|---|---|
ram:ListTagResources | list | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ResourcePrincipalName | array | No | The name of resource N. Valid values of N: 1 to 50. If ResourceType is set to user, the resource name is the name of the RAM user. Note
You must specify only one of the following parameters: ResourceId and ResourcePrincipalName.
| |
string | No | The name of resource N. Valid values of N: 1 to 50. If ResourceType is set to user, the resource name is the name of the RAM user. Note
You must specify only one of the following parameters: ResourceId and ResourcePrincipalName.
| test@example.onaliyun.com | |
NextToken | string | No | The token that is used to initiate the next request if the response of the current request is truncated. You can use the token to initiate another request and obtain the remaining records. | caeba0bbb2be03f84eb48b699f0a4883 |
PageSize | integer | No | The number of entries per page. If a response is truncated because it reaches the value of PageSize, the value of IsTruncated will be true. Valid values: 1 to 100. Default value: 100. | 2 |
ResourceType | string | Yes | The type of the resource. Valid value:
| user |
ResourceId | array | No | The ID of resource N. Valid values of N: 1 to 50. If ResourceType is set to user, the resource ID is the ID of the RAM user. Note
You must specify only one of the following parameters: ResourceId and ResourcePrincipalName.
| |
string | No | The ID of resource N. Valid values of N: 1 to 50. If ResourceType is set to user, the resource ID is the ID of the RAM user. Note
You must specify only one of the following parameters: ResourceId and ResourcePrincipalName.
| 20732900249392**** | |
Tag | array<object> | No | The tag value. Valid values of N: 1 to 20. N must be consecutive. | |
object | No | |||
Key | string | No | The key of tag N. Valid values of N: 1 to 20. N must be consecutive. | operator |
Value | string | No | The value of tag N. Valid values of N: 1 to 20. N must be consecutive. | alice |
Response parameters
Examples
Sample success responses
JSON
format
{
"NextToken": "caeba0bbb2be03f84eb48b699f0a****",
"RequestId": "4BE83135-0B08-467C-B3A2-27B312FD0F57",
"TagResources": {
"TagResource": [
{
"ResourceType": "user",
"TagValue": "alice",
"ResourceId": "20732900249392****",
"TagKey": "operator"
}
]
},
"IsTruncated": true
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-08-14 | API Description Update | View Change Details |
2023-09-19 | The internal configuration of the API is changed, but the call is not affected | View Change Details |