Azure Networking Services Virtual Network Peerings API
The VirtualNetworkPeerings API from Azure Networking Services — 2 operation(s) for virtualnetworkpeerings.
The VirtualNetworkPeerings API from Azure Networking Services — 2 operation(s) for virtualnetworkpeerings.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/azure-networking-services:azure-networking-services-virtualnetworkpeerings-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
description: The Microsoft Azure Network management API provides a RESTful set of web services that interact with Microsoft Azure Networks service to manage your network resources. The API has entities that capture the relationship between an end user and the Microsoft Azure Networks service.
title: NetworkManagementClient Virtual Network Peerings API
version: '2019-08-01'
x-apisguru-categories:
- cloud
x-logo:
url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
x-origin:
- format: swagger
url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/network/resource-manager/Microsoft.Network/stable/2019-08-01/virtualNetwork.json
version: '2.0'
x-preferred: true
x-providerName: azure.com
x-serviceName: network-virtualNetwork
x-tags:
- Azure
- Microsoft
servers:
- url: https://management.azure.com
security:
- azure_auth:
- user_impersonation
tags:
- name: VirtualNetworkPeerings
paths:
? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings
: get:
description: Gets all virtual network peerings in a virtual network.
operationId: VirtualNetworkPeerings_List
parameters:
- description: The name of the resource group.
in: path
name: resourceGroupName
required: true
example: my-resource-group
schema:
type: string
- description: The name of the virtual network.
in: path
name: virtualNetworkName
required: true
example: example-value
schema:
type: string
- description: Client API version.
in: query
name: api-version
required: true
example: '2019-06-01'
schema:
type: string
- description: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
in: path
name: subscriptionId
required: true
example: 00000000-0000-0000-0000-000000000000
schema:
type: string
responses:
'200':
description: Request successful. The operation returns a list of VirtualNetworkPeering resources.
content:
application/json:
schema:
$ref: '#/components/schemas/VirtualNetworkPeeringListResult'
tags:
- VirtualNetworkPeerings
x-ms-examples:
List peerings:
parameters:
api-version: '2019-08-01'
resourceGroupName: peerTest
subscriptionId: subid
virtualNetworkName: vnet1
responses:
'200':
body:
value:
- id: /subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet1/virtualNetworkPeerings/peer
name: peer
properties:
allowForwardedTraffic: true
allowGatewayTransit: false
allowVirtualNetworkAccess: true
peeringState: Initiated
provisioningState: Succeeded
remoteAddressSpace:
addressPrefixes:
- 12.0.0.0/8
remoteVirtualNetwork:
id: /subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2
useRemoteGateways: false
- id: /subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet1/virtualNetworkPeerings/peer2
name: peer
properties:
allowForwardedTraffic: false
allowGatewayTransit: false
allowVirtualNetworkAccess: true
peeringState: Initiated
provisioningState: Succeeded
remoteAddressSpace:
addressPrefixes:
- 13.0.0.0/8
remoteVirtualNetwork:
id: /subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet3
useRemoteGateways: false
x-ms-pageable:
nextLinkName: nextLink
summary: Azure Networking Services Virtual Network Peerings_ List
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}
: delete:
description: Deletes the specified virtual network peering.
operationId: VirtualNetworkPeerings_Delete
parameters:
- description: The name of the resource group.
in: path
name: resourceGroupName
required: true
example: my-resource-group
schema:
type: string
- description: The name of the virtual network.
in: path
name: virtualNetworkName
required: true
example: example-value
schema:
type: string
- description: The name of the virtual network peering.
in: path
name: virtualNetworkPeeringName
required: true
example: example-value
schema:
type: string
- description: Client API version.
in: query
name: api-version
required: true
example: '2019-06-01'
schema:
type: string
- description: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
in: path
name: subscriptionId
required: true
example: 00000000-0000-0000-0000-000000000000
schema:
type: string
responses:
'200':
description: Delete successful.
'202':
description: Accepted and the operation will complete asynchronously.
'204':
description: Delete successful.
tags:
- VirtualNetworkPeerings
x-ms-examples:
Delete peering:
parameters:
api-version: '2019-08-01'
resourceGroupName: peerTest
subscriptionId: subid
virtualNetworkName: vnet1
virtualNetworkPeeringName: peer
responses:
'200': {}
'202': {}
'204': {}
x-ms-long-running-operation: true
x-ms-long-running-operation-options:
final-state-via: location
summary: Azure Networking Services Virtual Network Peerings_ Delete
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
get:
description: Gets the specified virtual network peering.
operationId: VirtualNetworkPeerings_Get
parameters:
- description: The name of the resource group.
in: path
name: resourceGroupName
required: true
example: my-resource-group
schema:
type: string
- description: The name of the virtual network.
in: path
name: virtualNetworkName
required: true
example: example-value
schema:
type: string
- description: The name of the virtual network peering.
in: path
name: virtualNetworkPeeringName
required: true
example: example-value
schema:
type: string
- description: Client API version.
in: query
name: api-version
required: true
example: '2019-06-01'
schema:
type: string
- description: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
in: path
name: subscriptionId
required: true
example: 00000000-0000-0000-0000-000000000000
schema:
type: string
responses:
'200':
description: Request successful. The operation returns the resulting VirtualNetworkPeering resource.
content:
application/json:
schema:
$ref: '#/components/schemas/VirtualNetworkPeering'
tags:
- VirtualNetworkPeerings
x-ms-examples:
Get peering:
parameters:
api-version: '2019-08-01'
resourceGroupName: peerTest
subscriptionId: subid
virtualNetworkName: vnet1
virtualNetworkPeeringName: peer
responses:
'200':
body:
id: /subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet1/virtualNetworkPeerings/peer
name: peer
properties:
allowForwardedTraffic: true
allowGatewayTransit: false
allowVirtualNetworkAccess: true
peeringState: Initiated
provisioningState: Succeeded
remoteAddressSpace:
addressPrefixes:
- 12.0.0.0/8
remoteVirtualNetwork:
id: /subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2
useRemoteGateways: false
summary: Azure Networking Services Virtual Network Peerings_ Get
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
description: Creates or updates a peering in the specified virtual network.
operationId: VirtualNetworkPeerings_CreateOrUpdate
parameters:
- description: The name of the resource group.
in: path
name: resourceGroupName
required: true
example: my-resource-group
schema:
type: string
- description: The name of the virtual network.
in: path
name: virtualNetworkName
required: true
example: example-value
schema:
type: string
- description: The name of the peering.
in: path
name: virtualNetworkPeeringName
required: true
example: example-value
schema:
type: string
- description: Client API version.
in: query
name: api-version
required: true
example: '2019-06-01'
schema:
type: string
- description: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
in: path
name: subscriptionId
required: true
example: 00000000-0000-0000-0000-000000000000
schema:
type: string
responses:
'200':
description: Update successful. The operation returns the resulting VirtualNetworkPeering resource.
content:
application/json:
schema:
$ref: '#/components/schemas/VirtualNetworkPeering'
'201':
description: Create successful. The operation returns the resulting VirtualNetworkPeering resource.
content:
application/json:
schema:
$ref: '#/components/schemas/VirtualNetworkPeering'
tags:
- VirtualNetworkPeerings
x-ms-examples:
Create peering:
parameters:
VirtualNetworkPeeringParameters:
properties:
allowForwardedTraffic: true
allowGatewayTransit: false
allowVirtualNetworkAccess: true
remoteVirtualNetwork:
id: /subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2
useRemoteGateways: false
api-version: '2019-08-01'
resourceGroupName: peerTest
subscriptionId: subid
virtualNetworkName: vnet1
virtualNetworkPeeringName: peer
responses:
'200':
body:
id: /subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet1/virtualNetworkPeerings/peer
name: peer
properties:
allowForwardedTraffic: true
allowGatewayTransit: false
allowVirtualNetworkAccess: true
peeringState: Initiated
provisioningState: Succeeded
remoteAddressSpace:
addressPrefixes:
- 12.0.0.0/8
remoteVirtualNetwork:
id: /subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2
useRemoteGateways: false
'201':
body:
id: /subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet1/virtualNetworkPeerings/peer
name: peer
properties:
allowForwardedTraffic: true
allowGatewayTransit: false
allowVirtualNetworkAccess: true
peeringState: Initiated
provisioningState: Succeeded
remoteAddressSpace:
addressPrefixes:
- 12.0.0.0/8
remoteVirtualNetwork:
id: /subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2
useRemoteGateways: false
x-ms-long-running-operation: true
x-ms-long-running-operation-options:
final-state-via: azure-async-operation
summary: Azure Networking Services Virtual Network Peerings_ Create or Update
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/VirtualNetworkPeering'
description: Parameters supplied to the create or update virtual network peering operation.
required: true
components:
schemas:
VirtualNetworkPeeringPropertiesFormat:
description: Properties of the virtual network peering.
properties:
allowForwardedTraffic:
description: Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
type: boolean
allowGatewayTransit:
description: If gateway links can be used in remote virtual networking to link to this virtual network.
type: boolean
allowVirtualNetworkAccess:
description: Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
type: boolean
peeringState:
description: The status of the virtual network peering.
enum:
- Initiated
- Connected
- Disconnected
type: string
x-ms-enum:
modelAsString: true
name: VirtualNetworkPeeringState
provisioningState:
description: The current provisioning state.
enum:
- Succeeded
- Updating
- Deleting
- Failed
readOnly: true
type: string
x-ms-enum:
modelAsString: true
name: ProvisioningState
remoteAddressSpace:
$ref: '#/components/schemas/AddressSpace'
description: The reference of the remote virtual network address space.
remoteVirtualNetwork:
description: Reference to another subresource.
properties:
id:
description: Resource ID.
type: string
x-ms-azure-resource: true
useRemoteGateways:
description: If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.
type: boolean
VirtualNetworkPeeringListResult:
description: Response for ListSubnets API service call. Retrieves all subnets that belong to a virtual network.
properties:
nextLink:
description: The URL to get the next set of results.
type: string
value:
description: The peerings in a virtual network.
items:
$ref: '#/components/schemas/VirtualNetworkPeering'
type: array
VirtualNetworkPeering:
allOf:
- description: Reference to another subresource.
properties:
id:
description: Resource ID.
type: string
x-ms-azure-resource: true
description: Peerings in a virtual network resource.
properties:
etag:
description: A unique read-only string that changes whenever the resource is updated.
type: string
name:
description: The name of the resource that is unique within a resource group. This name can be used to access the resource.
type: string
properties:
$ref: '#/components/schemas/VirtualNetworkPeeringPropertiesFormat'
description: Properties of the virtual network peering.
x-ms-client-flatten: true
AddressSpace:
description: AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network.
properties:
addressPrefixes:
description: A list of address blocks reserved for this virtual network in CIDR notation.
items:
type: string
type: array
SubResourceModel:
type: object
description: Reference to another subresource.
properties:
name:
type: string
description: Name of the resource.
type:
type: string
description: Resource type.
readOnly: true
allOf:
- $ref: '#/components/schemas/SubResource'
x-ms-azure-resource: true
VirtualNetworkPeeringState:
type: string
description: The status of the virtual network peering.
enum:
- Initiated
- Connected
- Disconnected
x-ms-enum:
name: VirtualNetworkPeeringState
modelAsString: true
values:
- name: Initiated
value: Initiated
description: Initiated
- name: Connected
value: Connected
description: Connected
- name: Disconnected
value: Disconnected
description: Disconnected
SubResource:
type: object
description: Reference to another subresource.
properties:
id:
type: string
description: Resource ID.
VirtualNetworkPeeringLevel:
type: string
description: The peering sync status of the virtual network peering.
enum:
- FullyInSync
- RemoteNotInSync
- LocalNotInSync
- LocalAndRemoteNotInSync
x-ms-enum:
name: VirtualNetworkPeeringLevel
modelAsString: true
values:
- name: FullyInSync
value: FullyInSync
description: FullyInSync
- name: RemoteNotInSync
value: RemoteNotInSync
description: RemoteNotInSync
- name: LocalNotInSync
value: LocalNotInSync
description: LocalNotInSync
- name: LocalAndRemoteNotInSync
value: LocalAndRemoteNotInSync
description: LocalAndRemoteNotInSync
IpamPoolPrefixAllocationPool:
type: object
properties:
id:
type: string
format: arm-id
description: Resource id of the associated Azure IpamPool resource.
VirtualNetworkEncryptionEnforcement:
type: string
description: If the encrypted VNet allows VM that does not support encryption. This field is for future support, AllowUnencrypted is the only supported value at general availability.
enum:
- DropUnencrypted
- AllowUnencrypted
x-ms-enum:
name: VirtualNetworkEncryptionEnforcement
modelAsString: true
values:
- name: DropUnencrypted
value: DropUnencrypted
description: DropUnencrypted
- name: AllowUnencrypted
value: AllowUnencrypted
description: AllowUnencrypted
IpamPoolPrefixAllocation:
type: object
description: IpamPool prefix allocation reference.
properties:
pool:
$ref: '#/components/schemas/IpamPoolPrefixAllocationPool'
x-ms-client-flatten: true
numberOfIpAddresses:
type: string
description: Number of IP addresses to allocate.
allocatedAddressPrefixes:
type: array
description: List of assigned IP address prefixes in the IpamPool of the associated resource.
items:
type: string
readOnly: true
CloudError:
type: object
description: An error response from the service.
properties:
error:
$ref: '#/components/schemas/CloudErrorBody'
description: Cloud error body.
x-ms-external: true
ProvisioningState:
type: string
description: Provisioning states of a resource.
enum:
- Failed
- Succeeded
- Canceled
- Creating
- Updating
- Deleting
x-ms-enum:
name: ProvisioningState
modelAsString: true
values:
- name: Failed
value: Failed
description: Failed
- name: Succeeded
value: Succeeded
description: Succeeded
- name: Canceled
value: Canceled
description: Canceled
- name: Creating
value: Creating
description: Creating
- name: Updating
value: Updating
description: Updating
- name: Deleting
value: Deleting
description: Deleting
VirtualNetworkBgpCommunities:
type: object
description: Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET.
properties:
virtualNetworkCommunity:
type: string
description: The BGP community associated with the virtual network.
regionalCommunity:
type: string
description: The BGP community associated with the region of the virtual network.
readOnly: true
required:
- virtualNetworkCommunity
VirtualNetworkEncryption:
type: object
description: Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet.
properties:
enabled:
type: boolean
description: Indicates if encryption is enabled on the virtual network.
enforcement:
$ref: '#/components/schemas/VirtualNetworkEncryptionEnforcement'
description: If the encrypted VNet allows VM that does not support encryption. This field is for future support, AllowUnencrypted is the only supported value at general availability.
required:
- enabled
securitySchemes:
azure_auth:
type: oauth2
flows:
implicit:
scopes:
user_impersonation: impersonate your user account
authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
description: Azure Active Directory OAuth2 Flow.
parameters:
ApiVersionParameter:
name: api-version
in: query
description: The API version to use for this operation.
required: true
schema:
type: string
minLength: 1
SubscriptionIdParameter:
name: subscriptionId
in: path
description: The ID of the target subscription. The value must be an UUID.
required: true
schema:
type: string
format: uuid
ResourceGroupNameParameter:
name: resourceGroupName
in: path
description: The name of the resource group. The name is case insensitive.
required: true
x-ms-parameter-location: method
schema:
type: string
maxLength: 90
minLength: 1