You need to enable JavaScript to run this app.
文档中心
弹性伸缩

弹性伸缩

复制全文
下载 pdf
标签
TagResources - 资源打标
复制全文
下载 pdf
TagResources - 资源打标
为多个伸缩组添加用户标签。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:TagResources​
要执行的操作,取值:TagResources。​
​
Version string 必选 示例值:2020-01-01​
API的版本,取值:2020-01-01。​
​
ResourceIds.N string[] 必选 示例值:scg-ybmssdnnhn5pkgyd****​
资源ID。您可以调用DescribeScalingGroups 接口查询伸缩组ID。​
  • 参数 - N:表示资源的序号,支持多选。取值范围:1~20。​
​
ResourceType string 必选 示例值:scalinggroup​
资源类型。取值:​
  • scalinggroup:伸缩组。​
​
Tags.N.Key string[] 必选 示例值:k1​
用户标签的标签键,此处指定的标签将同时与ResourceIds.N指定的所有资源关联。​
  • 参数 - N:表示标签键的序号。​
  • 多个标签键之间用&分隔。​
命名规则如下:​
  • 不能以volc:或sys:的任意大小写组合开头。​
说明​
volc:或sys:开头为系统预留标签键,禁止创建。​
  • 只能包含语言字符、数字、空格和英文符号“_”、“.”、“:”、“/”、“=”、“+”、“-”、“@”。​
  • 长度限制在1~128个字符之间。​
同一资源的标签键不允许重复。​
​
Tags.N.Value string[] 可选 示例值:v1​
用户标签的标签值。​
  • 参数 - N:表示标签值的序号。​
  • 多个标签值之间用&分隔。​
命名规则如下:​
  • 只能包含语言字符、数字、空格和英文符号“_”、“.”、“:”、“/”、“=”、“+”、“-”、“@”。​
  • 允许为空,长度限制在0~256个字符之间。​
如果传入该参数,则必须先传入Tags.N.Key。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
OperationDetails object[] 示例值:--​
Tag操作详情,详情为空表示成功。​
ResourceId string 示例值:scg-ybmssdnnhn5pkgyd****​
资源ID。​
​
Error object 示例值:--​
资源操作错误详情。​
Code string 示例值:OperationDenied.ResourceLocked​
错误码。​
​
Message string 示例值:The specified operation is denied as your resource is locked for another operation.​
错误详情。​
​
​
​
​
​
请求示例​
​
GET /?Action=TagResources&ResourceIds.1=scg-ybmssdnnhn5pkgyd****&ResourceType=scalinggroup&Version=2020-01-01 HTTP/1.1​
Host: auto-scaling.cn-beijing.volcengineapi.com​
X-Date: 20240507T113206Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20240507/cn-beijing/auto_scaling/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "2024050719321311209608319490509E",​
"Version": "2020-01-01",​
"Service": "auto_scaling",​
"Region": "cn-beijing"​
},​
"Result": {​
"OperationDetails": [​
{​
"ResourceId": "scg-ybmssdnnhn5pkgyd****",​
"Error": {​
"Code": "OperationDenied.ResourceLocked",​
"Message": "The specified operation is denied as your resource is locked for another operation."​
}​
}​
]​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
InvalidTagKey.Malformed​
The specified TagKey is malformed.​
指定的标签键不合法。​
400​
InvalidTagValue.Malformed​
The specified TagValue is malformed.​
指定的标签值不合法。​
400​
MissingParameter.ResourceIds​
The required parameter ResourceIds are not supplied.​
资源ID不能为空。​
400​
LimitExceeded.ResourceIds​
You've reached the limit on the number of ResourceIds that you can set.​
已达到可设置的资源ID数量上限。​
400​
LimitExceeded.Tags​
You've reached the limit on the number of Tags that you can create.​
已达到可创建的标签数量上限。​
404​
InvalidResourceType.NotFound​
The specified ResourceType does not exist.​
指定的资源类型不存在。​
404​
MissingParameter.Tags​
The required parameter Tags are empty.​
标签参数不能为空。​
409​
InvalidTagKey.Conflict​
The specified TagKey already exists.​
指定的标签键已存在。​
500​
InternalError​
An internal error has occurred.​
内部错误,请重试。如果多次尝试失败,请提交工单。​
​
​
最近更新时间:2025.08.27 19:18:34
这个页面对您有帮助吗?
有用
有用
无用
无用