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

负载均衡

复制全文
下载 pdf
标签
TagResources - 为资源添加用户标签
复制全文
下载 pdf
TagResources - 为资源添加用户标签
调用 TagResources 接口,为资源添加用户标签。​
使用说明​
每秒最多提交 5 个 API 请求。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:TagResources​
要执行的操作,取值:TagResources。​
​
Version string 必选 示例值:2020-04-01​
API的版本,取值:2020-04-01。​
​
ResourceIds.N string[] 必选 示例值:ResourceIds.1=alb-273sdsdsxxxxxp8u2j****&ResourceIds.2=alb-2fe6fszjgeznk5oxruv0u****​
资源的ID。​
  • 参数 - N:表示资源 ID的序号,单次调用数量上限50个。​
  • 多个资源 ID之间使用 & 分隔。​
​
ResourceType string 必选 示例值:loadbalancer​
资源类型。取值如下:​
  • loadbalancer:负载均衡实例。​
  • listener:监听器。​
  • servergroup:后端服务器组。​
  • certificate:证书。​
  • acl:访问控制策略组。​
  • healthchecktemplate:健康检查模板。​
  • customizedcfg:个性化配置。​
​
Tags.N.Key string[] 必选 示例值:Tags.1.Key=k1&Tags.2.Key=k2​
标签的标签键。规则如下:​
  • 长度限制为1~128个字符。​
  • 大小写敏感,不能以volc:的任意大小写组合开头。​
  • 不能以空格开头或结尾。​
  • 允许包含各国语言文字、数字、空格()、下划线(_)、点号(.)、半角冒号(:)、斜杠(/)、等号(=)、加号(+)、减号(-)和@。​
  • 同一资源的标签键不允许重复。​
​
Tags.N.Value string[] 必选 示例值:Tags.1.Value=v1&Tags.2.Value=v2​
标签的标签值。具体规则如下:​
  • 长度限制为0~256个字符。​
  • 大小写敏感,不能以空格开头或结尾。​
  • 允许包含各国语言文字、数字、空格()、下划线(_)、点号(.)、半角冒号(:)、斜杠(/)、等号(=)、加号(+)、减号(-)和@。​
  • 如果传入该参数,则必须先传入Tags.N.Key。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
RequestId string 示例值:2021062415303301022514515207C4****​
请求ID。​
​
​
​
请求示例​
​
GET /?Action=TagResources&ResourceType=loadbalancer&ResourceIds.1=alb-r1rvlqgt58u83dvb46c1j2fi&Tags.1.Key=yxl12&Tags.1.Value=yxl12&Tags.2.Key=yxl13&Tags.2.Value=yxl13&Version=2020-04-01&AccountId=2100052283" -H "X-Top-Account-Id: 2100052283"​
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": "a295610f-5602-4ba8-ab73-84158c7b5dd7",​
"Action": "TagResources",​
"Version": "2020-04-01"​
},​
"Result": {​
"RequestId": "a295610f-5602-4ba8-ab73-84158c7b5dd7"​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
Invalid%s.Malformed​
MismatchThe specified %s is malformed.​
指定的 %s 参数格式不合法。​
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​
InvalidParameter​
Data unmarshal failed.​
请求解析失败。​
400​
LimitExceed.Tag​
You've reached the limit on the number of tags that you can operate at a time.​
已达到单次可操作的标签的数量上限。​
400​
InvalidResourceType.Malformed​
The specified ResourceType is malformed.​
指定的 ResourceType 参数格式不合法。​
400​
LimitExceed.Resource​
You've reached the limit on the number of resources 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, 'Tags'.​
该请求缺少必要参数。请确保发起请求已提供全部必要参数,比如: Tags。​
400​
InvalidIndexOrder.Malformed​
The specified index order is malformed.​
指定的索引顺序参数格式不合法。​
400​
InvalidTags.Key.Malformed​
The specified Tags.Key is malformed.​
指定的 Tags.Key 参数格式不合法。​
400​
InvalidTags.Value.Malformed​
The specified Tags.Value is malformed.​
指定的 Tags.Value 参数格式不合法。​
400​
InvalidTags.Key.Duplicated​
The specified Tags.Key is duplicated.​
指定的 Tags.Key 重复。​
404​
InvalidResource.NotFound​
The specified Resource does not exist.​
指定的资源不存在。​
500​
InternalError​
An internal error has occurred.​
发生内部错误。请稍后重试或联系工程师进一步咨询。​
​
​
最近更新时间:2026.02.27 11:57:39
这个页面对您有帮助吗?
有用
有用
无用
无用