S3Control

Table of Contents

Client

class S3Control.Client

A low-level client representing AWS S3 Control:

import boto3

client = boto3.client('s3control')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
delete_public_access_block(**kwargs)

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'
)
Parameters
AccountId (string) --

[REQUIRED]

The Account ID for the Amazon Web Services account whose Public Access Block configuration you want to remove.

Returns
None
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters
  • ClientMethod (string) -- The client method to presign for
  • Params (dict) -- The parameters normally passed to ClientMethod.
  • ExpiresIn (int) -- The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
  • HttpMethod (string) -- The http method to use on the generated url. By default, the http method is whatever is used in the method's model.
Returns

The presigned url

get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_public_access_block(**kwargs)

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'
)
Parameters
AccountId (string) --

[REQUIRED]

The Account ID for the Amazon Web Services account whose Public Access Block configuration you want to retrieve.

Return type
dict
Returns
Response Syntax
{
    'PublicAccessBlockConfiguration': {
        'BlockPublicAcls': True|False,
        'IgnorePublicAcls': True|False,
        'BlockPublicPolicy': True|False,
        'RestrictPublicBuckets': True|False
    }
}

Response Structure

  • (dict) --
    • PublicAccessBlockConfiguration (dict) --

      The Public Access Block configuration currently in effect for this Amazon Web Services account.

      • BlockPublicAcls (boolean) --

        Specifies whether Amazon S3 should block public ACLs for buckets in this account. Setting this element to TRUE causes the following behavior:

        • PUT Bucket acl and PUT Object acl calls will fail if the specified ACL allows public access.
        • PUT Object calls will fail if the request includes an object ACL.

        Note that enabling this setting doesn't affect existing policies or ACLs.

      • IgnorePublicAcls (boolean) --

        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.

      • BlockPublicPolicy (boolean) --

        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.

      • RestrictPublicBuckets (boolean) --

        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.

get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
put_public_access_block(**kwargs)

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'
)
Parameters
  • PublicAccessBlockConfiguration (dict) --

    [REQUIRED]

    The Public Access Block configuration that you want to apply to this Amazon Web Services account.

    • BlockPublicAcls (boolean) --

      Specifies whether Amazon S3 should block public ACLs for buckets in this account. Setting this element to TRUE causes the following behavior:

      • PUT Bucket acl and PUT Object acl calls will fail if the specified ACL allows public access.
      • PUT Object calls will fail if the request includes an object ACL.

      Note that enabling this setting doesn't affect existing policies or ACLs.

    • IgnorePublicAcls (boolean) --

      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.

    • BlockPublicPolicy (boolean) --

      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.

    • RestrictPublicBuckets (boolean) --

      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.

  • AccountId (string) --

    [REQUIRED]

    The Account ID for the Amazon Web Services account whose Public Access Block configuration you want to set.

Returns

None

Paginators

The available paginators are: