Local Network Gateways - Create Or Update
Creates or updates a local network gateway in the specified resource group.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}?api-version=2023-09-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
local
|
path | True |
string |
The name of the local network gateway. |
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. |
Request Body
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
location |
string |
Resource location. |
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. |
|
tags |
object |
Resource tags. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Update successful. The operation returns the resulting LocalNetworkGateway resource. |
|
201 Created |
Create successful. The operation returns the resulting LocalNetworkGateway resource. |
|
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
CreateLocalNetworkGateway
Sample Request
PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw?api-version=2023-09-01
{
"properties": {
"localNetworkAddressSpace": {
"addressPrefixes": [
"10.1.0.0/16"
]
},
"gatewayIpAddress": "11.12.13.14",
"fqdn": "site1.contoso.com"
},
"location": "Central US"
}
Sample Response
{
"name": "localgw",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw",
"etag": "W/\"00000000-0000-0000-0000-000000000000\"",
"type": "Microsoft.Network/localNetworkGateways",
"location": "centralus",
"properties": {
"provisioningState": "Updating",
"resourceGuid": "00000000-0000-0000-0000-000000000000",
"localNetworkAddressSpace": {
"addressPrefixes": [
"10.1.0.0/16"
]
},
"gatewayIpAddress": "11.12.13.14"
}
}
{
"name": "localgw",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw",
"etag": "W/\"00000000-0000-0000-0000-000000000000\"",
"type": "Microsoft.Network/localNetworkGateways",
"location": "centralus",
"properties": {
"provisioningState": "Updating",
"resourceGuid": "00000000-0000-0000-0000-000000000000",
"localNetworkAddressSpace": {
"addressPrefixes": [
"10.1.0.0/16"
]
},
"gatewayIpAddress": "11.12.13.14"
}
}
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. |
IPConfiguration |
Properties of IPConfigurationBgpPeeringAddress. |
Local |
A common class for general resource information. |
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. |
BgpSettings
BGP settings details.
Name | Type | Description |
---|---|---|
asn |
integer |
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 |
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. |
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. |
ProvisioningState
The current provisioning state.
Name | Type | Description |
---|---|---|
Deleting |
string |
|
Failed |
string |
|
Succeeded |
string |
|
Updating |
string |