Skip to main content

virtual_routers

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

Overview

Namevirtual_routers
TypeResource
Idazure.network.virtual_routers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringResource ID.
namestringResource name.
etagstringA unique read-only string that changes whenever the resource is updated.
hostedGatewayobjectReference to another subresource.
hostedSubnetobjectReference to another subresource.
locationstringResource location.
peeringsarrayList of references to VirtualRouterPeerings.
provisioningStatestringThe provisioning state of the resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting)
tagsobjectResource tags.
typestringResource type.
virtualRouterAsnintegerVirtualRouter ASN.
virtualRouterIpsarrayVirtualRouter IPs.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, virtual_router_name, subscription_id$expandGets the specified Virtual Router.
list_by_resource_groupselectresource_group_name, subscription_idLists all Virtual Routers in a resource group.
listselectsubscription_idGets all the Virtual Routers in a subscription.
create_or_updateinsertresource_group_name, virtual_router_name, subscription_idCreates or updates the specified Virtual Router.
create_or_updatereplaceresource_group_name, virtual_router_name, subscription_idCreates or updates the specified Virtual Router.
deletedeleteresource_group_name, virtual_router_name, subscription_idDeletes the specified Virtual Router.

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_router_namestringThe name of the Virtual Router. Required.
$expandstringExpands referenced resources. Default value is None.

SELECT examples

Gets the specified Virtual Router.

SELECT
id,
name,
etag,
hostedGateway,
hostedSubnet,
location,
peerings,
provisioningState,
tags,
type,
virtualRouterAsn,
virtualRouterIps
FROM azure.network.virtual_routers
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND virtual_router_name = '{{ virtual_router_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
;

INSERT examples

Creates or updates the specified Virtual Router.

INSERT INTO azure.network.virtual_routers (
id,
location,
tags,
properties,
resource_group_name,
virtual_router_name,
subscription_id
)
SELECT
'{{ id }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ virtual_router_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
location,
properties,
tags,
type
;

REPLACE examples

Creates or updates the specified Virtual Router.

REPLACE azure.network.virtual_routers
SET
id = '{{ id }}',
location = '{{ location }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND virtual_router_name = '{{ virtual_router_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
tags,
type;

DELETE examples

Deletes the specified Virtual Router.

DELETE FROM azure.network.virtual_routers
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND virtual_router_name = '{{ virtual_router_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;