Skip to main content

virtual_network_peerings

Creates, updates, deletes, gets or lists a virtual_network_peerings resource.

Overview

Namevirtual_network_peerings
TypeResource
Idazure.network.virtual_network_peerings

Fields

NameDatatypeDescription
idtextResource ID.
nametextThe name of the resource that is unique within a resource group. This name can be used to access the resource.
allow_forwarded_traffictextfield from the properties object
allow_gateway_transittextfield from the properties object
allow_virtual_network_accesstextfield from the properties object
do_not_verify_remote_gatewaystextfield from the properties object
enable_only_ipv6_peeringtextfield from the properties object
etagtextA unique read-only string that changes whenever the resource is updated.
local_address_spacetextfield from the properties object
local_subnet_namestextfield from the properties object
local_virtual_network_address_spacetextfield from the properties object
peer_complete_vnetstextfield from the properties object
peering_statetextfield from the properties object
peering_sync_leveltextfield from the properties object
provisioning_statetextfield from the properties object
remote_address_spacetextfield from the properties object
remote_bgp_communitiestextfield from the properties object
remote_subnet_namestextfield from the properties object
remote_virtual_networktextfield from the properties object
remote_virtual_network_address_spacetextfield from the properties object
remote_virtual_network_encryptiontextfield from the properties object
resourceGroupNametextfield from the properties object
resource_guidtextfield from the properties object
subscriptionIdtextfield from the properties object
typetextResource type.
use_remote_gatewaystextfield from the properties object
virtualNetworkNametextfield from the properties object
virtualNetworkPeeringNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, subscriptionId, virtualNetworkName, virtualNetworkPeeringNameGets the specified virtual network peering.
listSELECTresourceGroupName, subscriptionId, virtualNetworkNameGets all virtual network peerings in a virtual network.
create_or_updateINSERTresourceGroupName, subscriptionId, virtualNetworkName, virtualNetworkPeeringNameCreates or updates a peering in the specified virtual network.
deleteDELETEresourceGroupName, subscriptionId, virtualNetworkName, virtualNetworkPeeringNameDeletes the specified virtual network peering.

SELECT examples

Gets all virtual network peerings in a virtual network.

SELECT
id,
name,
allow_forwarded_traffic,
allow_gateway_transit,
allow_virtual_network_access,
do_not_verify_remote_gateways,
enable_only_ipv6_peering,
etag,
local_address_space,
local_subnet_names,
local_virtual_network_address_space,
peer_complete_vnets,
peering_state,
peering_sync_level,
provisioning_state,
remote_address_space,
remote_bgp_communities,
remote_subnet_names,
remote_virtual_network,
remote_virtual_network_address_space,
remote_virtual_network_encryption,
resourceGroupName,
resource_guid,
subscriptionId,
type,
use_remote_gateways,
virtualNetworkName,
virtualNetworkPeeringName
FROM azure.network.vw_virtual_network_peerings
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualNetworkName = '{{ virtualNetworkName }}';

INSERT example

Use the following StackQL query and manifest file to create a new virtual_network_peerings resource.

/*+ create */
INSERT INTO azure.network.virtual_network_peerings (
resourceGroupName,
subscriptionId,
virtualNetworkName,
virtualNetworkPeeringName,
properties,
name,
type,
id
)
SELECT
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ virtualNetworkName }}',
'{{ virtualNetworkPeeringName }}',
'{{ properties }}',
'{{ name }}',
'{{ type }}',
'{{ id }}'
;

DELETE example

Deletes the specified virtual_network_peerings resource.

/*+ delete */
DELETE FROM azure.network.virtual_network_peerings
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualNetworkName = '{{ virtualNetworkName }}'
AND virtualNetworkPeeringName = '{{ virtualNetworkPeeringName }}';