全部產品
Search
文件中心

Resource Management:UntagResources - 為雲資源統一解除綁定標籤

更新時間:Feb 25, 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 支援傳遞資源群組、Action Trail和資源管理的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. 標籤鍵參數不可為空白。

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

變更歷史

更多資訊,參考變更詳情