Skip to main content

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

NameDescriptionRequiredType
x-amz-aclThe canned ACL to apply to the bucket.

Valid values: private | public-read | public-read-write | authenticated-read
NoString
x-amz-expected-bucket-ownerThe 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).NoString
Content-MD5The base64-encoded 128-bit MD5 digest of the data.YesString
x-amz-sdk-checksum-algorithmIndicates 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
NoString
x-amz-grant-readAllows grantee to list the objects in the bucket.NoString
x-amz-grant-writeAllows grantee to create, overwrite, and delete any object in the bucket.NoString
x-amz-grant-read-acpAllows grantee to read the bucket ACL.NoString
x-amz-grant-write-acpAllows grantee to write the ACL for the bucket.NoString
x-amz-grant-full-controlAllows grantee the READ, WRITE, READ_ACP, and WRITE_ACP permissions on the bucket.NoString

Request Body

You can specify the ACL in the request body using an XML document with the following elements:

NameDescriptionRequiredType
AccessControlPolicyContainer for the ACL information.YesContainer
OwnerContainer for the bucket owner's information.NoOwner
GrantContainer for the grantee and permissions.YesArray 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

NameDescriptionRequiredType
NoSuchBucketThe specified bucket does not exist.NoString
InvalidAclThe provided ACL is not valid.NoString
MalformedACLErrorThe XML provided was not well-formed or did not validate against the published schema.NoString

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.