Try it now and let us know what you think. Switch to the new look >>
You can return to the original look by selecting English in the language selector above.
GET BucketPolicyStatus
Description
This operation retrieves the policy status for an Amazon S3 bucket, indicating whether
the
bucket is public. In order to use this operation, you must have the
s3:GetBucketPolicyStatus permission. For more information about Amazon S3
permissions, see Specifying
Permissions in a Policy in the Amazon Simple Storage Service Developer Guide.
For more information about when Amazon S3 considers a bucket public, see The Meaning of "Public" in the Amazon Simple Storage Service Developer Guide.
Requests
Syntax
GET /<bucket-name>?policyStatus HTTP/1.1 Host:<bucket-name>.s3.amazonaws.com x-amz-date:<Thu, 15 Nov 2016 00:17:21 GMT>Authorization:<authorization string>(see Authenticating Requests (AWS Signature Version 4))
Request Parameters
This operation does not use request parameters.
Request Headers
This implementation of the operation uses only request headers that are common to all operations. For more information, see Common Request Headers.
Request Elements
This implementation of the operation does not use request elements.
Responses
Response Headers
The operation returns response headers that are common to most responses. For more information, see Common Response Headers.
Response Elements
| Name | Description |
|---|---|
PolicyStatus |
Container element for bucket policy status. Type: Container Children: |
IsPublic |
Indicates whether this bucket currently has a public access policy. Type: Boolean Ancestor: Valid values: |
Special Errors
This implementation of the operation does not return special errors. For general information about Amazon S3 errors and a list of error codes, see Error Responses.
Examples
Sample Request
The following request gets a bucket policy status.
GET /<bucket-name>?policyStatus HTTP/1.1 Host:<bucket-name>.s3.amazonaws.com x-amz-date:<Thu, 15 Nov 2016 00:17:21 GMT>Authorization:<signatureValue>
Sample Response
HTTP/1.1 200 OK x-amz-id-2: ITnGT1y4REXAMPLEPi4hklTXouTf0hccUjo0iCPEXAMPLEutBj3M7fPGlWO2SEWp x-amz-request-id: 51991EXAMPLE5321 Date: Thu, 15 Nov 2016 00:17:22 GMT Server: AmazonS3 Content-Length: 0 <PolicyStatus> <IsPublic>TRUE</IsPublic> </PolicyStatus>
Related Resources
-
Using Amazon S3 Block Public Access in the Amazon Simple Storage Service Developer Guide.


