virtual_routers
Creates, updates, deletes, gets or lists a virtual_routers resource.
Overview
| Name | virtual_routers |
| Type | Resource |
| Id | azure.network.virtual_routers |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- list
| 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. |
hostedGateway | object | Reference to another subresource. |
hostedSubnet | object | Reference to another subresource. |
location | string | Resource location. |
peerings | array | List of references to VirtualRouterPeerings. |
provisioningState | string | The provisioning state of the resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
tags | object | Resource tags. |
type | string | Resource type. |
virtualRouterAsn | integer | VirtualRouter ASN. |
virtualRouterIps | array | VirtualRouter IPs. |
| 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. |
hostedGateway | object | Reference to another subresource. |
hostedSubnet | object | Reference to another subresource. |
location | string | Resource location. |
peerings | array | List of references to VirtualRouterPeerings. |
provisioningState | string | The provisioning state of the resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
tags | object | Resource tags. |
type | string | Resource type. |
virtualRouterAsn | integer | VirtualRouter ASN. |
virtualRouterIps | array | VirtualRouter IPs. |
| 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. |
hostedGateway | object | Reference to another subresource. |
hostedSubnet | object | Reference to another subresource. |
location | string | Resource location. |
peerings | array | List of references to VirtualRouterPeerings. |
provisioningState | string | The provisioning state of the resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
tags | object | Resource tags. |
type | string | Resource type. |
virtualRouterAsn | integer | VirtualRouter ASN. |
virtualRouterIps | array | VirtualRouter IPs. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, virtual_router_name, subscription_id | $expand | Gets the specified Virtual Router. |
list_by_resource_group | select | resource_group_name, subscription_id | Lists all Virtual Routers in a resource group. | |
list | select | subscription_id | Gets all the Virtual Routers in a subscription. | |
create_or_update | insert | resource_group_name, virtual_router_name, subscription_id | Creates or updates the specified Virtual Router. | |
create_or_update | replace | resource_group_name, virtual_router_name, subscription_id | Creates or updates the specified Virtual Router. | |
delete | delete | resource_group_name, virtual_router_name, subscription_id | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
virtual_router_name | string | The name of the Virtual Router. Required. |
$expand | string | Expands referenced resources. Default value is None. |
SELECT examples
- get
- list_by_resource_group
- list
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 }}'
;
Lists all Virtual Routers in a resource group.
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 subscription_id = '{{ subscription_id }}' -- required
;
Gets all the Virtual Routers in a subscription.
SELECT
id,
name,
etag,
hostedGateway,
hostedSubnet,
location,
peerings,
provisioningState,
tags,
type,
virtualRouterAsn,
virtualRouterIps
FROM azure.network.virtual_routers
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: virtual_routers
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the virtual_routers resource.
- name: virtual_router_name
value: "{{ virtual_router_name }}"
description: Required parameter for the virtual_routers resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the virtual_routers resource.
- name: id
value: "{{ id }}"
description: |
Resource ID.
- name: location
value: "{{ location }}"
description: |
Resource location.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: properties
description: |
Properties of the Virtual Router.
value:
virtualRouterAsn: {{ virtualRouterAsn }}
virtualRouterIps:
- "{{ virtualRouterIps }}"
hostedSubnet:
id: "{{ id }}"
hostedGateway:
id: "{{ id }}"
peerings:
- id: "{{ id }}"
provisioningState: "{{ provisioningState }}"
REPLACE examples
- create_or_update
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
- delete
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
;