virtual_networks
Creates, updates, deletes, gets or lists a virtual_networks resource.
Overview
| Name | virtual_networks |
| Type | Resource |
| Id | azure.hybrid_container_service.virtual_networks |
Fields
The following fields are returned by SELECT queries:
- list_by_resource_group
- list_by_subscription
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". |
name | string | The name of the resource. |
dnsServers | array | List of DNS server IP Addresses associated with the network. |
extendedLocation | object | Extended location pointing to the underlying infrastructure. |
gateway | string | IP Address of the Gateway associated with the network. |
infraVnetProfile | object | :vartype infra_vnet_profile: ~azure.mgmt.hybridcontainerservice.models.VirtualNetworkPropertiesInfraVnetProfile |
ipAddressPrefix | string | IP Address Prefix of the network. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Known values are: "Succeeded", "Failed", "Canceled", "Pending", "Creating", "Deleting", "Updating", and "Accepted". |
status | object | Status of the virtual network resource. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
vipPool | array | Range of IP Addresses for Kubernetes API Server and services if using HA Proxy load balancer. |
vlanID | integer | VLAN Id used by the network. |
vmipPool | array | Range of IP Addresses for Kubernetes node VMs. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". |
name | string | The name of the resource. |
dnsServers | array | List of DNS server IP Addresses associated with the network. |
extendedLocation | object | Extended location pointing to the underlying infrastructure. |
gateway | string | IP Address of the Gateway associated with the network. |
infraVnetProfile | object | :vartype infra_vnet_profile: ~azure.mgmt.hybridcontainerservice.models.VirtualNetworkPropertiesInfraVnetProfile |
ipAddressPrefix | string | IP Address Prefix of the network. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Known values are: "Succeeded", "Failed", "Canceled", "Pending", "Creating", "Deleting", "Updating", and "Accepted". |
status | object | Status of the virtual network resource. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
vipPool | array | Range of IP Addresses for Kubernetes API Server and services if using HA Proxy load balancer. |
vlanID | integer | VLAN Id used by the network. |
vmipPool | array | Range of IP Addresses for Kubernetes node VMs. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_by_resource_group | select | resource_group_name, subscription_id | Lists the virtual networks in the specified resource group. Lists the virtual networks in the specified resource group. | |
list_by_subscription | select | subscription_id | Lists the virtual networks in the specified subscription. Lists the virtual networks in the specified subscription. | |
create_or_update | insert | resource_group_name, virtual_network_name, subscription_id, location | Creates or updates the virtual network resource. Creates or updates the virtual network resource. | |
update | update | resource_group_name, virtual_network_name, subscription_id | Patches the virtual network resource. Patches the virtual network resource. | |
create_or_update | replace | resource_group_name, virtual_network_name, subscription_id, location | Creates or updates the virtual network resource. Creates or updates the virtual network resource. | |
delete | delete | resource_group_name, virtual_network_name, subscription_id | Deletes the specified virtual network resource. Deletes the specified virtual network resource. | |
retrieve | exec | resource_group_name, virtual_network_name, subscription_id | Gets 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.
| Name | Datatype | Description |
|---|---|---|
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
virtual_network_name | string | Parameter for the name of the virtual network. Required. |
SELECT examples
- list_by_resource_group
- list_by_subscription
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
;
Lists the virtual networks in the specified subscription. Lists the virtual networks in the specified subscription.
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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: virtual_networks
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the virtual_networks resource.
- name: virtual_network_name
value: "{{ virtual_network_name }}"
description: Required parameter for the virtual_networks resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the virtual_networks resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
description: |
Properties of the virtual network resource.
value:
infraVnetProfile:
hci:
mocGroup: "{{ mocGroup }}"
mocLocation: "{{ mocLocation }}"
mocVnetName: "{{ mocVnetName }}"
vipPool:
- endIP: "{{ endIP }}"
startIP: "{{ startIP }}"
vmipPool:
- endIP: "{{ endIP }}"
startIP: "{{ startIP }}"
dnsServers:
- "{{ dnsServers }}"
gateway: "{{ gateway }}"
ipAddressPrefix: "{{ ipAddressPrefix }}"
vlanID: {{ vlanID }}
provisioningState: "{{ provisioningState }}"
status:
operationStatus:
error:
code: "{{ code }}"
message: "{{ message }}"
operationId: "{{ operationId }}"
status: "{{ status }}"
- name: extendedLocation
description: |
Extended location pointing to the underlying infrastructure.
value:
type: "{{ type }}"
name: "{{ name }}"
UPDATE examples
- update
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
- create_or_update
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
- delete
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
- retrieve
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
;