bucketpolicyonly - Configure uniform bucket-level access


gsutil bucketpolicyonly set <on|off> bucket_url...
gsutil bucketpolicyonly get bucket_url...


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.


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


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
Var denne side nyttig? Giv os en anmeldelse af den:

Send feedback om...

Har du brug for hjælp? Besøg vores supportside.