- Resource: PolicyBasedRoute
- VirtualMachine
- InterconnectAttachment
- OtherRoutes
- Filter
- ProtocolVersion
- Warnings
- Code
- Methods
Resource: PolicyBasedRoute
Policy-based routes route L4 network traffic based on not just destination IP address, but also source IP address, protocol, and more. If a policy-based route conflicts with other types of routes, the policy-based route always takes precedence.
JSON representation |
---|
{ "name": string, "createTime": string, "updateTime": string, "labels": { string: string, ... }, "description": string, "network": string, "filter": { object ( |
Fields | |
---|---|
name |
Immutable. A unique name of the resource in the form of |
createTime |
Output only. Time when the policy-based route was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
updateTime |
Output only. Time when the policy-based route was updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
labels |
User-defined labels. An object containing a list of |
description |
Optional. An optional description of this resource. Provide this field when you create the resource. |
network |
Required. Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network. |
filter |
Required. The filter to match L4 traffic. |
priority |
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[] |
Output only. If potential misconfigurations are detected for this route, this field will be populated with warning messages. |
selfLink |
Output only. Server-defined fully-qualified URL for this resource. |
kind |
Output only. Type of this resource. Always networkconnectivity#policyBasedRoute for policy-based Route resources. |
Union field target . Target specifies network endpoints that this policy-based route applies to. If no target is specified, the PBR will be installed on all network endpoints (e.g. VMs, VPNs, and Interconnects) in the VPC. target can be only one of the following: |
|
virtualMachine |
Optional. VM instances that this policy-based route applies to. |
interconnectAttachment |
Optional. The interconnect attachments that this policy-based route applies to. |
Union field
|
|
nextHopIlbIp |
Optional. The IP address of a global-access-enabled L4 ILB that is the next hop for matching packets. For this version, only nextHopIlbIp is supported. |
nextHopOtherRoutes |
Optional. Other routes that will be referenced to determine the next hop of the packet. |
VirtualMachine
VM instances that this policy-based route applies to.
JSON representation |
---|
{ "tags": [ string ] } |
Fields | |
---|---|
tags[] |
Optional. A list of VM instance tags that this policy-based route applies to. VM instances that have ANY of tags specified here installs this PBR. |
InterconnectAttachment
InterconnectAttachment that this route applies to.
JSON representation |
---|
{ "region": string } |
Fields | |
---|---|
region |
Optional. Cloud region to install this policy-based route on interconnect attachment. Use |
OtherRoutes
The other routing cases.
Enums | |
---|---|
OTHER_ROUTES_UNSPECIFIED |
Default value. |
DEFAULT_ROUTING |
Use the routes from the default routing tables (system-generated routes, custom routes, peering route) to determine the next hop. This effectively excludes matching packets being applied on other PBRs with a lower priority. |
Filter
Filter matches L4 traffic.
JSON representation |
---|
{
"ipProtocol": string,
"srcRange": string,
"destRange": string,
"protocolVersion": enum ( |
Fields | |
---|---|
ipProtocol |
Optional. The IP protocol that this policy-based route applies to. Valid values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'. |
srcRange |
Optional. The source IP range of outgoing packets that this policy-based route applies to. Default is "0.0.0.0/0" if protocol version is IPv4. |
destRange |
Optional. The destination IP range of outgoing packets that this policy-based route applies to. Default is "0.0.0.0/0" if protocol version is IPv4. |
protocolVersion |
Required. Internet protocol versions this policy-based route applies to. For this version, only IPV4 is supported. IPV6 is supported in preview. |
ProtocolVersion
The internet protocol version.
Enums | |
---|---|
PROTOCOL_VERSION_UNSPECIFIED |
Default value. |
IPV4 |
The PBR is for IPv4 internet protocol traffic. |
Warnings
Informational warning message.
JSON representation |
---|
{
"code": enum ( |
Fields | |
---|---|
code |
Output only. A warning code, if applicable. |
data |
Output only. Metadata about this warning in key: value format. The key should provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement. An object containing a list of |
warningMessage |
Output only. A human-readable description of the warning code. |
Code
Warning code for policy-based routing. Expect to add values in the future.
Enums | |
---|---|
WARNING_UNSPECIFIED |
Default value. |
RESOURCE_NOT_ACTIVE |
The policy-based route is not active and functioning. Common causes are that the dependent network was deleted or the resource project was turned off. |
RESOURCE_BEING_MODIFIED |
The policy-based route is being modified (e.g. created/deleted) at this time. |
Methods |
|
---|---|
|
Creates a new policy-based route in a given project and location. |
|
Deletes a single policy-based route. |
|
Gets details of a single policy-based route. |
|
Gets the access control policy for a resource. |
|
Lists policy-based routes in a given project and location. |
|
Sets the access control policy on the specified resource. |
|
Returns permissions that a caller has on the specified resource. |