Skip to main content

virtual_networks

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

Overview

Namevirtual_networks
TypeResource
Idazure.system_center_vm_manager.virtual_networks

Fields

NameDatatypeDescription
extended_locationtextfield from the properties object
inventory_item_idtextfield from the properties object
locationtextThe geo-location where the resource lives
network_nametextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
uuidtextfield from the properties object
virtualNetworkNametextfield from the properties object
vmm_server_idtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, subscriptionId, virtualNetworkNameImplements VirtualNetwork GET method.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdList of VirtualNetworks in a resource group.
list_by_subscriptionSELECTsubscriptionIdList of VirtualNetworks in a subscription.
create_or_updateINSERTresourceGroupName, subscriptionId, virtualNetworkName, data__extendedLocationOnboards the ScVmm virtual network as an Azure virtual network resource.
deleteDELETEresourceGroupName, subscriptionId, virtualNetworkNameDeregisters the ScVmm virtual network from Azure.
updateUPDATEresourceGroupName, subscriptionId, virtualNetworkNameUpdates the VirtualNetworks resource.

SELECT examples

List of VirtualNetworks in a subscription.

SELECT
extended_location,
inventory_item_id,
location,
network_name,
provisioning_state,
resourceGroupName,
subscriptionId,
tags,
uuid,
virtualNetworkName,
vmm_server_id
FROM azure.system_center_vm_manager.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.system_center_vm_manager.virtual_networks (
resourceGroupName,
subscriptionId,
virtualNetworkName,
data__extendedLocation,
properties,
extendedLocation,
tags,
location
)
SELECT
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ virtualNetworkName }}',
'{{ data__extendedLocation }}',
'{{ properties }}',
'{{ extendedLocation }}',
'{{ tags }}',
'{{ location }}'
;

UPDATE example

Updates a virtual_networks resource.

/*+ update */
UPDATE azure.system_center_vm_manager.virtual_networks
SET
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualNetworkName = '{{ virtualNetworkName }}';

DELETE example

Deletes the specified virtual_networks resource.

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