Set Default Bucket Storage Class

To change a bucket's default storage class you make a PUT request that is scoped to a bucket, and you use the storageClass query string parameter along with a <StorageClass> element in the request body.

Note that changing a bucket's default storage class does not affect the storage class of objects that already exist in the bucket. For more information, see the Per-Object Storage Classes page.

Query string parameters

Parameter Description Required
storageClass A valid storage class. No

Request headers

See common request headers.

Request body elements

The following request body element is applicable only if you use the storageClass query string parameter to specify the storage class for an existing bucket.

Element Description
StorageClass Defines the default storage class for the bucket, which can be set to any available class, given the bucket's location.

Request syntax

The following syntax applies to PUT Bucket requests that use the storageClass query string parameter.

PUT /?storageClass HTTP/1.1
Host: <bucket>.storage.googleapis.com
Date: <date>
Content-Length: <request_body_length>
Authorization: <authentication_string>

<StorageClass>
  <new_storage_class_name>
</StorageClass>

Response headers

The request can return a variety of response headers depending on the request headers you use.

Response body elements

The response does not include an XML document in the response body.

Send feedback about...

Cloud Storage Documentation