[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Network Services V1 API - Class Google::Cloud::NetworkServices::V1::ServiceLbPolicy::AutoCapacityDrain (v2.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.4.0 (latest)](/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-AutoCapacityDrain)\n- [2.3.0](/ruby/docs/reference/google-cloud-network_services-v1/2.3.0/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-AutoCapacityDrain)\n- [2.2.0](/ruby/docs/reference/google-cloud-network_services-v1/2.2.0/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-AutoCapacityDrain)\n- [2.1.0](/ruby/docs/reference/google-cloud-network_services-v1/2.1.0/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-AutoCapacityDrain)\n- [2.0.1](/ruby/docs/reference/google-cloud-network_services-v1/2.0.1/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-AutoCapacityDrain)\n- [1.2.0](/ruby/docs/reference/google-cloud-network_services-v1/1.2.0/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-AutoCapacityDrain)\n- [1.1.0](/ruby/docs/reference/google-cloud-network_services-v1/1.1.0/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-AutoCapacityDrain)\n- [1.0.1](/ruby/docs/reference/google-cloud-network_services-v1/1.0.1/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-AutoCapacityDrain)\n- [0.2.0](/ruby/docs/reference/google-cloud-network_services-v1/0.2.0/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-AutoCapacityDrain)\n- [0.1.0](/ruby/docs/reference/google-cloud-network_services-v1/0.1.0/Google-Cloud-NetworkServices-V1-ServiceLbPolicy-AutoCapacityDrain) \nReference documentation and code samples for the Network Services V1 API class Google::Cloud::NetworkServices::V1::ServiceLbPolicy::AutoCapacityDrain.\n\nOption to specify if an unhealthy IG/NEG should be considered for global\nload balancing and traffic routing. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #enable\n\n def enable() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- Optional. If set to 'True', an unhealthy IG/NEG will be set as drained.\n\n - An IG/NEG is considered unhealthy if less than 25% of the instances/endpoints in the IG/NEG are healthy.\n - This option will never result in draining more than 50% of the configured IGs/NEGs for the Backend Service.\n\n### #enable=\n\n def enable=(value) -\u003e ::Boolean\n\n**Parameter**\n\n- **value** (::Boolean) ---\n\n Optional. If set to 'True', an unhealthy IG/NEG will be set as drained.\n - An IG/NEG is considered unhealthy if less than 25% of the instances/endpoints in the IG/NEG are healthy.\n- This option will never result in draining more than 50% of the configured IGs/NEGs for the Backend Service. \n**Returns**\n\n- (::Boolean) --- Optional. If set to 'True', an unhealthy IG/NEG will be set as drained.\n\n - An IG/NEG is considered unhealthy if less than 25% of the instances/endpoints in the IG/NEG are healthy.\n - This option will never result in draining more than 50% of the configured IGs/NEGs for the Backend Service."]]