Skip to main content

GetBucketPolicyStatus

Returns the policy status for a bucket, indicating whether the bucket is public.

Description

The GetBucketPolicyStatus operation retrieves the policy status for a bucket, indicating whether the bucket is public.

note
  • To use this operation, you must have permission to perform the s3:GetBucketPolicyStatus action.

Request Syntax

GET /?policyStatus 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

NameDescriptionRequiredType
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).Notext

Examples

Example 1: Get bucket policy status

GET /?policyStatus 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"?> <PolicyStatus xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <IsPublic>TRUE</IsPublic> </PolicyStatus>
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"?> <PolicyStatus xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <IsPublic>Boolean</IsPublic> </PolicyStatus>
Values in italics indicate variable response values.

Response Elements

Response Headers

NameDescriptionRequiredType
x-amz-id-2An identifier for the requestNoString
x-amz-request-idA unique identifier for the requestNoString
DateThe date and time at which the response was sentNoString

Response Body Elements

NameDescriptionRequiredType
PolicyStatusContainer for the policy status of a bucket. See PolicyStatus for details.NoString

Special Errors

Error CodeDescription
NoSuchBucketThe specified bucket does not exist
NoSuchBucketPolicyThe specified bucket does not have a bucket policy
403Forbidden. Authentication failed or you do not have permission to get the bucket policy status

Permissions

You must have the s3:GetBucketPolicyStatus permission.

Try It Out

Test GetBucketPolicyStatus

Get the policy status of a bucket.

Coming Soon

This feature is currently under development and will be available soon.