Skip to main content

virtual_networks

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

Overview

Namevirtual_networks
TypeResource
Idazure.network.virtual_networks

Fields

NameDatatypeDescription
idtextResource ID.
nametextResource name.
address_spacetextfield from the properties object
bgp_communitiestextfield from the properties object
ddos_protection_plantextfield from the properties object
dhcp_optionstextfield from the properties object
enable_ddos_protectiontextfield from the properties object
enable_vm_protectiontextfield from the properties object
encryptiontextfield from the properties object
etagtextA unique read-only string that changes whenever the resource is updated.
extended_locationtextfield from the properties object
flow_logstextfield from the properties object
flow_timeout_in_minutestextfield from the properties object
ip_allocationstextfield from the properties object
locationtextResource location.
private_endpoint_v_net_policiestextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
resource_guidtextfield from the properties object
subnetstextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
typetextResource type.
virtualNetworkNametextfield from the properties object
virtual_network_peeringstextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, subscriptionId, virtualNetworkNameGets the specified virtual network by resource group.
listSELECTresourceGroupName, subscriptionIdGets all virtual networks in a resource group.
list_allSELECTsubscriptionIdGets all virtual networks in a subscription.
create_or_updateINSERTresourceGroupName, subscriptionId, virtualNetworkNameCreates or updates a virtual network in the specified resource group.
deleteDELETEresourceGroupName, subscriptionId, virtualNetworkNameDeletes the specified virtual network.
check_ip_address_availabilityEXECipAddress, resourceGroupName, subscriptionId, virtualNetworkNameChecks whether a private IP address is available for use.
update_tagsEXECresourceGroupName, subscriptionId, virtualNetworkNameUpdates a virtual network tags.

SELECT examples

Gets all virtual networks in a subscription.

SELECT
id,
name,
address_space,
bgp_communities,
ddos_protection_plan,
dhcp_options,
enable_ddos_protection,
enable_vm_protection,
encryption,
etag,
extended_location,
flow_logs,
flow_timeout_in_minutes,
ip_allocations,
location,
private_endpoint_v_net_policies,
provisioning_state,
resourceGroupName,
resource_guid,
subnets,
subscriptionId,
tags,
type,
virtualNetworkName,
virtual_network_peerings
FROM azure.network.vw_virtual_networks
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.network.virtual_networks (
resourceGroupName,
subscriptionId,
virtualNetworkName,
extendedLocation,
properties,
id,
location,
tags
)
SELECT
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ virtualNetworkName }}',
'{{ extendedLocation }}',
'{{ properties }}',
'{{ id }}',
'{{ location }}',
'{{ tags }}'
;

DELETE example

Deletes the specified virtual_networks resource.

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