routes
Creates, updates, deletes, gets or lists a routes resource.
Overview
| Name | routes |
| Type | Resource |
| Id | azure.network.routes |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Name of the resource. |
addressPrefix | string | The destination CIDR to which the route applies. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
hasBgpOverride | boolean | A value indicating whether this route overrides overlapping BGP routes regardless of LPM. |
nextHop | object | The next hop definition containing ECMP next hop IP addresses. Only allowed when nextHopType is VirtualApplianceEcmp. |
nextHopIpAddress | string | The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. |
nextHopType | string | The type of Azure hop the packet should be sent to. Required. Known values are: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "VirtualApplianceEcmp", and "None". (VirtualNetworkGateway, VnetLocal, Internet, VirtualAppliance, VirtualApplianceEcmp, None) |
provisioningState | string | The provisioning state of the route resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
type | string | Resource type. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Name of the resource. |
addressPrefix | string | The destination CIDR to which the route applies. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
hasBgpOverride | boolean | A value indicating whether this route overrides overlapping BGP routes regardless of LPM. |
nextHop | object | The next hop definition containing ECMP next hop IP addresses. Only allowed when nextHopType is VirtualApplianceEcmp. |
nextHopIpAddress | string | The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. |
nextHopType | string | The type of Azure hop the packet should be sent to. Required. Known values are: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "VirtualApplianceEcmp", and "None". (VirtualNetworkGateway, VnetLocal, Internet, VirtualAppliance, VirtualApplianceEcmp, None) |
provisioningState | string | The provisioning state of the route resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
type | string | Resource type. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, route_table_name, route_name, subscription_id | Gets the specified route from a route table. | |
list | select | resource_group_name, route_table_name, subscription_id | Gets all routes in a route table. | |
create_or_update | insert | resource_group_name, route_table_name, route_name, subscription_id | Creates or updates a route in the specified route table. | |
create_or_update | replace | resource_group_name, route_table_name, route_name, subscription_id | Creates or updates a route in the specified route table. | |
delete | delete | resource_group_name, route_table_name, route_name, subscription_id | Deletes the specified route from a route table. |
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. |
route_name | string | The name of the route. Required. |
route_table_name | string | The name of the route table. Required. |
subscription_id | string |
SELECT examples
- get
- list
Gets the specified route from a route table.
SELECT
id,
name,
addressPrefix,
etag,
hasBgpOverride,
nextHop,
nextHopIpAddress,
nextHopType,
provisioningState,
type
FROM azure.network.routes
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND route_table_name = '{{ route_table_name }}' -- required
AND route_name = '{{ route_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets all routes in a route table.
SELECT
id,
name,
addressPrefix,
etag,
hasBgpOverride,
nextHop,
nextHopIpAddress,
nextHopType,
provisioningState,
type
FROM azure.network.routes
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND route_table_name = '{{ route_table_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Creates or updates a route in the specified route table.
INSERT INTO azure.network.routes (
id,
name,
properties,
resource_group_name,
route_table_name,
route_name,
subscription_id
)
SELECT
'{{ id }}',
'{{ name }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ route_table_name }}',
'{{ route_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
properties,
type
;
# Description fields are for documentation purposes
- name: routes
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the routes resource.
- name: route_table_name
value: "{{ route_table_name }}"
description: Required parameter for the routes resource.
- name: route_name
value: "{{ route_name }}"
description: Required parameter for the routes resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the routes resource.
- name: id
value: "{{ id }}"
description: |
Resource ID.
- name: name
value: "{{ name }}"
description: |
Name of the resource.
- name: properties
description: |
Properties of the route.
value:
addressPrefix: "{{ addressPrefix }}"
nextHopType: "{{ nextHopType }}"
nextHopIpAddress: "{{ nextHopIpAddress }}"
nextHop:
nextHopIpAddresses:
- "{{ nextHopIpAddresses }}"
provisioningState: "{{ provisioningState }}"
hasBgpOverride: {{ hasBgpOverride }}
REPLACE examples
- create_or_update
Creates or updates a route in the specified route table.
REPLACE azure.network.routes
SET
id = '{{ id }}',
name = '{{ name }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND route_table_name = '{{ route_table_name }}' --required
AND route_name = '{{ route_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
properties,
type;
DELETE examples
- delete
Deletes the specified route from a route table.
DELETE FROM azure.network.routes
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND route_table_name = '{{ route_table_name }}' --required
AND route_name = '{{ route_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;