:doc:`S3 <../../s3>` / Client / delete_public_access_block

**************************
delete_public_access_block
**************************



.. py:method:: S3.Client.delete_public_access_block(**kwargs)

  

  .. note::

    

    This operation is not supported for directory buckets.

    

   

  Removes the ``PublicAccessBlock`` configuration for an Amazon S3 bucket. This operation removes the bucket-level configuration only. The effective public access behavior will still be governed by account-level settings (which may inherit from organization-level policies). To use this operation, you must have the ``s3:PutBucketPublicAccessBlock`` permission. For more information about permissions, see `Permissions Related to Bucket Subresource Operations <https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources>`__ and `Managing Access Permissions to Your Amazon S3 Resources <https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html>`__.

   

  The following operations are related to ``DeletePublicAccessBlock``:

   

  
  * `Using Amazon S3 Block Public Access <https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html>`__
   
  * `GetPublicAccessBlock <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html>`__
   
  * `PutPublicAccessBlock <https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html>`__
   
  * `GetBucketPolicyStatus <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html>`__
  

   

  .. warning::

     

    You must URL encode any signed header values that contain spaces. For example, if your header value is ``my file.txt``, containing two spaces after ``my``, you must URL encode this value to ``my%20%20file.txt``.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletePublicAccessBlock>`_  


  **Request Syntax**
  ::

    response = client.delete_public_access_block(
        Bucket='string',
        ExpectedBucketOwner='string'
    )
    
  :type Bucket: string
  :param Bucket: **[REQUIRED]** 

    The Amazon S3 bucket whose ``PublicAccessBlock`` configuration you want to delete.

    

  
  :type ExpectedBucketOwner: string
  :param ExpectedBucketOwner: 

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code ``403 Forbidden`` (access denied).

    

  
  
  :returns: None