Local Network Gateways - List
Gets all the local network gateways in a resource group.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways?api-version=2025-03-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
resource
|
path | True |
string |
The name of the resource group. |
|
subscription
|
path | True |
string |
The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
|
api-version
|
query | True |
string |
Client API version. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Request successful. The operation returns a list of LocalNetworkGateway resources. |
|
| Other Status Codes |
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
ListLocalNetworkGateways
Sample request
Sample response
{
"value": [
{
"name": "localgw1",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw1",
"etag": "W/\"00000000-0000-0000-0000-000000000000\"",
"type": "Microsoft.Network/localNetworkGateways",
"location": "centralus",
"properties": {
"provisioningState": "Succeeded",
"resourceGuid": "00000000-0000-0000-0000-000000000000",
"localNetworkAddressSpace": {
"addressPrefixes": [
"10.1.0.0/16"
]
},
"gatewayIpAddress": "x.x.x.x"
}
},
{
"name": "localgw2",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw2",
"etag": "W/\"00000000-0000-0000-0000-000000000000\"",
"type": "Microsoft.Network/localNetworkGateways",
"location": "eastus",
"properties": {
"provisioningState": "Succeeded",
"resourceGuid": "00000000-0000-0000-0000-000000000000",
"localNetworkAddressSpace": {
"addressPrefixes": [
"10.2.0.0/16"
]
},
"gatewayIpAddress": "x.x.x.x"
}
}
]
}
Definitions
| Name | Description |
|---|---|
|
Address |
AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network. |
|
Bgp |
BGP settings details. |
|
Cloud |
An error response from the service. |
|
Cloud |
An error response from the service. |
|
Ipam |
IpamPool prefix allocation reference. |
|
IPConfiguration |
Properties of IPConfigurationBgpPeeringAddress. |
|
Local |
A common class for general resource information. |
|
Local |
Response for ListLocalNetworkGateways API service call. |
|
Provisioning |
The current provisioning state. |
AddressSpace
AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network.
| Name | Type | Description |
|---|---|---|
| addressPrefixes |
string[] |
A list of address blocks reserved for this virtual network in CIDR notation. |
| ipamPoolPrefixAllocations |
A list of IPAM Pools allocating IP address prefixes. |
BgpSettings
BGP settings details.
| Name | Type | Description |
|---|---|---|
| asn |
integer (int64) minimum: 0maximum: 4294967295 |
The BGP speaker's ASN. |
| bgpPeeringAddress |
string |
The BGP peering address and BGP identifier of this BGP speaker. |
| bgpPeeringAddresses |
BGP peering address with IP configuration ID for virtual network gateway. |
|
| peerWeight |
integer (int32) |
The weight added to routes learned from this BGP speaker. |
CloudError
An error response from the service.
| Name | Type | Description |
|---|---|---|
| error |
Cloud error body. |
CloudErrorBody
An error response from the service.
| Name | Type | Description |
|---|---|---|
| code |
string |
An identifier for the error. Codes are invariant and are intended to be consumed programmatically. |
| details |
A list of additional details about the error. |
|
| message |
string |
A message describing the error, intended to be suitable for display in a user interface. |
| target |
string |
The target of the particular error. For example, the name of the property in error. |
IpamPoolPrefixAllocation
IpamPool prefix allocation reference.
| Name | Type | Description |
|---|---|---|
| allocatedAddressPrefixes |
string[] |
List of assigned IP address prefixes in the IpamPool of the associated resource. |
| numberOfIpAddresses |
string |
Number of IP addresses to allocate. |
| pool.id |
string (arm-id) |
Resource id of the associated Azure IpamPool resource. |
IPConfigurationBgpPeeringAddress
Properties of IPConfigurationBgpPeeringAddress.
| Name | Type | Description |
|---|---|---|
| customBgpIpAddresses |
string[] |
The list of custom BGP peering addresses which belong to IP configuration. |
| defaultBgpIpAddresses |
string[] |
The list of default BGP peering addresses which belong to IP configuration. |
| ipconfigurationId |
string |
The ID of IP configuration which belongs to gateway. |
| tunnelIpAddresses |
string[] |
The list of tunnel public IP addresses which belong to IP configuration. |
LocalNetworkGateway
A common class for general resource information.
| Name | Type | Description |
|---|---|---|
| etag |
string |
A unique read-only string that changes whenever the resource is updated. |
| id |
string |
Resource ID. |
| location |
string |
Resource location. |
| name |
string |
Resource name. |
| properties.bgpSettings |
Local network gateway's BGP speaker settings. |
|
| properties.fqdn |
string |
FQDN of local network gateway. |
| properties.gatewayIpAddress |
string |
IP address of local network gateway. |
| properties.localNetworkAddressSpace |
Local network site address space. |
|
| properties.provisioningState |
The provisioning state of the local network gateway resource. |
|
| properties.resourceGuid |
string |
The resource GUID property of the local network gateway resource. |
| tags |
object |
Resource tags. |
| type |
string |
Resource type. |
LocalNetworkGatewayListResult
Response for ListLocalNetworkGateways API service call.
| Name | Type | Description |
|---|---|---|
| nextLink |
string |
The URL to get the next set of results. |
| value |
A list of local network gateways that exists in a resource group. |
ProvisioningState
The current provisioning state.
| Value | Description |
|---|---|
| Succeeded | |
| Updating | |
| Deleting | |
| Failed |