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

Torch Object Storage

Copy page
Download PDF
Basic Bucket Operations
CreateBucket
Copy page
Download PDF
CreateBucket
Function Description​
Create a new TOS bucket. To create a bucket, you must register a VolcEngine account and possess a valid TOS AccessKey ID to authenticate your request. Anonymous requests are not permitted to create buckets, and each user may create up to 100 buckets globally. By creating a bucket, you become the owner of that bucket.​
Storage Type​
When creating a bucket, you can specify the bucket's default storage class by including the header field x-tos-storage-class. We currently support the following storage types:​
  • STANDARD (Standard Storage): Suitable for frequent data access, such as social images, trending videos, big data analytics, and other business scenarios.​
  • IA (Infrequent Access Storage): Suitable for scenarios with infrequent access (on average once or twice per month), such as data backup, file synchronization, and other business scenarios. Compared to standard storage, it offers lower storage costs but incurs data retrieval fees when accessing data. For billing details, please refer to Billing Overview.​
  • ARCHIVE_FR (Archive Flashback Storage): Suitable for data that is almost never accessed, with a minimum retention period of 90 days; supports direct read (flashback) and direct conversion to other storage types. Data retrieval fees are incurred when accessing data. For billing details, please refer to Billing Overview.​
  • ARCHIVE (Archive Storage): Suitable for business scenarios where data is rarely accessed and requires long-term preservation. A minimum storage period of 90 days is required; archived data must be restored before access. For billing details, please refer to Billing Overview.​
  • COLD_ARCHIVE (Cold Archive Storage): Classified as a cold data type, it is suitable for business scenarios requiring long-term data retention with very infrequent access. A minimum storage period of 180 days is required; cold archive data must be restored before access. For billing details, please refer to Billing Overview.​
  • DEEP_COLD_ARCHIVE (Deep Cold Archive Storage): Suitable for extremely cold data requiring ultra-long-term retention. A minimum storage period of 180 days is required; deep cold archive data must be restored before access. For billing details, please refer to Billing Overview.​
Request syntax​
​
PUT / HTTP/1.1​
Host: bucketname.tos-cn-beijing.volces.com​
Authorization: authorization string​
Date: Fri, 30 Jul 2021 06:45:39 GMT​
x-tos-acl: ACL​
x-tos-grant-full-control: GrantFullControl​
x-tos-grant-read: GrantRead​
x-tos-grant-read-acp: GrantReadACP​
x-tos-grant-write: GrantWrite​
x-tos-grant-write-acp: GrantWriteACP​
x-tos-storage-class: STANDARD​
x-tos-tagging: key1=value1&key2=value2​
​
Request parameters and headers​
​
Name​
Location​
Type​
Required​
Sample Value​
Description​
x-tos-acl​
Header​
String​
No​
private​
Bucket access permissions. Effective permission settings include:​
  • private: private, default value.​
  • public-read: Public read.​
  • public-read-write: Public read-write access.​
  • authenticated-read: authenticated user read.​
  • bucket-owner-read: Bucket owner read.​
  • bucket-owner-full-control: Grants full control to the bucket owner.​
x-tos-grant-full-control​
Header​
String​
No​
id=123​
Has the following permissions on the bucket: READ, WRITE, READ ACP, and WRITE ACP.​
Format: id=account1,id=account2.​
x-tos-grant-read​
Header​
String​
No​
id=123​
Permit authorized users to list objects within the bucket.​
Format: id=account1,id=account2.​
x-tos-grant-read-acp​
Header​
String​
No​
id=123,id=456​
Allow authorized users to read the bucket ACL.​
Format: id=account1,id=account2.​
x-tos-grant-write​
Header​
String​
No​
id=123,id=456​
Allow authorized entities to create new objects in the bucket. Existing objects may be deleted or overwritten by their buckets and owners.​
Format: id=account1,id=account2.​
x-tos-grant-write-acp​
Header​
String​
No​
id=123,id=456​
Authorized users are permitted to write ACP permissions.​
Format: id=account1,id=account2.​
x-tos-storage-class​
Header​
String​
No​
STANDARD​
Default storage type of the bucket. The possible values are explained as follows:​
  • STANDARD: Standard storage, default value.​
  • IA: infrequent access storage.​
  • INTELLIGENT_TIERING: intelligent tiered storage​
  • ARCHIVE_FR: Flashback archive storage.​
  • ARCHIVE: Archival storage.​
  • COLD_ARCHIVE: Cold archive storage.​
tip​
Currently, only China (Beijing), China (Shanghai), and China (Guangzhou) support cold archive storage.​
  • DEEP_COLD_ARCHIVE: Deep cold archive storage.​
tip​
Currently, only China (Beijing), China (Shanghai), and China (Guangzhou) support Deep Cold Archive, and all are in the invitation-only testing phase. If you require this storage type, please contact your account manager.​
x-tos-az-redundancy​
Header​
String​
No​
single-az​
The redundancy type of the bucket's availability zone. The possible values are explained as follows:​
  • single-az: Single AZ redundancy, default value.​
  • multi-az: Multi-AZ redundancy.​
tip​
  • Only China (Beijing),China (Shanghai),China (Guangzhou), and Asia Pacific (Johor) regions support the multi-AZ redundancy feature. For detailed information, see Multi-AZ Redundancy.​
  • For the support status of the multi-AZ redundancy feature for HNS buckets, please refer to the console display.​
x-tos-project-name​
Header​
String​
No​
default​
Project name associated with the bucket. The possible values are described as follows:​
  • If the request includes this header and specifies a project name, the bucket created will belong to that project.​
  • When the specified project name is 'default', the bucket created will belong to the default project.​
  • If the request header is not included in the request, the bucket created will belong to the default project.​
x-tos-tagging​
Header​
String​
No​
key1=value1&key2=value2​
Set the tag information for the bucket in the format {Key&Separation. Each storage bucket can be associated with up to 50 tags. The constraints and restrictions for tag keys and tag values are as follows:​
  • Tag Key​
  • The length must be between 1 and 128 characters.​
  • Supports letters or characters from any language (such as Chinese, English letters), numbers, and spaces; supports special characters: _.:/+-@.​
  • Label keys must not begin with volc: in any capitalization. Keys beginning with volc: are reserved by the system and creation is prohibited.​
  • Tag Value​
  • The length is limited to between 0 and 256 characters, and the tag value may be empty.​
  • Supports letters or characters from any language (such as Chinese, English letters, etc.), numbers, and spaces; supports special characters: _.:/+-@.​
x-tos-bucket-type​
Header​
String​
No​
hns​
Specifies the bucket type. The parameter type is string and it is optional. The possible values are described as follows:​
  • fns: flat barrel.​
  • hns: Hierarchical bucket.​
  • If this message header is not included, an fns bucket will be created by default.​
x-tos-bucket-object-lock-enabled​
Header​
String​
No​
true​
Whether to enable the retention policy feature; only the value true is supported, which indicates that the retention policy is enabled. Once enabled, it cannot be disabled.​
​
Request body elements​
This request contains no request message element.​
Response headers​
Return public response headers. See Public Parameters.​
​
Name​
Parameter Type​
Example Value​
Description​
Location​
String​
/bucketName​
The slash (/) and the bucket name.​
​
Response body elements​
There is no message element in this request response.​
Sample request​
​
PUT / HTTP/1.1​
Host: bucketname.tos-cn-beijing.volces.com​
x-tos-acl: ACL​
Content-Length: 0​
Date: Fri, 30 Jul 2021 06:45:39 GMT​
Authorization: authorization string​
​
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​
Location: /bucketName ​
server: TosServer​
Content-Length: 0 ​
​
​
Last updated: 2025.09.29 17:27:01