virtual_networks
Creates, updates, deletes, gets or lists a virtual_networks
resource.
Overview
Name | virtual_networks |
Type | Resource |
Id | azure.dev_test_labs.virtual_networks |
Fields
- vw_virtual_networks
- virtual_networks
Name | Datatype | Description |
---|---|---|
id | text | The identifier of the resource. |
name | text | The name of the resource. |
description | text | field from the properties object |
allowed_subnets | text | field from the properties object |
created_date | text | field from the properties object |
external_provider_resource_id | text | field from the properties object |
external_subnets | text | field from the properties object |
labName | text | field from the properties object |
location | text | The location of the resource. |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subnet_overrides | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | The tags of the resource. |
type | text | The type of the resource. |
unique_identifier | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
id | string | The identifier of the resource. |
name | string | The name of the resource. |
location | string | The location of the resource. |
properties | object | Properties of a virtual network. |
tags | object | The tags of the resource. |
type | string | The type of the resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | labName, name, resourceGroupName, subscriptionId | Get virtual network. |
list | SELECT | labName, resourceGroupName, subscriptionId | List virtual networks in a given lab. |
create_or_update | INSERT | labName, name, resourceGroupName, subscriptionId | Create or replace an existing virtual network. This operation can take a while to complete. |
delete | DELETE | labName, name, resourceGroupName, subscriptionId | Delete virtual network. This operation can take a while to complete. |
update | UPDATE | labName, name, resourceGroupName, subscriptionId | Allows modifying tags of virtual networks. All other properties will be ignored. |
SELECT
examples
List virtual networks in a given lab.
- vw_virtual_networks
- virtual_networks
SELECT
id,
name,
description,
allowed_subnets,
created_date,
external_provider_resource_id,
external_subnets,
labName,
location,
provisioning_state,
resourceGroupName,
subnet_overrides,
subscriptionId,
tags,
type,
unique_identifier
FROM azure.dev_test_labs.vw_virtual_networks
WHERE labName = '{{ labName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
location,
properties,
tags,
type
FROM azure.dev_test_labs.virtual_networks
WHERE labName = '{{ labName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new virtual_networks
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.dev_test_labs.virtual_networks (
labName,
name,
resourceGroupName,
subscriptionId,
location,
tags,
properties
)
SELECT
'{{ labName }}',
'{{ name }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: properties
value:
- name: allowedSubnets
value:
- - name: resourceId
value: string
- name: labSubnetName
value: string
- name: allowPublicIp
value: string
- name: description
value: string
- name: externalProviderResourceId
value: string
- name: externalSubnets
value:
- - name: id
value: string
- name: name
value: string
- name: subnetOverrides
value:
- - name: resourceId
value: string
- name: labSubnetName
value: string
- name: useInVmCreationPermission
value: string
- name: usePublicIpAddressPermission
value: string
- name: sharedPublicIpAddressConfiguration
value:
- name: allowedPorts
value:
- - name: transportProtocol
value: string
- name: backendPort
value: integer
- name: virtualNetworkPoolName
value: string
- name: createdDate
value: string
- name: provisioningState
value: string
- name: uniqueIdentifier
value: string
UPDATE
example
Updates a virtual_networks
resource.
/*+ update */
UPDATE azure.dev_test_labs.virtual_networks
SET
tags = '{{ tags }}'
WHERE
labName = '{{ labName }}'
AND name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified virtual_networks
resource.
/*+ delete */
DELETE FROM azure.dev_test_labs.virtual_networks
WHERE labName = '{{ labName }}'
AND name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';