调用UntagResources为指定的ECS资源列表统一解绑标签。解绑后,如果该标签没有绑定其他任何资源,会被自动删除。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:- 对于必选的资源类型,用前面加 * 表示。
- 对于不支持资源级授权的操作,用全部资源表示。
 
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
| 操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 | 
|---|---|---|---|---|
| ecs:UntagResources | delete | 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} | 
 | 无 | 
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 | 
|---|---|---|---|---|
| RegionId | string | 是 | 资源所属的地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。 | cn-hangzhou | 
| ResourceType | string | 是 | 资源类型定义。取值范围: 
 | instance | 
| All | boolean | 否 | 是否解绑资源上全部的标签。当请求中未设置 TagKey.N 时,该参数才有效。取值范围: 
 默认值:false | false | 
| ResourceId | array | 是 | 资源 ID 列表。可输入最多 50 个资源 ID。 | |
| string | 是 | 资源 ID。 | i-bp67acfmxazb4ph**** | |
| TagKey | array | 否 | 资源的标签键列表。可输入最多 20 个标签键。 | |
| string | 否 | 资源的标签键。 | TestKey | 
返回参数
示例
正常返回示例
JSON格式
{
  "RequestId": "C46FF5A8-C5F0-4024-8262-B16B639225A0"
}错误码
| HTTP status code | 错误码 | 错误信息 | 描述 | 
|---|---|---|---|
| 400 | NumberExceed.ResourceIds | The ResourceIds parameter's number is exceed , Valid : 50 | - | 
| 400 | NumberExceed.Tags | The Tags parameter's number is exceed , Valid : 20 | - | 
| 400 | Duplicate.TagKey | The Tag.N.Key contain duplicate key. | 标签中存在重复的键,请保持键的唯一性。 | 
| 400 | InvalidTagKey.Malformed | The specified Tag.n.Key is not valid. | 指定的标签键参数有误。 | 
| 400 | InvalidTagValue.Malformed | The specified Tag.n.Value is not valid. | 指定的标签值参数有误。 | 
| 400 | OperationDenied.QuotaExceed | The quota of tags on resource is beyond permitted range. | 资源标签已达上限。 | 
| 400 | InvalidTag.Mismatch | The specified Tag.n.Key and Tag.n.Value are not match. | 指定的 Tag.N.Key 和 Tag.N.Value 不匹配。 | 
| 400 | InvalidTagCount | The specified tags are beyond the permitted range. | 指定的标记超出取值范围。 | 
| 400 | Invalid.Scope | The specified scope is invalid. | 可见范围参数无效。 | 
| 403 | PermissionDenied.TagOwnerBid | The specified operator not have permission to set TagOwnerBid value. | - | 
| 403 | PermissionDenied.TagOwnerUid | The specified operator not have permission to set TagOwnerUid value. | 无权设置标签归属者。 | 
| 403 | PermissionDenied.Scope | The specified operator not have permission to set Scope value. | 指定的操作员无权设置范围值。 | 
| 403 | InvalidResourceId.NotSupported | The specified ResourceId does not support tagging. | 指定的资源 ID 不支持标记。 | 
| 403 | NoPermissionKey.Scope | %s | - | 
| 403 | NoPermission.Tag | The operator is not permission for the tag. | 您没有操作该资源标签的权限。 | 
| 403 | Param.Conflict | The specified all is true, but the specified TagKey.N is not empty. | - | 
| 404 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | 地域信息错误 | 
| 404 | InvalidRegionId.NotFound | %s | 提供的地域 ID 不存在。 | 
| 404 | MissingParameter.ResourceIds | The parameter - ResourceIds.N should not be null | - | 
| 404 | MissingParameter.TagOwnerUid | The parameter - TagOwnerUid should not be null | 参数 TagOwnerUid 不能为空。 | 
| 404 | MissingParameter.TagOwnerBid | The parameter - TagOwnerBid should not be null | 参数 TagOwnerBid 不能为空。 | 
| 404 | MissingParameter.ResourceType | The parameter - ResourceType should not be null | - | 
| 404 | MissingParameter.Tags | The parameter - Tags should not be null | 参数 Tags 不能为空。 | 
| 404 | MissingParameter.RegionId | The parameter - RegionId should not be null | 参数 RegionId 不能为空。 | 
| 404 | InvalidResourceId.NotFound | The specified ResourceIds are not found in our records. | 指定的资源不存在,请检查参数 ResourceId 是否正确。 | 
| 404 | InvalidResourceType.NotFound | The ResourceType provided does not exist in our records. | 指定的资源类型不存在。 | 
| 404 | InvalidRegionId.NotFound | The specified RegionId does not exist. | 指定的地域 ID 不存在。 | 
访问错误中心查看更多错误码。
变更历史
| 变更时间 | 变更内容概要 | 操作 | 
|---|
暂无变更历史
