gcloud beta compute health-checks update tcp Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud beta compute health-checks update tcp - update a TCP health check
- SYNOPSIS
gcloud beta compute health-checks update tcpNAME[--check-interval=CHECK_INTERVAL][--description=DESCRIPTION][--enable-logging][--healthy-threshold=HEALTHY_THRESHOLD][--proxy-header=PROXY_HEADER][--request=REQUEST][--response=RESPONSE][--source-regions=REGION,…,[…]][--timeout=TIMEOUT][--unhealthy-threshold=UNHEALTHY_THRESHOLD][--global|--region=REGION][--port=PORT--port-name=PORT_NAME--use-serving-port][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(BETA)gcloud beta compute health-checks update tcpisused to update an existing TCP health check. Only arguments passed in will beupdated on the health check. Other attributes will remain unaffected.- POSITIONAL ARGUMENTS
NAME- Name of the TCP health check to update.
- FLAGS
--check-interval=CHECK_INTERVAL- How often to perform a health check for an instance. For example, specifying
will run the check every 10 seconds.See $gcloud topic datetimesfor information on duration formats.10s --description=DESCRIPTION- A textual description for the TCP health check. Pass in an empty string tounset.
--enable-logging- Enable logging of health check probe results to Stackdriver. Logging is disabledby default.
Use --no-enable-logging to disable logging.
--healthy-threshold=HEALTHY_THRESHOLD- The number of consecutive successful health checks before an unhealthy instanceis marked as healthy.
--proxy-header=PROXY_HEADER- The type of proxy protocol header to be sent to the backend.
PROXY_HEADERmust be one of:NONE- No proxy header is added.
PROXY_V1- Adds the header "PROXY UNKNOWN\r\n".
--request=REQUEST- An optional string of up to 1024 characters to send once the health check TCPconnection has been established. The health checker then looks for a reply ofthe string provided in the
--responsefield.If
--responseis not configured, the health checker does not waitfor a response and regards the probe as successful if the TCP or SSL handshakewas successful.Setting this to an empty string will clear any existing request value.
--response=RESPONSE- An optional string of up to 1024 characters that the health checker expects toreceive from the instance. If the response is not received exactly, the healthcheck probe fails. If
--responseis configured, but not--request, the health checker will wait for a response anyway.Unless your system automatically sends out a message in response to a successfulhandshake, only configure--responseto match an explicit--request. Setting this to an empty string will clear any existingresponse value. --source-regions=REGION,…,[…]- Define the list of Google Cloud regions from which health checks are performed.This option is supported only for global health checks that will be referencedby DNS routing policies. If specified, the --check-interval field should be atleast 30 seconds. The --proxy-header and --request fields (for TCP healthchecks) are not supported with this option.
If --source-regions is specified for a health check, then that health checkcannot be used by a backend service or by a managed instance group (forautohealing).
--timeout=TIMEOUT- If Google Compute Engine doesn't receive a healthy response from the instance bythe time specified by the value of this flag, the health check request isconsidered a failure. For example, specifying
will cause the check to wait for 10seconds before considering the request a failure. See $gcloud topic datetimes forinformation on duration formats.10s --unhealthy-threshold=UNHEALTHY_THRESHOLD- The number of consecutive health check failures before a healthy instance ismarked as unhealthy.
- At most one of these can be specified:
--global- If set, the TCP health check is global.
--region=REGION- Region of the TCP health check to update. If not specified, you might beprompted to select a region (interactive mode only).
To avoid prompting when this flag is omitted, you can set the
property:compute/regiongcloudconfigsetcompute/regionREGIONA list of regions can be fetched by running:
gcloudcomputeregionslistTo unset the property, run:
gcloudconfigunsetcompute/regionAlternatively, the region can be stored in the environment variable
.CLOUDSDK_COMPUTE_REGION
- These flags configure the port that the health check monitors. If both
--portand--port-nameare specified,--porttakes precedence.--port=PORT- The TCP port number that this health check monitors.
--port-name=PORT_NAME- The port name that this health check monitors. By default, this is empty.Setting this to an empty string will clear any existing port-name value.
--use-serving-port- If given, use the "serving port" for health checks:
- When health checking network endpoints in a Network Endpoint Group, use the portspecified with each endpoint.
--use-serving-portmust be used whenusing a Network Endpoint Group as a backend as this flag specifies theportSpecificationoption for a Health Check object. - When health checking other backends, use the port or named port of the backendservice.
- When health checking network endpoints in a Network Endpoint Group, use the portspecified with each endpoint.
- 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. - NOTES
- This command is currently in beta and might change without notice. Thesevariants are also available:
gcloudcomputehealth-checksupdatetcpgcloudalphacomputehealth-checksupdatetcp
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-05-07 UTC.