The Buckets resource represents a bucket in Google Cloud Storage. There is a single global namespace shared by all buckets. For more information, see Bucket Name Requirements.

Buckets contain objects which can be accessed by their own methods. In addition to the acl property, buckets contain bucketAccessControls, for use in fine-grained manipulation of an existing bucket's access controls.

A bucket is always owned by the project team owners group.

For a list of methods for this resource, see the end of this page.

Resource representations

  "kind": "storage#bucket",
  "id": string,
  "selfLink": string,
  "projectNumber": unsigned long,
  "name": string,
  "timeCreated": datetime,
  "updated": datetime,
  "metageneration": long,
  "acl": [
    bucketAccessControls Resource
  "defaultObjectAcl": [
    defaultObjectAccessControls Resource
  "owner": {
    "entity": string,
    "entityId": string
  "location": string,
  "website": {
    "mainPageSuffix": string,
    "notFoundPage": string
  "logging": {
    "logBucket": string,
    "logObjectPrefix": string
  "versioning": {
    "enabled": boolean
  "cors": [
      "origin": [
      "method": [
      "responseHeader": [
      "maxAgeSeconds": integer
  "lifecycle": {
    "rule": [
        "action": {
          "type": string,
          "storageClass": string
        "condition": {
          "age": integer,
          "createdBefore": date,
          "isLive": boolean,
          "matchesStorageClass": [
          "numNewerVersions": integer
  "storageClass": string,
  "etag": string
Property name Value Description Notes
acl[] list Access controls on the bucket. writable
cors[] list The bucket's Cross-Origin Resource Sharing (CORS) configuration. writable
cors[].maxAgeSeconds integer The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses. writable
cors[].method[] list The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method". writable
cors[].origin[] list The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin". writable
cors[].responseHeader[] list The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains. writable
defaultObjectAcl[] list Default access controls to apply to new objects when no ACL is provided. writable
etag string HTTP 1.1 Entity tag for the bucket.
id string The ID of the bucket.
kind string The kind of item this is. For buckets, this is always storage#bucket.
lifecycle object The bucket's lifecycle configuration. See lifecycle management for more information. writable
lifecycle.rule[] list A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken.
lifecycle.rule[].action object The action to take.
lifecycle.rule[].action.storageClass string Target storage class. Required iff the type of the action is SetStorageClass.
lifecycle.rule[].action.type string Type of the action. Currently, only Delete and SetStorageClass are supported.

Acceptable values are:
  • "Delete"
  • "SetStorageClass"
lifecycle.rule[].condition object The condition(s) under which the action will be taken.
lifecycle.rule[].condition.age integer Age of an object (in days). This condition is satisfied when an object reaches the specified age.
lifecycle.rule[].condition.createdBefore date A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when an object is created before midnight of the specified date in UTC.
lifecycle.rule[].condition.isLive boolean Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects.
lifecycle.rule[].condition.matchesStorageClass[] list Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.
lifecycle.rule[].condition.numNewerVersions integer Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object.
location string The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list. writable
logging object The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. writable
logging.logBucket string The destination bucket where the current bucket's logs should be placed. writable
logging.logObjectPrefix string A prefix for log object names. writable
metageneration long The metadata generation of this bucket.
name string The name of the bucket.
owner object The owner of the bucket. This is always the project team's owner group.
owner.entity string The entity, in the form project-owner-projectId.
owner.entityId string The ID for the entity.
projectNumber unsigned long The project number of the project the bucket belongs to.
storageClass string The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes. writable
timeCreated datetime The creation time of the bucket in RFC 3339 format.
updated datetime The modification time of the bucket in RFC 3339 format.
versioning object The bucket's versioning configuration. writable
versioning.enabled boolean While set to true, versioning is fully enabled for this bucket. writable
website object The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information. writable
website.mainPageSuffix string If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages. writable
website.notFoundPage string If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result. writable


Available methods for Buckets resources are as follows:

Permanently deletes an empty bucket.
Returns metadata for the specified bucket.
Returns an IAM policy for the specified bucket.
Creates a new bucket.
Retrieves a list of buckets for a given project.
Updates a bucket. This method supports patch semantics.
Updates an IAM policy for the specified bucket.
Tests a set of permissions on the given bucket to see which, if any, are held by the caller.
Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.

Send feedback about...

Cloud Storage Documentation