Class PolicyBasedRoute (2.4.2)

PolicyBasedRoute(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes

NameDescription
virtual_machine google.cloud.networkconnectivity_v1.types.PolicyBasedRoute.VirtualMachine
Optional. VM instances to which this policy based route applies to. This field is a member of oneof_ target.
interconnect_attachment google.cloud.networkconnectivity_v1.types.PolicyBasedRoute.InterconnectAttachment
Optional. The interconnect attachments to which this route applies to. This field is a member of oneof_ target.
next_hop_ilb_ip str
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. This field is a member of oneof_ next_hop.
next_hop_other_routes google.cloud.networkconnectivity_v1.types.PolicyBasedRoute.OtherRoutes
Optional. Other routes that will be referenced to determine the next hop of the packet. This field is a member of oneof_ next_hop.
name str
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_pb2.Timestamp
Output only. Time when the PolicyBasedRoute was created.
update_time google.protobuf.timestamp_pb2.Timestamp
Output only. Time when the PolicyBasedRoute was updated.
labels MutableMapping[str, str]
User-defined labels.
description str
Optional. An optional description of this resource. Provide this field when you create the resource.
network str
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.types.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 MutableSequence[google.cloud.networkconnectivity_v1.types.PolicyBasedRoute.Warnings]
Output only. If potential misconfigurations are detected for this route, this field will be populated with warning messages.
self_link str
Output only. Server-defined fully-qualified URL for this resource.
kind str
Output only. Type of this resource. Always networkconnectivity#policyBasedRoute for Policy Based Route resources.

Classes

Filter

Filter(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Filter matches L4 traffic.

InterconnectAttachment

InterconnectAttachment(mapping=None, *, ignore_unknown_fields=False, **kwargs)

InterconnectAttachment to which this route applies to.

LabelsEntry

LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

Parameters
NameDescription
kwargs dict

Keys and values corresponding to the fields of the message.

mapping Union[dict, .Message]

A dictionary or message to be used to determine the values for this message.

ignore_unknown_fields Optional(bool)

If True, do not raise errors for unknown fields. Only applied if mapping is a mapping type or there are keyword parameters.

OtherRoutes

OtherRoutes(value)

The other routing cases.

Values: OTHER_ROUTES_UNSPECIFIED (0): Default value. DEFAULT_ROUTING (1): Use the routes from the default routing tables (system-generated routes, custom routes, peering route) to determine the next hop. This will effectively exclude matching packets being applied on other PBRs with a lower priority.

VirtualMachine

VirtualMachine(mapping=None, *, ignore_unknown_fields=False, **kwargs)

VM instances to which this policy based route applies to.

Warnings

Warnings(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Informational warning message.