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_storage_buckets_update.1
.TH "GCLOUD_ALPHA_STORAGE_BUCKETS_UPDATE" 1



.SH "NAME"
.HP
gcloud alpha storage buckets update \- update bucket settings



.SH "SYNOPSIS"
.HP
\f5gcloud alpha storage buckets update\fR [\fIURL\fR\ ...] [\fB\-\-additional\-headers\fR=\fIHEADER\fR=\fIVALUE\fR] [\fB\-\-clear\-soft\-delete\fR] [\fB\-\-continue\-on\-error\fR,\ \fB\-c\fR] [\fB\-\-[no\-]default\-event\-based\-hold\fR] [\fB\-\-default\-storage\-class\fR=\fIDEFAULT_STORAGE_CLASS\fR] [\fB\-\-lock\-retention\-period\fR] [\fB\-\-read\-paths\-from\-stdin\fR,\ \fB\-I\fR] [\fB\-\-recovery\-point\-objective\fR=\fISETTING\fR,\ \fB\-\-rpo\fR=\fISETTING\fR] [\fB\-\-[no\-]requester\-pays\fR] [\fB\-\-soft\-delete\-duration\fR=\fISOFT_DELETE_DURATION\fR] [\fB\-\-[no\-]uniform\-bucket\-level\-access\fR] [\fB\-\-[no\-]versioning\fR] [\fB\-\-acl\-file\fR=\fIACL_FILE\fR\ \fB\-\-add\-acl\-grant\fR=[\fIACL_GRANT\fR,...]\ \fB\-\-canned\-acl\fR=\fIPREDEFINED_ACL\fR,\ \fB\-\-predefined\-acl\fR=\fIPREDEFINED_ACL\fR,\ \fB\-a\fR\ \fIPREDEFINED_ACL\fR\ \fB\-\-remove\-acl\-grant\fR=\fIREMOVE_ACL_GRANT\fR] [\fB\-\-add\-default\-object\-acl\-grant\fR=[\fIDEFAULT_OBJECT_ACL_GRANT\fR,...]\ \fB\-\-default\-object\-acl\-file\fR=\fIDEFAULT_OBJECT_ACL_FILE\fR\ \fB\-\-predefined\-default\-object\-acl\fR=\fIPREDEFINED_DEFAULT_OBJECT_ACL\fR\ \fB\-\-remove\-default\-object\-acl\-grant\fR=\fIREMOVE_DEFAULT_OBJECT_ACL_GRANT\fR] [\fB\-\-clear\-cors\fR\ |\ \fB\-\-cors\-file\fR=\fICORS_FILE\fR] [\fB\-\-clear\-default\-encryption\-key\fR\ |\ \fB\-\-default\-encryption\-key\fR=\fIDEFAULT_ENCRYPTION_KEY\fR] [\fB\-\-clear\-ip\-filter\fR\ |\ \fB\-\-ip\-filter\-file\fR=\fIIP_FILTER_FILE\fR] [\fB\-\-clear\-labels\fR\ |\ \fB\-\-labels\-file\fR=\fILABELS_FILE\fR\ |\ \fB\-\-remove\-labels\fR=[\fILABEL_KEYS\fR,...]\ \fB\-\-update\-labels\fR=[\fILABEL_KEYS_AND_VALUES\fR,...]] [\fB\-\-clear\-lifecycle\fR\ |\ \fB\-\-lifecycle\-file\fR=\fILIFECYCLE_FILE\fR] [\fB\-\-clear\-log\-bucket\fR\ |\ \fB\-\-log\-bucket\fR=\fILOG_BUCKET\fR] [\fB\-\-clear\-log\-object\-prefix\fR\ |\ \fB\-\-log\-object\-prefix\fR=\fILOG_OBJECT_PREFIX\fR] [\fB\-\-clear\-pap\fR,\ \fB\-\-clear\-public\-access\-prevention\fR\ |\ \fB\-\-[no\-]pap\fR,\ \fB\-\-[no\-]public\-access\-prevention\fR] [\fB\-\-clear\-retention\-period\fR\ |\ \fB\-\-retention\-period\fR=\fIRETENTION_PERIOD\fR] [\fB\-\-clear\-web\-error\-page\fR\ |\ \fB\-\-web\-error\-page\fR=\fIWEB_ERROR_PAGE\fR] [\fB\-\-clear\-web\-main\-page\-suffix\fR\ |\ \fB\-\-web\-main\-page\-suffix\fR=\fIWEB_MAIN_PAGE_SUFFIX\fR] [\fB\-\-autoclass\-terminal\-storage\-class\fR=\fIAUTOCLASS_TERMINAL_STORAGE_CLASS\fR\ \fB\-\-[no\-]enable\-autoclass\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

\fB(ALPHA)\fR Update a bucket.



.SH "EXAMPLES"

The following command updates the retention period of a Cloud Storage bucket
named "my\-bucket" to one year and thirty\-six minutes:

.RS 2m
$ gcloud alpha storage buckets update gs://my\-bucket \e
    \-\-retention\-period=1y36m
.RE

The following command clears the retention period of a bucket:

.RS 2m
$ gcloud alpha storage buckets update gs://my\-bucket \e
    \-\-clear\-retention\-period
.RE



.SH "POSITIONAL ARGUMENTS"

.RS 2m
.TP 2m
[\fIURL\fR ...]

Specifies the URLs of the buckets to update.


.RE
.sp

.SH "FLAGS"

.RS 2m
.TP 2m
\fB\-\-additional\-headers\fR=\fIHEADER\fR=\fIVALUE\fR

Includes arbitrary headers in storage API calls. Accepts a comma separated list
of key=value pairs, e.g. \f5header1=value1,header2=value2\fR. Overrides the
default \fBstorage/additional_headers\fR property value for this command
invocation.

.TP 2m
\fB\-\-clear\-soft\-delete\fR

Clears bucket soft delete settings. Does not affect objects already in
soft\-deleted state.

.TP 2m
\fB\-\-continue\-on\-error\fR, \fB\-c\fR

If any operations are unsuccessful, the command will exit with a non\-zero exit
status after completing the remaining operations. This flag takes effect only in
sequential execution mode (i.e. processor and thread count are set to 1).
Parallelism is default.

.TP 2m
\fB\-\-[no\-]default\-event\-based\-hold\fR

Sets the default value for an event\-based hold on the bucket. By setting the
default event\-based hold on a bucket, newly\-created objects inherit that value
as their event\-based hold (it is not applied retroactively). Use
\fB\-\-default\-event\-based\-hold\fR to enable and
\fB\-\-no\-default\-event\-based\-hold\fR to disable.

.TP 2m
\fB\-\-default\-storage\-class\fR=\fIDEFAULT_STORAGE_CLASS\fR

Sets the default storage class for the bucket.

.TP 2m
\fB\-\-lock\-retention\-period\fR

Locks an unlocked retention policy on the buckets. Caution: A locked retention
policy cannot be removed from a bucket or reduced in duration. Once locked,
deleting the bucket is the only way to "remove" a retention policy.

.TP 2m
\fB\-\-read\-paths\-from\-stdin\fR, \fB\-I\fR

Read the list of URLs from stdin.

.TP 2m
\fB\-\-recovery\-point\-objective\fR=\fISETTING\fR, \fB\-\-rpo\fR=\fISETTING\fR

Sets the recovery point objective
(https://cloud.google.com/architecture/dr\-scenarios\-planning\-guide#basics_of_dr_planning)
of a bucket. This flag can only be used with multi\-region and dual\-region
buckets. \f5DEFAULT\fR option is valid for multi\-region and dual\-regions
buckets. \f5ASYNC_TURBO\fR option is only valid for dual\-region buckets. If
unspecified when the bucket is created, it defaults to \f5DEFAULT\fR for
dual\-region and multi\-region buckets. For more information, see replication in
Cloud Storage
(https://cloud.google.com/storage/docs/availability\-durability#cross\-region\-redundancy).
\fISETTING\fR must be one of: \fBASYNC_TURBO\fR, \fBDEFAULT\fR.

.TP 2m
\fB\-\-[no\-]requester\-pays\fR

Allows you to configure a Cloud Storage bucket so that the requester pays all
costs related to accessing the bucket and its objects. Use
\fB\-\-requester\-pays\fR to enable and \fB\-\-no\-requester\-pays\fR to
disable.

.TP 2m
\fB\-\-soft\-delete\-duration\fR=\fISOFT_DELETE_DURATION\fR

Duration to retain soft\-deleted objects. For example, "2w1d" is two weeks and
one day.

.TP 2m
\fB\-\-[no\-]uniform\-bucket\-level\-access\fR

Enables or disables uniform bucket\-level access
(https://cloud.google.com/storage/docs/bucket\-policy\-only) for the buckets.
Use \fB\-\-uniform\-bucket\-level\-access\fR to enable and
\fB\-\-no\-uniform\-bucket\-level\-access\fR to disable.

.TP 2m
\fB\-\-[no\-]versioning\fR

Allows you to configure a Cloud Storage bucket to keep old versions of objects.
Use \fB\-\-versioning\fR to enable and \fB\-\-no\-versioning\fR to disable.

.TP 2m
\fB\-\-acl\-file\fR=\fIACL_FILE\fR

Path to a local JSON or YAML formatted file containing a valid policy. See the
ObjectAccessControls resource
(https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls) for a
representation of JSON formatted files. The output of \f5gcloud storage
[buckets|objects] describe\fR \f5\-\-format="multi(acl:format=json)"\fR is a
valid file and can be edited for more fine\-grained control.

.TP 2m
\fB\-\-add\-acl\-grant\fR=[\fIACL_GRANT\fR,...]

Key\-value pairs mirroring the JSON accepted by your cloud provider. For
example, for Cloud
Storage,\f5\-\-add\-acl\-grant=entity=user\-tim@gmail.com,role=OWNER\fR

.TP 2m
\fB\-\-canned\-acl\fR=\fIPREDEFINED_ACL\fR, \fB\-\-predefined\-acl\fR=\fIPREDEFINED_ACL\fR, \fB\-a\fR \fIPREDEFINED_ACL\fR

Applies predefined, or "canned," ACLs to a resource. See docs for a list of
predefined ACL constants:
https://cloud.google.com/storage/docs/access\-control/lists#predefined\-acl

.TP 2m
\fB\-\-remove\-acl\-grant\fR=\fIREMOVE_ACL_GRANT\fR

Key\-value pairs mirroring the JSON accepted by your cloud provider. For
example, for Cloud Storage, \f5\-\-remove\-acl\-grant=ENTITY\fR, where
\f5ENTITY\fR has a valid ACL entity format, such as \f5user\-tim@gmail.com\fR,
\f5group\-admins\fR, \f5allUsers\fR, etc.

.TP 2m
\fB\-\-add\-default\-object\-acl\-grant\fR=[\fIDEFAULT_OBJECT_ACL_GRANT\fR,...]

Adds default object ACL grant. See \-\-add\-acl\-grant help text for more
details.

.TP 2m
\fB\-\-default\-object\-acl\-file\fR=\fIDEFAULT_OBJECT_ACL_FILE\fR

Sets the default object ACL from file for the bucket.

.TP 2m
\fB\-\-predefined\-default\-object\-acl\fR=\fIPREDEFINED_DEFAULT_OBJECT_ACL\fR

Apply a predefined set of default object access controls tobuckets

.TP 2m
\fB\-\-remove\-default\-object\-acl\-grant\fR=\fIREMOVE_DEFAULT_OBJECT_ACL_GRANT\fR

Removes default object ACL grant. See \-\-remove\-acl\-grant help text for more
details.

.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-cors\fR

Clears the bucket's CORS settings.

.TP 2m
\fB\-\-cors\-file\fR=\fICORS_FILE\fR

Sets the Cross\-Origin Resource Sharing (CORS) configuration on a bucket. An
example CORS JSON document looks like the following:

.RS 2m
[
  {
    "origin": ["http://origin1.example.com"],
    "responseHeader": ["Content\-Type"],
    "method": ["GET"],
    "maxAgeSeconds": 3600
  }
]
.RE

For more information about supported endpoints for CORS, see Cloud Storage CORS
support
(https://cloud.google.com/storage/docs/cross\-origin#server\-side\-support).

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-default\-encryption\-key\fR

Clears the bucket's default encryption key.

.TP 2m
\fB\-\-default\-encryption\-key\fR=\fIDEFAULT_ENCRYPTION_KEY\fR

Set the default KMS key for the bucket.

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-ip\-filter\fR

Disables and clears IP filter configuration of the bucket.

.TP 2m
\fB\-\-ip\-filter\-file\fR=\fIIP_FILTER_FILE\fR

Sets the IP filter for the bucket. The IP filter is a list of ip ranges that are
allowed to access the bucket. For example, The following JSON document shows the
IP filter configuration with mode enabled and list of public network sources and
vpc network sources:

.RS 2m
{
  "mode": "Enabled",
  "publicNetworkSource": { "allowedIpCidrRanges": ["0.0.0.0/0"] },
  "vpcNetworkSources": [
      {
          "network": "projects/PROJECT_NAME/global/networks/NETWORK_NAME",
          "allowedIpCidrRanges": ["0.0.0.0/0"]
      },
  ]
}
.RE

For more information about supported configurations, see Cloud Storage bucket IP
filtering configurations
(https://cloud.google.com/storage/docs/create\-ip\-filter#ip\-filtering\-configurations)

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-labels\fR

Clear all labels associated with a bucket.

.TP 2m
\fB\-\-labels\-file\fR=\fILABELS_FILE\fR

Sets the label configuration for the bucket. An example label JSON document
looks like the following:

.RS 2m
{
  "your_label_key": "your_label_value",
  "your_other_label_key": "your_other_label_value"
}
.RE

.TP 2m
\fB\-\-remove\-labels\fR=[\fILABEL_KEYS\fR,...]

Remove labels by their key names.

.TP 2m
\fB\-\-update\-labels\fR=[\fILABEL_KEYS_AND_VALUES\fR,...]

Add or update labels. Example: \-\-update\-labels=key1=value1,key2=value2

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-lifecycle\fR

Removes all lifecycle configuration for the bucket.

.TP 2m
\fB\-\-lifecycle\-file\fR=\fILIFECYCLE_FILE\fR

Sets the lifecycle management configuration on a bucket. For example, The
following lifecycle management configuration JSON document specifies that all
objects in this bucket that are more than 365 days old are deleted
automatically:

.RS 2m
{
  "rule":
  [
    {
      "action": {"type": "Delete"},
      "condition": {"age": 365}
    }
  ]
}
.RE

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-log\-bucket\fR

Disables usage and storage logging for the bucket specified in the overall
update command.

.TP 2m
\fB\-\-log\-bucket\fR=\fILOG_BUCKET\fR

Enables usage and storage logging for the bucket specified in the overall update
command, outputting log files to the bucket specified in this flag. Cloud
Storage does not validate the existence of the bucket receiving logs. In
addition to enabling logging on your bucket, you also need to grant
cloud\-storage\-analytics@google.com write access to the log bucket.

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-log\-object\-prefix\fR

Clears the prefix used to determine the naming of log objects in the logging
bucket.

.TP 2m
\fB\-\-log\-object\-prefix\fR=\fILOG_OBJECT_PREFIX\fR

Specifies a prefix for the names of logs generated in the log bucket. The
default prefix is the bucket name. If logging is not enabled, this flag has no
effect.

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-pap\fR, \fB\-\-clear\-public\-access\-prevention\fR

Unsets the public access prevention setting on a bucket.

.TP 2m
\fB\-\-[no\-]pap\fR, \fB\-\-[no\-]public\-access\-prevention\fR

If True, sets public access prevention
(https://cloud.google.com/storage/docs/public\-access\-prevention) to
"enforced". If False, sets public access prevention to "inherited". Use
\fB\-\-public\-access\-prevention\fR to enable and
\fB\-\-no\-public\-access\-prevention\fR to disable.

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-retention\-period\fR

Clears the object retention period for a bucket.

.TP 2m
\fB\-\-retention\-period\fR=\fIRETENTION_PERIOD\fR

Minimum retention period
(https://cloud.google.com/storage/docs/bucket\-lock#retention\-periods) for
objects stored in the bucket, for example
\f5\fI\-\-retention\-period=P1Y1M1DT5S\fR\fR. Objects added to the bucket cannot
be deleted until they've been stored for the specified length of time. Default
is no retention period. Only available for Cloud Storage using the JSON API.

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-web\-error\-page\fR

Clear website error page if bucket is hosting website.

.TP 2m
\fB\-\-web\-error\-page\fR=\fIWEB_ERROR_PAGE\fR

Cloud Storage allows you to configure a bucket to behave like a static website.
A subsequent GET bucket request through a custom domain for a non\-existent
object serves the specified error page instead of the standard Cloud Storage
error.

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-web\-main\-page\-suffix\fR

Clear website main page suffix if bucket is hosting website.

.TP 2m
\fB\-\-web\-main\-page\-suffix\fR=\fIWEB_MAIN_PAGE_SUFFIX\fR

Cloud Storage allows you to configure a bucket to behave like a static website.
A subsequent GET bucket request through a custom domain serves the specified
"main" page instead of performing the usual bucket listing.


.RE
.RE
.sp

.SH "AUTOCLASS FLAGS"

.RS 2m
.TP 2m
\fB\-\-autoclass\-terminal\-storage\-class\fR=\fIAUTOCLASS_TERMINAL_STORAGE_CLASS\fR

The storage class that objects in the bucket eventually transition to if they
are not read for a certain length of time. Only valid if Autoclass is enabled.

.TP 2m
\fB\-\-[no\-]enable\-autoclass\fR

The Autoclass feature automatically selects the best storage class for objects
based on access patterns. Use \fB\-\-enable\-autoclass\fR to enable and
\fB\-\-no\-enable\-autoclass\fR to disable.


.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 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. This variant is also available:

.RS 2m
$ gcloud storage buckets update
.RE