REST Resource: projects.locations.tlsRoutes

Resource: TlsRoute

TlsRoute defines how traffic should be routed based on SNI and other matching L3 attributes.

JSON representation
{
  "name": string,
  "selfLink": string,
  "createTime": string,
  "updateTime": string,
  "description": string,
  "rules": [
    {
      object (RouteRule)
    }
  ],
  "meshes": [
    string
  ],
  "gateways": [
    string
  ],
  "labels": {
    string: string,
    ...
  }
}
Fields
name

string

Required. Name of the TlsRoute resource. It matches pattern projects/*/locations/global/tlsRoutes/tls_route_name>.

createTime

string (Timestamp format)

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: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

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: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

description

string

Optional. A free-text description of the resource. Max length 1024 characters.

rules[]

object (RouteRule)

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[]

string

Optional. Meshes defines a list of meshes this TlsRoute 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/<mesh_name>

The attached Mesh should be of a type SIDECAR

gateways[]

string

Optional. Gateways defines a list of gateways this TlsRoute 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/<gateway_name>

labels

map (key: string, value: string)

Optional. Set of label tags associated with the TlsRoute resource.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

RouteRule

Specifies how to match traffic and how to route traffic when traffic is matched.

JSON representation
{
  "matches": [
    {
      object (RouteMatch)
    }
  ],
  "action": {
    object (RouteAction)
  }
}
Fields
matches[]

object (RouteMatch)

Required. RouteMatch defines the predicate used to match requests to a given action. Multiple match types are "OR"ed for evaluation.

action

object (RouteAction)

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 "AND"ed for evaluation. If no routeMatch field is specified, this rule will unconditionally match traffic.

JSON representation
{
  "sniHost": [
    string
  ],
  "alpn": [
    string
  ]
}
Fields
sniHost[]

string

Optional. SNI (server name indicator) to match against. SNI will be matched against all wildcard domains, i.e. www.example.com will be first matched against www.example.com, then *.example.com, then *.com. Partial wildcards are not supported, and values like *w.example.com are invalid. At least one of sniHost and alpn is required. Up to 100 sni hosts across all matches can be set.

alpn[]

string

Optional. ALPN (Application-Layer Protocol Negotiation) to match against. Examples: "http/1.1", "h2". At least one of sniHost and alpn is required. Up to 5 alpns across all matches can be set.

RouteAction

The specifications for routing traffic and applying associated policies.

JSON representation
{
  "destinations": [
    {
      object (RouteDestination)
    }
  ],
  "idleTimeout": string
}
Fields
destinations[]

object (RouteDestination)

Required. The destination services to which traffic should be forwarded. At least one destination service is required.

idleTimeout

string (Duration format)

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 1 hour. If set to 0s, the timeout will be disabled.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

RouteDestination

Describe the destination for traffic to be routed to.

JSON representation
{
  "serviceName": string,
  "weight": integer
}
Fields
serviceName

string

Required. The URL of a BackendService to route traffic to.

weight

integer

Optional. Specifies the proportion of requests forwareded to the backend referenced by the serviceName field. This is computed as: - weight/Sum(weights in destinations) Weights in all destinations does not need to sum up to 100.

Methods

create

Creates a new TlsRoute in a given project and location.

delete

Deletes a single TlsRoute.

get

Gets details of a single TlsRoute.

list

Lists TlsRoute in a given project and location.

patch

Updates the parameters of a single TlsRoute.

setIamPolicy

Sets the access control policy on the specified resource.

testIamPermissions

Returns permissions that a caller has on the specified resource.