L 2 Networks - Update
Update tags associated with the provided layer 2 (L2) network.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}?api-version=2025-09-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
l2Network
|
path | True |
string pattern: ^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$ |
The name of the L2 network. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
subscription
|
path | True |
string (uuid) |
The ID of the target subscription. The value must be an UUID. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Header
| Name | Required | Type | Description |
|---|---|---|---|
| If-Match |
string |
The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. |
|
| If-None-Match |
string |
Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. |
Request Body
| Name | Type | Description |
|---|---|---|
| tags |
object |
Resource tags. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Azure operation completed successfully. |
|
| Other Status Codes |
An unexpected error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
Patch L2 network
Sample request
Sample response
{
"extendedLocation": {
"name": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName",
"type": "CustomLocation"
},
"id": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName",
"location": "location",
"name": "l2NetworkName",
"properties": {
"associatedResourceIds": [
"/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName"
],
"clusterId": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName",
"detailedStatus": "Available",
"detailedStatusMessage": "L2 network is up",
"interfaceName": "eth0",
"l2IsolationDomainId": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName",
"provisioningState": "Succeeded"
},
"systemData": {
"createdAt": "2021-01-22T13:27:03.008Z",
"createdBy": "identityA",
"createdByType": "Application",
"lastModifiedAt": "2021-01-22T13:29:03.001Z",
"lastModifiedBy": "identityB",
"lastModifiedByType": "User"
},
"tags": {
"key1": "myvalue1",
"key2": "myvalue2"
},
"type": "Microsoft.NetworkCloud/l2Networks"
}
Definitions
| Name | Description |
|---|---|
|
Azure. |
The complex type of the extended location. |
|
created |
The type of identity that created the resource. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Extended |
The type of the extended location. |
|
Hybrid |
Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network plugin type for Hybrid AKS. |
| L2Network |
L2Network represents a network that utilizes a single isolation domain set up for layer-2 resources. |
|
L2Network |
The more detailed status of the L2 network. |
|
L2Network |
L2NetworkPatchParameters represents the body of the request to patch the L2 network. |
|
L2Network |
The provisioning state of the L2 network. |
|
system |
Metadata pertaining to creation and last modification of the resource. |
Azure.ResourceManager.CommonTypes.ExtendedLocation
The complex type of the extended location.
| Name | Type | Description |
|---|---|---|
| name |
string |
The name of the extended location. |
| type |
The type of the extended location. |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
ExtendedLocationType
The type of the extended location.
| Value | Description |
|---|---|
| EdgeZone |
Azure Edge Zones location type |
| CustomLocation |
Azure Custom Locations type |
HybridAksPluginType
Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network plugin type for Hybrid AKS.
| Value | Description |
|---|---|
| DPDK |
The DPDK plugin type. |
| SRIOV |
The SRIOV plugin type. |
| OSDevice |
The OSDevice plugin type. |
L2Network
L2Network represents a network that utilizes a single isolation domain set up for layer-2 resources.
| Name | Type | Default value | Description |
|---|---|---|---|
| etag |
string |
"If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") |
|
| extendedLocation |
The extended location of the resource. This property is required when creating the resource. |
||
| id |
string (arm-id) |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
|
| location |
string |
The geo-location where the resource lives |
|
| name |
string |
The name of the resource |
|
| properties.associatedResourceIds |
string[] |
The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. |
|
| properties.clusterId |
string (arm-id) |
The resource ID of the Network Cloud cluster this L2 network is associated with. |
|
| properties.detailedStatus |
The more detailed status of the L2 network. |
||
| properties.detailedStatusMessage |
string |
The descriptive message about the current detailed status. |
|
| properties.hybridAksClustersAssociatedIds |
string[] |
Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource ID(s) that are associated with this L2 network. |
|
| properties.hybridAksPluginType | SRIOV |
Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network plugin type for Hybrid AKS. |
|
| properties.interfaceName |
string maxLength: 12pattern: ^[a-zA-Z0-9@._-]*$ |
The default interface name for this L2 network in the virtual machine. This name can be overridden by the name supplied in the network attachment configuration of that virtual machine. |
|
| properties.l2IsolationDomainId |
string (arm-id) |
The resource ID of the Network Fabric l2IsolationDomain. |
|
| properties.provisioningState |
The provisioning state of the L2 network. |
||
| properties.virtualMachinesAssociatedIds |
string[] |
Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource ID(s), excluding any Hybrid AKS virtual machines, that are currently using this L2 network. |
|
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
||
| tags |
object |
Resource tags. |
|
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
L2NetworkDetailedStatus
The more detailed status of the L2 network.
| Value | Description |
|---|---|
| Error |
The Error status. |
| Available |
The Available status. |
| Provisioning |
The Provisioning status. |
L2NetworkPatchParameters
L2NetworkPatchParameters represents the body of the request to patch the L2 network.
| Name | Type | Description |
|---|---|---|
| tags |
object |
Resource tags. |
L2NetworkProvisioningState
The provisioning state of the L2 network.
| Value | Description |
|---|---|
| Succeeded |
The Succeeded status. |
| Failed |
The Failed status. |
| Canceled |
The Canceled status. |
| Provisioning |
The Provisioning status. |
| Accepted |
The Accepted status. |
systemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |