Skip to main content

gateway_advertised_routes

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

Overview

Namegateway_advertised_routes
TypeResource
Idgoogle.networkconnectivity.gateway_advertised_routes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. The name of the gateway advertised route. Route names must be unique and use the following form: projects/{project_number}/locations/{region}/spokes/{spoke}/gatewayAdvertisedRoutes/{gateway_advertised_route_id}
createTimestring (google-datetime)Output only. The time the gateway advertised route was created.
descriptionstringAn optional description of the gateway advertised route.
ipRangestringImmutable. This route's advertised IP address range. Must be a valid CIDR-formatted prefix. If an IP address is provided without a subnet mask, it is interpreted as, for IPv4, a /32 singular IP address range, and, for IPv6, /128.
labelsobjectOptional labels in key-value pair format. For more information about labels, see Requirements for labels.
priorityinteger (int32)Optional. The priority of this advertised route. You can choose a value from 0 to 65335. If you don't provide a value, Google Cloud assigns a priority of 100 to the ranges.
recipientstringOptional. The recipient of this advertised route. (RECIPIENT_UNSPECIFIED, ADVERTISE_TO_HUB)
statestringOutput only. The current lifecycle state of this gateway advertised route. (STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING, ACCEPTING, REJECTING, UPDATING, INACTIVE, OBSOLETE, FAILED)
uniqueIdstringOutput only. The Google-generated UUID for the gateway advertised route. This value is unique across all gateway advertised route resources. If a gateway advertised route is deleted and another with the same name is created, the new route is assigned a different unique_id.
updateTimestring (google-datetime)Output only. The time the gateway advertised route was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, spokesId, gatewayAdvertisedRoutesIdGet a GatewayAdvertisedRoute
listselectprojectsId, locationsId, spokesIdorderBy, pageToken, filter, pageSizeList GatewayAdvertisedRoutes
createinsertprojectsId, locationsId, spokesIdgatewayAdvertisedRouteId, requestIdCreate a GatewayAdvertisedRoute
patchupdateprojectsId, locationsId, spokesId, gatewayAdvertisedRoutesIdupdateMask, requestIdUpdate a GatewayAdvertisedRoute
deletedeleteprojectsId, locationsId, spokesId, gatewayAdvertisedRoutesIdrequestIdDelete a GatewayAdvertisedRoute

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
gatewayAdvertisedRoutesIdstring
locationsIdstring
projectsIdstring
spokesIdstring
filterstring
gatewayAdvertisedRouteIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Get a GatewayAdvertisedRoute

SELECT
name,
createTime,
description,
ipRange,
labels,
priority,
recipient,
state,
uniqueId,
updateTime
FROM google.networkconnectivity.gateway_advertised_routes
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND spokesId = '{{ spokesId }}' -- required
AND gatewayAdvertisedRoutesId = '{{ gatewayAdvertisedRoutesId }}' -- required
;

INSERT examples

Create a GatewayAdvertisedRoute

INSERT INTO google.networkconnectivity.gateway_advertised_routes (
data__labels,
data__priority,
data__description,
data__ipRange,
data__recipient,
data__name,
projectsId,
locationsId,
spokesId,
gatewayAdvertisedRouteId,
requestId
)
SELECT
'{{ labels }}',
{{ priority }},
'{{ description }}',
'{{ ipRange }}',
'{{ recipient }}',
'{{ name }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ spokesId }}',
'{{ gatewayAdvertisedRouteId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Update a GatewayAdvertisedRoute

UPDATE google.networkconnectivity.gateway_advertised_routes
SET
data__labels = '{{ labels }}',
data__priority = {{ priority }},
data__description = '{{ description }}',
data__ipRange = '{{ ipRange }}',
data__recipient = '{{ recipient }}',
data__name = '{{ name }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND spokesId = '{{ spokesId }}' --required
AND gatewayAdvertisedRoutesId = '{{ gatewayAdvertisedRoutesId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Delete a GatewayAdvertisedRoute

DELETE FROM google.networkconnectivity.gateway_advertised_routes
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND spokesId = '{{ spokesId }}' --required
AND gatewayAdvertisedRoutesId = '{{ gatewayAdvertisedRoutesId }}' --required
AND requestId = '{{ requestId }}'
;