Skip to main content

tcp_routes

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

Overview​

Nametcp_routes
TypeResource
Idgoogle.networkservices.tcp_routes

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. Name of the TcpRoute resource. It matches pattern projects/*/locations/*/tcpRoutes/tcp_route_name>.
createTimestring (google-datetime)Output only. The timestamp when the resource was created.
descriptionstringOptional. A free-text description of the resource. Max length 1024 characters.
gatewaysarrayOptional. Gateways defines a list of gateways this TcpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: projects/*/locations/*/gateways/
labelsobjectOptional. Set of label tags associated with the TcpRoute resource.
meshesarrayOptional. Meshes defines a list of meshes this TcpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: projects/*/locations/*/meshes/ The attached Mesh should be of a type SIDECAR
rulesarrayRequired. Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.
selfLinkstringOutput only. Server-defined URL of this resource
updateTimestring (google-datetime)Output only. The timestamp when the resource was updated.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, tcpRoutesIdGets details of a single TcpRoute.
listselectprojectsId, locationsIdpageSize, pageToken, returnPartialSuccessLists TcpRoute in a given project and location.
createinsertprojectsId, locationsIdtcpRouteIdCreates a new TcpRoute in a given project and location.
patchupdateprojectsId, locationsId, tcpRoutesIdupdateMaskUpdates the parameters of a single TcpRoute.
deletedeleteprojectsId, locationsId, tcpRoutesIdDeletes a single TcpRoute.

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
locationsIdstring
projectsIdstring
tcpRoutesIdstring
pageSizeinteger (int32)
pageTokenstring
returnPartialSuccessboolean
tcpRouteIdstring
updateMaskstring (google-fieldmask)

SELECT examples​

Gets details of a single TcpRoute.

SELECT
name,
createTime,
description,
gateways,
labels,
meshes,
rules,
selfLink,
updateTime
FROM google.networkservices.tcp_routes
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND tcpRoutesId = '{{ tcpRoutesId }}' -- required
;

INSERT examples​

Creates a new TcpRoute in a given project and location.

INSERT INTO google.networkservices.tcp_routes (
data__description,
data__gateways,
data__labels,
data__meshes,
data__name,
data__rules,
projectsId,
locationsId,
tcpRouteId
)
SELECT
'{{ description }}',
'{{ gateways }}',
'{{ labels }}',
'{{ meshes }}',
'{{ name }}',
'{{ rules }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ tcpRouteId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples​

Updates the parameters of a single TcpRoute.

UPDATE google.networkservices.tcp_routes
SET
data__description = '{{ description }}',
data__gateways = '{{ gateways }}',
data__labels = '{{ labels }}',
data__meshes = '{{ meshes }}',
data__name = '{{ name }}',
data__rules = '{{ rules }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND tcpRoutesId = '{{ tcpRoutesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples​

Deletes a single TcpRoute.

DELETE FROM google.networkservices.tcp_routes
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND tcpRoutesId = '{{ tcpRoutesId }}' --required
;