aws s3api put-public-access-block
This operation is not supported for directory buckets. AWS CLI reference
5 options Its page in the AWS CLI reference
Options
--bucketThe name of the Amazon S3 bucket whose PublicAccessBlock configuration you want to set.--checksum-algorithmIndicates the algorithm used to create the checksum for the object when you use the SDK.--content-md5The MD5 hash of the PutPublicAccessBlock request body.--expected-bucket-ownerThe account ID of the expected bucket owner.--public-access-block-configurationThe PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket.