GetBucketOwnershipControls
Returns the ownership controls for a bucket.
Description
The GetBucketOwnershipControls
operation retrieves the ownership controls for a bucket. To use this operation, you must have the s3:GetBucketOwnershipControls
permission.
note
- To use this operation, you must have permission to perform the
s3:GetBucketOwnershipControls
action. - You must be the bucket owner to use this operation.
- If no ownership controls are configured for the bucket, QStorage returns a
OwnershipControlsNotFoundError
error.
Request Syntax
GET /?ownershipControls HTTP/1.1
Host: BucketName.qstorage.quilibrium.com
x-amz-expected-bucket-owner: OwnerAccountId
Values in italics indicate user input and should be replaced with actual values.
This operation does not have a request body.
Request Parameters
Headers
Name | Description | Required | Type |
---|---|---|---|
x-amz-expected-bucket-owner | The account ID of the expected bucket owner | No | text |
Examples
Example 1: Get bucket ownership controls
GET /?ownershipControls HTTP/1.1
Host: my-bucket.qstorage.quilibrium.com
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
Date: Wed, 01 Mar 2024 12:00:00 GMT
<?xml version="1.0" encoding="UTF-8"?>
<OwnershipControls xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Rule>
<ObjectOwnership>BucketOwnerPreferred</ObjectOwnership>
</Rule>
</OwnershipControls>
Values in italics indicate variable response values.
Response Syntax
HTTP/1.1 200 OK
x-amz-id-2: RequestId
x-amz-request-id: AmazonRequestId
Date: ISO8601Date
<?xml version="1.0" encoding="UTF-8"?>
<OwnershipControls xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Rule>
<ObjectOwnership>OwnershipValue</ObjectOwnership>
</Rule>
</OwnershipControls>
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 |
Date | The date and time at which the response was sent | No | String |
Response Body Elements
Name | Description | Required | Type |
---|---|---|---|
OwnershipControls | Container for ownership controls. See OwnershipControls for details. | No | String |
Rule | Container for a rule that defines ownership controls. See OwnershipControlsRule for details. | No | String |
Special Errors
Error Code | Description |
---|---|
NoSuchBucket | The specified bucket does not exist |
OwnershipControlsNotFoundError | The ownership controls were not found |
403 | Forbidden. Authentication failed or you do not have permission to get the bucket ownership controls |
Permissions
You must have the s3:GetBucketOwnershipControls
permission.
Try It Out
Test GetBucketOwnershipControls
Get the ownership controls of a bucket.
Coming Soon
This feature is currently under development and will be available soon.