gcloud compute backend-services create BACKEND_SERVICE_NAME [--affinity-cookie-name=AFFINITY_COOKIE_NAME] [--affinity-cookie-path=AFFINITY_COOKIE_PATH] [--affinity-cookie-ttl=AFFINITY_COOKIE_TTL] [--bypass-cache-on-request-headers=BYPASS_CACHE_ON_REQUEST_HEADERS] [--no-cache-key-include-host] [--cache-key-include-http-header=[HEADER_FIELD_NAME,…]] [--cache-key-include-named-cookie=[NAMED_COOKIE,…]] [--no-cache-key-include-protocol] [--no-cache-key-include-query-string] [--cache-mode=CACHE_MODE] [--client-ttl=CLIENT_TTL] [--compression-mode=COMPRESSION_MODE] [--connection-drain-on-failover] [--connection-draining-timeout=CONNECTION_DRAINING_TIMEOUT] [--connection-persistence-on-unhealthy-backends=CONNECTION_PERSISTENCE_ON_UNHEALTHY_BACKENDS] [--custom-request-header=CUSTOM_REQUEST_HEADER] [--custom-response-header=CUSTOM_RESPONSE_HEADER] [--default-ttl=DEFAULT_TTL] [--description=DESCRIPTION] [--drop-traffic-if-unhealthy] [--[no-]enable-cdn] [--[no-]enable-logging] [--[no-]enable-strong-affinity] [--failover-ratio=FAILOVER_RATIO] [--health-checks=HEALTH_CHECK,[…]] [--http-health-checks=HTTP_HEALTH_CHECK,[…]] [--https-health-checks=HTTPS_HEALTH_CHECK,[…]] [--iap=disabled|enabled,[oauth2-client-id=OAUTH2-CLIENT-ID,oauth2-client-secret=OAUTH2-CLIENT-SECRET]] [--idle-timeout-sec=IDLE_TIMEOUT_SEC] [--ip-address-selection-policy=IP_ADDRESS_SELECTION_POLICY] [--load-balancing-scheme=LOAD_BALANCING_SCHEME; default="EXTERNAL"] [--locality-lb-policy=LOCALITY_LB_POLICY] [--logging-http-request-headers=[LOGGING_HTTP_REQUEST_HEADERS,…]] [--logging-http-response-headers=[LOGGING_HTTP_RESPONSE_HEADERS,…]] [--logging-optional=LOGGING_OPTIONAL] [--logging-optional-fields=[LOGGING_OPTIONAL_FIELDS,…]] [--logging-sample-rate=LOGGING_SAMPLE_RATE] [--max-ttl=MAX_TTL] [--[no-]negative-caching] [--negative-caching-policy=[[CODE=TTL],…]] [--network=NETWORK] [--port-name=PORT_NAME] [--protocol=PROTOCOL] [--[no-]request-coalescing] [--resource-manager-tags=[KEY=VALUE,…]] [--serve-while-stale=SERVE_WHILE_STALE] [--service-bindings=SERVICE_BINDING,[…]] [--service-lb-policy=SERVICE_LOAD_BALANCING_POLICY] [--session-affinity=SESSION_AFFINITY] [--signed-url-cache-max-age=SIGNED_URL_CACHE_MAX_AGE] [--subsetting-policy=SUBSETTING_POLICY; default="NONE"] [--timeout=TIMEOUT; default="30s"] [--tls-settings=[authenticationConfig=AUTHENTICATIONCONFIG],[sni=SNI]] [--tracking-mode=TRACKING_MODE] [--zonal-affinity-spillover=ZONAL_AFFINITY_SPILLOVER] [--zonal-affinity-spillover-ratio=ZONAL_AFFINITY_SPILLOVER_RATIO] [--cache-key-query-string-blacklist=[QUERY_STRING,…] | --cache-key-query-string-whitelist=QUERY_STRING,[…]] [--custom-metrics=[CUSTOM_METRICS,…] | --custom-metrics-file=[CUSTOM_METRICS,…]] [--global | --region=REGION] [--global-health-checks | --health-checks-region=HEALTH_CHECKS_REGION] [GCLOUD_WIDE_FLAG …]
gcloud compute backend-services create creates a backend service
for a Google Cloud load balancer or Traffic Director. A backend service defines
how to distribute traffic to backends. Depending on the load balancing scheme of
the backend service, backends can be instance groups (managed or unmanaged),
zonal network endpoint groups (zonal NEGs), serverless NEGs, or an internet NEG.
For more information, see the backend
services overview.
After you create a backend service, you add backends by using gcloud
compute backend-services add-backend or gcloud compute
backend-services edit.
BACKEND_SERVICE_NAME--affinity-cookie-name=AFFINITY_COOKIE_NAME--session-affinity is set to HTTP_COOKIE or
STRONG_COOKIE_AFFINITY, this flag sets the name of the cookie.
--affinity-cookie-path=AFFINITY_COOKIE_PATH--session-affinity is set to HTTP_COOKIE or
STRONG_COOKIE_AFFINITY, this flag sets the path of the cookie.
--affinity-cookie-ttl=AFFINITY_COOKIE_TTL--session-affinity is set to GENERATED_COOKIE,
HTTP_COOKIE, or STRONG_COOKIE_AFFINITY, this flag sets
the TTL, in seconds, of the resulting cookie. A setting of 0 indicates that the
cookie should be a session cookie. See $ gcloud topic datetimes for
information on duration formats.
--bypass-cache-on-request-headers=BYPASS_CACHE_ON_REQUEST_HEADERSThe cache is bypassed for all cdnPolicy.cacheMode settings.
Note that requests that include these headers will always fill from origin, and may result in a large number of cache misses if the specified headers are common to many requests.
Values are case-insensitive.
The header name must be a valid HTTP header field token (per RFC 7230).
For the list of restricted headers, see the list of required header name properties in How custom headers work.
A header name must not appear more than once in the list of added headers.--cache-key-include-host--no-cache-key-include-host to disable.
--cache-key-include-http-header=[HEADER_FIELD_NAME,…]--cache-key-include-named-cookie=[NAMED_COOKIE,…]--cache-key-include-protocol--no-cache-key-include-protocol to disable.
--cache-key-include-query-string--no-cache-key-include-query-string to disable.
--cache-mode=CACHE_MODECACHE_MODE must be one of:
CACHE_ALL_STATICFORCE_CACHE_ALLUSE_ORIGIN_HEADERS--client-ttl=CLIENT_TTLThis allows you to set a shorter TTL for browsers/clients, and to have those clients revalidate content against Cloud CDN on a more regular basis, without requiring revalidation at the origin.
The value of clientTtl cannot be set to a value greater than that of maxTtl, but can be equal.
Any cacheable response has its max-age/s-maxage directives adjusted down to the client TTL value if necessary; an Expires header will be replaced with a suitable max-age directive.
The maximum allowed value is 31,622,400s (1 year).
When creating a new backend with CACHE_ALL_STATIC and the field is unset, or when switching to that mode and the field is unset, a default value of 3600 is used.
When the cache mode is set to "USE_ORIGIN_HEADERS", you must omit this field.--compression-mode=COMPRESSION_MODECOMPRESSION_MODE must be one of: DISABLED,
AUTOMATIC.
--connection-drain-on-failover--connection-draining-timeout=CONNECTION_DRAINING_TIMEOUT--connection-persistence-on-unhealthy-backends=CONNECTION_PERSISTENCE_ON_UNHEALTHY_BACKENDSCONNECTION_PERSISTENCE_ON_UNHEALTHY_BACKENDS must be one
of: DEFAULT_FOR_PROTOCOL, NEVER_PERSIST,
ALWAYS_PERSIST.
--custom-request-header=CUSTOM_REQUEST_HEADERgcloud compute backend-services create NAME --custom-request-header "header-name: value" --custom-request-header "another-header:"--custom-response-header=CUSTOM_RESPONSE_HEADER--default-ttl=DEFAULT_TTLThe default value is 3600s for cache modes that allow a default TTL to be defined.
The value of defaultTtl cannot be set to a value greater than that of maxTtl, but can be equal.
When the cacheMode is set to FORCE_CACHE_ALL, the defaultTtl overwrites the TTL set in all responses.
A TTL of "0" means Always revalidate.
The maximum allowed value is 31,622,400s (1 year). Infrequently accessed objects may be evicted from the cache before the defined TTL.
When creating a new backend with CACHE_ALL_STATIC or FORCE_CACHE_ALL and the field is unset, or when updating an existing backend to use these modes and the field is unset, a default value of 3600 is used. When the cache mode is set to "USE_ORIGIN_HEADERS", you must omit this field.--description=DESCRIPTION--drop-traffic-if-unhealthy--[no-]enable-cdn--enable-cdn to enable and --no-enable-cdn to disable.
--[no-]enable-logging--enable-logging to enable and
--no-enable-logging to disable.
--[no-]enable-strong-affinity--enable-strong-affinity to
enable and --no-enable-strong-affinity to disable.
--failover-ratio=FAILOVER_RATIO--health-checks=HEALTH_CHECK,[…]--http-health-checks=HTTP_HEALTH_CHECK,[…]--https-health-checks=HTTPS_HEALTH_CHECK,[…]--iap=disabled|enabled,[oauth2-client-id=OAUTH2-CLIENT-ID,oauth2-client-secret=OAUTH2-CLIENT-SECRET]enabled or disabled (default).
If enabled, you can provide values for oauth2-client-id and
oauth2-client-secret. For example,
--iap=enabled,oauth2-client-id=foo,oauth2-client-secret=bar turns
IAP on, and --iap=disabled turns it off. For more information, see
https://cloud.google.com/iap/.
--idle-timeout-sec=IDLE_TIMEOUT_SEC--ip-address-selection-policy=IP_ADDRESS_SELECTION_POLICYCan only be set if load balancing scheme is INTERNAL_SELF_MANAGED, INTERNAL_MANAGED or EXTERNAL_MANAGED.
The possible values are:
IPV4_ONLY Only send IPv4 traffic to the backends of the backend service, regardless of traffic from the client to the proxy. Only IPv4 health checks are used to check the health of the backends.
PREFER_IPV6 Prioritize the connection to the endpoint's IPv6 address over its IPv4 address (provided there is a healthy IPv6 address).
IPV6_ONLY Only send IPv6 traffic to the backends of the backend service, regardless of traffic from the client to the proxy. Only IPv6 health checks are used to check the health of the backends.
IP_ADDRESS_SELECTION_POLICY must be one of:
IPV4_ONLY, PREFER_IPV6, IPV6_ONLY.
--load-balancing-scheme=LOAD_BALANCING_SCHEME; default="EXTERNAL"LOAD_BALANCING_SCHEME must be one of:
INTERNAL, EXTERNAL,
INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED,
INTERNAL_MANAGED.
--locality-lb-policy=LOCALITY_LB_POLICYLOCALITY_LB_POLICY must be one of:
INVALID_LB_POLICY, ROUND_ROBIN,
LEAST_REQUEST, RING_HASH, RANDOM,
ORIGINAL_DESTINATION, MAGLEV,
WEIGHTED_MAGLEV, WEIGHTED_ROUND_ROBIN,
WEIGHTED_GCP_RENDEZVOUS.
--logging-http-request-headers=[LOGGING_HTTP_REQUEST_HEADERS,…]--logging-http-response-headers=[LOGGING_HTTP_RESPONSE_HEADERS,…]--logging-optional=LOGGING_OPTIONALLOGGING_OPTIONAL must be one of:
EXCLUDE_ALL_OPTIONAL, INCLUDE_ALL_OPTIONAL,
CUSTOM.
--logging-optional-fields=[LOGGING_OPTIONAL_FIELDS,…]--logging-sample-rate=LOGGING_SAMPLE_RATE--max-ttl=MAX_TTLThe default value is 86400 for cache modes that support a max TTL.
Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTtl seconds in the future, are capped at the value of maxTtl, as if it were the value of an s-maxage Cache-Control directive.
A TTL of "0" means Always revalidate.
The maximum allowed value is 31,622,400s (1 year). Infrequently accessed objects may be evicted from the cache before the defined TTL.
When creating a new backend with CACHE_ALL_STATIC and the field is unset, or when updating an existing backend to use these modes and the field is unset, a default value of 86400 is used. When the cache mode is set to "USE_ORIGIN_HEADERS" or "FORCE_CACHE_ALL", you must omit this field.--[no-]negative-cachingNegative caching applies to a set of 3xx, 4xx, and 5xx status codes that are typically useful to cache.
Status codes not listed here cannot have their TTL explicitly set and aren't cached, in order to avoid cache poisoning attacks.
HTTP success codes (HTTP 2xx) are handled by the values of defaultTtl and maxTtl.
When the cache mode is set to CACHE_ALL_STATIC or USE_ORIGIN_HEADERS, these
values apply to responses with the specified response code that lack any
cache-control or expires headers.
When the cache mode is set to FORCE_CACHE_ALL, these values apply to all responses with the specified response code, and override any caching headers.
Cloud CDN applies the following default TTLs to these status codes:
These defaults can be overridden in cdnPolicy.negativeCachingPolicy.
Use--negative-caching to enable and
--no-negative-caching to disable.
--negative-caching-policy=[[CODE=TTL],…]NegativeCaching must be enabled to config the negativeCachingPolicy.
If you omit the policy and leave negativeCaching enabled, Cloud CDN's default cache TTLs are used.
Note that when specifying an explicit negative caching policy, make sure that you specify a cache TTL for all response codes that you want to cache. Cloud CDN doesn't apply any default negative caching when a policy exists.
CODE is the HTTP status code to define a TTL against. Only HTTP
status codes 300, 301, 308, 404, 405, 410, 421, 451, and 501 can be specified as
values, and you cannot specify a status code more than once.
CODE. The maximum allowed value is 1800s (30 minutes),
noting that infrequently accessed objects may be evicted from the cache before
the defined TTL.
--network=NETWORK--port-name=PORT_NAMEEach instance group backend exports one or more named ports, which map a user-configurable name to a port number. The backend service's named port subscribes to one named port on each instance group. The resolved port number can differ among instance group backends, based on each instance group's named port list.
When omitted, a backend service subscribes to a named port called http.
The named port for a backend service is either ignored or cannot be set for these load balancing configurations:
--protocol=PROTOCOL
If the load-balancing-scheme is INTERNAL (Internal
passthrough Network Load Balancer), the protocol must be one of: TCP, UDP,
UNSPECIFIED.
If the load-balancing-scheme is INTERNAL_SELF_MANAGED
(Traffic Director), the protocol must be one of: HTTP, HTTPS, HTTP2, GRPC, H2C.
If the load-balancing-scheme is INTERNAL_MANAGED
(Internal Application Load Balancer), the protocol must be one of: HTTP, HTTPS,
HTTP2, H2C.
If the load-balancing-scheme is INTERNAL_MANAGED
(Internal proxy Network Load Balancer), the protocol must be only TCP.
If the load-balancing-scheme is EXTERNAL and
region is not set (Classic Application Load Balancer and Classic
proxy Network Load Balancer), the protocol must be one of: HTTP, HTTPS, HTTP2,
TCP, SSL.
If the load-balancing-scheme is EXTERNAL and
region is set (External passthrough Network Load Balancer), the
protocol must be one of: TCP, UDP, UNSPECIFIED.
If the load-balancing-scheme is EXTERNAL_MANAGED
(Global external Application Load Balancer and regional external Application
Load Balancer), the protocol must be one of: HTTP, HTTPS, HTTP2, H2C.
If the load-balancing-scheme is EXTERNAL_MANAGED
(Global external proxy Network Load Balancer), the protocol must be one of: TCP,
SSL.
load-balancing-scheme is EXTERNAL_MANAGED
(Regional external proxy Network Load Balancer), the protocol must be only TCP.
--[no-]request-coalescingRequest coalescing (or collapsing) combines multiple concurrent cache fill requests into a small number of requests to the origin. This can improve performance by putting less load on the origin and backend infrastructure. However, coalescing adds a small amount of latency when multiple requests to the same URL are processed, so for latency-critical applications it may not be desirable.
Defaults to true.
Use--request-coalescing to enable and
--no-request-coalescing to disable.
--resource-manager-tags=[KEY=VALUE,…]--serve-while-stale=SERVE_WHILE_STALEThis setting defines the default serve-stale duration for any cached responses that do not specify a stale-while-revalidate directive. Stale responses that exceed the TTL configured here will not be served without first being revalidated with the origin. The default limit is 86400s (1 day), which will allow stale content to be served up to this limit beyond the max-age (or s-max-age) of a cached response.
The maximum allowed value is 604800 (1 week).
Set this to zero (0) to disable serve-while-stale.--service-bindings=SERVICE_BINDING,[…]--service-lb-policy=SERVICE_LOAD_BALANCING_POLICY--session-affinity=SESSION_AFFINITYSESSION_AFFINITY must be one of:
CLIENT_IPCLIENT_IP_NO_DESTINATIONCLIENT_IP_PORT_PROTO--load-balancing-scheme is INTERNAL)
Connections from the same client IP with the same IP protocol and port will go
to the same backend VM while that VM remains healthy.
CLIENT_IP_PROTO--load-balancing-scheme is INTERNAL)
Connections from the same client IP with the same IP protocol will go to the
same backend VM while that VM remains healthy.
GENERATED_COOKIE--load-balancing-scheme is
INTERNAL_MANAGED, INTERNAL_SELF_MANAGED,
EXTERNAL_MANAGED, or EXTERNAL) If the
--load-balancing-scheme is EXTERNAL or
EXTERNAL_MANAGED, routes requests to backend VMs or endpoints in a
NEG, based on the contents of the GCLB cookie set by the load
balancer. Only applicable when --protocol is HTTP, HTTPS,HTTP2 or
H2C. If the --load-balancing-scheme is
INTERNAL_MANAGED or INTERNAL_SELF_MANAGED, routes
requests to backend VMs or endpoints in a NEG, based on the contents of the
GCILB cookie set by the proxy. (If no cookie is present, the proxy
chooses a backend VM or endpoint and sends a Set-Cookie response
for future requests.) If the --load-balancing-scheme is
INTERNAL_SELF_MANAGED, routes requests to backend VMs or endpoints
in a NEG, based on the contents of a cookie set by Traffic Director. This
session affinity is only valid if the load balancing locality policy is either
RING_HASH or MAGLEV.
HEADER_FIELD--load-balancing-scheme is
INTERNAL_MANAGED, EXTERNAL_MANAGED, or
INTERNAL_SELF_MANAGED) Route requests to backend VMs or endpoints
in a NEG based on the value of the HTTP header named in the
--custom-request-header flag. This session affinity is only valid
if the load balancing locality policy is either RING_HASH or
MAGLEV and the backend service's consistent hash specifies the name
of the HTTP header.
HTTP_COOKIE--load-balancing-scheme is
INTERNAL_MANAGED, EXTERNAL_MANAGED or
INTERNAL_SELF_MANAGED) Route requests to backend VMs or endpoints
in a NEG, based on an HTTP cookie in the --affinity-cookie-name
flag (with the optional --affinity-cookie-ttl flag). If the client
has not provided the cookie, the proxy generates the cookie and returns it to
the client in a Set-Cookie header. This session affinity is only
valid if the load balancing locality policy is either RING_HASH or
MAGLEV and the backend service's consistent hash specifies the HTTP
cookie.
NONESTRONG_COOKIE_AFFINITY--load-balancing-scheme is
INTERNAL_MANAGED or EXTERNAL_MANAGED) Strong
cookie-based affinity, based on an HTTP cookie named in the
--affinity-cookie-name flag (with the optional
--affinity-cookie-ttl flag). Connections bearing the same cookie
will be served by the same backend VM while that VM remains healthy, as long as
the cookie has not expired. If the --affinity-cookie-ttl flag is
set to 0, the cookie will be treated as a session cookie.
--signed-url-cache-max-age=SIGNED_URL_CACHE_MAX_AGECache-Control: public, max-age=[TTL] header,
regardless of any existing Cache-Control header. The actual headers served in
responses will not be altered. If unspecified, the default value is 3600s.
For example, specifying 12h will cause the responses to signed URL
requests to be cached in the CDN up to 12 hours. See $ gcloud topic datetimes for
information on duration formats.
--subsetting-policy=SUBSETTING_POLICY; default="NONE"SUBSETTING_POLICY must be one of: NONE,
CONSISTENT_HASH_SUBSETTING.
--timeout=TIMEOUT; default="30s"load-balancing-scheme set to INTERNAL) and
external passthrough Network Load Balancers
(global not set and
load-balancing-scheme set to EXTERNAL),
timeout is ignored.
If the is HTTP, HTTPS, HTTP2 or
H2C, protocol is a request/response timeout
for HTTP(S) traffic, meaning the amount of time that the load balancer waits for
a backend to return a full response to a request. If WebSockets traffic is
supported, the timeout parameter sets the
maximum amount of time that a WebSocket can be open (idle or not).
timeout
For example, for HTTP, HTTPS, HTTP2 or H2C traffic, specifying a
of 10s means that backends have 10
seconds to respond to the load balancer's requests. The load balancer retries
the HTTP GET request one time if the backend closes the connection or times out
before sending response headers to the load balancer. If the backend sends
response headers or if the request sent to the backend is not an HTTP GET
request, the load balancer does not retry. If the backend does not reply at all,
the load balancer returns a 502 Bad Gateway error to the client.
timeout
If the is SSL or TCP,
protocol is an idle timeout.
timeout
--tls-settings=[authenticationConfig=AUTHENTICATIONCONFIG],[sni=SNI]--tracking-mode=TRACKING_MODETRACKING_MODE must be one of:
PER_CONNECTION, PER_SESSION.
--zonal-affinity-spillover=ZONAL_AFFINITY_SPILLOVERCan only be set if load balancing scheme is INTERNAL,
The possible values are:
ZONAL_AFFINITY_DISABLED Default Value. Zonal Affinity is disabled. The load balancer distributes new connections to all healthy backend VMs across all zones.
ZONAL_AFFINITY_STAY_WITHIN_ZONE Zonal Affinity is enabled. The load balancer distributes new connections to all healthy backend VMs in the client VM's zone only. If there are no healthy backend VMs in the client VM's zone, the load balancer distributes new connections to all backend VMs in the client VM's zone.
ZONAL_AFFINITY_SPILL_CROSS_ZONE Zonal Affinity is enabled. The load balancer distributes new connections to all healthy backend VMs in the client VM's zone only. If there aren't enough healthy backend VMs in the client VM's zone, the load balancer distributes some new connections to backend VMs in zones other than the client VM's zone. This distribution depends on a configurable spillover ratio that determines when traffic starts spilling over to backend VMs in other zones.
ZONAL_AFFINITY_SPILLOVER must be one of:
ZONAL_AFFINITY_DISABLED,
ZONAL_AFFINITY_STAY_WITHIN_ZONE,
ZONAL_AFFINITY_SPILL_CROSS_ZONE.
--zonal-affinity-spillover-ratio=ZONAL_AFFINITY_SPILLOVER_RATIOThis ratio indicates the threshold value for keeping traffic in the client VM's zone. If the proportion of healthy backend VMs in a zone falls below the configured spillover ratio, some new connections from the client VM are distributed to healthy backend VMs in zones other than the client VM's zone.
For further details, refer to How ZONAL_AFFINITY_SPILL_CROSS_ZONE and spillover ratio work. At most one of these can be specified:--cache-key-query-string-blacklist=[QUERY_STRING,…]--cache-key-query-string-whitelist=QUERY_STRING,[…]--custom-metrics=[CUSTOM_METRICS,…]Example:
gcloud compute backend-services create --custom-metrics='name=my-signal,dryRun=true'gcloud compute backend-services create --custom-metrics='name=my-signal,dryRun=true' --custom-metrics='name=my-signal2'gcloud compute backend-services create --custom-metrics='[{"name" : "my-signal", "dryRun" : true},{"name" : "my-signal2"}]'
Sets custom_metrics value.
dryRundryRun value.
namename value.
Shorthand Example:
--custom-metrics=dryRun=boolean,name=string --custom-metrics=dryRun=boolean,name=string
JSON Example:
--custom-metrics='[{"dryRun": boolean, "name": "string"}]'
File Example:
--custom-metrics=path_to_file.(yaml|json)
--custom-metrics-file=[CUSTOM_METRICS,…]Example:
gcloud compute backend-services create --custom-metrics-file='customMetric.json'
Sets custom_metrics_file value.
dryRundryRun value.
namename value.
Shorthand Example:
--custom-metrics-file=dryRun=boolean,name=string --custom-metrics-file=dryRun=boolean,name=string
JSON Example:
--custom-metrics-file='[{"dryRun": boolean, "name": "string"}]'
File Example:
--custom-metrics-file=path_to_file.(yaml|json)
--global--region=REGIONcompute/region property value for this command invocation.
--global-health-checks--health-checks-region=HEALTH_CHECKS_REGION
To avoid prompting when this flag is omitted, you can set the
property:
compute/region
gcloud config set compute/region REGIONA list of regions can be fetched by running:
gcloud compute regions listTo unset the property, run:
gcloud config unset compute/regionCLOUDSDK_COMPUTE_REGION.
--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 help for details.
gcloud alpha compute backend-services creategcloud beta compute backend-services creategcloud preview compute backend-services create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-07-21 UTC.