Skip to main content

routes

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

Overview

Nameroutes
TypeResource
Idazure.network.routes

Fields

NameDatatypeDescription
idtextResource ID.
nametextThe name of the resource that is unique within a resource group. This name can be used to access the resource.
address_prefixtextfield from the properties object
etagtextA unique read-only string that changes whenever the resource is updated.
has_bgp_overridetextfield from the properties object
next_hop_ip_addresstextfield from the properties object
next_hop_typetextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
routeNametextfield from the properties object
routeTableNametextfield from the properties object
subscriptionIdtextfield from the properties object
typetextThe type of the resource.

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, routeName, routeTableName, subscriptionIdGets the specified route from a route table.
listSELECTresourceGroupName, routeTableName, subscriptionIdGets all routes in a route table.
create_or_updateINSERTresourceGroupName, routeName, routeTableName, subscriptionIdCreates or updates a route in the specified route table.
deleteDELETEresourceGroupName, routeName, routeTableName, subscriptionIdDeletes the specified route from a route table.

SELECT examples

Gets all routes in a route table.

SELECT
id,
name,
address_prefix,
etag,
has_bgp_override,
next_hop_ip_address,
next_hop_type,
provisioning_state,
resourceGroupName,
routeName,
routeTableName,
subscriptionId,
type
FROM azure.network.vw_routes
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND routeTableName = '{{ routeTableName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.network.routes (
resourceGroupName,
routeName,
routeTableName,
subscriptionId,
properties,
name,
type,
id
)
SELECT
'{{ resourceGroupName }}',
'{{ routeName }}',
'{{ routeTableName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ name }}',
'{{ type }}',
'{{ id }}'
;

DELETE example

Deletes the specified routes resource.

/*+ delete */
DELETE FROM azure.network.routes
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND routeName = '{{ routeName }}'
AND routeTableName = '{{ routeTableName }}'
AND subscriptionId = '{{ subscriptionId }}';