S3 PUT PublicAccessBlock

Create or modify the account-level PublicAccessBlock configuration.

To use this operation, you must have the s3:PutBucketPublicAccessBlock permission.
Important: If the PublicAccessBlock configuration is different between the bucket and the account, Amazon S3 uses the most restrictive combination of the bucket-level and account-level settings.
Note:

For information about the S3 Public Access Block feature used with IBM Storage Ceph, see S3 Block Public Access.

PUT /v20180820/configuration/publicAccessBlock HTTP/1.1
Host: cname.domain.com
x-amz-account-id: ACCOUNTID
<?xml version="1.0" encoding="UTF-8"?>
<PublicAccessBlockConfiguration xmlns="http://awss3control.amazonaws.com/doc/2018-08-20">
   <BlockPublicAcls>boolean</BlockPublicAcls>
   <IgnorePublicAcls>boolean</IgnorePublicAcls>
   <BlockPublicPolicy>boolean</BlockPublicPolicy>
   <RestrictPublicBuckets>boolean</RestrictPublicBuckets>
</PublicAccessBlockConfiguration>

Request Elements

The request includes PublicAccessBlockConfiguration, which specifies the account-level Public Access Block settings.

Table 1. PublicAccessBlockConfiguration
Element Type Description
BlockPublicAcls Boolean Specifies whether requests that include public ACLs are blocked.
IgnorePublicAcls Boolean Specifies whether public ACLs are ignored when evaluating access permissions.
BlockPublicPolicy Boolean Specifies whether public bucket policies are blocked.
RestrictPublicBuckets Boolean Specifies whether access to buckets with public policies is restricted to authorized users only.

Request Headers

For more information about request headers, see S3 common request headers.

Response

The response is an HTTP 200 response and is returned with an empty HTTP body.