Skip to main content

routes

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

Overview

Nameroutes
TypeResource
Idgoogle.networkconnectivity.routes

Fields

NameDatatypeDescription
namestringImmutable. The name of the route. Route names must be unique. Route names use the following form: projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}
descriptionstringAn optional description of the route.
createTimestringOutput only. The time the route was created.
ipCidrRangestringThe destination IP address range.
labelsobjectOptional labels in key-value pair format. For more information about labels, see Requirements for labels.
locationstringOutput only. The origin location of the route. Uses the following form: "projects/{project}/locations/{location}" Example: projects/1234/locations/us-central1
nextHopInterconnectAttachmentobjectA route next hop that leads to an interconnect attachment resource.
nextHopRouterApplianceInstanceobjectA route next hop that leads to a Router appliance instance.
nextHopVpcNetworkobject
nextHopVpnTunnelobjectA route next hop that leads to a VPN tunnel resource.
prioritystringOutput only. The priority of this route. Priority is used to break ties in cases where a destination matches more than one route. In these cases the route with the lowest-numbered priority value wins.
spokestringImmutable. The spoke that this route leads to. Example: projects/12345/locations/global/spokes/SPOKE
statestringOutput only. The current lifecycle state of the route.
typestringOutput only. The route's type. Its type is determined by the properties of its IP address range.
uidstringOutput only. The Google-generated UUID for the route. This value is unique across all Network Connectivity Center route resources. If a route is deleted and another with the same name is created, the new route is assigned a different uid.
updateTimestringOutput only. The time the route was last updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECThubsId, projectsId, routeTablesId, routesIdGets details about the specified route.
listSELECThubsId, projectsId, routeTablesIdLists routes in a given route table.

SELECT examples

Lists routes in a given route table.

SELECT
name,
description,
createTime,
ipCidrRange,
labels,
location,
nextHopInterconnectAttachment,
nextHopRouterApplianceInstance,
nextHopVpcNetwork,
nextHopVpnTunnel,
priority,
spoke,
state,
type,
uid,
updateTime
FROM google.networkconnectivity.routes
WHERE hubsId = '{{ hubsId }}'
AND projectsId = '{{ projectsId }}'
AND routeTablesId = '{{ routeTablesId }}';