文档

UntagResources - 为指定资源列表统一解绑标签

更新时间:

调用UntagResources为指定的ECS资源列表统一解绑标签。解绑后,如果该标签没有绑定其他任何资源,会被自动删除。

调试

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

授权信息

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

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
ecs:UntagResourcesWrite
  • DedicatedHost
    acs:ecs:{#regionId}:{#accountId}:ddh/{#ddhId}
  • Disk
    acs:ecs:{#regionId}:{#accountId}:disk/{#diskId}
  • NetworkInterface
    acs:ecs:{#regionId}:{#accountId}:eni/{#eniId}
  • Image
    acs:ecs:{#regionId}:{#accountId}:image/{#imageId}
  • Instance
    acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}
  • KeyPair
    acs:ecs:{#regionId}:{#accountId}:keypair/{#keypairId}
  • ReservedInstance
    acs:ecs:{#regionId}:{#accountId}:reservedinstance/{#reservedinstanceId}
  • SecurityGroup
    acs:ecs:{#regionId}:{#accountId}:securitygroup/{#securitygroupId}
  • Snapshot
    acs:ecs:{#regionId}:{#accountId}:snapshot/{#snapshotId}
  • LaunchTemplate
    acs:ecs:{#regionId}:{#accountId}:launchtemplate/{#launchtemplateId}
  • AutoSnapshotPolicy
    acs:ecs:{#regionId}:{#accountId}:snapshotpolicy/{#SnapshotPolicyId}
  • ecs:tag

请求参数

名称类型必填描述示例值
RegionIdstring

资源所属的地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。

cn-hangzhou
ResourceTypestring

资源类型定义。取值范围:

  • instance:ECS 实例。
  • disk:磁盘。
  • snapshot:快照。
  • image:镜像。
  • securitygroup:安全组。
  • volume:存储卷。
  • eni:弹性网卡。
  • ddh:专有宿主机。
  • ddhcluster:专有宿主机集群。
  • keypair:SSH 密钥对。
  • launchtemplate:启动模板。
  • reservedinstance:预留实例券。
  • snapshotpolicy:自动快照策略。
  • elasticityassurance:弹性保障。
  • capacityreservation:容量预定。
  • command:云助手命令。
  • invocation:云助手命令执行结果。
instance
Allboolean

是否解绑资源上全部的标签。当请求中未设置 TagKey.N 时,该参数才有效。取值范围:

  • true
  • false

默认值:false

false
ResourceIdarray

资源 ID 列表。可输入最多 50 个资源 ID。

string

资源 ID。

i-bp67acfmxazb4ph****
TagKeyarray

资源的标签键列表。可输入最多 20 个标签键。

string

资源的标签键。

TestKey

返回参数

名称类型描述示例值
object
RequestIdstring

请求 ID。

C46FF5A8-C5F0-4024-8262-B16B639225A0

示例

正常返回示例

JSON格式

{
  "RequestId": "C46FF5A8-C5F0-4024-8262-B16B639225A0"
}

错误码

HTTP status code错误码错误信息描述
400NumberExceed.ResourceIdsThe ResourceIds parameter's number is exceed , Valid : 50-
400NumberExceed.TagsThe Tags parameter's number is exceed , Valid : 20-
400Duplicate.TagKeyThe Tag.N.Key contain duplicate key.标签中存在重复的键,请保持键的唯一性。
400InvalidTagKey.MalformedThe specified Tag.n.Key is not valid.指定的标签键参数有误。
400InvalidTagValue.MalformedThe specified Tag.n.Value is not valid.指定的标签值参数有误。
400OperationDenied.QuotaExceedThe quota of tags on resource is beyond permitted range.资源标签已达上限。
400InvalidTag.MismatchThe specified Tag.n.Key and Tag.n.Value are not match.指定的 Tag.N.Key 和 Tag.N.Value 不匹配。
400InvalidTagCountThe specified tags are beyond the permitted range.指定的标记超出取值范围。
400Invalid.ScopeThe specified scope is invalid.可见范围参数无效。
403PermissionDenied.TagOwnerBidThe specified operator not have permission to set TagOwnerBid value.-
403PermissionDenied.TagOwnerUidThe specified operator not have permission to set TagOwnerUid value.无权设置标签归属者。
403PermissionDenied.ScopeThe specified operator not have permission to set Scope value.指定的操作员无权设置范围值。
403InvalidResourceId.NotSupportedThe specified ResourceId does not support tagging.指定的资源 ID 不支持标记。
403NoPermissionKey.Scope%s-
403NoPermission.TagThe operator is not permission for the tag.您没有操作该资源标签的权限。
403Param.ConflictThe specified all is true, but the specified TagKey.N is not empty.-
404InvalidRegionId.NotFoundThe RegionId provided does not exist in our records.提供的RegionId不存在
404InvalidRegionId.NotFound%s提供的地域 ID 不存在。
404MissingParameter.ResourceIdsThe parameter - ResourceIds.N should not be null-
404MissingParameter.TagOwnerUidThe parameter - TagOwnerUid should not be null参数 TagOwnerUid 不能为空。
404MissingParameter.TagOwnerBidThe parameter - TagOwnerBid should not be null参数 TagOwnerBid 不能为空。
404MissingParameter.ResourceTypeThe parameter - ResourceType should not be null-
404MissingParameter.TagsThe parameter - Tags should not be null参数 Tags 不能为空。
404MissingParameter.RegionIdThe parameter - RegionId should not be null参数 RegionId 不能为空。
404InvalidResourceId.NotFoundThe specified ResourceIds are not found in our records.指定的资源不存在,请检查参数 ResourceId 是否正确。
404InvalidResourceType.NotFoundThe ResourceType provided does not exist in our records.指定的资源类型不存在。
404InvalidRegionId.NotFoundThe specified RegionId does not exist.指定的地域 ID 不存在。

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

  • 本页导读 (1)
文档反馈