Debian Codegraph @

docs/source/guide/s3-example-access-permissions.rst

raw
1 .. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
3 This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0
4 International License (the "License"). You may not use this file except in compliance with the
5 License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/.
6
7 This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
8 either express or implied. See the License for the specific language governing permissions and
9 limitations under the License.
10
11 ##################
12 Access permissions
13 ##################
14
15 This section demonstrates how to manage the access permissions for an S3
16 bucket or object by using an access control list (ACL).
17
18
19 Get a bucket access control list
20 ================================
21
22 The example retrieves the current access control list of an S3 bucket.
23
24 .. code-block:: python
25
26 import boto3
27
28 # Retrieve a bucket's ACL
29 s3 = boto3.client('s3')
30 result = s3.get_bucket_acl(Bucket='amzn-s3-demo-bucket')
31 print(result)