gcloud_alpha_compute_routers_nats_update (1)
NAME
- gcloud alpha compute routers nats update - update a NAT on a Google Compute Engine router
SYNOPSIS
-
gcloud alpha compute routers nats update NAME --router=ROUTER [--async] [--enable-logging] [--region=REGION] [--auto-allocate-nat-external-ips | --nat-external-ip-pool=IP_ADDRESS,[IP_ADDRESS,...]] [--clear-icmp-idle-timeout | --icmp-idle-timeout=ICMP_IDLE_TIMEOUT] [--clear-log-filter | --log-filter=LOG_FILTER] [--clear-min-ports-per-vm | --min-ports-per-vm=MIN_PORTS_PER_VM] [--clear-tcp-established-idle-timeout | --tcp-established-idle-timeout=TCP_ESTABLISHED_IDLE_TIMEOUT] [--clear-tcp-transitory-idle-timeout | --tcp-transitory-idle-timeout=TCP_TRANSITORY_IDLE_TIMEOUT] [--clear-udp-idle-timeout | --udp-idle-timeout=UDP_IDLE_TIMEOUT] [--nat-all-subnet-ip-ranges | --nat-custom-subnet-ip-ranges=SUBNETWORK[:RANGE_NAME],[...] | --nat-primary-subnet-ip-ranges] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) gcloud alpha compute routers nats update is used to update a
POSITIONAL ARGUMENTS
-
- NAME
-
Name of the NAT to create
REQUIRED FLAGS
-
- --router=ROUTER
-
The Router to use for NAT.
OPTIONAL FLAGS
-
- --async
-
Display information about the operation in progress, without waiting for the
operation to complete.
- --enable-logging
-
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 \ --no-enable-logging --router ROUTER
--region REGION
- --region=REGION
-
Region of the NAT to create. If not specified, you may be prompted to select a
region.
To avoid prompting when this flag is omitted, you can set the compute/region property:
- $ gcloud config set compute/region REGION
A list of regions can be fetched by running:
- $ gcloud compute regions list
To unset the property, run:
- $ gcloud config unset compute/region
Alternatively, the region can be stored in the environment variable CLOUDSDK_COMPUTE_REGION.
-
At most one of these may be specified:
-
- --auto-allocate-nat-external-ips
-
Automatically allocate external IP addresses for Cloud NAT
- --nat-external-ip-pool=IP_ADDRESS,[IP_ADDRESS,...]
-
External IP Addresses to use for NAT
-
-
At most one of these may be specified:
-
- --clear-icmp-idle-timeout
-
Clear timeout for ICMP connections
- --icmp-idle-timeout=ICMP_IDLE_TIMEOUT
-
Timeout for ICMP connections. See $ gcloud topic datetimes for information on
duration formats.
-
-
At most one of these may be specified:
-
- --clear-log-filter
-
Clear the filter for logs exported to stackdriver. Without a filter, logs (if
enabled) will be exported for all connections handled by this NAT.
- --log-filter=LOG_FILTER
-
Specify a filter for logs exported to stackdriver. This can be one of the
following: ERRORS_ONLY - export logs for connection failures only.
TRANSLATIONS_ONLY - export logs for successful connections only. Without a
filter, logs (if enabled) will be exported for all connections handled by this
NAT.
If logging is not enabled, filter settings will be persisted but will have no effect. Use --[no-]enable-logging to enable and disable logging.
To clear the filter, use $ gcloud alpha compute routers nats update MY-NAT \ --clear-log-filter --router ROUTER --region REGION
LOG_FILTER must be one of:
-
- ERRORS_ONLY
- Export logs for connection failures only.
- TRANSLATIONS_ONLY
- Export logs for successful connections only.
-
-
-
At most one of these may be specified:
-
- --clear-min-ports-per-vm
-
Clear minimum ports to be allocated to a VM
- --min-ports-per-vm=MIN_PORTS_PER_VM
-
Minimum ports to be allocated to a VM
-
-
At most one of these may be specified:
-
- --clear-tcp-established-idle-timeout
-
Clear timeout for TCP established connections
- --tcp-established-idle-timeout=TCP_ESTABLISHED_IDLE_TIMEOUT
-
Timeout for TCP established connections. See $ gcloud topic datetimes for
information on duration formats.
-
-
At most one of these may be specified:
-
- --clear-tcp-transitory-idle-timeout
-
Clear timeout for TCP transitory connections
- --tcp-transitory-idle-timeout=TCP_TRANSITORY_IDLE_TIMEOUT
-
Timeout for TCP transitory connections. See $ gcloud topic datetimes for
information on duration formats.
-
-
At most one of these may be specified:
-
- --clear-udp-idle-timeout
-
Clear timeout for UDP connections
- --udp-idle-timeout=UDP_IDLE_TIMEOUT
-
Timeout for UDP connections. See $ gcloud topic datetimes for information on
duration formats.
-
-
At most one of these may be specified:
-
- --nat-all-subnet-ip-ranges
-
Allow all IP ranges of all subnetworks in the region, including primary and
secondary ranges, to use NAT.
- --nat-custom-subnet-ip-ranges=SUBNETWORK[:RANGE_NAME],[...]
-
List of subnetwork primary and secondary IP ranges to be allowed to use NAT.
[SUBNETWORK]: including a subnetwork name includes only the primary subnet range
of the subnetwork. [SUBNETWORK]:[RANGE_NAME]: specifying a subnetwork and
secondary range name includes only that secondary range.It does not include the
primary range of the subnet.
- --nat-primary-subnet-ip-ranges
-
Allow only primary IP ranges of all subnetworks in the region to use NAT.
-
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
EXAMPLES
Change subnetworks and IP address resources associated with NAT:
-
$ gcloud alpha compute routers nats update nat1 --router=my-router
--nat-external-ip-pool=ip-address2,ip-address3
--nat-custom-subnet-ip-ranges=subnet-2,subnet-3:secondary-range-2
Change minimum default ports allocated per VM associated with NAT:
-
$ gcloud alpha compute routers nats update nat1 --router=my-router \
--min-default-ports-per-vm=128
Change connection timeouts associated with NAT:
-
$ gcloud alpha compute routers nats update nat1 --router=my-router
--udp-mapping-idle-timeout=60s
--icmp-mapping-idle-timeout=60s
--tcp-established-connection-idle-timeout=60s
--tcp-transitory-connection-idle-timeout=60s
Reset connection timeouts associated NAT to default values:
-
$ gcloud alpha compute routers nats update nat1 --router=my-router
--clear-udp-mapping-idle-timeout --clear-icmp-mapping-idle-timeout
--clear-tcp-established-connection-idle-timeout
--clear-tcp-transitory-connection-idle-timeout
NOTES
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you will have to apply for early access and have your projects registered on the API whitelist to use it. To do so, contact Support at cloud.google.com/support These variants are also available:
- $ gcloud compute routers nats update $ gcloud beta compute routers nats update