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

负载均衡

复制全文
下载 pdf
标签
TagResources - 添加资源标签
复制全文
下载 pdf
TagResources - 添加资源标签
调用 TagResources 接口,为资源添加用户标签。​
使用说明​
  • 为同一个资源重复添加相同标签键的标签,则后添加的标签值会自动覆盖之前的标签值。​
  • 每个资源最多可添加50个用户标签,每次调用该接口最多可添加50个用户标签。​
  • Tags.N.a类型的参数中,“N”表示标签信息的序号,需按照数字顺序从1开始填写,取值范围为1~20。多个标签之间使用&分隔。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
Action String 必选 示例值:TagResources​
要执行的操作,取值:TagResources。​
​
Version String 必选 示例值:2020-04-01​
API的版本信息,当前版本为 2020-04-01。​
​
ResourceType String 必选 示例值:clb​
资源的类型,取值如下:​
  • clb:CLB实例。​
  • listener:监听器。​
  • servergroup:后端服务器组。​
  • acl:访问控制。​
  • certificate:证书。​
​
ResourceIds.N String 必选 示例值:clb-273sdsdsxxxxxp8u2j****​
资源的ID。​
  • 参数 - N:表示资源 ID的序号,单次调用数量上限50个。​
  • 多个资源 ID之间使用&分隔。​
  • 您可以调用如下接口获得资源ID:​
​
Tags.N.Key String 必选 示例值:k1​
用户标签的标签键。​
  • 长度限制为1~128个字符。​
  • 大小写敏感,不能以volc:或sys:的任意大小写组合开头。​
  • 不能以空格开头或结尾。​
  • 允许包含各国语言文字、数字、空格()、下划线(_)、点号(.)、半角冒号(:)、斜杠(/)、等号(=)、加号(+)、减号(-)和@。​
同一资源的标签键不允许重复。如果传入的Tags.N.Key与已有标签的标签键重复,则后添加的标签会覆盖原有标签。​
​
Tags.N.Value String 可选 示例值:v1​
用户标签的标签值。​
  • 长度限制为1~256个字符。​
  • 大小写敏感,不能以空格开头或结尾。​
  • 允许包含各国语言文字、数字、空格()、下划线(_)、点号(.)、半角冒号(:)、斜杠(/)、等号(=)、加号(+)、减号(-)和@。​
如果传入该参数,则必须先传入Tags.N.Key。​
​
​
​
返回参数​
RequestId String 示例值:2021062415303301022514515207C4****​
请求ID。​
​
​
​
请求示例​
​
GET /?Action=TagResources&Version=2020-04-01&ResourceType=clb&ResourceIds.1=clb-273sdsdsxxxxxp8u2j****&Tags.1.Key=k1&Tags.1.Value=v1​
Host: clb.cn-beijing.volcengineapi.com​
X-Date: 20251121T094038Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251121/cn-beijing/clb/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "20230604110420****100232280022D31",​
"Action": "TagResources",​
"Version": "2020-04-01",​
"Service": "clb",​
"Region": "cn-beijing"​
},​
"Result": {​
"RequestId": "2021062415303301022514515207C4****"​
}​
}​
​
错误码​
此处仅展示当前API的错误码,更多错误码请参见公共错误码。​
​
状态码​
错误码​
错误信息​
说明​
400​
InvalidDefaultRule.UnSupportAction​
The specified Default Rule does not support this action.​
指定的默认转发规则不支持当前操作。​
400​
InvalidIncorrectOrder.Malformed​
The specified index order is malformed.​
指定的索引顺序参数格式不合法。​
400​
InvalidResourceType.Malformed​
The specified ResourceType is malformed.​
指定的 ResourceType 参数格式不合法。​
400​
InvalidTagKey.Malformed​
The specified TagKey is malformed.​
指定的 TagKey 参数格式不合法。​
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.ServiceManagedTag​
You've reached the limit on the number of service managed tags that you can create.​
已达到单次可创建受管资源标签键值数量的上限。​
400​
LimitExceeded.TagOperation​
You've reached the limit on the number of tags that you can operate at a time.​
已达到单次可操作的标签条目数量上限。​
400​
MissingParameter​
The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, the 'ResourceIds'.​
该请求缺少必要参数。请确保发起请求已提供全部必要参数,比如 ResourceIds。​
400​
MissingParameter​
The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, the 'Tags'.​
该请求缺少必要参数。请确保发起请求已提供全部必要参数,比如 Tags。​
400​
MissingParameter​
The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, the 'ResourceType'.​
该请求缺少必要参数。请确保发起请求已提供全部必要参数,比如 ResourceType。​
400​
MissingParameter​
The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, the ''.​
该请求缺少必要参数。请确保发起请求已提供全部必要参数,比如 。​
400​
QuotaExceeded.ResourceCustomTags​
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.​
已达到单个资源可创建系统标签的数量的配额上限。​
403​
Forbidden​
You are not authorized to perform operations on the service managed tag.​
无权限对指定资源打上受管标签。​
403​
Forbidden​
You are not authorized to perform operations on the system tag.​
无权限对指定资源打上系统标签。​
403​
InvalidResourceType.ServcieManaged​
The specified ResourceType is managed by a service.​
指定的资源是服务托管资源。​
404​
InvalidResource.NotFound​
The specified resource does not exist.​
指定的资源不存在。​
500​
InternalError​
An internal error has occurred.​
发生内部错误。​
​
​
最近更新时间:2026.02.13 10:33:01
这个页面对您有帮助吗?
有用
有用
无用
无用