Bucket metadata (original) (raw)

Get metadata

Get bucket size

This page discusses the metadata fields that are stored along with bucketsin Cloud Storage.

Introduction

Cloud Storage buckets have metadata associated with them. Metadata identifies properties of the bucket and specifies how the bucket should be handled when it's accessed.

Metadata is stored as key: value pairs, where the value can take a variety of forms, including strings, arrays, or even nested key:value pairs. For example, the bucket name is a string, while a bucket Object Lifecycle Management configuration is an array of rules in which each rule contains several childkey: value pairs.

The mutability of metadata varies:

Non-editable metadata

The following metadata is set during bucket creation, and cannot be edited or removed:

Editable metadata

Editable bucket metadata is metadata whose values you can typically modify at any time. In some cases, such as the bucket being subject to anorganization policy constraint, there are restrictions on modifying certain metadata values.

Metadata overview Link to guide Notes
Access Control Lists (ACLs) Create and managing ACLs Recommended only for XML users.
Default ACLs Set default object ACLs
Identity and Access Management (IAM) policies1 Use IAM permissions
Billing (Requester Pays) Use Requester Pays
Cross-origin resource sharing (CORS) configuration Set up and view CORS configurations
Default storage class Change the default storage class Set during bucket creation and can be edited, but not removed.
Default Cloud KMS encryption key Use default Cloud KMS keys
Default event-based holds1 Work with the default event-based hold property
Public access prevention1 Use public access prevention
Uniform bucket-level access1 Use uniform bucket-level access Only editable for the first 90 days after you enable uniform bucket-level access on a bucket.
Lifecycle configuration policy Manage object lifecycles
Autoclass Use Autoclass
Turbo replication1 Manage turbo replication
Usage logs and storage logs Usage logs configuration
Bucket Lock2 Use and locking retention policies Only editable if you don't lock the retention policy.
Object Retention Lock Enable and use object retention configurations Once enabled for a bucket, cannot be disabled.
Object Versioning configuration Use Object Versioning
Bucket labels Use bucket labels
Soft delete retention duration Use soft delete
Website configuration Assign specialty pages for static websites
Bucket location Relocate buckets Before you relocate a bucket, review the Bucket relocation overview page.

1 This metadata cannot be viewed or managed using the XML API.

2 You can use the XML API to set this metadata during bucket creation, but not to view or manage this metadata.

What's next