Snapshots - Update Tags
更新快照上的標籤。
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}?api-version=2025-10-01
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
資源群組的名稱。 名稱不區分大小寫。 |
|
resource
|
path | True |
string minLength: 1maxLength: 63 pattern: ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$ |
受管理叢集資源的名稱。 |
|
subscription
|
path | True |
string (uuid) |
目標訂用帳戶的標識碼。 此值必須是 UUID。 |
|
api-version
|
query | True |
string minLength: 1 |
用於此作業的 API 版本。 |
要求本文
| 名稱 | 類型 | Description |
|---|---|---|
| tags |
object |
資源標籤。 |
回應
| 名稱 | 類型 | Description |
|---|---|---|
| 200 OK |
OK |
|
| Other Status Codes |
描述作業失敗原因的錯誤回應。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
| 名稱 | Description |
|---|---|
| user_impersonation | 模擬您的用戶帳戶 |
範例
Update Snapshot Tags
範例要求
範例回覆
{
"name": "snapshot1",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1",
"type": "Microsoft.ContainerService/Snapshots",
"location": "westus",
"tags": {
"key1": "val1",
"key2": "val2"
},
"systemData": {
"createdBy": "user1",
"createdByType": "User",
"createdAt": "2021-08-09T20:13:23.298420761Z"
},
"properties": {
"creationData": {
"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0"
},
"snapshotType": "NodePool",
"nodeImageVersion": "AKSUbuntu-1804gen2containerd-2021.09.11",
"kubernetesVersion": "1.20.5",
"osType": "Linux",
"osSku": "Ubuntu",
"vmSize": "Standard_D2s_v3",
"enableFIPS": false
}
}
定義
| 名稱 | Description |
|---|---|
|
created |
建立資源的身分識別類型。 |
|
Creation |
從來源資源建立目標資源時所使用的數據。 |
|
Error |
資源管理錯誤其他資訊。 |
|
Error |
錯誤詳細數據。 |
|
Error |
錯誤回應 |
| OSSKU |
指定代理程式集區所使用的 OS SKU。 如果OSType為Linux,則預設值為Ubuntu。 當 Kubernetes <= 1.24 或 Windows2022 時,當 Kubernetes >= 1.25 如果 OSType 為 Windows,則預設值為 Windows2019。 |
| OSType |
作系統類型。 預設值為Linux。 |
| Snapshot |
節點集區快照集資源。 |
|
Snapshot |
快照集的類型。 預設值為 NodePool。 |
|
system |
與建立和上次修改資源相關的元數據。 |
|
Tags |
修補作業的標記物件。 |
createdByType
建立資源的身分識別類型。
| 值 | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
CreationData
從來源資源建立目標資源時所使用的數據。
| 名稱 | 類型 | Description |
|---|---|---|
| sourceResourceId |
string (arm-id) |
這是要用來建立目標物件的來源物件的 ARM 識別碼。 |
ErrorAdditionalInfo
資源管理錯誤其他資訊。
| 名稱 | 類型 | Description |
|---|---|---|
| info |
object |
附加資訊。 |
| type |
string |
其他資訊類型。 |
ErrorDetail
錯誤詳細數據。
| 名稱 | 類型 | Description |
|---|---|---|
| additionalInfo |
錯誤附加資訊。 |
|
| code |
string |
錯誤碼。 |
| details |
錯誤詳細數據。 |
|
| message |
string |
錯誤訊息。 |
| target |
string |
錯誤目標。 |
ErrorResponse
錯誤回應
| 名稱 | 類型 | Description |
|---|---|---|
| error |
錯誤物件。 |
OSSKU
指定代理程式集區所使用的 OS SKU。 如果OSType為Linux,則預設值為Ubuntu。 當 Kubernetes <= 1.24 或 Windows2022 時,當 Kubernetes >= 1.25 如果 OSType 為 Windows,則預設值為 Windows2019。
| 值 | Description |
|---|---|
| AzureLinux |
使用 AzureLinux 作為節點映像的 OS。 Azure Linux 是Microsoft所建置的容器優化Linux散發版本,如需詳細資訊,請造訪 https://aka.ms/azurelinux。 |
| AzureLinux3 |
使用 AzureLinux3 作為節點映像的 OS。 Azure Linux 是Microsoft所建置的容器優化Linux散發版本,如需詳細資訊,請造訪 https://aka.ms/azurelinux。 有關限制,請訪問 https://aka.ms/aks/node-images。 如需作業系統移轉指引,請參閱 https://aka.ms/aks/upgrade-os-version。 |
| CBLMariner |
已被取代的 OSSKU。 Microsoft建議新的部署改為選擇 『AzureLinux』。 |
| Ubuntu |
使用Ubuntu作為節點映像的OS。 |
| Ubuntu2204 |
使用Ubuntu2204作為節點映像的作系統,但是,並非所有節點池都支援Ubuntu 22.04。 如需限制和支援的 Kubernetes 版本,請參閱 https://aka.ms/aks/supported-ubuntu-versions |
| Ubuntu2404 |
使用Ubuntu2404作為節點映像的作系統,但是,並非所有節點池都支援Ubuntu 24.04。 如需限制和支援的 Kubernetes 版本,請參閱 https://aka.ms/aks/supported-ubuntu-versions |
| Windows2019 |
使用 Windows2019 作為節點映像的 OS。 不支援系統節點集區。 Windows2019 僅支援 Windows2019 容器;它無法執行 Windows2022 容器,反之亦然。 |
| Windows2022 |
使用 Windows2022 作為節點映像的 OS。 不支援系統節點集區。 Windows2022 僅支援 Windows2022 容器;它無法執行 Windows2019 容器,反之亦然。 |
OSType
作系統類型。 預設值為Linux。
| 值 | Description |
|---|---|
| Linux |
使用 Linux。 |
| Windows |
使用 Windows。 |
Snapshot
節點集區快照集資源。
| 名稱 | 類型 | 預設值 | Description |
|---|---|---|---|
| id |
string (arm-id) |
資源的完整資源標識碼。 例如 “/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
|
| location |
string |
資源所在的地理位置 |
|
| name |
string |
資源的名稱 |
|
| properties.creationData |
要用來指定來源代理程式集區資源標識碼以建立此快照集的 CreationData。 |
||
| properties.enableFIPS |
boolean |
是否要使用已啟用 FIPS 的 OS。 |
|
| properties.kubernetesVersion |
string |
Kubernetes 的版本。 |
|
| properties.nodeImageVersion |
string |
節點映像的版本。 |
|
| properties.osSku |
指定代理程式集區所使用的 OS SKU。 如果OSType為Linux,則預設值為Ubuntu。 當 Kubernetes <= 1.24 或 Windows2022 時,當 Kubernetes >= 1.25 如果 OSType 為 Windows,則預設值為 Windows2019。 |
||
| properties.osType | Linux |
作系統類型。 預設值為Linux。 |
|
| properties.snapshotType | NodePool |
快照集的類型。 預設值為 NodePool。 |
|
| properties.vmSize |
string |
VM 的大小。 |
|
| systemData |
包含 createdBy 和 modifiedBy 資訊的 Azure Resource Manager 元數據。 |
||
| tags |
object |
資源標籤。 |
|
| type |
string |
資源的類型。 例如「Microsoft.Compute/virtualMachines」或「Microsoft.Storage/storageAccounts」 |
SnapshotType
快照集的類型。 預設值為 NodePool。
| 值 | Description |
|---|---|
| NodePool |
快照集是節點集區的快照集。 |
systemData
與建立和上次修改資源相關的元數據。
| 名稱 | 類型 | Description |
|---|---|---|
| createdAt |
string (date-time) |
資源建立的時間戳(UTC)。 |
| createdBy |
string |
建立資源的身分識別。 |
| createdByType |
建立資源的身分識別類型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的資源時間戳 (UTC) |
| lastModifiedBy |
string |
上次修改資源的身分識別。 |
| lastModifiedByType |
上次修改資源的身分識別類型。 |
TagsObject
修補作業的標記物件。
| 名稱 | 類型 | Description |
|---|---|---|
| tags |
object |
資源標籤。 |