2.14.0 (latest) 2.13.0 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.2.0 1.1.0 1.0.0

    public sealed class PolicyBasedRoute : IMessage<PolicyBasedRoute>, IEquatable<PolicyBasedRoute>, IDeepCloneable<PolicyBasedRoute>, IBufferMessage, IMessage

Reference documentation and code samples for the Network Connectivity v1 API class 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.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> PolicyBasedRoute

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.md.txt)[PolicyBasedRoute](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/latest/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoute.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[PolicyBasedRoute](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/latest/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoute.md.txt), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.md.txt)[PolicyBasedRoute](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/latest/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoute.md.txt), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.md.txt), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.md.txt)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.NetworkConnectivity.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/latest/Google.Cloud.NetworkConnectivity.V1.md.txt)

## Assembly

Google.Cloud.NetworkConnectivity.V1.dll

## Constructors

### PolicyBasedRoute()

    public PolicyBasedRoute()

### PolicyBasedRoute(PolicyBasedRoute)

    public PolicyBasedRoute(PolicyBasedRoute other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `PolicyBasedRoute` |

## Properties

### CreateTime

    public Timestamp CreateTime { get; set; }

Output only. Time when the policy-based route was created.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `Timestamp` |   |

### Description

    public string Description { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### Filter

    public PolicyBasedRoute.Types.Filter Filter { get; set; }

Required. The filter to match L4 traffic.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `PolicyBasedRouteTypesFilter` |   |

### HasNextHopIlbIp

    public bool HasNextHopIlbIp { get; }

Gets whether the "next_hop_ilb_ip" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### HasNextHopOtherRoutes

    public bool HasNextHopOtherRoutes { get; }

Gets whether the "next_hop_other_routes" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### InterconnectAttachment

    public PolicyBasedRoute.Types.InterconnectAttachment InterconnectAttachment { get; set; }

Optional. The interconnect attachments that this policy-based route
applies to.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `PolicyBasedRouteTypesInterconnectAttachment` |   |

### Kind

    public string Kind { get; set; }

Output only. Type of this resource. Always
networkconnectivity#policyBasedRoute for policy-based Route resources.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### Labels

    public MapField<string, string> Labels { get; }

User-defined labels.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `MapFieldstringstring` |   |

### Name

    public string Name { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### Network

    public string Network { get; set; }

Required. Fully-qualified URL of the network that this route applies to,
for example: projects/my-project/global/networks/my-network.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### NetworkAsNetworkName

    public NetworkName NetworkAsNetworkName { get; set; }

[NetworkName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/latest/Google.Cloud.NetworkConnectivity.V1.NetworkName.md.txt)-typed view over the [Network](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/latest/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoute.md.txt#Google_Cloud_NetworkConnectivity_V1_PolicyBasedRoute_Network) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `NetworkName` |   |

### NextHopCase

    public PolicyBasedRoute.NextHopOneofCase NextHopCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `PolicyBasedRouteNextHopOneofCase` |   |

### NextHopIlbIp

    public string NextHopIlbIp { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### NextHopOtherRoutes

    public PolicyBasedRoute.Types.OtherRoutes NextHopOtherRoutes { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `PolicyBasedRouteTypesOtherRoutes` |   |

### PolicyBasedRouteName

    public PolicyBasedRouteName PolicyBasedRouteName { get; set; }

[PolicyBasedRouteName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/latest/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRouteName.md.txt)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/latest/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoute.md.txt#Google_Cloud_NetworkConnectivity_V1_PolicyBasedRoute_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `PolicyBasedRouteName` |   |

### Priority

    public int Priority { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### SelfLink

    public string SelfLink { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### TargetCase

    public PolicyBasedRoute.TargetOneofCase TargetCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `PolicyBasedRouteTargetOneofCase` |   |

### UpdateTime

    public Timestamp UpdateTime { get; set; }

Output only. Time when the policy-based route was updated.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `Timestamp` |   |

### VirtualMachine

    public PolicyBasedRoute.Types.VirtualMachine VirtualMachine { get; set; }

Optional. VM instances that this policy-based route applies to.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `PolicyBasedRouteTypesVirtualMachine` |   |

### Warnings

    public RepeatedField<PolicyBasedRoute.Types.Warnings> Warnings { get; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `RepeatedFieldPolicyBasedRouteTypesWarnings` |   |