1.6.0 (latest) 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

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

Reference documentation and code samples for the Network Services v1 API class ServiceLbPolicy.

ServiceLbPolicy holds global load balancing and traffic distribution
configuration that can be applied to a BackendService.

## Inheritance

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

## Implements

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

## 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.NetworkServices.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1)

## Assembly

Google.Cloud.NetworkServices.V1.dll

## Constructors

### ServiceLbPolicy()

    public ServiceLbPolicy()

### ServiceLbPolicy(ServiceLbPolicy)

    public ServiceLbPolicy(ServiceLbPolicy other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ServiceLbPolicy` |

## Properties

### AutoCapacityDrain

    public ServiceLbPolicy.Types.AutoCapacityDrain AutoCapacityDrain { get; set; }

Optional. Configuration to automatically move traffic away for unhealthy
IG/NEG for the associated Backend Service.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ServiceLbPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ServiceLbPolicy.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ServiceLbPolicy.Types.AutoCapacityDrain` |   |

### CreateTime

    public Timestamp CreateTime { get; set; }

Output only. The timestamp when this resource was created.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### Description

    public string Description { get; set; }

Optional. A free-text description of the resource. Max length 1024
characters.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### FailoverConfig

    public ServiceLbPolicy.Types.FailoverConfig FailoverConfig { get; set; }

Optional. Configuration related to health based failover.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ServiceLbPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ServiceLbPolicy.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ServiceLbPolicy.Types.FailoverConfig` |   |

### IsolationConfig

    public ServiceLbPolicy.Types.IsolationConfig IsolationConfig { get; set; }

Optional. Configuration to provide isolation support for the associated
Backend Service.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ServiceLbPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ServiceLbPolicy.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ServiceLbPolicy.Types.IsolationConfig` |   |

### Labels

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

Optional. Set of label tags associated with the ServiceLbPolicy resource.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.MapField-2.htmlhttps://learn.microsoft.com/dotnet/api/system.stringhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### LoadBalancingAlgorithm

    public ServiceLbPolicy.Types.LoadBalancingAlgorithm LoadBalancingAlgorithm { get; set; }

Optional. The type of load balancing algorithm to be used. The default
behavior is WATERFALL_BY_REGION.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ServiceLbPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ServiceLbPolicy.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ServiceLbPolicy.Types.LoadBalancingAlgorithm` |   |

### Name

    public string Name { get; set; }

Identifier. Name of the ServiceLbPolicy resource. It matches pattern
`projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ServiceLbPolicyName

    public ServiceLbPolicyName ServiceLbPolicyName { get; set; }

[ServiceLbPolicyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ServiceLbPolicyName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ServiceLbPolicy#Google_Cloud_NetworkServices_V1_ServiceLbPolicy_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ServiceLbPolicyName` |   |

### UpdateTime

    public Timestamp UpdateTime { get; set; }

Output only. The timestamp when this resource was last updated.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |