You need to enable JavaScript to run this app.
文档中心
云服务器

云服务器

复制全文
下载 pdf
标签
DeleteTags - 删除标签 (旧版)
复制全文
下载 pdf
DeleteTags - 删除标签 (旧版)
调用 DeleteTags 接口为一个或多个资源删除用户标签。​
使用说明​
注意​
当前页面为旧版标签接口,未来可能停止维护。新版标签接口使用场景更加广泛,建议新用户使用以下新版标签接口,了解更多。​
注意事项​
  • 单次调用该接口最多可删除20个标签。​
  • 重复解绑标签会覆盖原有结果,标签值更新。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:DeleteTags​
要执行的操作,取值:DeleteTags。​
​
Version string 必选 示例值:2020-04-01​
API的版本,取值:2020-04-01。​
​
ClientToken string 可选 示例值:333456899ff****​
保证请求幂等性。由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。​
取值:仅支持ASCII字符,且不能超过64个字符。​
​
ResourceIds.N string[] 必选 示例值:ResourceIds.1=i-l8u0p77yseabkpak****&ResourceIds.2=i-l8u0p7xyseabkbak****​
资源ID。​
  • 参数 - N:表示资源的序号,取值范围:1~50。​
  • 多个资源之间用&分隔。​
​
ResourceType string 必选 示例值:instance​
资源类型,取值:​
  • instance:实例​
  • image:镜像​
  • reservedinstance:预留实例券​
  • scheduledinstance:弹性预约实例​
  • keypair:密钥对​
​
TagKeys.N string[] 必选 示例值:TagKeys.1=k1​
资源要删除的用户标签的标签键。​
  • 参数 - N:表示标签键的序号,取值范围:1~20。​
  • 多个标签键之间用&分隔。​
命名规则如下:​
  • 不能以任何大小写形式的volc:或sys:开头。​
volc:或sys:开头为系统预留标签键禁止创建。​
  • 只能包含语言字符、数字、空格和英文符号“_”、“.”、“:”、“/”、“=”、“+”、“-”、“@”。​
  • 长度限制在1~128个字符之间。​
​
​
​
返回参数​
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。​
说明​
仅当请求参数输入不合法时提示下文中的接口错误码。若请求参数输入无误,将不会提示接口错误码,且接口的返回状态码将为200,但这并不代表对所有资源的操作均已成功,单个资源的操作结果请参见如下返回参数中的信息。​
OperationDetails object[] 示例值:--​
操作详情。​
Error object 示例值:--​
操作的资源错误信息。​
Code string 示例值:InvalidInstance.NotFound​
批量操作时具体单个请求失败的错误码,取值:​
  • InvalidResourceId.NotFound:指定的资源不存在。​
  • InternalError:内部错误,请重试。如果多次尝试失败,请提交工单。​
  • FlowLimitExceeded:您已超过资源请求限速。​
说明​
Code与Message按顺序一一对应。​
​
Message string 示例值:The specified instance does not exist.​
批量操作时具体单个请求失败的错误信息,取值:​
  • The specified ResourceId does not exist.​
  • An internal error has occurred.​
  • You've reach the limit on request rate of resources.​
说明​
Code与Message按顺序一一对应。​
​
​
ResourceId string 示例值:i-l8u0p77yseabkpak****​
操作的资源ID。​
​
​
​
​
请求示例​
​
GET /?Action=DeleteTags&Version=2020-04-01&ResourceType=instance&ResourceIds.1=i-l8u0p77yseabkpak****&ResourceIds.2=i-l8u0p7xyseabkbak****&TagKeys.1=k1 HTTP/1.1​
Host: ecs.cn-beijing.volcengineapi.com​
Region: cn-beijing​
ServiceName: ecs​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "2021062415303301022514515207C4****",​
"Action": "DeleteTags",​
"Version": "2020-04-01",​
"Service": "ecs",​
"Region": "cn-beijing"​
},​
"Result": {​
"OperationDetails": [​
{​
"Error": null,​
"ResourceId": "i-l8u0p77yseabkpak****"​
},​
{​
"Error": {​
"Code": "InvalidResourceId.NotFound",​
"Message": "The specified ResourceId does not exist."​
},​
"ResourceId": "i-l8u0p7xyseabkbak****"​
}​
]​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
IdempotentParameterMismatch​
The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.​
幂等参数不一致。​
400​
InvalidArgument​
The specified argument is invalid.​
指定的参数不合法。​
400​
InvalidClientToken.Malformed​
The specified ClientToken is malformed.​
指定的ClientToken不合法。​
400​
InvalidTagKey.Malformed​
The specified TagKey is malformed.​
指定的标签的键不合法。​
400​
LimitExceeded.MaximumResourceIds​
You've reached the limit on the number of ResourceIds that you can set.​
指定的资源ID数量超过限制。​
400​
LimitExceeded.MaximumTagKeys​
You've reached the limit on the number of TagKeys that you can set.​
指定的标签键超出取值范围。​
404​
InvalidResourceId.NotFound​
The specified ResourceId does not exist.​
指定资源不存在。​
404​
InvalidResourceType.NotFound​
The specified ResourceType does not exist.​
指定的资源类型不存在。​
404​
InvalidTagKey.NotFound​
The specified TagKey does not exist.​
指定的标签键不存在。​
412​
IdempotentProcessing​
The request uses the same client token as a previous one that is still in process.​
先前的幂等请求仍在处理中,请稍后重试。​
500​
InternalError​
An internal error has occurred.​
内部错误,请重试。如果多次尝试失败,请提交工单。​
​
​
最近更新时间:2025.09.04 16:59:40
这个页面对您有帮助吗?
有用
有用
无用
无用