PutBucketStorageclass
Last Updated:2021-12-08
Interface Description
This interface is used to set the default storage type of the bucket.
If the object uploaded by the user through API, CLI, or SDK does not specify the storage type, it inherits the default storage type of bucket. If the specified storage type of the object uploaded is not consistent with the default storage type of the bucket, the storage type of the object shall prevail. The storage types include standard storage, infrequent access, cold storage, and archive storage. For the specific usage scenarios and performance, see Hierarchical Storage.
Request
-
Request syntax
PUT /?storageClass HTTP/1.1 Host: <BcuketName>.bj.bcebos.com x-bce-date: date Content-Length: request-body-length Content-Type: application/json; charset=utf-8 Authorization: AuthorizationString
-
Request header field
No special parameters.
-
Request parameters
Name Type Description Required? storageClass String Specify the default storage type of the bucket. STANDRAD
represents the standard storage,STANDARD_IA
represents the infrequent access,COLD
represents the cold storage, andARCHIVE
represents the archive storage. For the multi-AZ bucket, onlyMAZ_STANDRAD
andMAZ_STANDARD_IA
can be set.MAZ_STANDRAD
represents the multi-AZ standard storage, andMAZ_STANDARD_IA
represents the multi-AZ infrequent access.Yes
Response
Example
-
Request example
PUT /?storageClass HTTP/1.1 Host: <BcuketName>.bj.bcebos.com x-bce-date: date Content-Length: 38 Content-Type: application/json; charset=utf-8 Authorization: AuthorizationString { "storageClass": "STANDARD_IA" }
-
Response example
HTTP/1.1 200 OK x-bce-request-id: 4db4b34d-653d-4d9a-b49b-3049ca786409 Date: Wed, 31 May 2017 08:34:40 GMT Connection: keep-alive Server: BceBos