tcp_routes
Creates, updates, deletes, gets or lists a tcp_routes
resource.
Overview
Name | tcp_routes |
Type | Resource |
Id | google.networkservices.tcp_routes |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Name of the TcpRoute resource. It matches pattern projects/*/locations/global/tcpRoutes/tcp_route_name> . |
createTime | string (google-datetime) | Output only. The timestamp when the resource was created. |
description | string | Optional. A free-text description of the resource. Max length 1024 characters. |
gateways | array | Optional. 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/global/gateways/ |
labels | object | Optional. Set of label tags associated with the TcpRoute resource. |
meshes | array | Optional. 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/global/meshes/ The attached Mesh should be of a type SIDECAR |
rules | array | Required. 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. |
selfLink | string | Output only. Server-defined URL of this resource |
updateTime | string (google-datetime) | Output only. The timestamp when the resource was updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Name of the TcpRoute resource. It matches pattern projects/*/locations/global/tcpRoutes/tcp_route_name> . |
createTime | string (google-datetime) | Output only. The timestamp when the resource was created. |
description | string | Optional. A free-text description of the resource. Max length 1024 characters. |
gateways | array | Optional. 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/global/gateways/ |
labels | object | Optional. Set of label tags associated with the TcpRoute resource. |
meshes | array | Optional. 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/global/meshes/ The attached Mesh should be of a type SIDECAR |
rules | array | Required. 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. |
selfLink | string | Output only. Server-defined URL of this resource |
updateTime | string (google-datetime) | Output only. The timestamp when the resource was updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , tcpRoutesId | Gets details of a single TcpRoute. | |
list | select | projectsId , locationsId | pageSize , pageToken , returnPartialSuccess | Lists TcpRoute in a given project and location. |
create | insert | projectsId , locationsId | tcpRouteId | Creates a new TcpRoute in a given project and location. |
patch | update | projectsId , locationsId , tcpRoutesId | updateMask | Updates the parameters of a single TcpRoute. |
delete | delete | projectsId , locationsId , tcpRoutesId | Deletes 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.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
projectsId | string | |
tcpRoutesId | string | |
pageSize | integer (int32) | |
pageToken | string | |
returnPartialSuccess | boolean | |
tcpRouteId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
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;
Lists TcpRoute in a given project and location.
SELECT
name,
createTime,
description,
gateways,
labels,
meshes,
rules,
selfLink,
updateTime
FROM google.networkservices.tcp_routes
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND returnPartialSuccess = '{{ returnPartialSuccess }}';
INSERT
examples
- create
- Manifest
Creates a new TcpRoute in a given project and location.
INSERT INTO google.networkservices.tcp_routes (
data__name,
data__description,
data__rules,
data__meshes,
data__gateways,
data__labels,
projectsId,
locationsId,
tcpRouteId
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ rules }}',
'{{ meshes }}',
'{{ gateways }}',
'{{ labels }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ tcpRouteId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: tcp_routes
props:
- name: projectsId
value: string
description: Required parameter for the tcp_routes resource.
- name: locationsId
value: string
description: Required parameter for the tcp_routes resource.
- name: name
value: string
description: >
Identifier. Name of the TcpRoute resource. It matches pattern `projects/*/locations/global/tcpRoutes/tcp_route_name>`.
- name: description
value: string
description: >
Optional. A free-text description of the resource. Max length 1024 characters.
- name: rules
value: array
description: >
Required. 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.
- name: meshes
value: array
description: >
Optional. 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/global/meshes/` The attached Mesh should be of a type SIDECAR
- name: gateways
value: array
description: >
Optional. 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/global/gateways/`
- name: labels
value: object
description: >
Optional. Set of label tags associated with the TcpRoute resource.
- name: tcpRouteId
value: string
UPDATE
examples
- patch
Updates the parameters of a single TcpRoute.
UPDATE google.networkservices.tcp_routes
SET
data__name = '{{ name }}',
data__description = '{{ description }}',
data__rules = '{{ rules }}',
data__meshes = '{{ meshes }}',
data__gateways = '{{ gateways }}',
data__labels = '{{ labels }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND tcpRoutesId = '{{ tcpRoutesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes a single TcpRoute.
DELETE FROM google.networkservices.tcp_routes
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND tcpRoutesId = '{{ tcpRoutesId }}' --required;