PutBucketAcl
Sets the access control list (ACL) permissions for a QStorage bucket.
Permissions Required
To perform this operation, you need:
- WRITE_ACP permission on the bucket
- Bucket owner permissions
Request
Request 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-expected-bucket-owner | The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied). | No | String |
Content-MD5 | The base64-encoded 128-bit MD5 digest of the data. | Yes | String |
x-amz-sdk-checksum-algorithm | Indicates the algorithm used to create the checksum for the request when using the SDK. Must be accompanied by either x-amz-checksum or x-amz-trailer header. If an individual checksum is provided, this parameter is ignored. Valid values: CRC32 | CRC32C | SHA1 | SHA256 | CRC64NVME | No | String |
x-amz-grant-read | Allows grantee to list the objects in the bucket. | No | String |
x-amz-grant-write | Allows grantee to create, overwrite, and delete any object in the bucket. | No | String |
x-amz-grant-read-acp | Allows grantee to read the bucket ACL. | No | String |
x-amz-grant-write-acp | Allows grantee to write the ACL for the bucket. | No | String |
x-amz-grant-full-control | Allows grantee the READ, WRITE, READ_ACP, and WRITE_ACP permissions on the bucket. | No | String |
Request Body
You can specify the ACL in the request body using an XML document with the following elements:
Name | Description | Required | Type |
---|---|---|---|
AccessControlPolicy | Container for the ACL information. | Yes | Container |
Owner | Container for the bucket owner's information. | No | Owner |
Grant | Container for the grantee and permissions. | Yes | Array of Grant data types |
Request Syntax
PUT /?acl HTTP/1.1
Host: _bucket-name_.qstorage.quilibrium.com
Content-MD5: {content-md5}
x-amz-acl: {canned-acl}
x-amz-grant-read: {grant-read}
x-amz-grant-write: {grant-write}
x-amz-grant-read-acp: {grant-read-acp}
x-amz-grant-write-acp: {grant-write-acp}
x-amz-grant-full-control: {grant-full-control}
<?xml version="1.0" encoding="UTF-8"?>
<AccessControlPolicy>
<Owner>
<ID>*** Owner-ID ***</ID>
<DisplayName>owner-display-name</DisplayName>
</Owner>
<AccessControlList>
<Grant>
<Grantee>
<ID>*** Grantee-ID ***</ID>
<DisplayName>grantee-display-name</DisplayName>
</Grantee>
<Permission>FULL_CONTROL</Permission>
</Grant>
</AccessControlList>
</AccessControlPolicy>
Response
Error Responses
Name | Description | Required | Type |
---|---|---|---|
NoSuchBucket | The specified bucket does not exist. | No | String |
InvalidAcl | The provided ACL is not valid. | No | String |
MalformedACLError | The XML provided was not well-formed or did not validate against the published schema. | No | String |
Examples
Example 1: Set a canned ACL using the x-amz-acl header
Request
PUT /?acl HTTP/1.1
Host: _example-bucket_.qstorage.quilibrium.com
x-amz-acl: _private_
Content-MD5: _0123456789abcdef0123456789abcdef_
Example 2: Set a custom ACL using XML
Request
PUT /?acl HTTP/1.1
Host: _example-bucket_.qstorage.quilibrium.com
Content-MD5: _0123456789abcdef0123456789abcdef_
<?xml version="1.0" encoding="UTF-8"?>
<AccessControlPolicy>
<Owner>
<ID>*** Owner-ID ***</ID>
<DisplayName>owner-display-name</DisplayName>
</Owner>
<AccessControlList>
<Grant>
<Grantee>
<ID>*** Grantee-ID ***</ID>
<DisplayName>grantee-display-name</DisplayName>
</Grantee>
<Permission>READ</Permission>
</Grant>
</AccessControlList>
</AccessControlPolicy>
API Tester
Test
Coming Soon
This feature is currently under development and will be available soon.