mirror of
https://github.com/imjasonh/gcloud-help
synced 2026-07-19 07:15:23 +00:00
gcloud: Wed Dec 6 10:10:36 UTC 2023
This commit is contained in:
parent
d3074f94bb
commit
f36750d203
469 changed files with 9617 additions and 1400 deletions
|
|
@ -1,14 +1,14 @@
|
|||
NAME
|
||||
gcloud compute addresses describe - display detailed information about an
|
||||
address
|
||||
gcloud compute addresses describe - display detailed information about a
|
||||
reserved static address
|
||||
|
||||
SYNOPSIS
|
||||
gcloud compute addresses describe NAME [--global | --region=REGION]
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
gcloud compute addresses describe displays all data associated with an
|
||||
address in a project.
|
||||
gcloud compute addresses describe displays all data associated with a
|
||||
reserved static address in a project.
|
||||
|
||||
EXAMPLES
|
||||
To get details about a global address, run:
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ COMMANDS
|
|||
Release reserved IP addresses.
|
||||
|
||||
describe
|
||||
Display detailed information about an address.
|
||||
Display detailed information about a reserved static address.
|
||||
|
||||
list
|
||||
List addresses.
|
||||
|
|
|
|||
|
|
@ -9,10 +9,22 @@ SYNOPSIS
|
|||
DESCRIPTION
|
||||
gcloud compute instances stop is used to stop a Compute Engine virtual
|
||||
machine. Stopping a VM performs a clean shutdown, much like invoking the
|
||||
shutdown functionality of a workstation or laptop. Stopping a VM with a
|
||||
local SSD is not supported and will result in an API error unless the
|
||||
--discard-local-ssd flag is passed. Stopping a VM which is already stopped
|
||||
will return without errors.
|
||||
shutdown functionality of a workstation or laptop.
|
||||
|
||||
If a VM has any attached Local SSD disks, you must use the
|
||||
--discard-local-ssd flag to indicate whether or not the Local SSD data
|
||||
should be discarded. To stop the VM and preserve the Local SSD data when
|
||||
you stop the VM by setting --discard-local-ssd=False.
|
||||
|
||||
To stop the VM and discard the Local SSD data, specify
|
||||
--discard-local-ssd=True.
|
||||
|
||||
Preserving the Local SSD disk data incurs costs and is subject to
|
||||
limitations. See
|
||||
https://cloud.google.com/compute/docs/disks/local-ssd#stop_instance for
|
||||
more information.
|
||||
|
||||
Stopping a VM which is already stopped will return without errors.
|
||||
|
||||
EXAMPLES
|
||||
To stop an instance named test-instance, run:
|
||||
|
|
|
|||
|
|
@ -17,8 +17,17 @@ DESCRIPTION
|
|||
Note: A suspended instance can be resumed by running the gcloud compute
|
||||
instances resume command.
|
||||
|
||||
Limitations: See this feature's restrictions at
|
||||
https://cloud.google.com/compute/docs/instances/suspend-resume-instance#limitations
|
||||
If a VM has any attached Local SSD disks, you can preserve the Local SSD
|
||||
data when you suspend the VM by setting --discard-local-ssd=False.
|
||||
Preserving the Local SSD disk data incurs costs and is subject to
|
||||
limitations.
|
||||
|
||||
Limitations:
|
||||
|
||||
▪ Limitations for suspending a VM:
|
||||
https://cloud.google.com/compute/docs/instances/suspend-resume-instance#limitations
|
||||
▪ Limitations for preserving Local SSD data:
|
||||
https://cloud.google.com/compute/docs/disks/local-ssd#stop_instance
|
||||
|
||||
EXAMPLES
|
||||
To suspend an instance named test-instance, run:
|
||||
|
|
@ -30,7 +39,7 @@ EXAMPLES
|
|||
$ gcloud compute instances suspend test-instance \
|
||||
--discard-local-ssd=True
|
||||
|
||||
Using '--discard-local-ssd' without a value defaults to True.
|
||||
Using --discard-local-ssd without a value defaults to True.
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
INSTANCE_NAMES [INSTANCE_NAMES ...]
|
||||
|
|
|
|||
|
|
@ -98,16 +98,16 @@ FLAGS
|
|||
Default port, network, and subnet are not effective for serverless
|
||||
endpoints.
|
||||
|
||||
private-service-connect
|
||||
The network endpoint corresponds to a service outside the VPC,
|
||||
accessed via Private Service Connect.
|
||||
|
||||
gce-vm-ip
|
||||
Endpoint must be the IP address of a VM's network interface in
|
||||
Compute Engine. Instance reference is required. The IP address is
|
||||
optional. If unspecified, the primary NIC address is used. A port
|
||||
must not be specified.
|
||||
|
||||
private-service-connect
|
||||
The network endpoint corresponds to a service outside the VPC,
|
||||
accessed via Private Service Connect.
|
||||
|
||||
NETWORK_ENDPOINT_TYPE must be one of: gce-vm-ip-port,
|
||||
internet-ip-port, internet-fqdn-port, non-gcp-private-ip-port,
|
||||
serverless, gce-vm-ip, private-service-connect.
|
||||
|
|
|
|||
|
|
@ -108,6 +108,8 @@ OPTIONAL FLAGS
|
|||
Reserved for Internal HTTP(S) Load Balancing.
|
||||
PRIVATE
|
||||
Regular user created or automatically created subnet.
|
||||
PRIVATE_NAT
|
||||
Reserved for use as source range for Private NAT.
|
||||
PRIVATE_SERVICE_CONNECT
|
||||
Reserved for Private Service Connect Internal Load Balancing.
|
||||
REGIONAL_MANAGED_PROXY
|
||||
|
|
|
|||
|
|
@ -3,10 +3,8 @@ NAME
|
|||
|
||||
SYNOPSIS
|
||||
gcloud compute routers nats create NAME --router=ROUTER
|
||||
(--auto-allocate-nat-external-ips
|
||||
| --nat-external-ip-pool=IP_ADDRESS,[IP_ADDRESS,...])
|
||||
(--nat-all-subnet-ip-ranges
|
||||
| --nat-custom-subnet-ip-ranges=SUBNETWORK[:RANGE_NAME],[...]
|
||||
| --nat-custom-subnet-ip-ranges=SUBNETWORK[:RANGE_NAME|:ALL],[...]
|
||||
| --nat-primary-subnet-ip-ranges) [--async]
|
||||
[--auto-network-tier=AUTO_NETWORK_TIER]
|
||||
[--[no-]enable-dynamic-port-allocation]
|
||||
|
|
@ -18,7 +16,10 @@ SYNOPSIS
|
|||
[--tcp-established-idle-timeout=TCP_ESTABLISHED_IDLE_TIMEOUT]
|
||||
[--tcp-time-wait-timeout=TCP_TIME_WAIT_TIMEOUT]
|
||||
[--tcp-transitory-idle-timeout=TCP_TRANSITORY_IDLE_TIMEOUT]
|
||||
[--udp-idle-timeout=UDP_IDLE_TIMEOUT] [GCLOUD_WIDE_FLAG ...]
|
||||
[--type=TYPE] [--udp-idle-timeout=UDP_IDLE_TIMEOUT]
|
||||
[--auto-allocate-nat-external-ips
|
||||
| --nat-external-ip-pool=IP_ADDRESS,[IP_ADDRESS,...]]
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
gcloud compute routers nats create is used to create a NAT on a Compute
|
||||
|
|
@ -55,24 +56,18 @@ REQUIRED FLAGS
|
|||
--router=ROUTER
|
||||
The Router to use for NAT.
|
||||
|
||||
Exactly one of these must 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 Cloud NAT
|
||||
|
||||
Exactly one of these must 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],[...]
|
||||
--nat-custom-subnet-ip-ranges=SUBNETWORK[:RANGE_NAME|:ALL],[...]
|
||||
List of subnetwork primary and secondary IP ranges to be allowed to
|
||||
use NAT.
|
||||
|
||||
▸ SUBNETWORK:ALL - specifying a subnetwork name with ALL includes
|
||||
the primary range and all secondary ranges of the subnet.
|
||||
▸ SUBNETWORK - including a subnetwork name includes only the
|
||||
primary subnet range of the subnetwork.
|
||||
▸ SUBNETWORK:RANGE_NAME - specifying a subnetwork and secondary
|
||||
|
|
@ -221,11 +216,30 @@ OPTIONAL FLAGS
|
|||
https://cloud.google.com/sdk/gcloud/reference/topic/datetimes for
|
||||
information on duration formats.
|
||||
|
||||
--type=TYPE
|
||||
Type of the NAT Gateway. Defaults to PUBLIC if not specified. TYPE must
|
||||
be one of:
|
||||
|
||||
PRIVATE
|
||||
Used for private-to-private NAT translations. Allows communication
|
||||
between VPC Networks.
|
||||
PUBLIC
|
||||
Used for private-to-public NAT translations. Allows VM instances to
|
||||
communicate with the internet.
|
||||
|
||||
--udp-idle-timeout=UDP_IDLE_TIMEOUT
|
||||
Timeout for UDP connections. See
|
||||
https://cloud.google.com/sdk/gcloud/reference/topic/datetimes for
|
||||
information on duration formats.
|
||||
|
||||
At most one of these can 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 Cloud NAT
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --access-token-file, --account,
|
||||
--billing-project, --configuration, --flags-file, --flatten, --format,
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ NAME
|
|||
|
||||
SYNOPSIS
|
||||
gcloud compute routers nats rules create RULE_NUMBER --match=MATCH
|
||||
--nat=NAT --router=ROUTER
|
||||
--source-nat-active-ips=IP_ADDRESS,[IP_ADDRESS,...] [--async]
|
||||
[--region=REGION] [GCLOUD_WIDE_FLAG ...]
|
||||
--nat=NAT --router=ROUTER [--async] [--region=REGION]
|
||||
[--source-nat-active-ips=IP_ADDRESS,[IP_ADDRESS,...]]
|
||||
[--source-nat-active-ranges=SUBNETWORK,[SUBNETWORK,...]]
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
gcloud compute routers nats rules create is used to create a Rule on a
|
||||
|
|
@ -28,27 +29,29 @@ POSITIONAL ARGUMENTS
|
|||
REQUIRED FLAGS
|
||||
--match=MATCH
|
||||
CEL Expression used to identify traffic to which this rule applies.
|
||||
◆ Supported attributes: destination.ip
|
||||
◆ Supported operators: ||, ==
|
||||
◆ Supported methods: inIpRange
|
||||
|
||||
Examples of allowed Match expressions:
|
||||
◆ Supported attributes (Public NAT): destination.ip
|
||||
◆ Supported attributes (Private NAT): nexthop.hub
|
||||
◆ Supported methods (Public Nat): inIpRange
|
||||
◆ Supported operators (Public NAT): ||, ==
|
||||
◆ Supported operators (Private NAT): ==
|
||||
|
||||
Examples of allowed Match expressions (Public NAT):
|
||||
◆ 'inIpRange(destination.ip, "203.0.113.0/24")''
|
||||
◆ 'destination.ip == "203.0.113.7"'
|
||||
◆ 'destination.ip == "203.0.113.7" || inIpRange(destination.ip,
|
||||
"203.0.113.16/25")'
|
||||
|
||||
Example of allowed Match expression (Private NAT):
|
||||
◆ nexthop.hub ==
|
||||
"//networkconnectivity.googleapis.com/projects/p1/locations/global/hubs/h1"
|
||||
|
||||
--nat=NAT
|
||||
Name of the NAT that contains the Rule
|
||||
|
||||
--router=ROUTER
|
||||
The Router to use for NAT.
|
||||
|
||||
--source-nat-active-ips=IP_ADDRESS,[IP_ADDRESS,...]
|
||||
External IP Addresses to use for connections matching this rule.
|
||||
|
||||
These must be valid reserved external IPs in the same region.
|
||||
|
||||
OPTIONAL FLAGS
|
||||
--async
|
||||
Return immediately, without waiting for the operation in progress to
|
||||
|
|
@ -74,6 +77,21 @@ OPTIONAL FLAGS
|
|||
Alternatively, the region can be stored in the environment variable
|
||||
CLOUDSDK_COMPUTE_REGION.
|
||||
|
||||
--source-nat-active-ips=IP_ADDRESS,[IP_ADDRESS,...]
|
||||
External IP Addresses to use for connections matching this rule. This
|
||||
flag is supported only for Public NAT and is required when creating a
|
||||
Public NAT gateway.
|
||||
|
||||
These must be valid reserved external IP addresses in the same region.
|
||||
|
||||
--source-nat-active-ranges=SUBNETWORK,[SUBNETWORK,...]
|
||||
Subnetworks from which addresses are used for connections matching this
|
||||
rule. This flag is supported only for Private NAT and is required when
|
||||
creating a Private NAT gateway.
|
||||
|
||||
These must be subnetwork resources in the same region, with purpose set
|
||||
to PRIVATE_NAT.
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --access-token-file, --account,
|
||||
--billing-project, --configuration, --flags-file, --flatten, --format,
|
||||
|
|
|
|||
|
|
@ -6,8 +6,11 @@ SYNOPSIS
|
|||
gcloud compute routers nats rules update RULE_NUMBER --nat=NAT
|
||||
--router=ROUTER [--async] [--match=MATCH] [--region=REGION]
|
||||
[--source-nat-active-ips=IP_ADDRESS,[IP_ADDRESS,...]]
|
||||
[--source-nat-active-ranges=SUBNETWORK,[SUBNETWORK,...]]
|
||||
[--clear-source-nat-drain-ips
|
||||
| --source-nat-drain-ips=IP_ADDRESS,[IP_ADDRESS,...]]
|
||||
[--clear-source-nat-drain-ranges
|
||||
| --source-nat-drain-ranges=SUBNETWORK,[SUBNETWORK,...]]
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
|
|
@ -41,16 +44,23 @@ OPTIONAL FLAGS
|
|||
|
||||
--match=MATCH
|
||||
CEL Expression used to identify traffic to which this rule applies.
|
||||
◆ Supported attributes: destination.ip
|
||||
◆ Supported operators: ||, ==
|
||||
◆ Supported methods: inIpRange
|
||||
|
||||
Examples of allowed Match expressions:
|
||||
◆ Supported attributes (Public NAT): destination.ip
|
||||
◆ Supported attributes (Private NAT): nexthop.hub
|
||||
◆ Supported methods (Public Nat): inIpRange
|
||||
◆ Supported operators (Public NAT): ||, ==
|
||||
◆ Supported operators (Private NAT): ==
|
||||
|
||||
Examples of allowed Match expressions (Public NAT):
|
||||
◆ 'inIpRange(destination.ip, "203.0.113.0/24")''
|
||||
◆ 'destination.ip == "203.0.113.7"'
|
||||
◆ 'destination.ip == "203.0.113.7" || inIpRange(destination.ip,
|
||||
"203.0.113.16/25")'
|
||||
|
||||
Example of allowed Match expression (Private NAT):
|
||||
◆ nexthop.hub ==
|
||||
"//networkconnectivity.googleapis.com/projects/p1/locations/global/hubs/h1"
|
||||
|
||||
--region=REGION
|
||||
Region of the NAT containing the Rule to update. If not specified, you
|
||||
might be prompted to select a region (interactive mode only).
|
||||
|
|
@ -72,14 +82,24 @@ OPTIONAL FLAGS
|
|||
CLOUDSDK_COMPUTE_REGION.
|
||||
|
||||
--source-nat-active-ips=IP_ADDRESS,[IP_ADDRESS,...]
|
||||
External IP Addresses to use for connections matching this rule.
|
||||
External IP Addresses to use for connections matching this rule. This
|
||||
flag is supported only for Public NAT and is required when creating a
|
||||
Public NAT gateway.
|
||||
|
||||
These must be valid reserved external IPs in the same region.
|
||||
These must be valid reserved external IP addresses in the same region.
|
||||
|
||||
--source-nat-active-ranges=SUBNETWORK,[SUBNETWORK,...]
|
||||
Subnetworks from which addresses are used for connections matching this
|
||||
rule. This flag is supported only for Private NAT and is required when
|
||||
creating a Private NAT gateway.
|
||||
|
||||
These must be subnetwork resources in the same region, with purpose set
|
||||
to PRIVATE_NAT.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-source-nat-drain-ips
|
||||
Clear drained IPs from the Rule
|
||||
Clear drained IPs from the rule
|
||||
|
||||
--source-nat-drain-ips=IP_ADDRESS,[IP_ADDRESS,...]
|
||||
External IP Addresses to drain connections on.
|
||||
|
|
@ -87,6 +107,17 @@ OPTIONAL FLAGS
|
|||
These must be external IPs previously used as active IPs on this
|
||||
rule. No new connections will be established using these IPs.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-source-nat-drain-ranges
|
||||
Clear drained ranges from the rule
|
||||
|
||||
--source-nat-drain-ranges=SUBNETWORK,[SUBNETWORK,...]
|
||||
Subnetwork ranges to drain connections on.
|
||||
|
||||
These must be subnetworks previously used as active ranges on this
|
||||
rule. No new connections will be established using these ranges.
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --access-token-file, --account,
|
||||
--billing-project, --configuration, --flags-file, --flatten, --format,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ SYNOPSIS
|
|||
| --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-custom-subnet-ip-ranges=SUBNETWORK[:RANGE_NAME|:ALL],[...]
|
||||
| --nat-primary-subnet-ip-ranges] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
|
|
@ -252,10 +252,12 @@ OPTIONAL FLAGS
|
|||
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],[...]
|
||||
--nat-custom-subnet-ip-ranges=SUBNETWORK[:RANGE_NAME|:ALL],[...]
|
||||
List of subnetwork primary and secondary IP ranges to be allowed to
|
||||
use NAT.
|
||||
|
||||
▸ SUBNETWORK:ALL - specifying a subnetwork name with ALL includes
|
||||
the primary range and all secondary ranges of the subnet.
|
||||
▸ SUBNETWORK - including a subnetwork name includes only the
|
||||
primary subnet range of the subnetwork.
|
||||
▸ SUBNETWORK:RANGE_NAME - specifying a subnetwork and secondary
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ SYNOPSIS
|
|||
[--log-level=LOG_LEVEL]
|
||||
[--network-ddos-protection=NETWORK_DDOS_PROTECTION]
|
||||
[--recaptcha-redirect-site-key=RECAPTCHA_REDIRECT_SITE_KEY]
|
||||
[--user-ip-request-headers=[USER_IP_REQUEST_HEADER,...]]
|
||||
[--global | --region=REGION] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
|
|
@ -63,6 +64,10 @@ FLAGS
|
|||
The reCAPTCHA site key to be used for rules using the redirect action
|
||||
and the google-recaptcha redirect type under the security policy.
|
||||
|
||||
--user-ip-request-headers=[USER_IP_REQUEST_HEADER,...]
|
||||
A comma-separated list of request header names to use for resolving the
|
||||
caller's user IP address.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--global
|
||||
|
|
|
|||
|
|
@ -7,7 +7,10 @@ SYNOPSIS
|
|||
[--internal-ips] [--update-labels=[KEY=VALUE,...]]
|
||||
[--attach-disk=[SOURCE=DATA_DISK,...] | --detach-disk=DATA_DISK]
|
||||
[--clear-labels | --remove-labels=[KEY,...]]
|
||||
[--clear-tags | --remove-tags=[TAG,...]] [GCLOUD_WIDE_FLAG ...]
|
||||
[--clear-tags | --remove-tags=[TAG,...]]
|
||||
[--metadata-from-file=[KEY=VALUE,...]
|
||||
| --update-metadata=[KEY=VALUE,...] --clear-metadata
|
||||
| --remove-metadata=[KEY,...]] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
Update a Cloud TPU VM node.
|
||||
|
|
@ -176,6 +179,38 @@ FLAGS
|
|||
ignored. If --add-tags is also specified then --add-tags is applied
|
||||
first.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--metadata-from-file=[KEY=VALUE,...]
|
||||
Same as --metadata except the value for the entry will be read from a
|
||||
local file. Example: --metadata-from-file='key1=value1.txt'
|
||||
|
||||
--update-metadata=[KEY=VALUE,...]
|
||||
List of comma-separated metadata key-value pairs for the Cloud TPU VM
|
||||
node. If a key exists, its value is modified. Otherwise, a new
|
||||
key-value pair is created.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-metadata
|
||||
Remove all metadata. If --update-metadata is also specified then
|
||||
--clear-metadata is applied first.
|
||||
|
||||
For example, to remove all metadata:
|
||||
|
||||
$ gcloud compute tpus tpu-vm update --clear-metadata
|
||||
|
||||
To remove all existing metadata and create two new metadata
|
||||
key-value pairs, 'foo=bar' and 'baz=qux':
|
||||
|
||||
$ gcloud compute tpus tpu-vm update --clear-metadata \
|
||||
--update-metadata foo=bar,baz=qux
|
||||
|
||||
--remove-metadata=[KEY,...]
|
||||
List of comma-separated metadata keys to remove. If a key does not
|
||||
exist it is silently ignored. If --update-metadata is also
|
||||
specified then --update-metadata is applied first.
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --access-token-file, --account,
|
||||
--billing-project, --configuration, --flags-file, --flatten, --format,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue