查询多个云产品的多个云资源绑定的标签列表。
接口说明
支持标签的云服务,请参见支持标签的云服务。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
tag:ListTagResources |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
地域 ID。取值:
|
cn-hangzhou |
| NextToken |
string |
否 |
下一个查询开始的 Token。 |
caeba0bbb2be03f84eb48b699f0a**** |
| PageSize |
integer |
否 |
分页时每页显示的数据行数。 最大值:1000。默认值:50。 |
50 |
| Tags |
string |
否 |
标签键和标签值,键值对取值范围:1~10。 如果指定多个标签,则会查询同时绑定了该多个标签的资源。 约束如下:
|
{"k1":"v1","k2":"v2"} |
| Category |
string |
否 |
标签类型。取值:
默认值:All。 |
Custom |
| ResourceARN |
array |
否 |
资源 ARN(Aliyun Resource Name)。 N 的取值范围:1~50。 资源 ARN 的格式:
说明
ResourceARN 支持传递资源组、操作审计和资源管理的 |
arn:acs:ecs:cn-hangzhou:123456789****:instance/i-bp15hr53jws84akg**** |
|
string |
否 |
资源 ARN(Aliyun Resource Name)。 |
arn:acs:ecs:cn-hangzhou:123456789****:instance/i-bp15hr53jws84akg**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回参数。 |
||
| NextToken |
string |
根据
|
caeba0bbb2be03f84eb48b699f0a**** |
| RequestId |
string |
请求 ID。 |
014738E0-3C7F-47D8-8FB9-469500C6F387 |
| TagResources |
array<object> |
资源绑定的标签信息。 |
|
|
array<object> |
资源绑定的标签信息。 |
||
| ResourceARN |
string |
资源 ARN。 |
arn:acs:ecs:cn-hangzhou:123456789****:instance/i-bp15hr53jws84akg**** |
| Tags |
array<object> |
标签信息。 |
|
|
object |
标签信息。 |
||
| Key |
string |
标签键。 |
k1 |
| Value |
string |
标签值。 |
v1 |
| Category |
string |
标签类型。取值:
|
Custom |
示例
正常返回示例
JSON格式
{
"NextToken": "caeba0bbb2be03f84eb48b699f0a****",
"RequestId": "014738E0-3C7F-47D8-8FB9-469500C6F387",
"TagResources": [
{
"ResourceARN": "arn:acs:ecs:cn-hangzhou:123456789****:instance/i-bp15hr53jws84akg****",
"Tags": [
{
"Key": "k1",
"Value": "v1",
"Category": "Custom"
}
]
}
]
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidResourceARN.Account | The Account specified in the ResourceARN parameter does not match the actual account, specifically: %s. | ResourceARN中的Account与实际用户不吻合,分别是:%s |
| 400 | InvalidResourceARN.FormatError | The format of parameter ResourceARN: %s is not valid, for the correct format, you can refer to the Recommend. | ResourceARN的格式不符合规范,正确的格式请参考错误诊断。 |
| 400 | InvalidResourceARN.Region | The Region specified in the ResourceARN parameter does not match the RegionId parameter, specifically: %s. | ResourceARN中的Region与参数RegionId不匹配,它们分别是:%s |
| 400 | InvalidParameter.TagKey | The TagKey parameter is invalid. The following TagKeys are invalid: %s. | 参数中存在不合法的标签键,不合法的标签键如下:%s |
| 400 | InvalidParameter.Tags | The Tags parameter cannot be empty, and JSON parsing should adhere to the format of a Map. | |
| 400 | InvalidParameter.RegionId | %s. | 地域参数不合法。 |
| 400 | Throttling | You have exceeded the maximum traffic. To increase the limit, submit a ticket. | 你的请求量太大,被流控。请降低请求频率后重试。 |
| 403 | Duplicate.TagKey | The Tag.N.Key contains duplicate keys. | 参数包含重复标签键。 |
| 403 | InvalidParameter.Category | The specified Category is invalid. Valid values are Custom and System. | 标签类型非法,合法值为Custom,System。 |
| 403 | MissingParameter.ResourceIds | You must specify ResourceIds. | 资源列表参数不可为空。 |
| 403 | NoPermission.Operator | The user is not authorized to operate on the specified resource. | 该用户没有权限操作。 |
| 403 | NoPermission.SystemTag | The user does not have permission to operate the system tag. | 该用户没有权限操作此系统标签。 |
| 403 | NoPermissionKey.Category | Some keys cannot be modified because the user does not have permission. | 某些key的标签类型没有操作权限。 |
| 403 | NoPermissionKey.Operator | You are not authorized to operate the tag key. | 该用户没有操作此标签键权限。 |
| 403 | NumberExceed.ResourceIds | The maximum number of ResourceIds is exceeded. | 资源列表参数数量超限。 |
| 403 | NumberExceed.Tags | The maximum number of Tags is exceeded. | 标签参数数量超限。 |
| 403 | QuotaExceed.TagsPerResource | The maximum number of tags for each resource is exceeded. | 每个资源上的标签数量有限制,目前有资源已经超限。 |
| 403 | Invalid.NextToken | The parameter NextToken is invalid. | NextToken参数非法。 |
| 403 | InvalidParameter.TagValue | The Tag.N.Value parameter is invalid. | 标签值参数非法。 |
| 403 | InvalidParameter.ResourceType | The ResourceType parameter is invalid. | 资源类型参数非法。 |
| 404 | Missing.TagKey | Tag.N.Value has been specified and you must specify Tag.N.Key. | 一对键值对,对应的TagValue缺失相同N的TagKey。 |
| 404 | MissingParameter.AliUid | You must specify AliUid. | 缺失用户UID参数。 |
| 404 | MissingParameter.Bid | You must specify Bid. | bid参数不可为空。 |
| 404 | MissingParameter.RegionId | You must specify RegionId. | 缺少RegionId参数。 |
| 404 | MissingParameter.RemoveNum | You must specify RemoveNum. | 删除数量参数缺失。 |
| 404 | MissingParameter.ResourceIdARN | You must specify ResourceIdARN. | 缺少ResourceIdARN参数。 |
| 404 | MissingParameter.TagKey | You must specify TagKey. | 标签键参数不可为空。 |
| 404 | MissingParameter.Tags | You must specify Tags. | 缺少参数Tags。 |
| 404 | NoMatch.RemoveNum | The specified DataNum does not match the deleted number. | 删除数量参数不匹配。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。