Skip to main content

virtual_networks

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

Overview

Namevirtual_networks
TypeResource
Idazure_isv.connected_vsphere.virtual_networks

Fields

NameDatatypeDescription
idtextGets or sets the Id.
nametextGets or sets the name.
custom_resource_nametextfield from the properties object
extended_locationtextfield from the properties object
inventory_item_idtextfield from the properties object
kindtextMetadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
locationtextGets or sets the location.
mo_nametextfield from the properties object
mo_ref_idtextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
statusestextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
tagstextGets or sets the Resource tags.
typetextGets or sets the type of the resource.
uuidtextfield from the properties object
v_center_idtextfield from the properties object
virtualNetworkNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, subscriptionId, virtualNetworkNameImplements virtual network GET method.
listSELECTsubscriptionIdList of virtualNetworks in a subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdList of virtualNetworks in a resource group.
createINSERTresourceGroupName, subscriptionId, virtualNetworkName, data__location, data__propertiesCreate Or Update virtual network.
deleteDELETEresourceGroupName, subscriptionId, virtualNetworkNameImplements virtual network DELETE method.
updateUPDATEresourceGroupName, subscriptionId, virtualNetworkNameAPI to update certain properties of the virtual network resource.

SELECT examples

List of virtualNetworks in a subscription.

SELECT
id,
name,
custom_resource_name,
extended_location,
inventory_item_id,
kind,
location,
mo_name,
mo_ref_id,
provisioning_state,
resourceGroupName,
statuses,
subscriptionId,
system_data,
tags,
type,
uuid,
v_center_id,
virtualNetworkName
FROM azure_isv.connected_vsphere.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_isv.connected_vsphere.virtual_networks (
resourceGroupName,
subscriptionId,
virtualNetworkName,
data__location,
data__properties,
properties,
location,
extendedLocation,
systemData,
tags,
kind
)
SELECT
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ virtualNetworkName }}',
'{{ data__location }}',
'{{ data__properties }}',
'{{ properties }}',
'{{ location }}',
'{{ extendedLocation }}',
'{{ systemData }}',
'{{ tags }}',
'{{ kind }}'
;

UPDATE example

Updates a virtual_networks resource.

/*+ update */
UPDATE azure_isv.connected_vsphere.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_isv.connected_vsphere.virtual_networks
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualNetworkName = '{{ virtualNetworkName }}';