Skip to main content

routes

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

Overview

Nameroutes
TypeResource
Idazure.network.routes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringResource ID.
namestringName of the resource.
addressPrefixstringThe destination CIDR to which the route applies.
etagstringA unique read-only string that changes whenever the resource is updated.
hasBgpOverridebooleanA value indicating whether this route overrides overlapping BGP routes regardless of LPM.
nextHopobjectThe next hop definition containing ECMP next hop IP addresses. Only allowed when nextHopType is VirtualApplianceEcmp.
nextHopIpAddressstringThe IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
nextHopTypestringThe 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)
provisioningStatestringThe provisioning state of the route resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting)
typestringResource type.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, route_table_name, route_name, subscription_idGets the specified route from a route table.
listselectresource_group_name, route_table_name, subscription_idGets all routes in a route table.
create_or_updateinsertresource_group_name, route_table_name, route_name, subscription_idCreates or updates a route in the specified route table.
create_or_updatereplaceresource_group_name, route_table_name, route_name, subscription_idCreates or updates a route in the specified route table.
deletedeleteresource_group_name, route_table_name, route_name, subscription_idDeletes 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.

NameDatatypeDescription
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
route_namestringThe name of the route. Required.
route_table_namestringThe name of the route table. Required.
subscription_idstring

SELECT examples

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
;

INSERT examples

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
;

REPLACE examples

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

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
;