You need to enable JavaScript to run this app.
文档中心
云企业网

云企业网

复制全文
下载 pdf
标签
TagResources - 创建标签
复制全文
下载 pdf
TagResources - 创建标签
调用 TagResources 接口,为云企业网资源添加用户标签。​
使用说明​
  • 为同一个资源重复添加相同标签键的标签,则后面的标签值会自动覆盖前面的。​
  • 每个资源最多可添加50个标签,每次调用该接口最多可添加20个标签。​
  • 下表中,Tags.N.a类型参数中的“N”表示标签信息的序号,需按照数字顺序从1开始填写,单次调用数量上限20个。多个标签之间使用&分隔。每个标签键对应一个标签值。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:TagResources​
要执行的操作,取值:TagResources。​
​
Version string 必选 示例值:2020-04-01​
API的版本,取值:2020-04-01。​
​
Tags.N.Key string[] 必选 示例值:k1​
用户标签的标签键。​
  • 长度限制为1~128个字符。​
  • 大小写敏感,不能以volc:或sys:的任意大小写组合开头。​
  • 不能以空格开头或结尾。​
  • 允许包含字母、数字、空格()、下划线(_)、点号(.)、半角冒号(:)、斜杠(/)、等号(=)、加号(+)、减号(-)和@。​
同一资源的标签键不允许重复。​
​
Tags.N.Value string[] 可选 示例值:v1​
用户标签的标签值。​
  • 长度限制为0~256个字符。​
  • 大小写敏感,不能以空格开头或结尾。​
  • 允许包含字母、数字、空格()、下划线(_)、点号(.)、半角冒号(:)、斜杠(/)、等号(=)、加号(+)、减号(-)和@。​
​
ResourceType string 必选 示例值:cen​
资源的类型,取值如下:​
  • cen:CEN实例。​
  • cenbandwidthpackage:带宽包。​
​
ResourceIds.N string[] 必选 示例值:cen-273w3e33y2y9s7fap8u2j****​
资源的ID。​
  • 您可以调用 DescribeCens 接口,查询“cen”类型的资源ID。​
  • 参数 - N:表示资源 ID的序号,单次调用数量上限50个。​
  • 多个云企业网资源 ID之间使用&分隔。​
​
​
​
返回参数​
本接口无特有的返回参数。更多信息请见返回结构。​
请求示例​
​
GET /?Action=TagResources&Version=2020-04-01&ResourceType=cen&ResourceIds.1=cen-273w3e33y2y9s7fap8u2j**** HTTP/1.1​
Host: cen.volcengineapi.com​
X-Date: 20260109T082150Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20260109/cn-beijing/cen/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "2021062415303301022514515207C4****",​
"Action": "TagResources",​
"Version": "2020-04-01",​
"Service": "cen",​
"Region": "cn-beijing"​
},​
"Result": {}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
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​
InvalidTagKey.Malformed​
The specified parameter tag key is invalid.​
标签键不合法。​
400​
InvalidTagValue.Malformed​
The specified parameter tag value is invalid.​
标签值不合法。​
400​
LimitExceeded.Tags​
You've reached the limit on the number of tags that you can operate at a time.​
已达到单次可操作标签数量的上限。​
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​
QuotaExceeded.ResourceTags​
You've reached the limit on the number of resource tags that you can create.​
已达到单个资源可创建用户标签的数量的配额上限。​
400​
QuotaExceeded.ResourceSystemTags​
You've reached the limit on the number of system tags that you can create.​
已达到单个资源可创建系统标签的数量的配额上限。​
400​
InvalidTag.Disorder​
The specified index order of tag is malformed.​
指定标签的索引顺序参数格式不合法。​
404​
InvalidResource.NotFound​
The specified resource does not exist.​
指定的资源不存在。​
500​
InternalError​
Request failed with internal server error.​
系统内部错误。​
​
​
最近更新时间:2026.01.15 11:22:04
这个页面对您有帮助吗?
有用
有用
无用
无用