You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Basic Bucket Operations
PutBucketStorageClass
Copy page
Download PDF
PutBucketStorageClass

Description

This API is used to set the default storage type of a bucket. After the default storage type is set for the bucket, objects uploaded, copied, or initialized for multipart uploads without a specified storage type inherit this default storage type. By default, the storage type of a bucket is STANDARD (Standard Storage).

Note

  • This API must be called by the bucket owner or user with the PutBucketStoragePolicy permission for the bucket. For detailed instructions on how to achieve access control using bucket policies, see Bucket Authorization Policy Management.
  • For applicable scenarios of different storage types of TOS and their differences, see Storage Type.

Request syntax

PUT /?storageClass HTTP/1.1
Host: bucketname.tos-cn-beijing.volces.com
Date: Fri, 30 Jul 2021 08:05:36 +0000
Authorization: authorization string
X-Tos-Storage-Class: "STANDARD"

Request parameters and headers

For common request headers, see Common Parameters.

Name

Location

Type

Required

Sample Value

Description

storageClassQueryStringYes-Identifies a PutBucketStorageClass request.
x-tos-storage-classHeaderStringYesSTANDARDThe default storage type of the bucket. For detailed information, please refer to Storage type.For detailed information, please refer to Storage type.

Request body elements

No elements are used.

Response headers

For common response headers, see Common Parameters.

Response body elements

No elements are used.

Sample request

PUT /?storageClass HTTP/1.1
Host: bucketname.tos-cn-beijing.volces.com
Date: Fri, 30 Jul 2021 08:05:36 +0000
Authorization: authorization string
X-Tos-Storage-Class: "STANDARD"

Sample response

HTTP/1.1 200 OK
x-tos-id-2: f91b0c03a01300c1-a444ed0        
x-tos-request-id: f91b0c03a01300c1-a444ed0            
Date: Fri, 30 Jul 2021 06:45:39 GMT
Content-Length: 0
server: TosServer
Last updated: 2025.06.30 11:00:33