全部产品
Search
文档中心

资源管理:UntagResources - 为云资源统一解绑标签

更新时间:Aug 28, 2026

为指定的多个云产品的多个云资源统一解绑标签。

接口说明

解绑后,如果该标签没有绑定其他任何资源,系统会在 24 小时内自动将其删除。

支持标签的云服务,请参见支持标签的云服务

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

tag:UntagResources

update

*全部资源

*

  • *:UntagResources
  • *:UnTagResources
  • vod:UnTagVodResources
  • dcdn:UntagDcdnResources
  • ecs:RemoveTags
  • slb:RemoveTags
  • rds:RemoveTagsFromResource
  • oss:DeleteBucketTagging
  • live:UnTagLiveResources

请求参数

名称

类型

必填

描述

示例值

RegionId

string

地域 ID。取值:

  • 对于中心化部署的云服务,您可以填写通用地域cn-hangzhou,或者参照标签支持的中心化云服务的对应地域填写资源对应的地域 ID。

  • 对于非中心化部署的云服务,您需要填写资源所属的地域 ID。

cn-hangzhou

RegionId

string

地域 ID。取值:

  • 对于中心化部署的云服务,您可以填写通用地域cn-hangzhou,或者参照标签支持的中心化云服务的对应地域填写资源对应的地域 ID。

  • 对于非中心化部署的云服务,您需要填写资源所属的地域 ID。

cn-hangzhou

ResourceARN

array

资源 ARN(Aliyun Resource Name)。

N 的取值范围:1~50。

资源 ARN 的格式:arn:acs:${ProductCode}:${Region}:${Account}:${ResourceType}/${ResourceId}。各字段含义如下:

  • ProductCode:云服务 code。从 ListSupportResourceTypes 返回参数中获取。

  • Region:资源所属的地域 ID。支持使用星号(*)表示当前地域。

  • Account:资源所属的阿里云账号(主账号)ID。支持使用星号(*)表示当前登录的阿里云账号(主账号)。

  • ResourceType:资源类型。从 ListSupportResourceTypes 返回参数中获取。

  • ResourceId:资源 ID。

说明

ResourceARN 支持传递资源组、操作审计和资源管理的ProductCodeResourceType

arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu****

string

资源 ARN(Aliyun Resource Name)。

arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu****

TagKey

array

标签键。

N 的取值范围:1~10。

k1

string

标签键。

N 的取值范围:1~10。

k1

关于公共请求参数的详情,请参见公共参数

返回参数

名称

类型

描述

示例值

object

返回参数。

RequestId

string

请求 ID。

43D12436-B10F-4469-8136-FD1C5D2B2083

FailedResources

object

FailedResource

array<object>

失败资源信息。

说明
  • 解绑标签成功时,返回的 FailedResources 为空。

  • 解绑标签失败或部分失败时,返回的 FailedResources 会显示失败资源的详细信息。

array<object>

失败资源信息。

ResourceARN

string

失败资源 ARN。

arn:acs:ecs:cn-hangzhou:123456789****:instance/i-xxxxxxxxxx1

Result

object

错误结果。

Code

string

错误码。

InvalidResourceId.NotFound

Message

string

错误信息。

The specified ResourceIds are not found in our records.

示例

正常返回示例

JSON格式

{
  "RequestId": "43D12436-B10F-4469-8136-FD1C5D2B2083",
  "FailedResources": {
    "FailedResource": [
      {
        "ResourceARN": "arn:acs:ecs:cn-hangzhou:123456789****:instance/i-xxxxxxxxxx1",
        "Result": {
          "Code": "InvalidResourceId.NotFound",
          "Message": "The specified ResourceIds are not found in our records."
        }
      }
    ]
  }
}

错误码

HTTP status code

错误码

错误信息

描述

400 InvalidResourceARN.Account The Account specified in the ResourceARN parameter does not match the actual account, specifically: %s. ResourceARN中的Account与实际用户不吻合,分别是:%s
400 InvalidResourceARN.FormatError The format of parameter ResourceARN: %s is not valid, for the correct format, you can refer to the Recommend. ResourceARN的格式不符合规范,正确的格式请参考错误诊断。
400 InvalidResourceARN.Region The Region specified in the ResourceARN parameter does not match the RegionId parameter, specifically: %s. ResourceARN中的Region与参数RegionId不匹配,它们分别是:%s
400 InvalidParameter.ResourceType The parameter resource type: %s in ResourceARN is not valid or not support. 在ResourceARN中的ResourceType:%s 不合法或不被支持。
400 InvalidParameter.ServiceCode The parameter service code: %s in ResourceARN is not valid or not support. ResourceARN中的ServiceCode:%s 不合法或未被支持。
400 InvalidParameter.TagKey The TagKey parameter is invalid. The following TagKeys are invalid: %s. 参数中存在不合法的标签键,不合法的标签键如下:%s
400 InvalidParameter.TagValue The TagValue parameter is invalid. The following TagValues are invalid: %s. 参数中包含不合法的标签值,不合法的标签值如下:%s
403 Duplicate.TagKey The Tag.N.Key contains duplicate keys. 参数包含重复标签键。
403 InvalidParameter.Category The specified Category is invalid. Valid values are Custom and System. 标签类型非法,合法值为Custom,System。
403 MissingParameter.Createby You must specify Createby. 操作者参数不可为空。
403 MissingParameter.ResourceIds You must specify ResourceIds. 资源列表参数不可为空。
403 NoPermission.Operator The user is not authorized to operate on the specified resource. 该用户没有权限操作。
403 NoPermission.SystemTag The user does not have permission to operate the system tag. 该用户没有权限操作此系统标签。
403 NoPermissionKey.Category Some keys cannot be modified because the user does not have permission. 某些key的标签类型没有操作权限。
403 NoPermissionKey.Operator You are not authorized to operate the tag key. 该用户没有操作此标签键权限。
403 NumberExceed.ResourceIds The maximum number of ResourceIds is exceeded. 资源列表参数数量超限。
403 NumberExceed.Tags The maximum number of Tags is exceeded. 标签参数数量超限。
403 QuotaExceed.TagsPerResource The maximum number of tags for each resource is exceeded. 每个资源上的标签数量有限制,目前有资源已经超限。
403 Missing.ServiceCode You must specify ServiceCode. 该账号没有对应的服务code。
404 Missing.TagKey Tag.N.Value has been specified and you must specify Tag.N.Key. 一对键值对,对应的TagValue缺失相同N的TagKey。
404 MissingParameter.AliUid You must specify AliUid. 缺失用户UID参数。
404 MissingParameter.Bid You must specify Bid. bid参数不可为空。
404 MissingParameter.TagKey You must specify TagKey. 标签键参数不可为空。

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情