gcloud network-services service-lb-policies update Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud network-services service-lb-policies update - update a service LB policy
- SYNOPSIS
gcloud network-services service-lb-policies update(SERVICE_LB_POLICY:--location=LOCATION)[--async][--auto-capacity-drain][--description=DESCRIPTION][--failover-health-threshold=FAILOVER_HEALTH_THRESHOLD][--isolation-config-granularity=ISOLATION_CONFIG_GRANULARITY; default="unspecified"][--isolation-config-mode=ISOLATION_CONFIG_MODE; default="unspecified"][--load-balancing-algorithm=LOAD_BALANCING_ALGORITHM; default="waterfall-by-region"][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
- Update the detail of a service LB Policy.
- EXAMPLES
- Update load-balancing-algorithm of a service LB policy named
:my-service-lb-policygcloudnetwork-servicesservice-lb-policiesupdatemy-service-lb-policy--load-balancing-algorithm=waterfall-by-zone - POSITIONAL ARGUMENTS
- Service lb policy resource - Name of the service LB policy to be updated. Thearguments in this group can be used to specify the attributes of this resource.(NOTE) Some attributes are not given arguments in this group but can be set inother ways.
To set the
projectattribute:- provide the argument
service_lb_policyon the command line with afully specified name; - provide the argument
--projecton the command line; - set the property
core/project.
This must be specified.
SERVICE_LB_POLICY- ID of the service lb policy or fully qualified identifier for the service lbpolicy.
To set the
service_lb_policyattribute:- provide the argument
service_lb_policyon the command line.
This positional argument must be specified if any of the other arguments in thisgroup are specified.
- provide the argument
--location=LOCATION- The location Id.
To set the
locationattribute:- provide the argument
service_lb_policyon the command line with afully specified name; - provide the argument
--locationon the command line.
- provide the argument
- provide the argument
- Service lb policy resource - Name of the service LB policy to be updated. Thearguments in this group can be used to specify the attributes of this resource.(NOTE) Some attributes are not given arguments in this group but can be set inother ways.
- FLAGS
--async- Return immediately, without waiting for the operation in progress to complete.
--auto-capacity-drain- If specified, an unhealthy MIG/NEG will be removed from Global load balancingand traffic routing for the service. A MIG/NEG is considered to be unhealthy ifless than 25% of the instance/endpoints in the MIG/NEG are healthy.autoCapacityDrain will never drain more than 50% of the configured MIGs/NEGs ofa Backend Service.
--description=DESCRIPTION- The description for the service LB policy.
--failover-health-threshold=FAILOVER_HEALTH_THRESHOLD- The percentage threshold that a load balancer will begin to send traffic tofailover backends. If the percentage of endpoints in a MIG/NEG is smaller thanthis value, traffic would be sent to failover backends if possible. This fieldshould be set to a value between 1 and 99. The default value is 50 for Proxylessservice mesh, and 70 for others.
--isolation-config-granularity=ISOLATION_CONFIG_GRANULARITY; default="unspecified"- The granularity of the isolation.
ISOLATION_CONFIG_GRANULARITYmust be one of:region- Traffic for this service will be isolated at the nearest cloud region.
unspecified- No isolation is configured for the backend service. Traffic can overflow basedon the load balancing algorithm.
--isolation-config-mode=ISOLATION_CONFIG_MODE; default="unspecified"- The granularity of the isolation.
ISOLATION_CONFIG_MODEmust be one of:nearest- Traffic will be sent to the nearest location.
strict- Traffic will fail if no serving backends are available in the same region as theload balancer.
unspecified- No isolation mode is configured for the backend service.
--load-balancing-algorithm=LOAD_BALANCING_ALGORITHM; default="waterfall-by-region"- The global load balancing algorithm to be used.
LOAD_BALANCING_ALGORITHMmust be one of:spray-to-region- Spread the traffic from each client to all the MIGs/NEGs in a region.
spray-to-world- Balance traffic across all backends across the world proportionally based oncapacity.
waterfall-by-region- Direct traffic to the nearest region with endpoints and capacity before spillingover to other regions.
waterfall-by-zone- Attempt to keep traffic in a single zone closest to the client, before spillingover to other zones.
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$gcloud helpfor details. - API REFERENCE
- This command uses the
networkservices/v1API. The fulldocumentation for this API can be found at:https://cloud.google.com/networking - NOTES
- These variants are also available:
gcloudalphanetwork-servicesservice-lb-policiesupdategcloudbetanetwork-servicesservice-lb-policiesupdate
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-15 UTC.