Google Cloud Network Connectivity V1 Client - Class PolicyBasedRoute (1.3.0)

Reference documentation and code samples for the Google Cloud Network Connectivity V1 Client class PolicyBasedRoute.

Policy Based Routes (PBR) are more powerful routes that allows GCP customers to route their L4 network traffic based on not just destination IP, but also source IP, protocol and more. A PBR always take precedence when it conflicts with other types of routes.

Next id: 22

Generated from protobuf message google.cloud.networkconnectivity.v1.PolicyBasedRoute

Namespace

Google \ Cloud \ NetworkConnectivity \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ virtual_machine Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\VirtualMachine

Optional. VM instances to which this policy based route applies to.

↳ interconnect_attachment Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\InterconnectAttachment

Optional. The interconnect attachments to which this route applies to.

↳ next_hop_ilb_ip string

Optional. The IP of a global access enabled L4 ILB that should be the next hop to handle matching packets. For this version, only next_hop_ilb_ip is supported.

↳ next_hop_other_routes int

Optional. Other routes that will be referenced to determine the next hop of the packet.

↳ name string

Immutable. A unique name of the resource in the form of projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}

↳ create_time Google\Protobuf\Timestamp

Output only. Time when the PolicyBasedRoute was created.

↳ update_time Google\Protobuf\Timestamp

Output only. Time when the PolicyBasedRoute was updated.

↳ labels array|Google\Protobuf\Internal\MapField

User-defined labels.

↳ description string

Optional. An optional description of this resource. Provide this field when you create the resource.

↳ network string

Required. Fully-qualified URL of the network that this route applies to. e.g. projects/my-project/global/networks/my-network.

↳ filter Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Filter

Required. The filter to match L4 traffic.

↳ priority int

Optional. The priority of this policy based route. Priority is used to break ties in cases where there are more than one matching policy based routes found. In cases where multiple policy based routes are matched, the one with the lowest-numbered priority value wins. The default value is 1000. The priority value must be from 1 to 65535, inclusive.

↳ warnings array<Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Warnings>

Output only. If potential misconfigurations are detected for this route, this field will be populated with warning messages.

↳ self_link string

Output only. Server-defined fully-qualified URL for this resource.

↳ kind string

Output only. Type of this resource. Always networkconnectivity#policyBasedRoute for Policy Based Route resources.

getVirtualMachine

Optional. VM instances to which this policy based route applies to.

Returns
TypeDescription
Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\VirtualMachine|null

hasVirtualMachine

setVirtualMachine

Optional. VM instances to which this policy based route applies to.

Parameter
NameDescription
var Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\VirtualMachine
Returns
TypeDescription
$this

getInterconnectAttachment

Optional. The interconnect attachments to which this route applies to.

Returns
TypeDescription
Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\InterconnectAttachment|null

hasInterconnectAttachment

setInterconnectAttachment

Optional. The interconnect attachments to which this route applies to.

Parameter
NameDescription
var Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\InterconnectAttachment
Returns
TypeDescription
$this

getNextHopIlbIp

Optional. The IP of a global access enabled L4 ILB that should be the next hop to handle matching packets. For this version, only next_hop_ilb_ip is supported.

Returns
TypeDescription
string

hasNextHopIlbIp

setNextHopIlbIp

Optional. The IP of a global access enabled L4 ILB that should be the next hop to handle matching packets. For this version, only next_hop_ilb_ip is supported.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getNextHopOtherRoutes

Optional. Other routes that will be referenced to determine the next hop of the packet.

Returns
TypeDescription
int

hasNextHopOtherRoutes

setNextHopOtherRoutes

Optional. Other routes that will be referenced to determine the next hop of the packet.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getName

Immutable. A unique name of the resource in the form of projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}

Returns
TypeDescription
string

setName

Immutable. A unique name of the resource in the form of projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCreateTime

Output only. Time when the PolicyBasedRoute was created.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. Time when the PolicyBasedRoute was created.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getUpdateTime

Output only. Time when the PolicyBasedRoute was updated.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. Time when the PolicyBasedRoute was updated.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getLabels

User-defined labels.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setLabels

User-defined labels.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getDescription

Optional. An optional description of this resource. Provide this field when you create the resource.

Returns
TypeDescription
string

setDescription

Optional. An optional description of this resource. Provide this field when you create the resource.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getNetwork

Required. Fully-qualified URL of the network that this route applies to.

e.g. projects/my-project/global/networks/my-network.

Returns
TypeDescription
string

setNetwork

Required. Fully-qualified URL of the network that this route applies to.

e.g. projects/my-project/global/networks/my-network.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getFilter

Required. The filter to match L4 traffic.

Returns
TypeDescription
Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Filter|null

hasFilter

clearFilter

setFilter

Required. The filter to match L4 traffic.

Parameter
NameDescription
var Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Filter
Returns
TypeDescription
$this

getPriority

Optional. The priority of this policy based route. Priority is used to break ties in cases where there are more than one matching policy based routes found. In cases where multiple policy based routes are matched, the one with the lowest-numbered priority value wins. The default value is

  1. The priority value must be from 1 to 65535, inclusive.
Returns
TypeDescription
int

setPriority

Optional. The priority of this policy based route. Priority is used to break ties in cases where there are more than one matching policy based routes found. In cases where multiple policy based routes are matched, the one with the lowest-numbered priority value wins. The default value is

  1. The priority value must be from 1 to 65535, inclusive.
Parameter
NameDescription
var int
Returns
TypeDescription
$this

getWarnings

Output only. If potential misconfigurations are detected for this route, this field will be populated with warning messages.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setWarnings

Output only. If potential misconfigurations are detected for this route, this field will be populated with warning messages.

Parameter
NameDescription
var array<Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Warnings>
Returns
TypeDescription
$this

Output only. Server-defined fully-qualified URL for this resource.

Returns
TypeDescription
string

Output only. Server-defined fully-qualified URL for this resource.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getKind

Output only. Type of this resource. Always networkconnectivity#policyBasedRoute for Policy Based Route resources.

Returns
TypeDescription
string

setKind

Output only. Type of this resource. Always networkconnectivity#policyBasedRoute for Policy Based Route resources.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getTarget

Returns
TypeDescription
string

getNextHop

Returns
TypeDescription
string