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.

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.

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.

이 페이지가 도움이 되었나요? 평가를 부탁드립니다.

다음에 대한 의견 보내기...

도움이 필요하시나요? 지원 페이지를 방문하세요.