# Network Services V1 API - Class Google::Cloud::NetworkServices::V1::ServiceLbPolicy::AutoCapacityDrain (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::AutoCapacityDrain.

Option to specify if an unhealthy IG/NEG should be considered for global
load balancing and traffic routing.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #enable

    def enable() -> ::Boolean

**Returns**

- (::Boolean) --- Optional. If set to 'True', an unhealthy IG/NEG will be set as drained.

  - An IG/NEG is considered unhealthy if less than 25% of the instances/endpoints in the IG/NEG are healthy.
  - This option will never result in draining more than 50% of the configured IGs/NEGs for the Backend Service.

### #enable=

    def enable=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) ---

  Optional. If set to 'True', an unhealthy IG/NEG will be set as drained.
  - An IG/NEG is considered unhealthy if less than 25% of the instances/endpoints in the IG/NEG are healthy.
  - This option will never result in draining more than 50% of the configured IGs/NEGs for the Backend Service.
**Returns**

- (::Boolean) --- Optional. If set to 'True', an unhealthy IG/NEG will be set as drained.

  - An IG/NEG is considered unhealthy if less than 25% of the instances/endpoints in the IG/NEG are healthy.
  - This option will never result in draining more than 50% of the configured IGs/NEGs for the Backend Service.