tcp_routes
Creates, updates, deletes, gets or lists a tcp_routes
resource.
Overview
Name | tcp_routes |
Type | Resource |
Id | google.networkservices.tcp_routes |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Name of the TcpRoute resource. It matches pattern projects/*/locations/global/tcpRoutes/tcp_route_name> . |
description | string | Optional. A free-text description of the resource. Max length 1024 characters. |
createTime | string | Output only. The timestamp when the resource was created. |
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 | Output only. The timestamp when the resource was updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, projectsId, tcpRoutesId | Gets details of a single TcpRoute. |
list | SELECT | locationsId, projectsId | Lists TcpRoute in a given project and location. |
create | INSERT | locationsId, projectsId | Creates a new TcpRoute in a given project and location. |
delete | DELETE | locationsId, projectsId, tcpRoutesId | Deletes a single TcpRoute. |
patch | UPDATE | locationsId, projectsId, tcpRoutesId | Updates the parameters of a single TcpRoute. |
SELECT
examples
Lists TcpRoute in a given project and location.
SELECT
name,
description,
createTime,
gateways,
labels,
meshes,
rules,
selfLink,
updateTime
FROM google.networkservices.tcp_routes
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new tcp_routes
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.networkservices.tcp_routes (
locationsId,
projectsId,
name,
description,
rules,
meshes,
gateways,
labels
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ description }}',
'{{ rules }}',
'{{ meshes }}',
'{{ gateways }}',
'{{ labels }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: selfLink
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: description
value: string
- name: rules
value:
- - name: matches
value:
- - name: address
value: string
- name: port
value: string
- name: action
value:
- name: destinations
value:
- - name: serviceName
value: string
- name: weight
value: integer
- name: originalDestination
value: boolean
- name: idleTimeout
value: string
- name: meshes
value:
- string
- name: gateways
value:
- string
- name: labels
value: object
UPDATE
example
Updates a tcp_routes
resource.
/*+ update */
UPDATE google.networkservices.tcp_routes
SET
name = '{{ name }}',
description = '{{ description }}',
rules = '{{ rules }}',
meshes = '{{ meshes }}',
gateways = '{{ gateways }}',
labels = '{{ labels }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND tcpRoutesId = '{{ tcpRoutesId }}';
DELETE
example
Deletes the specified tcp_routes
resource.
/*+ delete */
DELETE FROM google.networkservices.tcp_routes
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND tcpRoutesId = '{{ tcpRoutesId }}';