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

NameDatatypeDescription
idtextResource ID.
nametextResource name.
etagtextA unique read-only string that changes whenever the resource is updated.
hosted_gatewaytextfield from the properties object
hosted_subnettextfield from the properties object
locationtextResource location.
peeringstextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
typetextResource type.
virtualRouterNametextfield from the properties object
virtual_router_asntextfield from the properties object
virtual_router_ipstextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, subscriptionId, virtualRouterNameGets the specified Virtual Router.
listSELECTsubscriptionIdGets all the Virtual Routers in a subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdLists all Virtual Routers in a resource group.
create_or_updateINSERTresourceGroupName, subscriptionId, virtualRouterNameCreates or updates the specified Virtual Router.
deleteDELETEresourceGroupName, subscriptionId, virtualRouterNameDeletes the specified Virtual Router.

SELECT examples

Gets all the Virtual Routers in a subscription.

SELECT
id,
name,
etag,
hosted_gateway,
hosted_subnet,
location,
peerings,
provisioning_state,
resourceGroupName,
subscriptionId,
tags,
type,
virtualRouterName,
virtual_router_asn,
virtual_router_ips
FROM azure.network.vw_virtual_routers
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new virtual_routers resource.

/*+ create */
INSERT INTO azure.network.virtual_routers (
resourceGroupName,
subscriptionId,
virtualRouterName,
properties,
id,
location,
tags
)
SELECT
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ virtualRouterName }}',
'{{ properties }}',
'{{ id }}',
'{{ location }}',
'{{ tags }}'
;

DELETE example

Deletes the specified virtual_routers resource.

/*+ delete */
DELETE FROM azure.network.virtual_routers
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualRouterName = '{{ virtualRouterName }}';