全部產品
Search
文件中心

Elastic Compute Service:UntagResources - 為指定資源清單統一解除綁定標籤

更新時間:Apr 04, 2026

調用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

RegionId

string

資源所屬的地區 ID。您可以調用 DescribeRegions 查看最新的阿里雲地區列表。

cn-hangzhou

ResourceType

string

資源類型定義。取值範圍:

  • instance:ECS 執行個體。

  • disk:磁碟。

  • snapshot:快照。

  • image:鏡像。

  • securitygroup:安全性群組。

  • volume:儲存卷。

  • eni:彈性網卡。

  • ddh:Dedicated Host。

  • ddhcluster:Dedicated Host叢集。

  • keypair:SSH 金鑰對。

  • launchtemplate:啟動模板。

  • reservedinstance:預留執行個體券。

  • snapshotpolicy:自動快照策略。

  • elasticityassurance:彈性保障。

  • capacityreservation:容量預定。

  • command:雲助手命令。

  • invocation:雲助手命令執行結果。

instance

All

boolean

是否解除綁定資源上全部的標籤。當請求中未設定 TagKey.N 時,該參數才有效。取值範圍:

  • true

  • false

預設值:false

false

ResourceId

array

資源 ID 列表。可輸入最多 50 個資源 ID。

i-bp67acfmxazb4ph****

string

資源 ID。

i-bp67acfmxazb4ph****

TagKey

array

資源的標籤鍵列表。可輸入最多 20 個標籤鍵。

TestKey

string

資源的標籤鍵。

TestKey

返回參數

名稱

類型

描述

樣本值

object

RequestId

string

請求 ID。

C46FF5A8-C5F0-4024-8262-B16B639225A0

樣本

正常返回樣本

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.
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 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. 指定的資源類型不存在。

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情