You need to enable JavaScript to run this app.
文档中心
负载均衡

负载均衡

复制全文
下载 pdf
标签
ListTagsForResources - 查询标签资源列表
复制全文
下载 pdf
ListTagsForResources - 查询标签资源列表
调用 ListTagsForResources 接口,查询资源标签列表。​
使用说明​
每秒最多提交 50 个 API 请求。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:ListTagsForResources​
要执行的操作,取值:ListTagsForResources。​
​
Version string 必选 示例值:2020-04-01​
API的版本,取值:2020-04-01。​
​
ResourceType string 必选 示例值:loadbalancer​
资源类型。取值如下:​
  • loadbalancer:负载均衡实例。​
  • listener:监听器。​
  • servergroup:后端服务器组。​
  • certificate:证书。​
  • acl:访问控制策略组。​
  • healthchecktemplate:健康检查模板。​
  • customizedcfg:个性化配置。​
​
ResourceIds.N string[] 可选 示例值:ResourceIds.1=alb-273sdsdsxxxxxp8u2j****&ResourceIds.2=alb-2fe6fszjgeznk5oxruv0u****​
资源的ID。​
  • 参数 - N:表示资源 ID的序号,单次调用数量上限50个。​
  • 多个资源 ID之间使用 & 分隔。​
​
TagFilters.N.Key string[] 可选 示例值:TagFilters.1.Key=k1&TagFilters.2.Key=k2​
根据标签查询资源时指定的标签键。参数-N:表示标签键的序号,单次调用数量上限10个。 多个标签键之间使用&分隔。 指定多个标签键时,表示查询同时包含所有指定标签键的资源。​
​
TagFilters.N.Values.N string[] 可选 示例值:TagFilters.1.Values.1=v1&TagFilters.2.Values.1=v4​
资源标签的标签值。每个标签键最多可指定3个标签值。未传入该参数时,表示查询指定标签键下所有标签值对应的标签所关联的资源。 同一个标签键指定多个标签值时,表示查询各个标签值对应标签所关联资源的集合。​
如果传入该参数,则必须先传入TagFilters.N.Key。​
​
MaxResults integer 可选 示例值:10​
单次查询的数量,默认为 10,最大为100。​
​
NextToken string 可选 示例值:OTk5OTk5OQ==​
分页查询凭证,用于标记分页的位置,初次调用该接口时无需设置。下次查询时,取值为上一次API调用返回的NextToken参数值。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
RequestId string 示例值:2021062415303301022514515207C4****​
请求ID。​
​
NextToken string 示例值:OTk5OTk5OQ==​
本次调用返回的查询凭证值,返回为空表示没有下一页。​
​
ResourceTags object[] 示例值:--​
资源及其附加的标签信息。​
ResourceID string 示例值:alb-2e0b1cayeha81fi56*****​
资源的ID。​
​
ResourceType string 示例值:listener​
资源的类型。​
​
TagKey string 示例值:K1​
资源附加标签的标签键。​
​
TagValue string 示例值:Val1​
资源附加标签的标签值。​
​
​
​
​
请求示例​
​
GET /?Action=ListTagsForResources&Version=2020-04-01&ResourceType=loadbalancer&ResourceIds.1=alb-2e0b1cayeha81fi56cp*****&ResourceIds.2=alb-1tzhdsteithq84gwgtb***** HTTP/1.1​
Host: alb.cn-beijing.volcengineapi.com​
X-Date: 20251121T094038Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251121/cn-beijing/alb/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "2024062415303301022514515207C4****",​
"Action": "ListTagsForResources",​
"Version": "2020-04-01",​
"Service": "alb",​
"Region": "cn-beijing"​
},​
"Result": {​
"RequestId": "2024062415303301022514515207C4****",​
"NextToken": "hj4l32hj4gjvgo430f5****",​
"ResourceTags": [​
{​
"ResourceType": "loadbalancer",​
"ResourceId": "alb-2e0b1cayeha81fi56cp*****",​
"TagKey": "k1",​
"TagValue": "v1"​
},​
{​
"ResourceType": "loadbalancer",​
"ResourceId": "alb-1tzhdsteithq84gwgtb*****",​
"TagKey": "k2",​
"TagValue": "v2"​
}​
]​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
InvalidParameter​
Data unmarshal failed.​
请求解析失败。​
400​
MissingParameter​
The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, '%s'.​
该请求缺少必要参数。请确保发起请求已提供全部必要参数,比如: %s。​
400​
Invalid%s.Malformed​
MismatchThe specified %s is malformed.​
指定的 %s 参数格式不合法。​
400​
InvalidTags.Value.Malformed​
The specified Tags.Value is malformed.​
指定的 Tags.Value 参数格式不合法。​
400​
InvalidTags.Key.Malformed​
The specified Tags.Key is malformed.​
指定的 Tags.Key 参数格式不合法。​
400​
LimitExceed.Resource​
You've reached the limit on the number of resources that you can operate at a time.​
已达到单次可操作的资源的数量上限。​
400​
InvalidMaxResults.Malformed​
The specified MaxResults is malformed.​
指定的 MaxResults 参数格式不合法。​
400​
MissingParameter​
The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, 'ResourceType'.​
该请求缺少必要参数。请确保发起请求已提供全部必要参数,比如: ResourceType。​
400​
InvalidResourceType.Malformed​
The specified ResourceType is malformed.​
指定的 ResourceType 参数格式不合法。​
400​
InvalidTagFilters.Key.Malformed​
The specified TagFilters.Key is malformed.​
指定的 TagFilters.Key 参数格式不合法。​
400​
LimitExceed.TagFilters.Values​
You've reached the limit on the number of tag filter values that you can operate at a time.​
已达到单次可操作的标签值的数量上限。​
400​
LimitExceed.TagFilters​
You've reached the limit on the number of tag filters that you can operate at a time.​
已达到单次可操作的标签过滤条件的数量上限。​
500​
InternalError​
An internal error has occurred.​
发生内部错误。请稍后重试或联系工程师进一步咨询。​
​
​
最近更新时间:2026.02.27 11:57:40
这个页面对您有帮助吗?
有用
有用
无用
无用