Set Default Storage Typ of Bucket
Last Updated:2021-09-13
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 URI
PUT /v1/{bucketName}/?storageClass
Parameter Name | Parameter Type | Required | Description | Example Value | Parameter position |
---|---|---|---|---|---|
bucketName | String | Yes | Bucket name | "bucketName_example" | Path |
Request Body Parameters
Instructions for Data Structure of Request Body Field
Parameter Name | Parameter Type | Required | Description | Example Value |
---|---|---|---|---|
storageClass | String | Yes | It specifies the default storage class of bucket. STANDRAD represents the standard storage, STANDARD_IA represents the infrequent access, COLD represents the cold storage, and ARCHIVE represents the archive storage. For the bucket with multiple AZs, only MAZ_STANDRAD and MAZ_STANDARD_IA can be set. MAZ_STANDRAD represents the standard storage with multiple AZs, and MAZ_STANDARD_IA represents the infrequent access with multiple AZs. | STANDARD_IA |
Response Body Parameters
Instructions for Data Structure of Response Body Field
Request Example
PUT /v1/bucketName_example/?storageClass
Common Request Header
{
"storageClass" : "STANDARD_IA"
}
Response Example
HTTP/1.1 200 OK
<Common response header>
{ }
Error Code
Refer to the universal error code.