You need to enable JavaScript to run this app.
文档中心
私网连接

私网连接

复制全文
下载 pdf
标签
ListTagsForResources - 查询资源标签
复制全文
下载 pdf
ListTagsForResources - 查询资源标签
调用ListTagsForResources接口,查询满足指定条件的标签信息。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
Action String 必选 示例值:ListTagsForResources​
要执行的操作,取值:ListTagsForResources。​
​
Version String 必选 示例值:2020-04-01​
API的版本信息,当前版本为 2020-04-01。​
​
ResourceType String 必选 示例值:endpointservice​
资源的类型,取值如下:​
  • endpointservice:终端节点服务​
  • endpoint:接口终端节点​
  • gatewayendpoint:网关终端节点​
​
ResourceIds.N String 可选 示例值:epsvc-2fe630gurkl37k5gfuy33****​
资源的ID。​
说明​
  • N:表示资源ID的序号,取值范围 1~50。​
  • 多个资源ID之间使用&分隔。​
​
TagFilters.N.Key String 可选 示例值:k1​
根据标签查询资源时指定的标签键。​
指定多个标签键时,表示查询同时包含所有指定标签键的资源。​
​
NextToken String 可选 示例值:caeba0bbb2be03f84eb48b699f0a****​
下一次查询开始的Token。​
​
MaxResults Integer 可选 示例值:50​
单次查询的数量,默认为 10,最大为100。​
​
TagType String 可选 示例值:custom​
标签类型,取值如下:​
  • custom:用户标签。​
  • system:系统标签。​
  • 该参数可以为空,此时查询全部类型的标签。​
​
TagFilters.N.Values.N String 可选 示例值:v1​
根据标签查询资源时指定的标签值。每个标签键最多可指定3个标签值。​
  • 未传入该参数时,表示查询指定标签键下所有标签值对应的标签所关联的终端节点或终端节点服务实例。​
  • 该参数取值为空时,表示查询指定标签键下标签值为空的标签所关联的终端节点或终端节点服务实例。​
  • 同一个标签键指定多个标签值时,表示查询各个标签值对应标签所关联终端节点或终端节点服务实例的集合。​
说明​
如果传入该参数,则必须先传入TagFilters.N.Key。​
​
​
​
返回参数​
RequestId String 示例值:2021062415303301022514515207C4****​
请求ID。​
​
NextToken String 示例值:caeba0bbb2be03f84eb48b699f0a****​
本次调用返回的查询凭证值,返回为空表示没有下一页。​
​
ResourceTags Object[] 示例值:-​
资源及其附加的标签信息。​
ResourceType String 示例值:endpoint​
资源的类型。​
  • endpointservice:终端节点服务​
  • endpoint:接口终端节点​
  • gatewayendpoint:网关终端节点​
​
ResourceId String 示例值:epsvc-2fe6fszjgeznk5oxruv0u****​
资源的ID。​
​
TagKey String 示例值:k1​
资源附加标签的标签键。​
​
TagValue String 示例值:v1​
资源附加标签的标签值。​
​
​
​
​
请求示例​
​
GET /?Action=ListTagsForResources&Version=2020-04-01&ResourceType=endpointservice&ResourceIds.1=epsvc-2fe630gurkl37k5gfuy33****&TagFilters.1.Key=k1&NextToken=caeba0bbb2be03f84eb48b699f0a****&MaxResults=50&TagType=custom&TagFilters.1.Values.1=v1​
Host: privatelink.cn-guangzhou.volcengineapi.com​
X-Date: 20251121T094038Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251121/cn-guangzhou/privatelink/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "20230604110420****100232280022D31",​
"Action": "ListTagsForResources",​
"Version": "2020-04-01",​
"Service": "privatelink",​
"Region": "cn-guangzhou"​
},​
"Result": {​
"NextToken": "caeba0bbb2be03f84eb48b699f0a****",​
"RequestId": "2021062415303301022514515207C4****",​
"ResourceTags": [​
{​
"TagKey": "k1",​
"TagValue": "v1",​
"ResourceId": "epsvc-2fe6fszjgeznk5oxruv0u****",​
"ResourceType": "endpoint"​
}​
]​
}​
}​
​
错误码​
此处仅展示当前API的错误码,更多错误码请参见公共错误码。​
​
状态码​
错误码​
错误信息​
说明​
400​
MissingParameter​
The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, the 'XXX'.​
该请求缺少必要参数。请确保发起请求已提供全部必要参数,比如XXX。​
说明​
其中,XXX表示缺少的参数名称。​
400​
InvalidIncorrectOrder.Malformed​
The specified index order is malformed.​
指定的索引顺序参数格式不合法。​
400​
InvalidMaxResult.Malformed​
The specified MaxResult is malformed.​
指定的 MaxResult 参数格式不合法。​
400​
InvalidNextToken.Malformed​
The specified NextToken is malformed.​
指定的 NextToken 参数格式不合法。​
400​
InvalidResourceType.Malformed​
The specified ResourceType is malformed.​
指定的 ResourceType 参数格式不合法。​
400​
InvalidTagKey.Malformed​
The specified TagKey is malformed.​
指定的 TagKey 参数格式不合法。​
400​
InvalidTagType.Malformed​
The specified TagType is malformed.​
指定的 TagType 参数格式不合法。​
400​
InvalidTagValue.Malformed​
The specified TagValue is malformed.​
指定的 TagValue 参数格式不合法。​
400​
LimitExceeded.Resource​
You've reached the limit on the number of resources that you can operate at a time.​
已达到单次可操作资源数量的上限。​
400​
LimitExceeded.TagFilterKey​
You've reached the limit on the number of tag keys that you can filter.​
已达到单次可指定过滤标签键数量的上限。​
400​
LimitExceeded.TagFilterValues​
You've reached the limit on the number of tag values that you can filter.​
已达到单次可指定过滤标签键值数量的上限。​
404​
InvalidResource.NotFound​
The specified resource does not exist.​
指定的资源不存在。​
​
​
最近更新时间:2026.10.26 15:10:42
这个页面对您有帮助吗?
有用
有用
无用
无用