Skip to main content

virtual_networks

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

Overview

Namevirtual_networks
TypeResource
Idazure.hybrid_container_service.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}".
namestringThe name of the resource.
dnsServersarrayList of DNS server IP Addresses associated with the network.
extendedLocationobjectExtended location pointing to the underlying infrastructure.
gatewaystringIP Address of the Gateway associated with the network.
infraVnetProfileobject:vartype infra_vnet_profile: ~azure.mgmt.hybridcontainerservice.models.VirtualNetworkPropertiesInfraVnetProfile
ipAddressPrefixstringIP Address Prefix of the network.
locationstringThe geo-location where the resource lives. Required.
provisioningStatestringKnown values are: "Succeeded", "Failed", "Canceled", "Pending", "Creating", "Deleting", "Updating", and "Accepted".
statusobjectStatus of the virtual network resource.
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".
vipPoolarrayRange of IP Addresses for Kubernetes API Server and services if using HA Proxy load balancer.
vlanIDintegerVLAN Id used by the network.
vmipPoolarrayRange of IP Addresses for Kubernetes node VMs.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_by_resource_groupselectresource_group_name, subscription_idLists the virtual networks in the specified resource group. Lists the virtual networks in the specified resource group.
list_by_subscriptionselectsubscription_idLists the virtual networks in the specified subscription. Lists the virtual networks in the specified subscription.
create_or_updateinsertresource_group_name, virtual_network_name, subscription_id, locationCreates or updates the virtual network resource. Creates or updates the virtual network resource.
updateupdateresource_group_name, virtual_network_name, subscription_idPatches the virtual network resource. Patches the virtual network resource.
create_or_updatereplaceresource_group_name, virtual_network_name, subscription_id, locationCreates or updates the virtual network resource. Creates or updates the virtual network resource.
deletedeleteresource_group_name, virtual_network_name, subscription_idDeletes the specified virtual network resource. Deletes the specified virtual network resource.
retrieveexecresource_group_name, virtual_network_name, subscription_idGets the specified virtual network resource. Gets the specified virtual network resource.

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_namestringParameter for the name of the virtual network. Required.

SELECT examples

Lists the virtual networks in the specified resource group. Lists the virtual networks in the specified resource group.

SELECT
id,
name,
dnsServers,
extendedLocation,
gateway,
infraVnetProfile,
ipAddressPrefix,
location,
provisioningState,
status,
systemData,
tags,
type,
vipPool,
vlanID,
vmipPool
FROM azure.hybrid_container_service.virtual_networks
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates the virtual network resource. Creates or updates the virtual network resource.

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

UPDATE examples

Patches the virtual network resource. Patches the virtual network resource.

UPDATE azure.hybrid_container_service.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

Creates or updates the virtual network resource. Creates or updates the virtual network resource.

REPLACE azure.hybrid_container_service.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
RETURNING
id,
name,
extendedLocation,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes the specified virtual network resource. Deletes the specified virtual network resource.

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

Lifecycle Methods

Gets the specified virtual network resource. Gets the specified virtual network resource.

EXEC azure.hybrid_container_service.virtual_networks.retrieve 
@resource_group_name='{{ resource_group_name }}' --required,
@virtual_network_name='{{ virtual_network_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;