Virtual Router Peerings - Create Or Update
Creates or updates the specified Virtual Router Peering.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}?api-version=2024-03-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
peering
|
path | True |
string |
The name of the Virtual Router Peering. |
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. |
virtual
|
path | True |
string |
The name of the Virtual Router. |
api-version
|
query | True |
string |
Client API version. |
Request Body
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
name |
string |
Name of the virtual router peering that is unique within a virtual router. |
properties.peerAsn |
integer |
Peer ASN. |
properties.peerIp |
string |
Peer IP. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Request successful. The operation returns the resulting Virtual Router Peering resource. |
|
201 Created |
Request received successfully. The operation returns the resulting Virtual Router Peering 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
Create Virtual Router Peering
Sample request
Sample response
{
"name": "peering1",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualRouters/virtualRouter/peerings/peering1",
"etag": "W/\"72090554-7e3b-43f2-80ad-99a9020dcb11\"",
"properties": {
"provisioningState": "Succeeded",
"peerIp": "192.168.1.5",
"peerAsn": 20000
}
}
{
"name": "peering1",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualRouters/virtualRouter/peerings/peering1",
"etag": "W/\"72090554-7e3b-43f2-80ad-99a9020dcb11\"",
"properties": {
"provisioningState": "Succeeded",
"peerIp": "192.168.1.5",
"peerAsn": 20000
}
}
Definitions
Name | Description |
---|---|
Error |
Common error representation. |
Error |
Common error details representation. |
Provisioning |
The current provisioning state. |
Virtual |
Virtual Router Peering resource. |
Error
Common error representation.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
details |
Error details. |
|
innerError |
string |
Inner error message. |
message |
string |
Error message. |
target |
string |
Error target. |
ErrorDetails
Common error details representation.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
message |
string |
Error message. |
target |
string |
Error target. |
ProvisioningState
The current provisioning state.
Name | Type | Description |
---|---|---|
Deleting |
string |
|
Failed |
string |
|
Succeeded |
string |
|
Updating |
string |
VirtualRouterPeering
Virtual Router Peering resource.
Name | Type | Description |
---|---|---|
etag |
string |
A unique read-only string that changes whenever the resource is updated. |
id |
string |
Resource ID. |
name |
string |
Name of the virtual router peering that is unique within a virtual router. |
properties.peerAsn |
integer |
Peer ASN. |
properties.peerIp |
string |
Peer IP. |
properties.provisioningState |
The provisioning state of the resource. |
|
type |
string |
Peering type. |