GetBucketAcl
Returns the access control list (ACL) of a bucket.
Description
The GetBucketAcl
operation returns the access control list (ACL) of a bucket. To use this operation, you must have s3:GetBucketAcl
permissions on the bucket, or be the bucket owner.
If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. You must use policies to grant access to your bucket and the objects in it.
Request Syntax
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 |
Response Syntax
Response Elements
If the action is successful, the service sends back an response of HTTP 200.
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 |
Last-Modified | The date and time at which the resource was last modified | No | String |
Content-Length | The size of the response body in bytes | No | String |
Content-Type | The MIME type of the response | No | String |
Connection | The type of connection used for the HTTP response | No | String |
Response Body Elements
The response body will be in XML format.
Name | Description | Required | Type |
---|---|---|---|
AccessControlPolicy | Container for the response | No | String |
Grants | A list of Grants. See Grant data type. | No | String |
Owner | Container for the bucket owner's ID. See Owner data type. | No | String |
Special Errors
Error Code | Description |
---|---|
NoSuchBucket | The specified bucket does not exist |
403 | Forbidden. Authentication failed or you do not have permission to access the bucket ACL |
Permissions
You must have the s3:GetBucketAcl
permission.
Examples
Try It Out
Test GetBucketAcl
Get the access control list (ACL) of a bucket.
Coming Soon
This feature is currently under development and will be available soon.