BlockPublicAccessOptions

class aws_cdk.aws_s3.BlockPublicAccessOptions(*, block_public_acls=None, block_public_policy=None, ignore_public_acls=None, restrict_public_buckets=None)

Bases: object

Parameters:
  • block_public_acls (Optional[bool]) – Whether to block public ACLs.

  • block_public_policy (Optional[bool]) – Whether to block public policy.

  • ignore_public_acls (Optional[bool]) – Whether to ignore public ACLs.

  • restrict_public_buckets (Optional[bool]) – Whether to restrict public access.

ExampleMetadata:

infused

Example:

bucket = s3.Bucket(self, "MyBlockedBucket",
    block_public_access=s3.BlockPublicAccess(block_public_policy=True)
)

Attributes

block_public_acls

Whether to block public ACLs.

See:

https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-options

block_public_policy

Whether to block public policy.

See:

https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-options

ignore_public_acls

Whether to ignore public ACLs.

See:

https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-options

restrict_public_buckets

Whether to restrict public access.

See:

https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-options