File: //snap/google-cloud-cli/current/help/man/man1/gcloud_beta_compute_disks_update.1
.TH "GCLOUD_BETA_COMPUTE_DISKS_UPDATE" 1
.SH "NAME"
.HP
gcloud beta compute disks update \- update a Compute Engine persistent disk
.SH "SYNOPSIS"
.HP
\f5gcloud beta compute disks update\fR \fIDISK_NAME\fR [\fB\-\-access\-mode\fR=\fIACCESS_MODE\fR] [\fB\-\-provisioned\-iops\fR=\fIPROVISIONED_IOPS\fR] [\fB\-\-provisioned\-throughput\fR=\fIPROVISIONED_THROUGHPUT\fR] [\fB\-\-size\fR=\fISIZE\fR] [\fB\-\-update\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-append\-licenses\fR=\fILICENSE\fR,[\fILICENSE\fR,...]\ \fB\-\-remove\-licenses\fR=\fILICENSE\fR,[\fILICENSE\fR,...]\ \fB\-\-replace\-license\fR=\fILICENSE\fR,\fILICENSE\fR] [\fB\-\-clear\-architecture\fR\ |\ \fB\-\-update\-architecture\fR=\fIUPDATE_ARCHITECTURE\fR] [\fB\-\-clear\-labels\fR\ |\ \fB\-\-remove\-labels\fR=[\fIKEY\fR,...]] [\fB\-\-clear\-user\-licenses\fR\ |\ \fB\-\-update\-user\-licenses\fR=[\fILICENSE\fR,...]] [\fB\-\-region\fR=\fIREGION\fR\ |\ \fB\-\-zone\fR=\fIZONE\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fB(BETA)\fR \fBgcloud beta compute disks update\fR updates a Compute Engine
persistent disk.
.SH "EXAMPLES"
To update labels 'k0' and 'k1' and remove label 'k3' of a disk, run:
.RS 2m
$ gcloud beta compute disks update example\-disk \e
\-\-zone=us\-central1\-a \-\-update\-labels=k0=value1,k1=value2 \e
\-\-remove\-labels=k3
.RE
.RS 2m
`_k0_` and `_k1_` are added as new labels if not already present.
.RE
Labels can be used to identify the disk. To list disks with the 'k1:value2'
label, run:
.RS 2m
$ gcloud beta compute disks list \-\-filter='labels.k1:value2'
.RE
To list only the labels when describing a resource, use \-\-format to filter the
result:
.RS 2m
$ gcloud beta compute disks describe example\-disk \e
\-\-format="default(labels)"
.RE
To append licenses to the disk, run:
.RS 2m
$ gcloud beta compute disks update example\-disk \e
\-\-zone=us\-central1\-a \e
\-\-append\-licenses=projects/license\-project/global/licenses/\e
license\-1,projects/license\-project/global/licenses/license\-2
.RE
To remove licenses from the disk, run:
.RS 2m
$ gcloud beta compute disks update example\-disk \e
\-\-zone=us\-central1\-a \e
\-\-replace\-licenses=projects/license\-project/global/licenses/\e
license\-1,projects/license\-project/global/licenses/license\-2
.RE
To replace a license on the disk, run:
.RS 2m
$ gcloud beta compute disks update example\-disk \e
\-\-zone=us\-central1\-a \e
\-\-replace\-license=projects/license\-project/global/licenses/\e
old\-license,projects/license\-project/global/licenses/new\-license
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
\fIDISK_NAME\fR
Name of the disk to update.
.RE
.sp
.SH "FLAGS"
.RS 2m
.TP 2m
\fB\-\-access\-mode\fR=\fIACCESS_MODE\fR
Specifies how VMs attached to the disk can access the data on the disk. To grant
read\-only access to multiple VMs attached to the disk, set access\-mode to
READ_ONLY_MANY. To grant read\-write access to only one VM attached to the disk,
use READ_WRITE_SINGLE. READ_WRITE_SINGLE is used if omitted. \fIACCESS_MODE\fR
must be one of: \fBREAD_ONLY_MANY\fR, \fBREAD_WRITE_MANY\fR,
\fBREAD_WRITE_SINGLE\fR.
.TP 2m
\fB\-\-provisioned\-iops\fR=\fIPROVISIONED_IOPS\fR
Provisioned IOPS of disk to update. Only for use with disks of type
hyperdisk\-extreme.
.TP 2m
\fB\-\-provisioned\-throughput\fR=\fIPROVISIONED_THROUGHPUT\fR
Provisioned throughput of disk to update. The throughput unit is MB per sec.
.TP 2m
\fB\-\-size\fR=\fISIZE\fR
Size of the disks. The value must be a whole number followed by a size unit of
\f5\fIGB\fR\fR for gigabyte, or \f5\fITB\fR\fR for terabyte. If no size unit is
specified, GB is assumed. For details about disk size limits, refer to:
https://cloud.google.com/compute/docs/disks
.TP 2m
\fB\-\-update\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]
List of label KEY=VALUE pairs to update. If a label exists, its value is
modified. Otherwise, a new label is created.
Keys must start with a lowercase character and contain only hyphens (\f5\-\fR),
underscores (\f5_\fR), lowercase characters, and numbers. Values must contain
only hyphens (\f5\-\fR), underscores (\f5_\fR), lowercase characters, and
numbers.
.TP 2m
\fB\-\-append\-licenses\fR=\fILICENSE\fR,[\fILICENSE\fR,...]
"A list of license URIs or license codes. These licenses will be appended to the
existing licenses on the disk. Provided licenses can be either license URIs or
license codes but not a mix of both.
.TP 2m
\fB\-\-remove\-licenses\fR=\fILICENSE\fR,[\fILICENSE\fR,...]
A list of license URIs or license codes. If present in the set of existing
licenses, these licenses will be removed. If not present, this is a no\-op.
Provided licenses can be either license URIs or license codes but not a mix of
both.
.TP 2m
\fB\-\-replace\-license\fR=\fILICENSE\fR,\fILICENSE\fR
A list of license URIs or license codes. The first license is the license to be
replaced and the second license is the replacement license. Provided licenses
can be either license URIs or license codes but not a mix of both.
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-clear\-architecture\fR
Removes the architecture or processor type annotation from the disk.
.TP 2m
\fB\-\-update\-architecture\fR=\fIUPDATE_ARCHITECTURE\fR
Updates the architecture or processor type that this disk can support. For
available processor types on Compute Engine, see
https://cloud.google.com/compute/docs/cpu\-platforms. \fIUPDATE_ARCHITECTURE\fR
must be one of: \fBARM64\fR, \fBX86_64\fR.
.RE
.sp
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-clear\-labels\fR
Remove all labels. If \f5\-\-update\-labels\fR is also specified then
\f5\-\-clear\-labels\fR is applied first.
For example, to remove all labels:
.RS 2m
$ gcloud beta compute disks update \-\-clear\-labels
.RE
To remove all existing labels and create two new labels, \f5\fIfoo\fR\fR and
\f5\fIbaz\fR\fR:
.RS 2m
$ gcloud beta compute disks update \-\-clear\-labels \e
\-\-update\-labels foo=bar,baz=qux
.RE
.TP 2m
\fB\-\-remove\-labels\fR=[\fIKEY\fR,...]
List of label keys to remove. If a label does not exist it is silently ignored.
If \f5\-\-update\-labels\fR is also specified then \f5\-\-update\-labels\fR is
applied first.
.RE
.sp
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-clear\-user\-licenses\fR
Remove all existing user licenses on a disk.
.TP 2m
\fB\-\-update\-user\-licenses\fR=[\fILICENSE\fR,...]
List of user licenses to be updated on a disk. These user licenses will replace
all existing user licenses. If this flag is not provided, all existing user
licenses will remain unchanged.
.RE
.sp
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-region\fR=\fIREGION\fR
Region of the disk to update. 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\-\-zone\fR=\fIZONE\fR
Zone of the disk to update. If not specified and the \f5\fIcompute/zone\fR\fR
property isn't set, you might be prompted to select a zone (interactive mode
only).
To avoid prompting when this flag is omitted, you can set the
\f5\fIcompute/zone\fR\fR property:
.RS 2m
$ gcloud config set compute/zone ZONE
.RE
A list of zones can be fetched by running:
.RS 2m
$ gcloud compute zones list
.RE
To unset the property, run:
.RS 2m
$ gcloud config unset compute/zone
.RE
Alternatively, the zone can be stored in the environment variable
\f5\fICLOUDSDK_COMPUTE_ZONE\fR\fR.
.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 "NOTES"
This command is currently in beta and might change without notice. These
variants are also available:
.RS 2m
$ gcloud compute disks update
.RE
.RS 2m
$ gcloud alpha compute disks update
.RE