buckets

Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.

put/b/{bucket}

Request

  • Base URL: https://storage.googleapis.com/storage/v1
  • URL: https://storage.googleapis.com/storage/v1/b/{bucket}
  • Auth: one of:
    • OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/cloud-platform) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/cloud-platform)
    • OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/devstorage.full_control) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/devstorage.full_control)

Path parameters

bucketstring required

Name of a bucket.

Query parameters

ifMetagenerationMatchstring

Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.

ifMetagenerationNotMatchstring

Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.

predefinedAcl'authenticatedRead' | 'private' | 'projectPrivate' | 'publicRead' | 'publicReadWrite'

Apply a predefined set of access controls to this bucket.

predefinedDefaultObjectAcl'authenticatedRead' | 'bucketOwnerFullControl' | 'bucketOwnerRead' | 'private' | 'projectPrivate' | 'publicRead'

Apply a predefined set of default object access controls to this bucket.

projection'full' | 'noAcl'

Set of properties to return. Defaults to full.

userProjectstring

The project to be billed for this request. Required for Requester Pays buckets.

Request body

defaultEventBasedHoldboolean

The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed.

etagstring

HTTP 1.1 Entity tag for the bucket.

generationstring int64

The generation of this bucket.

hardDeleteTimestring date-time

The hard delete time of the bucket in RFC 3339 format.

idstring

The ID of the bucket. For buckets, the id and name properties are the same.

kindstring

The kind of item this is. For buckets, this is always storage#bucket.

labelsobject

User-provided labels, in key/value pairs.

locationstring

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.

locationTypestring

The type of the bucket location.

metagenerationstring int64

The metadata generation of this bucket.

namestring

The name of the bucket.

projectNumberstring uint64

The project number of the project the bucket belongs to.

rpostring

The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO to turn on Turbo Replication on a bucket.

satisfiesPZIboolean

Reserved for future use.

satisfiesPZSboolean

Reserved for future use.

selfLinkstring

The URI of this bucket.

softDeleteTimestring date-time

The soft delete time of the bucket in RFC 3339 format.

storageClassstring

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, ARCHIVE, 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.

timeCreatedstring date-time

The creation time of the bucket in RFC 3339 format.

updatedstring date-time

The modification time of the bucket in RFC 3339 format.

Response

Successful response

Changes

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/devstorage.full_control was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/devstorage.full_control was removed from the endpoint's security scheme Oauth2c

    • breaking

      removed the request body

    • breaking

      removed the media type */* for the response with the status

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/devstorage.full_control was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/devstorage.full_control was removed from the endpoint's security scheme Oauth2c