1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-20 13:10:18 +00:00

gcloud: Tue Mar 1 21:43:54 UTC 2022

This commit is contained in:
Automated 2022-03-01 21:43:54 +00:00
parent c1c3b75313
commit 21878eea72
1018 changed files with 4838 additions and 3409 deletions

View file

@ -77,15 +77,15 @@ EXAMPLES
To run the gcr.io/google-containers/busybox image on an instance named
'instance-1' that executes 'echo "Hello world"' as a run command, run:
$ gcloud alpha compute instances create-with-container instance-1 \
--container-image=gcr.io/google-containers/busybox \
--container-command='echo "Hello world"'
$ gcloud alpha compute instances create-with-container instance-1 \
--container-image=gcr.io/google-containers/busybox \
--container-command='echo "Hello world"'
To run the gcr.io/google-containers/busybox image in privileged mode, run:
$ gcloud alpha compute instances create-with-container instance-1 \
--container-image=gcr.io/google-containers/busybox
--container-privileged
$ gcloud alpha compute instances create-with-container instance-1 \
--container-image=gcr.io/google-containers/busybox \
--container-privileged
POSITIONAL ARGUMENTS
INSTANCE_NAMES [INSTANCE_NAMES ...]

View file

@ -20,7 +20,8 @@ EXAMPLES
To get the effective firewalls of instance with name example-instance, run:
$ gcloud alpha compute instances network-interfaces \
get-effective-firewalls example-instance,
get-effective-firewalls example-instance
To show all fields of the firewall rules, please show in JSON format with
option --format=json

View file

@ -37,43 +37,39 @@ EXAMPLES
installed, run:
$ gcloud alpha compute instances os-inventory list-instances \
--package-name="google-cloud-sdk" \
--package-version="235.0.0-0"
--package-name="google-cloud-sdk" --package-version="235.0.0-0"
To list all instances with package name matching a regex ^google-cloud
available for update through apt, run:
$ gcloud alpha compute instances os-inventory list-instances \
--inventory-filter="\
PackageUpdates.apt[].Name~^google-cloud*"
--inventory-filter="PackageUpdates.apt[].Name~^google-cloud*"
To list all instances with package update google-cloud-sdk of version
greater than or equal to 235.0.0-0 available through apt, run:
$ gcloud alpha compute instances os-inventory list-instances \
--inventory-filter="\
PackageUpdates.apt[].['google-cloud-sdk'].Version>=235.0.0-0"
--inventory-filter="PackageUpdates.apt[].['google-cloud-sdk'].Ve\
rsion>=235.0.0-0"
To list all instances missing the Stackdriver monitoring package
stackdriver-agent, run:
$ gcloud alpha compute instances os-inventory list-instances \
--inventory-filter="\
NOT(InstalledPackages:stackdriver-agent)"
--inventory-filter="NOT(InstalledPackages:stackdriver-agent)"
To list all Windows instances with an installed qfe hotfix whose ID equals
KB4462930, run:
$ gcloud alpha compute instances os-inventory list-instances \
--inventory-filter="\
InstalledPackages.qfe[].HotFixID=KB4462930"
--inventory-filter="InstalledPackages.qfe[].HotFixID=KB4462930"
To list all Windows instances with a wua update whose description contains
the word Security, run:
$ gcloud alpha compute instances os-inventory list-instances \
--inventory-filter="\
InstalledPackages.wua[].Description:Security"
--inventory-filter="InstalledPackages.wua[].Description:Security\
"
FLAGS
--inventory-filter=INVENTORY_FILTER

View file

@ -11,8 +11,11 @@ DESCRIPTION
EXAMPLES
The following command reads an IAM policy defined in a JSON file
policy.json and sets it for the instance 'my-instance' and zone 'ZONE': $ gcloud alpha compute instances set-iam-policy my-instance \
policy.json and sets it for the instance 'my-instance' and zone 'ZONE':
$ gcloud alpha compute instances set-iam-policy my-instance \
--zone=ZONE policy.json
See https://cloud.google.com/iam/docs/managing-policies for details of
policy role and member types.

View file

@ -20,7 +20,7 @@ DESCRIPTION
EXAMPLES
To set instance to be terminated during maintenance, run:
$ gcloud alpha compute instances set-scheduling example-instance \
$ gcloud alpha compute instances set-scheduling example-instance \
--maintenance-policy=TERMINATE --zone=us-central1-b
POSITIONAL ARGUMENTS

View file

@ -21,7 +21,7 @@ EXAMPLES
To update network interface of an instance to 'nic0', run:
$ gcloud alpha compute instances update-access-config \
example-instance --network-interface=nic0 --zone=us-central1-b
example-instance --network-interface=nic0 --zone=us-central1-b
POSITIONAL ARGUMENTS
INSTANCE_NAME

View file

@ -40,14 +40,14 @@ EXAMPLES
To run the gcr.io/google-containers/busybox image on an instance named
'instance-1' that executes 'echo "Hello world"' as a run command, run:
$ gcloud alpha compute instances update-container instance-1 \
--container-image=gcr.io/google-containers/busybox \
$ gcloud alpha compute instances update-container instance-1 \
--container-image=gcr.io/google-containers/busybox \
--container-command='echo "Hello world"'
To run the gcr.io/google-containers/busybox image in privileged mode, run:
$ gcloud alpha compute instances update-container instance-1 \
--container-image=gcr.io/google-containers/busybox \
$ gcloud alpha compute instances update-container instance-1 \
--container-image=gcr.io/google-containers/busybox \
--container-privileged
POSITIONAL ARGUMENTS