Share via


Tags - Update At Scope

選擇性地更新資源或訂用帳戶上的標記集。
此作業允許取代、合併或選擇性刪除指定資源或訂用帳戶上的標記。 指定的實體在作業結束時最多可以有50個標記。 'replace' 選項會將整個現有標記集取代為新的集合。 [合併] 選項可讓您新增具有新名稱的標籤,以及使用現有名稱更新標籤的值。 'delete' 選項可讓您根據指定的名稱或名稱/值組選擇性地刪除標記。

PATCH https://management.azure.com/{scope}/providers/Microsoft.Resources/tags/default?api-version=2021-04-01

URI 參數

名稱 位於 必要 類型 Description
scope
path True

string

資源範圍。

api-version
query True

string

用於此作業的 API 版本。

要求本文

名稱 類型 Description
operation

tagsPatchOperation

修補程式 API 的作業類型。

properties

Tags

標記集。

回應

名稱 類型 Description
200 OK

TagsResource

標籤已成功更新。 從指定的 對象傳回標記。

Other Status Codes

CloudError

描述作業失敗原因的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名稱 Description
user_impersonation 模擬您的用戶帳戶

定義

名稱 Description
CloudError

資源管理要求的錯誤回應。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorResponse

錯誤回應

Tags

名稱和值組的字典。

tagsPatchOperation

修補程式 API 的作業類型。

TagsPatchResource

卷標修補程式 API 要求的包裝函式資源。

TagsResource

標記 API 要求和回應的包裝函式資源。

CloudError

資源管理要求的錯誤回應。

名稱 類型 Description
error

ErrorResponse

錯誤回應
所有 Azure Resource Manager API 的常見錯誤回應,以傳回失敗作業的錯誤詳細數據。 (這也會遵循 OData 錯誤回應格式。)

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorResponse

錯誤回應

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorResponse[]

錯誤詳細資料。

message

string

錯誤訊息。

target

string

錯誤目標。

Tags

名稱和值組的字典。

名稱 類型 Description
tags

object

tagsPatchOperation

修補程式 API 的作業類型。

名稱 類型 Description
Delete

string

'delete' 選項可讓您根據指定的名稱或名稱/值組選擇性地刪除標記。

Merge

string

[合併] 選項可讓您新增具有新名稱的標籤,以及使用現有名稱更新標籤的值。

Replace

string

'replace' 選項會將整個現有標記集取代為新的集合。

TagsPatchResource

卷標修補程式 API 要求的包裝函式資源。

名稱 類型 Description
operation

tagsPatchOperation

修補程式 API 的作業類型。

properties

Tags

標記集。

TagsResource

標記 API 要求和回應的包裝函式資源。

名稱 類型 Description
id

string

卷標包裝函式資源的標識碼。

name

string

標記包裝函式資源的名稱。

properties

Tags

標記集。

type

string

卷標包裝函式資源的型別。