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 必选 示例值:cen​
云企业网资源的类型,取值如下:​
  • cen:CEN实例。​
  • cenbandwidthpackage:带宽包。​
​
ResourceIds.N string[] 可选 示例值:cen-273w3e33y2y9s7fap8u2j****​
云企业网资源的ID。​
  • 您可以调用 DescribeCens 接口,查询“cen”类型的资源ID。​
  • 参数 - N:表示资源 ID的序号,单次调用数量上限50个。​
  • 多个云企业网资源 ID之间使用&分隔。​
​
NextToken string 可选 示例值:caeba0bbb2be03f84eb48b699f0a****​
下一次查询开始的Token。​
​
MaxResults integer 可选 示例值:50​
单次查询的数量,默认为 10,最大为100。​
​
TagFilters.N.Key string[] 可选 示例值:k1​
标签的标签键。​
  • 参数 - N:表示标签键的序号,取值范围:1~10。​
  • 多个标签键之间用&分隔。多个标签键之间的关系为逻辑“与(AND)”,即查询同时添加多个标签键的资源。​
  • 不允许重复。​
​
TagFilters.N.Values.N string[] 可选 示例值:v1​
标签的标签值。​
  • 第一个N:表示标签键的序号,取值范围:1~10。​
  • 第二个N:表示标签值的序号,取值范围:1~3。同一标签键多个标签值之间的关系为逻辑“或(OR)”,即查询同一标签键下添加其中一个标签值的资源。​
  • 多个标签值之间用&分隔。​
  • 若传入该参数,则必须先传入TagFilters.N.Key。​
  • 传入空字符串时,表示查询标签值为空的资源。​
​
TagType string 可选 示例值:custom​
标签类型,取值如下:​
  • custom:用户标签。​
  • system:系统标签。​
  • 该参数可以为空,此时查询全部类型的标签。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
NextToken string 示例值:caeba0bbb2be03f84eb48b699f0a****​
根据 NextToken 判断是否具备下一个查询开始的 Token。​
  • 如果 NextToken 为空,表示没有下一个。​
  • 如果 NextToken 有值,则该值就是下一个查询开始的 Token。​
​
ResourceTags object[] 示例值:-​
资源及其附加的标签信息。​
ResourceType string 示例值:cen​
云企业网资源的类型。​
  • cen:表示CEN实例。​
  • cenbandwidthpackage:表示带宽包。​
​
TagKey string 示例值:k1​
云企业网资源附加标签的标签键。​
​
TagValue string 示例值:v1​
云企业网资源附加标签的标签值。​
​
ResourceId string 示例值:cen-273w3e33y2y9s7fap8u2j****​
云企业网资源的ID。​
​
​
​
​
请求示例​
​
GET /?Action=ListTagsForResources&Version=2020-04-01&ResourceType=cen&ResourceIds.1=cen-273w3e33y2y9s7fap8u2j****&NextToken=caeba0bbb2be03f84eb48b699f0a****&MaxResults=50&TagFilters.1.Key=k1&TagFilters.1.Values.1=v1&TagType=custom HTTP/1.1​
Host: cen.cn-beijing.volcengineapi.com​
X-Date: 20250815T082933Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20250815/cn-beijing/cen/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "2025081516293801307203013704D858",​
"Action": "ListTagsForResources",​
"Version": "2020-04-01",​
"Service": "cen",​
"Region": "cn-beijing"​
},​
"Result": {​
"NextToken": "caeba0bbb2be03f84eb48b699f0a****",​
"ResourceTags": [​
{​
"ResourceType": "cen",​
"TagKey": "k1",​
"TagValue": "v1",​
"ResourceId": "cen-273w3e33y2y9s7fap8u2j****"​
}​
]​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
MissingParameter​
The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request.​
该请求缺少必要参数。请确保您发起请求时已传入全部必要参数。​
400​
InvalidParameter​
A parameter specified in the request is not valid, is unsupported or cannot be used.​
该请求传入了非法或不支持的参数。​
400​
LimitExceeded.Resource​
You've reached the limit on the number of resources that you can operate at a time.​
已达到单次可操作资源数量的上限。​
400​
InvalidResourceType.Malformed​
The specified parameter resource type is invalid.​
资源类型不合法。​
400​
InvalidTagType.Malformed​
The specified parameter tag type is invalid.​
标签类型不合法。​
400​
InvalidTagFilterKey.Malformed​
The specified parameter tag filter key is invalid.​
过滤标签键不合法。​
400​
InvalidTagFilterValue.Malformed​
The specified parameter tag filter value is invalid.​
过滤标签值不合法。​
400​
LimitExceeded.TagFilterKey​
You've reached the limit on the number of tag keys that you can filter.​
已达到单次可指定过滤标签键数量的上限。​
400​
LimitExceeded.TagFilterValue​
You've reached the limit on the number of tag values that you can filter.​
已达到单次可指定过滤标签值数量的上限。​
400​
InvalidNextToken.Malformed​
The specified parameter NextToken is invalid.​
查询NextToken不合法。​
400​
InvalidMaxResults.Malformed​
The specified parameter MaxResults is malformed.​
查询数量不合法。​
400​
InvalidTagFilter.Disorder​
The specified index order of tag filter is malformed.​
指定标签过滤项的索引顺序参数格式不合法。​
404​
InvalidResource.NotFound​
The specified resource does not exist.​
指定的资源不存在。​
500​
InternalError​
Request failed with internal server error.​
系统内部错误。​
​
​
最近更新时间:2026.11.02 16:19:59
这个页面对您有帮助吗?
有用
有用
无用
无用