Share via


L 2 Networks - List By Subscription

List layer 2 (L2) networks in the subscription.
Get a list of layer 2 (L2) networks in the provided subscription.

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/l2Networks?api-version=2025-02-01

URI Parameters

Name In Required Type Description
subscriptionId
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.

Responses

Name Type Description
200 OK

L2NetworkList

The resource list has been successfully retrieved.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

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

List L2 networks for subscription

Sample request

GET https://management.azure.com/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/l2Networks?api-version=2025-02-01

Sample response

{
  "value": [
    {
      "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"
      }
    }
  ],
  "nextLink": "https://fully.qualified.hyperlink"
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ExtendedLocation

ExtendedLocation represents the Azure custom location where the resource will be created.

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.

L2Network

L2Network represents a network that utilizes a single isolation domain set up for layer-2 resources.

L2NetworkDetailedStatus

The more detailed status of the L2 network.

L2NetworkList

L2NetworkList represents a list of L2 networks.

L2NetworkProvisioningState

The provisioning state of the L2 network.

systemData

Metadata pertaining to creation and last modification of the resource.

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

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

ExtendedLocation

ExtendedLocation represents the Azure custom location where the resource will be created.

Name Type Description
name

string

The resource ID of the extended location on which the resource will be created.

type

string

The extended location type, for example, CustomLocation.

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
SRIOV
OSDevice

L2Network

L2Network represents a network that utilizes a single isolation domain set up for layer-2 resources.

Name Type Default value Description
etag

string

Resource ETag.

extendedLocation

ExtendedLocation

ExtendedLocation represents the Azure custom location where the resource will be created.
The extended location of the cluster associated with 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

L2NetworkDetailedStatus

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

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: 12
pattern: ^[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

L2NetworkProvisioningState

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

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
Available
Provisioning

L2NetworkList

L2NetworkList represents a list of L2 networks.

Name Type Description
nextLink

string

The link used to get the next page of operations.

value

L2Network[]

The list of L2 networks.

L2NetworkProvisioningState

The provisioning state of the L2 network.

Value Description
Succeeded
Failed
Canceled
Provisioning
Accepted

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

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

createdByType

The type of identity that last modified the resource.