Table of Contents
A low-level client representing AWS S3 Control:
import boto3
client = boto3.client('s3control')
These are the available methods:
Check if an operation can be paginated.
Removes the Public Access Block configuration for an Amazon Web Services account.
See also: AWS API Documentation
Request Syntax
response = client.delete_public_access_block(
AccountId='string'
)
[REQUIRED]
The Account ID for the Amazon Web Services account whose Public Access Block configuration you want to remove.
Generate a presigned url given a client, its method, and arguments
The presigned url
Create a paginator for an operation.
Retrieves the Public Access Block configuration for an Amazon Web Services account.
See also: AWS API Documentation
Request Syntax
response = client.get_public_access_block(
AccountId='string'
)
[REQUIRED]
The Account ID for the Amazon Web Services account whose Public Access Block configuration you want to retrieve.
{
'PublicAccessBlockConfiguration': {
'BlockPublicAcls': True|False,
'IgnorePublicAcls': True|False,
'BlockPublicPolicy': True|False,
'RestrictPublicBuckets': True|False
}
}
Response Structure
The Public Access Block configuration currently in effect for this Amazon Web Services account.
Specifies whether Amazon S3 should block public ACLs for buckets in this account. Setting this element to TRUE causes the following behavior:
Note that enabling this setting doesn't affect existing policies or ACLs.
Specifies whether Amazon S3 should ignore public ACLs for buckets in this account. Setting this element to TRUE causes Amazon S3 to ignore all public ACLs on buckets in this account and any objects that they contain.
Note that enabling this setting doesn't affect the persistence of any existing ACLs and doesn't prevent new public ACLs from being set.
Specifies whether Amazon S3 should block public bucket policies for buckets in this account. Setting this element to TRUE causes Amazon S3 to reject calls to PUT Bucket policy if the specified bucket policy allows public access.
Note that enabling this setting doesn't affect existing bucket policies.
Specifies whether Amazon S3 should restrict public bucket policies for buckets in this account. If this element is set to TRUE , then only the bucket owner and AWS Services can access buckets with public policies.
Note that enabling this setting doesn't affect previously stored bucket policies, except that public and cross-account access within any public bucket policy, including non-public delegation to specific accounts, is blocked.
Returns an object that can wait for some condition.
Creates or modifies the Public Access Block configuration for an Amazon Web Services account.
See also: AWS API Documentation
Request Syntax
response = client.put_public_access_block(
PublicAccessBlockConfiguration={
'BlockPublicAcls': True|False,
'IgnorePublicAcls': True|False,
'BlockPublicPolicy': True|False,
'RestrictPublicBuckets': True|False
},
AccountId='string'
)
[REQUIRED]
The Public Access Block configuration that you want to apply to this Amazon Web Services account.
Specifies whether Amazon S3 should block public ACLs for buckets in this account. Setting this element to TRUE causes the following behavior:
Note that enabling this setting doesn't affect existing policies or ACLs.
Specifies whether Amazon S3 should ignore public ACLs for buckets in this account. Setting this element to TRUE causes Amazon S3 to ignore all public ACLs on buckets in this account and any objects that they contain.
Note that enabling this setting doesn't affect the persistence of any existing ACLs and doesn't prevent new public ACLs from being set.
Specifies whether Amazon S3 should block public bucket policies for buckets in this account. Setting this element to TRUE causes Amazon S3 to reject calls to PUT Bucket policy if the specified bucket policy allows public access.
Note that enabling this setting doesn't affect existing bucket policies.
Specifies whether Amazon S3 should restrict public bucket policies for buckets in this account. If this element is set to TRUE , then only the bucket owner and AWS Services can access buckets with public policies.
Note that enabling this setting doesn't affect previously stored bucket policies, except that public and cross-account access within any public bucket policy, including non-public delegation to specific accounts, is blocked.
[REQUIRED]
The Account ID for the Amazon Web Services account whose Public Access Block configuration you want to set.
None
The available paginators are: