Skip to main content

routes

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

Overview

Nameroutes
TypeResource
Idgoogle.networkconnectivity.routes

Fields

The following fields are returned by SELECT queries:

Successful response

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}
createTimestring (google-datetime)Output only. The time the route was created.
descriptionstringAn optional description of the route.
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
nextHopInterconnectAttachmentobjectImmutable. The next-hop VLAN attachment for packets on this route. (id: NextHopInterconnectAttachment)
nextHopRouterApplianceInstanceobjectImmutable. The next-hop Router appliance instance for packets on this route. (id: NextHopRouterApplianceInstance)
nextHopSpokeobjectImmutable. The next-hop spoke for packets on this route. (id: NextHopSpoke)
nextHopVpcNetworkobjectImmutable. The destination VPC network for packets on this route. (id: NextHopVpcNetwork)
nextHopVpnTunnelobjectImmutable. The next-hop VPN tunnel for packets on this route. (id: NextHopVPNTunnel)
prioritystring (int64)Output 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.
updateTimestring (google-datetime)Output only. The time the route was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, hubsId, routeTablesId, routesIdGets details about the specified route.
listselectprojectsId, hubsId, routeTablesIdpageSize, pageToken, filter, orderByLists routes in a given 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
hubsIdstring
projectsIdstring
routeTablesIdstring
routesIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets details about the specified route.

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