百度智能云

All Product Document

          Object Storage

          Create Bucket

          Interface Description

          This interface is used to create a bucket. Each user is only allowed to create 100 buckets. The permission of the bucket created is private by default. That is, the bucket owner has the FULL_CONTROL permission, while others have no permission.

          Considerations

          • If a user creates more than 100 buckets, the service returns “400 Bad Request: TooManyBuckets”.
          • If the requested bucket already exists, it returns “409 Conflict: BucketAlreadyExists” whether this bucket is created by the requestor.
          • The prerequisite for creating a bucket with multiple AZs distribution of data is that this region already supports creating the multi-AZ bucket. At present, BOS only supports Beijing and Guangzhou regions, and other regions have not been enabled.

          Request URI

          PUT /v1/{bucketname}

          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
          enableMultiAz Boolean No It specifies whether the data in the bucket created is distributed in multiple availability zones (AZ) to achieve the data center disaster recovery. True represents the creation of a multi-AZ bucket. It is false by false, which represents the creation?. true

          Response Body Parameters

          Instructions for Data Structure of Response Body Field

          Request Example

          PUT /v1/bucketname_example
          <Common Request Header>
          
          
          {
            "enableMultiAz" : true
          }

          Response Example

          HTTP/1.1 200 OK
          <Common response header>
          
          { }

          Error Code

          Refer to the universal error code.

          Previous
          Bucket Data Synchronization Related Interfaces
          Next
          Delete Bucket