# Network Services V1 API - Class Google::Cloud::NetworkServices::V1::ServiceLbPolicy (v2.10.1)

2.10.1 (latest) 2.10.0 2.9.0 2.8.0 2.7.0 2.6.1 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.1 1.2.0 1.1.0 1.0.1 0.2.0 0.1.0 Reference documentation and code samples for the Network Services V1 API class Google::Cloud::NetworkServices::V1::ServiceLbPolicy.

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

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #auto_capacity_drain

    def auto_capacity_drain() -> ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::AutoCapacityDrain

**Returns**

- ([::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::AutoCapacityDrain](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-AutoCapacityDrain)) --- Optional. Configuration to automatically move traffic away for unhealthy IG/NEG for the associated Backend Service.

### #auto_capacity_drain=

    def auto_capacity_drain=(value) -> ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::AutoCapacityDrain

**Parameter**

- **value** ([::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::AutoCapacityDrain](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-AutoCapacityDrain)) --- Optional. Configuration to automatically move traffic away for unhealthy IG/NEG for the associated Backend Service.
**Returns**

- ([::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::AutoCapacityDrain](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-AutoCapacityDrain)) --- Optional. Configuration to automatically move traffic away for unhealthy IG/NEG for the associated Backend Service.

### #create_time

    def create_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The timestamp when this resource was created.

### #description

    def description() -> ::String

**Returns**

- (::String) --- Optional. A free-text description of the resource. Max length 1024 characters.

### #description=

    def description=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. A free-text description of the resource. Max length 1024 characters.
**Returns**

- (::String) --- Optional. A free-text description of the resource. Max length 1024 characters.

### #failover_config

    def failover_config() -> ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::FailoverConfig

**Returns**

- ([::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::FailoverConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-FailoverConfig)) --- Optional. Configuration related to health based failover.

### #failover_config=

    def failover_config=(value) -> ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::FailoverConfig

**Parameter**

- **value** ([::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::FailoverConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-FailoverConfig)) --- Optional. Configuration related to health based failover.
**Returns**

- ([::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::FailoverConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-FailoverConfig)) --- Optional. Configuration related to health based failover.

### #isolation_config

    def isolation_config() -> ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::IsolationConfig

**Returns**

- ([::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::IsolationConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-IsolationConfig)) --- Optional. Configuration to provide isolation support for the associated Backend Service.

### #isolation_config=

    def isolation_config=(value) -> ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::IsolationConfig

**Parameter**

- **value** ([::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::IsolationConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-IsolationConfig)) --- Optional. Configuration to provide isolation support for the associated Backend Service.
**Returns**

- ([::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::IsolationConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-IsolationConfig)) --- Optional. Configuration to provide isolation support for the associated Backend Service.

### #labels

    def labels() -> ::Google::Protobuf::Map{::String => ::String}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. Set of label tags associated with the ServiceLbPolicy resource.

### #labels=

    def labels=(value) -> ::Google::Protobuf::Map{::String => ::String}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. Set of label tags associated with the ServiceLbPolicy resource.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. Set of label tags associated with the ServiceLbPolicy resource.

### #load_balancing_algorithm

    def load_balancing_algorithm() -> ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::LoadBalancingAlgorithm

**Returns**

- ([::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::LoadBalancingAlgorithm](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-LoadBalancingAlgorithm)) --- Optional. The type of load balancing algorithm to be used. The default behavior is WATERFALL_BY_REGION.

### #load_balancing_algorithm=

    def load_balancing_algorithm=(value) -> ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::LoadBalancingAlgorithm

**Parameter**

- **value** ([::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::LoadBalancingAlgorithm](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-LoadBalancingAlgorithm)) --- Optional. The type of load balancing algorithm to be used. The default behavior is WATERFALL_BY_REGION.
**Returns**

- ([::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::LoadBalancingAlgorithm](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-LoadBalancingAlgorithm)) --- Optional. The type of load balancing algorithm to be used. The default behavior is WATERFALL_BY_REGION.

### #name

    def name() -> ::String

**Returns**

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

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Identifier. Name of the ServiceLbPolicy resource. It matches pattern `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.
**Returns**

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

### #update_time

    def update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The timestamp when this resource was last updated.