Stay organized with collections Save and categorize content based on your preferences.

bucketpolicyonly - Configure uniform bucket-level access

Synopsis

gsutil bucketpolicyonly set (on|off) gs://<bucket_name>...
gsutil bucketpolicyonly get gs://<bucket_name>...

Description

The Bucket Policy Only feature is now known as uniform bucket-level access. The bucketpolicyonly command is still supported, but we recommend using the equivalent ubla command.

The bucketpolicyonly command is used to retrieve or configure the uniform bucket-level access setting of Cloud Storage buckets. This command has two sub-commands, get and set.

Get

The bucketpolicyonly get command shows whether uniform bucket-level access is enabled for the specified Cloud Storage bucket.

Get Examples

Check if your buckets are using uniform bucket-level access:

gsutil bucketpolicyonly get gs://redbucket gs://bluebucket

Set

The bucketpolicyonly set command enables or disables the uniform bucket-level access feature on Cloud Storage buckets.

Set Examples

Configure your buckets to use uniform bucket-level access:

gsutil bucketpolicyonly set on gs://redbucket gs://bluebucket

Configure your buckets to NOT use uniform bucket-level access:

gsutil bucketpolicyonly set off gs://redbucket gs://bluebucket