Google Cloud Network Services V1 Client - Class RouteRule (0.1.1)

Reference documentation and code samples for the Google Cloud Network Services V1 Client class RouteRule.

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

Generated from protobuf message google.cloud.networkservices.v1.HttpRoute.RouteRule

Namespace

Google \ Cloud \ NetworkServices \ V1 \ HttpRoute

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ matches array<Google\Cloud\NetworkServices\V1\HttpRoute\RouteMatch>

A list of matches define conditions used for matching the rule against incoming HTTP requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied. If no matches field is specified, this rule will unconditionally match traffic. If a default rule is desired to be configured, add a rule with no matches specified to the end of the rules list.

↳ action Google\Cloud\NetworkServices\V1\HttpRoute\RouteAction

The detailed rule defining how to route matched traffic.

getMatches

A list of matches define conditions used for matching the rule against incoming HTTP requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied.

If no matches field is specified, this rule will unconditionally match traffic. If a default rule is desired to be configured, add a rule with no matches specified to the end of the rules list.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setMatches

A list of matches define conditions used for matching the rule against incoming HTTP requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied.

If no matches field is specified, this rule will unconditionally match traffic. If a default rule is desired to be configured, add a rule with no matches specified to the end of the rules list.

Parameter
Name Description
var array<Google\Cloud\NetworkServices\V1\HttpRoute\RouteMatch>
Returns
Type Description
$this

getAction

The detailed rule defining how to route matched traffic.

Returns
Type Description
Google\Cloud\NetworkServices\V1\HttpRoute\RouteAction|null

hasAction

clearAction

setAction

The detailed rule defining how to route matched traffic.

Parameter
Name Description
var Google\Cloud\NetworkServices\V1\HttpRoute\RouteAction
Returns
Type Description
$this