HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/396/help/man/man1/gcloud_alpha_compute_routers_nats_update.1
.TH "GCLOUD_ALPHA_COMPUTE_ROUTERS_NATS_UPDATE" 1



.SH "NAME"
.HP
gcloud alpha compute routers nats update \- update a NAT on a Compute Engine router



.SH "SYNOPSIS"
.HP
\f5gcloud alpha compute routers nats update\fR \fINAME\fR \fB\-\-router\fR=\fIROUTER\fR [\fB\-\-async\fR] [\fB\-\-auto\-network\-tier\fR=\fIAUTO_NETWORK_TIER\fR] [\fB\-\-[no\-]enable\-dynamic\-port\-allocation\fR] [\fB\-\-enable\-endpoint\-independent\-mapping\fR] [\fB\-\-enable\-logging\fR] [\fB\-\-log\-filter\fR=\fILOG_FILTER\fR] [\fB\-\-region\fR=\fIREGION\fR] [\fB\-\-rules\fR=\fIRULES\fR] [\fB\-\-auto\-allocate\-nat\-external\-ips\fR\ |\ \fB\-\-nat\-external\-ip\-pool\fR=\fIIP_ADDRESS\fR,[\fIIP_ADDRESS\fR,...]] [\fB\-\-clear\-icmp\-idle\-timeout\fR\ |\ \fB\-\-icmp\-idle\-timeout\fR=\fIICMP_IDLE_TIMEOUT\fR] [\fB\-\-clear\-max\-ports\-per\-vm\fR\ |\ \fB\-\-max\-ports\-per\-vm\fR=\fIMAX_PORTS_PER_VM\fR] [\fB\-\-clear\-min\-ports\-per\-vm\fR\ |\ \fB\-\-min\-ports\-per\-vm\fR=\fIMIN_PORTS_PER_VM\fR] [\fB\-\-clear\-nat\-external\-drain\-ip\-pool\fR\ |\ \fB\-\-nat\-external\-drain\-ip\-pool\fR=\fINAT_EXTERNAL_DRAIN_IP_POOL\fR,[...]] [\fB\-\-clear\-nat\-subnet\-ip\-ranges\fR\ |\ \fB\-\-nat\-all\-subnet\-ip\-ranges\fR\ |\ \fB\-\-nat\-custom\-subnet\-ip\-ranges\fR=\fISUBNETWORK\fR[:\fIRANGE_NAME\fR|:\fIALL\fR],[...]\ |\ \fB\-\-nat\-primary\-subnet\-ip\-ranges\fR] [\fB\-\-clear\-nat64\-subnet\-ip\-ranges\fR\ |\ \fB\-\-nat64\-all\-v6\-subnet\-ip\-ranges\fR\ |\ \fB\-\-nat64\-custom\-v6\-subnet\-ip\-ranges\fR=\fISUBNETWORK\fR,[\fISUBNETWORK\fR,...]] [\fB\-\-clear\-tcp\-established\-idle\-timeout\fR\ |\ \fB\-\-tcp\-established\-idle\-timeout\fR=\fITCP_ESTABLISHED_IDLE_TIMEOUT\fR] [\fB\-\-clear\-tcp\-time\-wait\-timeout\fR\ |\ \fB\-\-tcp\-time\-wait\-timeout\fR=\fITCP_TIME_WAIT_TIMEOUT\fR] [\fB\-\-clear\-tcp\-transitory\-idle\-timeout\fR\ |\ \fB\-\-tcp\-transitory\-idle\-timeout\fR=\fITCP_TRANSITORY_IDLE_TIMEOUT\fR] [\fB\-\-clear\-udp\-idle\-timeout\fR\ |\ \fB\-\-udp\-idle\-timeout\fR=\fIUDP_IDLE_TIMEOUT\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

\fB(ALPHA)\fR \fBgcloud alpha compute routers nats update\fR is used to update a
NAT in a Compute Engine router.



.SH "EXAMPLES"

Change subnetworks and IP address resources associated with NAT:

.RS 2m
$ gcloud alpha compute routers nats update nat1 \-\-router=my\-router \e
    \-\-nat\-external\-ip\-pool=ip\-address2,ip\-address3 \e
    \-\-nat\-custom\-subnet\-ip\-ranges=subnet\-2,\e
subnet\-3:secondary\-range\-2
.RE

Change minimum default ports allocated per VM associated with NAT:

.RS 2m
$ gcloud alpha compute routers nats update nat1 \-\-router=my\-router \e
    \-\-min\-ports\-per\-vm=128
.RE

Change connection timeouts associated with NAT:

.RS 2m
$ gcloud alpha compute routers nats update nat1 \-\-router=my\-router \e
    \-\-udp\-idle\-timeout=60s \-\-icmp\-idle\-timeout=60s \e
    \-\-tcp\-established\-idle\-timeout=60s \e
    \-\-tcp\-transitory\-idle\-timeout=60s
.RE

Reset connection timeouts associated NAT to default values:

.RS 2m
$ gcloud alpha compute routers nats update nat1 \-\-router=my\-router \e
    \-\-clear\-udp\-idle\-timeout \-\-clear\-icmp\-idle\-timeout \e
    \-\-clear\-tcp\-established\-idle\-timeout \e
    \-\-clear\-tcp\-transitory\-idle\-timeout
.RE



.SH "POSITIONAL ARGUMENTS"

.RS 2m
.TP 2m
\fINAME\fR

Name of the NAT to create


.RE
.sp

.SH "REQUIRED FLAGS"

.RS 2m
.TP 2m
\fB\-\-router\fR=\fIROUTER\fR

Router to use for NAT.


.RE
.sp

.SH "OPTIONAL FLAGS"

.RS 2m
.TP 2m
\fB\-\-async\fR

Return immediately, without waiting for the operation in progress to complete.

.TP 2m
\fB\-\-auto\-network\-tier\fR=\fIAUTO_NETWORK_TIER\fR

Network tier to use when automatically reserving NAT IP addresses.
\fIAUTO_NETWORK_TIER\fR must be one of:

.RS 2m
.TP 2m
\fBPREMIUM\fR
High quality, Google\-grade network tier with support for all networking
products.
.TP 2m
\fBSTANDARD\fR
Public internet quality, with only limited support for other networking
products.
.RE
.sp


.TP 2m
\fB\-\-[no\-]enable\-dynamic\-port\-allocation\fR

Enable dynamic port allocation.

If not specified, Dynamic Port Allocation is disabled by default.

Use \fB\-\-enable\-dynamic\-port\-allocation\fR to enable and
\fB\-\-no\-enable\-dynamic\-port\-allocation\fR to disable.

.TP 2m
\fB\-\-enable\-endpoint\-independent\-mapping\fR

Enable endpoint\-independent mapping for the NAT (as defined in RFC 5128).

If not specified, NATs have endpoint\-independent mapping disabled by default.

Use \f5\-\-no\-enable\-endpoint\-independent\-mapping\fR to disable
endpoint\-independent mapping.

.TP 2m
\fB\-\-enable\-logging\fR

Enable logging for the NAT. Logs will be exported to Stackdriver. NAT logging is
disabled by default. To disable logging for the NAT, use $ gcloud alpha compute
routers nats update MY\-NAT \e \-\-no\-enable\-logging \-\-router ROUTER
\-\-region REGION

.TP 2m
\fB\-\-log\-filter\fR=\fILOG_FILTER\fR

Filter for logs exported to stackdriver.

The default is ALL.

If logging is not enabled, filter settings will be persisted but will have no
effect.

Use \-\-[no\-]enable\-logging to enable and disable logging.

\fILOG_FILTER\fR must be one of:

.RS 2m
.TP 2m
\fBALL\fR
Export logs for all connections handled by this NAT.
.TP 2m
\fBERRORS_ONLY\fR
Export logs for connection failures only.
.TP 2m
\fBTRANSLATIONS_ONLY\fR
Export logs for successful connections only.
.RE
.sp


.TP 2m
\fB\-\-region\fR=\fIREGION\fR

Region of the NAT to create. If not specified, you might be prompted to select a
region (interactive mode only).

To avoid prompting when this flag is omitted, you can set the
\f5\fIcompute/region\fR\fR property:

.RS 2m
$ gcloud config set compute/region REGION
.RE

A list of regions can be fetched by running:

.RS 2m
$ gcloud compute regions list
.RE

To unset the property, run:

.RS 2m
$ gcloud config unset compute/region
.RE

Alternatively, the region can be stored in the environment variable
\f5\fICLOUDSDK_COMPUTE_REGION\fR\fR.

.TP 2m
\fB\-\-rules\fR=\fIRULES\fR

Path to YAML file containing NAT Rules applied to the NAT. The YAML file format
must follow the REST API schema for NAT Rules. See API Discovery docs
(https://www.googleapis.com/discovery/v1/apis/compute/alpha/rest) for reference.

.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-auto\-allocate\-nat\-external\-ips\fR

Automatically allocate external IP addresses for Cloud NAT

.TP 2m
\fB\-\-nat\-external\-ip\-pool\fR=\fIIP_ADDRESS\fR,[\fIIP_ADDRESS\fR,...]

External IP Addresses to use for Cloud NAT

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-icmp\-idle\-timeout\fR

Clear timeout for ICMP connections

.TP 2m
\fB\-\-icmp\-idle\-timeout\fR=\fIICMP_IDLE_TIMEOUT\fR

Timeout for ICMP connections. See
https://cloud.google.com/sdk/gcloud/reference/topic/datetimes for information on
duration formats.

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-max\-ports\-per\-vm\fR

Clear maximum ports to be allocated to a VM

.TP 2m
\fB\-\-max\-ports\-per\-vm\fR=\fIMAX_PORTS_PER_VM\fR

Maximum ports to be allocated to a VM.

This field can only be set when Dynamic Port Allocation is enabled and defaults
to 65536. It must be set to a power of 2 that is greater than minPortsPerVm and
at most 65536.

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-min\-ports\-per\-vm\fR

Clear minimum ports to be allocated to a VM

.TP 2m
\fB\-\-min\-ports\-per\-vm\fR=\fIMIN_PORTS_PER_VM\fR

Minimum ports to be allocated to a VM.

If Dynamic Port Allocation is disabled, this defaults to 64.

If Dynamic Port Allocation is enabled, this defaults to 32 and must be set to a
power of 2 that is at least 32 and lower than maxPortsPerVm.

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-nat\-external\-drain\-ip\-pool\fR

Clear the drained NAT IPs

.TP 2m
\fB\-\-nat\-external\-drain\-ip\-pool\fR=\fINAT_EXTERNAL_DRAIN_IP_POOL\fR,[...]

External IP Addresses to be drained

These IPs must be valid external IPs that have been used as NAT IPs

.RE
.sp
.TP 2m

Options for IPv4 subnetwork ranges.

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-nat\-subnet\-ip\-ranges\fR

Clear IPv4 subnetwork ranges.

.TP 2m
\fB\-\-nat\-all\-subnet\-ip\-ranges\fR

Allow all IP ranges of all subnetworks in the region, including primary and
secondary ranges, to use NAT.

.TP 2m
\fB\-\-nat\-custom\-subnet\-ip\-ranges\fR=\fISUBNETWORK\fR[:\fIRANGE_NAME\fR|:\fIALL\fR],[...]

List of subnetwork primary and secondary IP ranges to be allowed to use NAT.

.RS 2m
.IP "\(bu" 2m
\f5SUBNETWORK:ALL\fR \- specifying a subnetwork name with ALL includes the
primary range and all secondary ranges of the subnet.
.IP "\(bu" 2m
\f5SUBNETWORK\fR \- including a subnetwork name includes only the primary subnet
range of the subnetwork.
.IP "\(bu" 2m
\f5SUBNETWORK:RANGE_NAME\fR \- specifying a subnetwork and secondary range name
includes only that secondary range. It does not include the primary range of the
subnet.
.RE
.sp

.TP 2m
\fB\-\-nat\-primary\-subnet\-ip\-ranges\fR

Allow only primary IP ranges of all subnetworks in the region to use NAT.

.RE
.sp
.TP 2m

Options for IPv6 subnetwork ranges.

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-nat64\-subnet\-ip\-ranges\fR

Clear IPv6 subnetwork ranges.

.TP 2m
\fB\-\-nat64\-all\-v6\-subnet\-ip\-ranges\fR

Allow all IPv6 subnetwork ranges in the region to use NAT.

.TP 2m
\fB\-\-nat64\-custom\-v6\-subnet\-ip\-ranges\fR=\fISUBNETWORK\fR,[\fISUBNETWORK\fR,...]

List of subnetworks with IPv6 ranges to be allowed to use NAT.

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-tcp\-established\-idle\-timeout\fR

Clear timeout for TCP established connections

.TP 2m
\fB\-\-tcp\-established\-idle\-timeout\fR=\fITCP_ESTABLISHED_IDLE_TIMEOUT\fR

Timeout for TCP established connections. See
https://cloud.google.com/sdk/gcloud/reference/topic/datetimes for information on
duration formats.

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-tcp\-time\-wait\-timeout\fR

Clear timeout for TCP connections in the TIME_WAIT state

.TP 2m
\fB\-\-tcp\-time\-wait\-timeout\fR=\fITCP_TIME_WAIT_TIMEOUT\fR

Timeout for TCP connections in the TIME_WAIT state. See
https://cloud.google.com/sdk/gcloud/reference/topic/datetimes for information on
duration formats.

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-tcp\-transitory\-idle\-timeout\fR

Clear timeout for TCP transitory connections

.TP 2m
\fB\-\-tcp\-transitory\-idle\-timeout\fR=\fITCP_TRANSITORY_IDLE_TIMEOUT\fR

Timeout for TCP transitory connections. See
https://cloud.google.com/sdk/gcloud/reference/topic/datetimes for information on
duration formats.

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-udp\-idle\-timeout\fR

Clear timeout for UDP connections

.TP 2m
\fB\-\-udp\-idle\-timeout\fR=\fIUDP_IDLE_TIMEOUT\fR

Timeout for UDP connections. See
https://cloud.google.com/sdk/gcloud/reference/topic/datetimes for information on
duration formats.


.RE
.RE
.sp

.SH "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 \fB$ gcloud help\fR for details.



.SH "API REFERENCE"

This command, when specified without alpha or beta, uses the compute/v1/routers
API. The full documentation for this API can be found at:
https://cloud.google.com/compute/docs/reference/rest/v1/routers/

The beta command uses the compute/beta/routers API. The full documentation for
this API can be found at:
https://cloud.google.com/compute/docs/reference/rest/beta/routers/

The alpha command uses the compute/alpha/routers API. Full documentation is not
available for the alpha API.



.SH "NOTES"

This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct project,
you might be trying to access an API with an invitation\-only early access
allowlist. These variants are also available:

.RS 2m
$ gcloud compute routers nats update
.RE

.RS 2m
$ gcloud beta compute routers nats update
.RE