共用方式為


L 2 Networks - Update

修補第 2 層 (L2) 網路。
更新與所提供第 2 層 (L2) 網路相關聯的標記。

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}?api-version=2025-09-01

URI 參數

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

string

pattern: ^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$

L2 網路的名稱。

resourceGroupName
path True

string

minLength: 1
maxLength: 90

資源群組的名稱。 名稱不區分大小寫。

subscriptionId
path True

string (uuid)

目標訂用帳戶的標識碼。 此值必須是 UUID。

api-version
query True

string

minLength: 1

要用於這項作業的 API 版本。

要求標頭

名稱 必要 類型 Description
If-Match

string

轉換的ETag。 請省略此值以一律覆寫目前的資源。 指定最後看到的 ETag 值,以防止意外覆寫並行變更。

If-None-Match

string

設定為 『*』 以允許建立新的記錄集,但為了避免更新現有的資源。 其他值會導致伺服器發生錯誤,因為它們不受支援。

要求本文

名稱 類型 Description
tags

object

將取代現有資源的 Azure 資源標籤。

回應

名稱 類型 Description
200 OK

L2Network

資源已成功更新。

Other Status Codes

ErrorResponse

說明作業為何失敗的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

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

範例

Patch L2 network

範例要求

PATCH https://management.azure.com/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName?api-version=2025-09-01

{
  "tags": {
    "key1": "myvalue1",
    "key2": "myvalue2"
  }
}

範例回覆

{
  "id": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName",
  "name": "l2NetworkName",
  "systemData": {
    "createdAt": "2021-01-22T13:27:03.008Z",
    "createdBy": "identityA",
    "createdByType": "Application",
    "lastModifiedAt": "2021-01-22T13:29:03.001Z",
    "lastModifiedBy": "identityB",
    "lastModifiedByType": "User"
  },
  "type": "Microsoft.NetworkCloud/l2Networks",
  "location": "location",
  "tags": {
    "key1": "myvalue1",
    "key2": "myvalue2"
  },
  "extendedLocation": {
    "type": "CustomLocation",
    "name": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"
  },
  "properties": {
    "interfaceName": "eth0",
    "l2IsolationDomainId": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName",
    "provisioningState": "Succeeded",
    "clusterId": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName",
    "associatedResourceIds": [
      "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName"
    ],
    "detailedStatus": "Available",
    "detailedStatusMessage": "L2 network is up"
  }
}

定義

名稱 Description
createdByType

建立資源的身分識別類型。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorDetail

錯誤詳細數據。

ErrorResponse

錯誤回應

ExtendedLocation

ExtendedLocation 代表將建立資源的 Azure 自訂位置。

HybridAksPluginType

欄位已被取代。 欄位先前是選擇性的,現在不會有已定義的行為,而且會被忽略。 混合式 AKS 的網路外掛程式類型。

L2Network

L2Network 代表利用為第 2 層資源設定的單一隔離域的網路。

L2NetworkDetailedStatus

L2 網路的更詳細狀態。

L2NetworkPatchParameters

L2NetworkPatchParameters 代表修補 L2 網路的要求主體。

L2NetworkProvisioningState

L2網路的佈建狀態。

systemData

與建立和上次修改資源相關的元數據。

createdByType

建立資源的身分識別類型。

Description
User
Application
ManagedIdentity
Key

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorDetail

錯誤詳細數據。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorDetail[]

錯誤詳細數據。

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorResponse

錯誤回應

名稱 類型 Description
error

ErrorDetail

error 物件。

ExtendedLocation

ExtendedLocation 代表將建立資源的 Azure 自訂位置。

名稱 類型 Description
name

string

要在其中建立資源之擴充位置的資源標識碼。

type

string

擴充位置類型,例如 CustomLocation。

HybridAksPluginType

欄位已被取代。 欄位先前是選擇性的,現在不會有已定義的行為,而且會被忽略。 混合式 AKS 的網路外掛程式類型。

Description
DPDK
SRIOV
OSDevice

L2Network

L2Network 代表利用為第 2 層資源設定的單一隔離域的網路。

名稱 類型 預設值 Description
etag

string

資源 ETag。

extendedLocation

ExtendedLocation

ExtendedLocation 代表將建立資源的 Azure 自訂位置。
與資源相關聯的叢集擴充位置。

id

string (arm-id)

資源的完整資源標識碼。 例如 “/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}”

location

string

資源所在的地理位置

name

string

資源的名稱

properties.associatedResourceIds

string[]

已連結此網路之其他 Microsoft.NetworkCloud 資源的資源識別碼清單。

properties.clusterId

string (arm-id)

與此 L2 網路相關聯的網路雲端叢集的資源 ID。

properties.detailedStatus

L2NetworkDetailedStatus

L2 網路的更詳細狀態。

properties.detailedStatusMessage

string

有關當前詳細狀態的描述性訊息。

properties.hybridAksClustersAssociatedIds

string[]

欄位已被取代。 這些欄位將是空的/省略的。 與此 L2 網路相關聯的混合式 AKS 叢集資源識別碼清單。

properties.hybridAksPluginType

HybridAksPluginType

SRIOV

欄位已被取代。 欄位先前是選擇性的,現在不會有已定義的行為,而且會被忽略。 混合式 AKS 的網路外掛程式類型。

properties.interfaceName

string

maxLength: 12
pattern: ^[a-zA-Z0-9@._-]*$

虛擬機中此 L2 網路的預設介面名稱。 此名稱可由該虛擬機的網路附件元件中提供的名稱覆寫。

properties.l2IsolationDomainId

string (arm-id)

Network Fabric l2IsolationDomain 的資源標識符。

properties.provisioningState

L2NetworkProvisioningState

L2網路的佈建狀態。

properties.virtualMachinesAssociatedIds

string[]

欄位已被取代。 這些欄位將是空的/省略的。 目前使用此 L2 網路的虛擬機器資源識別碼清單,不包括任何混合式 AKS 虛擬機器。

systemData

systemData

包含 createdBy 和 modifiedBy 資訊的 Azure Resource Manager 元數據。

tags

object

資源標籤。

type

string

資源的類型。 例如“Microsoft.Compute/virtualMachines” 或 “Microsoft.Storage/storageAccounts”

L2NetworkDetailedStatus

L2 網路的更詳細狀態。

Description
Error
Available
Provisioning

L2NetworkPatchParameters

L2NetworkPatchParameters 代表修補 L2 網路的要求主體。

名稱 類型 Description
tags

object

將取代現有資源的 Azure 資源標籤。

L2NetworkProvisioningState

L2網路的佈建狀態。

Description
Succeeded
Failed
Canceled
Provisioning
Accepted

systemData

與建立和上次修改資源相關的元數據。

名稱 類型 Description
createdAt

string (date-time)

資源建立的時間戳(UTC)。

createdBy

string

建立資源的身分識別。

createdByType

createdByType

建立資源的身分識別類型。

lastModifiedAt

string (date-time)

上次修改的資源時間戳 (UTC)

lastModifiedBy

string

上次修改資源的身分識別。

lastModifiedByType

createdByType

上次修改資源的身分識別類型。