CreateBucket
Creates a new bucket in QStorage.
Description
The CreateBucket
operation creates a new bucket in QStorage. The bucket name you choose must be unique across all existing bucket names in QStorage. You can use this operation to create a bucket that can hold your objects.
important
- Bucket names must be between 3 and 63 characters long
- Bucket names can consist only of lowercase letters, numbers, dots (.), and hyphens (-)
- Bucket names must begin and end with a letter or number
- Bucket names must not be formatted as an IP address (e.g., 192.168.5.4)
Request Syntax
PUT / HTTP/1.1
Host: BucketName.qstorage.quilibrium.com
x-amz-bucket-object-lock-enabled: ObjectLockEnabled
<?xml version="1.0" encoding="UTF-8"?>
<CreateBucketConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
</CreateBucketConfiguration>
Values in italics indicate user input and should be replaced with actual values.
Request Parameters
Headers
Name | Description | Required | Type |
---|---|---|---|
x-amz-acl | The canned ACL to apply to the bucket. Valid values: private | public-read | public-read-write | authenticated-read | No | string |
x-amz-grant-full-control | Allows grantee the READ, WRITE, READ_ACP, and WRITE_ACP permissions on the bucket | No | string |
x-amz-grant-read | Allows grantee to list the objects in the bucket | No | string |
x-amz-grant-read-acp | Allows grantee to read the bucket ACL | No | string |
x-amz-grant-write | Allows grantee to create, overwrite, and delete any object in the bucket | No | string |
x-amz-grant-write-acp | Allows grantee to write the ACL for the applicable bucket | No | string |
x-amz-bucket-object-lock-enabled | Specifies whether you want object lock to be enabled for the new bucket | No | boolean |
x-amz-object-ownership | Specifies the Object Ownership of the bucket Valid values: BucketOwnerPreferred | ObjectWriter | BucketOwnerEnforced | No | string |
Examples
PUT / HTTP/1.1
Host: my-new-bucket.qstorage.quilibrium.com
x-amz-bucket-object-lock-enabled: true
<?xml version="1.0" encoding="UTF-8"?>
<CreateBucketConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
</CreateBucketConfiguration>
Values in italics indicate user input and should be replaced with actual values.
HTTP/1.1 200 OK
x-amz-id-2: Example7qoYGN7uMuFuYS6m7a4l
x-amz-request-id: TX234S0F24A06C7
Location: http://my-new-bucket.qstorage.quilibrium.com/
Date: Wed, 01 Mar 2024 12:00:00 GMT
Values in italics indicate variable response values.
Response Syntax
HTTP/1.1 200 OK
x-amz-id-2: RequestId
x-amz-request-id: AmazonRequestId
Location: BucketLocation
Date: ISO8601Date
Values in italics indicate variable response values.
Response Elements
Response Headers
Name | Description | Required | Type |
---|---|---|---|
x-amz-id-2 | An identifier for the request | No | String |
x-amz-request-id | A unique identifier for the request | No | String |
Location | The URI of the newly created bucket | No | String |
Date | The date and time at which the response was sent | No | String |
This operation does not return a response body.
Special Errors
Error Code | Description |
---|---|
BucketAlreadyExists | The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again. |
BucketAlreadyOwnedByYou | Your previous request to create the named bucket succeeded and you already own it. |
InvalidBucketName | The specified bucket name is not valid. |
TooManyBuckets | You have attempted to create more buckets than allowed. |
403 | Forbidden. Authentication failed or you do not have permission to create buckets. |
Permissions
You must have the s3:CreateBucket
permission.
Related Operations
The following operations are related to CreateBucket:
Try It Out
Test CreateBucket
Create a new bucket in QStorage.
Coming Soon
This feature is currently under development and will be available soon.