Resource: TcpRoute
TcpRoute is the resource defining how TCP traffic should be routed by a Mesh/Gateway resource.
JSON representation |
---|
{
"name": string,
"selfLink": string,
"createTime": string,
"updateTime": string,
"description": string,
"rules": [
{
object ( |
Fields | |
---|---|
name |
Required. Name of the TcpRoute resource. It matches pattern |
selfLink |
Output only. Server-defined URL of this resource |
createTime |
Output only. The timestamp when the resource was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
updateTime |
Output only. The timestamp when the resource was updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
description |
Optional. A free-text description of the resource. Max length 1024 characters. |
rules[] |
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. |
meshes[] |
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: The attached Mesh should be of a type SIDECAR |
gateways[] |
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: |
labels |
Optional. Set of label tags associated with the TcpRoute resource. An object containing a list of |
RouteRule
Specifies how to match traffic and how to route traffic when traffic is matched.
JSON representation |
---|
{ "matches": [ { object ( |
Fields | |
---|---|
matches[] |
Optional. RouteMatch defines the predicate used to match requests to a given action. Multiple match types are "OR"ed for evaluation. If no routeMatch field is specified, this rule will unconditionally match traffic. |
action |
Required. The detailed rule defining how to route matched traffic. |
RouteMatch
RouteMatch defines the predicate used to match requests to a given action. Multiple match types are "OR"ed for evaluation. If no routeMatch field is specified, this rule will unconditionally match traffic.
JSON representation |
---|
{ "address": string, "port": string } |
Fields | |
---|---|
address |
Required. Must be specified in the CIDR range format. A CIDR range consists of an IP Address and a prefix length to construct the subnet mask. By default, the prefix length is 32 (i.e. matches a single IP address). Only IPV4 addresses are supported. Examples: "10.0.0.1" - matches against this exact IP address. "10.0.0.0/8" - matches against any IP address within the 10.0.0.0 subnet and 255.255.255.0 mask. "0.0.0.0/0" - matches against any IP address'. |
port |
Required. Specifies the destination port to match against. |
RouteAction
The specifications for routing traffic and applying associated policies.
JSON representation |
---|
{
"destinations": [
{
object ( |
Fields | |
---|---|
destinations[] |
Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set. |
originalDestination |
Optional. If true, Router will use the destination IP and port of the original connection as the destination of the request. Default is false. Only one of route destinations or original destination can be set. |
idleTimeout |
Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 30 seconds. If set to 0s, the timeout will be disabled. A duration in seconds with up to nine fractional digits, ending with ' |
RouteDestination
Describe the destination for traffic to be routed to.
JSON representation |
---|
{ "serviceName": string, "weight": integer } |
Fields | |
---|---|
serviceName |
Required. The URL of a BackendService to route traffic to. |
weight |
Optional. Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them. |
Methods |
|
---|---|
|
Creates a new TcpRoute in a given project and location. |
|
Deletes a single TcpRoute. |
|
Gets details of a single TcpRoute. |
|
Lists TcpRoute in a given project and location. |
|
Updates the parameters of a single TcpRoute. |
|
Sets the access control policy on the specified resource. |
|
Returns permissions that a caller has on the specified resource. |