virtual_routers
Creates, updates, deletes, gets or lists a virtual_routers
resource.
Overview
Name | virtual_routers |
Type | Resource |
Id | azure.network.virtual_routers |
Fields
- vw_virtual_routers
- virtual_routers
Name | Datatype | Description |
---|---|---|
id | text | Resource ID. |
name | text | Resource name. |
etag | text | A unique read-only string that changes whenever the resource is updated. |
hosted_gateway | text | field from the properties object |
hosted_subnet | text | field from the properties object |
location | text | Resource location. |
peerings | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
type | text | Resource type. |
virtualRouterName | text | field from the properties object |
virtual_router_asn | text | field from the properties object |
virtual_router_ips | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
location | string | Resource location. |
properties | object | Virtual Router definition. |
tags | object | Resource tags. |
type | string | Resource type. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, subscriptionId, virtualRouterName | Gets the specified Virtual Router. |
list | SELECT | subscriptionId | Gets all the Virtual Routers in a subscription. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | Lists all Virtual Routers in a resource group. |
create_or_update | INSERT | resourceGroupName, subscriptionId, virtualRouterName | Creates or updates the specified Virtual Router. |
delete | DELETE | resourceGroupName, subscriptionId, virtualRouterName | Deletes the specified Virtual Router. |
SELECT
examples
Gets all the Virtual Routers in a subscription.
- vw_virtual_routers
- virtual_routers
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 }}';
SELECT
id,
name,
etag,
location,
properties,
tags,
type
FROM azure.network.virtual_routers
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new virtual_routers
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.network.virtual_routers (
resourceGroupName,
subscriptionId,
virtualRouterName,
properties,
id,
location,
tags
)
SELECT
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ virtualRouterName }}',
'{{ properties }}',
'{{ id }}',
'{{ location }}',
'{{ tags }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: virtualRouterAsn
value: integer
- name: virtualRouterIps
value:
- string
- name: hostedSubnet
value:
- name: id
value: string
- name: peerings
value:
- - name: id
value: string
- name: provisioningState
value: []
- name: etag
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
DELETE
example
Deletes the specified virtual_routers
resource.
/*+ delete */
DELETE FROM azure.network.virtual_routers
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualRouterName = '{{ virtualRouterName }}';