Skip to main content

logical_networks

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

Overview

Namelogical_networks
TypeResource
Idazure_stack.azure_stack_hci_vm.logical_networks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
dhcpOptionsobjectDhcpOptions contains an array of DNS servers available to VMs deployed in the logical network. Standard DHCP option for a subnet overrides logical network DHCP options.
extendedLocationobjectThe extendedLocation of the resource.
locationstringThe geo-location where the resource lives. Required.
networkTypestringType of the Logical Network. Known values are: "Workload" and "Infrastructure". (Workload, Infrastructure)
provisioningStatestringProvisioning state of the logical network. Known values are: "Succeeded", "Failed", "InProgress", "Accepted", "Deleting", and "Canceled". (Succeeded, Failed, InProgress, Accepted, Deleting, Canceled)
statusobjectThe observed state of logical networks.
subnetsarraySubnet - list of subnets under the logical network.
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".
vmSwitchNamestringname of the network switch to be used for VMs.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, logical_network_name, subscription_idThe operation to get a logical network.
list_by_resource_groupselectresource_group_name, subscription_idLists all of the logical networks in the specified resource group. Use the nextLink property in the response to get the next page of logical networks.
list_allselectsubscription_idLists all of the logical networks in the specified subscription. Use the nextLink property in the response to get the next page of logical networks.
create_or_updateinsertresource_group_name, logical_network_name, subscription_id, locationThe operation to create or update a logical network. Please note some properties can be set only during logical network creation.
updateupdateresource_group_name, logical_network_name, subscription_idThe operation to update a logical network.
create_or_updatereplaceresource_group_name, logical_network_name, subscription_id, locationThe operation to create or update a logical network. Please note some properties can be set only during logical network creation.
deletedeleteresource_group_name, logical_network_name, subscription_idThe operation to delete a logical network.

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
logical_network_namestringName of the logical network. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

The operation to get a logical network.

SELECT
id,
name,
dhcpOptions,
extendedLocation,
location,
networkType,
provisioningState,
status,
subnets,
systemData,
tags,
type,
vmSwitchName
FROM azure_stack.azure_stack_hci_vm.logical_networks
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND logical_network_name = '{{ logical_network_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

The operation to create or update a logical network. Please note some properties can be set only during logical network creation.

INSERT INTO azure_stack.azure_stack_hci_vm.logical_networks (
tags,
location,
properties,
extendedLocation,
resource_group_name,
logical_network_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ extendedLocation }}',
'{{ resource_group_name }}',
'{{ logical_network_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
extendedLocation,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

The operation to update a logical network.

UPDATE azure_stack.azure_stack_hci_vm.logical_networks
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND logical_network_name = '{{ logical_network_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
extendedLocation,
location,
properties,
systemData,
tags,
type;

REPLACE examples

The operation to create or update a logical network. Please note some properties can be set only during logical network creation.

REPLACE azure_stack.azure_stack_hci_vm.logical_networks
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
extendedLocation = '{{ extendedLocation }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND logical_network_name = '{{ logical_network_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
extendedLocation,
location,
properties,
systemData,
tags,
type;

DELETE examples

The operation to delete a logical network.

DELETE FROM azure_stack.azure_stack_hci_vm.logical_networks
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND logical_network_name = '{{ logical_network_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;