Skip to main content

virtual_networks

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

Overview

Namevirtual_networks
TypeResource
Idazure.scvmm.virtual_networks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
namestringThe name of the resource.
extendedLocationobjectThe extended location. Required.
inventoryItemIdstringGets or sets the inventory Item ID for the resource.
locationstringThe geo-location where the resource lives. Required.
networkNamestringName of the virtual network in vmmServer.
provisioningStatestringProvisioning state of the resource. Known values are: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", and "Created".
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
uuidstringUnique ID of the virtual network.
vmmServerIdstringARM Id of the vmmServer resource in which this resource resides.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, virtual_network_name, subscription_idGets a VirtualNetwork. Implements VirtualNetwork GET method.
list_by_resource_groupselectresource_group_name, subscription_idImplements GET VirtualNetworks in a resource group. List of VirtualNetworks in a resource group.
list_by_subscriptionselectsubscription_idImplements GET VirtualNetworks in a subscription. List of VirtualNetworks in a subscription.
create_or_updateinsertresource_group_name, virtual_network_name, subscription_id, location, extendedLocationImplements VirtualNetworks PUT method. Onboards the ScVmm virtual network as an Azure virtual network resource.
updateupdateresource_group_name, virtual_network_name, subscription_idImplements the VirtualNetworks PATCH method. Updates the VirtualNetworks resource.
create_or_updatereplaceresource_group_name, virtual_network_name, subscription_id, location, extendedLocationImplements VirtualNetworks PUT method. Onboards the ScVmm virtual network as an Azure virtual network resource.
deletedeleteresource_group_name, virtual_network_name, subscription_idforceImplements VirtualNetwork DELETE method. Deregisters the ScVmm virtual network from Azure.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
virtual_network_namestringName of the VirtualNetwork. Required.
forcestringForces the resource to be deleted. Known values are: "true" and "false". Default value is None.

SELECT examples

Gets a VirtualNetwork. Implements VirtualNetwork GET method.

SELECT
id,
name,
extendedLocation,
inventoryItemId,
location,
networkName,
provisioningState,
systemData,
tags,
type,
uuid,
vmmServerId
FROM azure.scvmm.virtual_networks
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND virtual_network_name = '{{ virtual_network_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Implements VirtualNetworks PUT method. Onboards the ScVmm virtual network as an Azure virtual network resource.

INSERT INTO azure.scvmm.virtual_networks (
tags,
location,
properties,
extendedLocation,
resource_group_name,
virtual_network_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ extendedLocation }}' /* required */,
'{{ resource_group_name }}',
'{{ virtual_network_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
extendedLocation,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Implements the VirtualNetworks PATCH method. Updates the VirtualNetworks resource.

UPDATE azure.scvmm.virtual_networks
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND virtual_network_name = '{{ virtual_network_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
extendedLocation,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Implements VirtualNetworks PUT method. Onboards the ScVmm virtual network as an Azure virtual network resource.

REPLACE azure.scvmm.virtual_networks
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
extendedLocation = '{{ extendedLocation }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND virtual_network_name = '{{ virtual_network_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
AND extendedLocation = '{{ extendedLocation }}' --required
RETURNING
id,
name,
extendedLocation,
location,
properties,
systemData,
tags,
type;

DELETE examples

Implements VirtualNetwork DELETE method. Deregisters the ScVmm virtual network from Azure.

DELETE FROM azure.scvmm.virtual_networks
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND virtual_network_name = '{{ virtual_network_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND force = '{{ force }}'
;