Class: AWSCDK::S3::CfnMultiRegionAccessPoint::PublicAccessBlockConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
s3/cfn_multi_region_access_point.rb

Overview

The PublicAccessBlock configuration that you want to apply to this Amazon S3 Multi-Region Access Point.

You can enable the configuration options in any combination. For more information about when Amazon S3 considers an object public, see The Meaning of "Public" in the Amazon S3 User Guide .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(block_public_acls: nil, block_public_policy: nil, ignore_public_acls: nil, restrict_public_buckets: nil) ⇒ PublicAccessBlockConfigurationProperty

Returns a new instance of PublicAccessBlockConfigurationProperty.

Parameters:

  • block_public_acls (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Specifies whether Amazon S3 should block public access control lists (ACLs) for this bucket and objects in this bucket.

  • block_public_policy (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Specifies whether Amazon S3 should block public bucket policies for this bucket.

  • ignore_public_acls (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket.

  • restrict_public_buckets (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Specifies whether Amazon S3 should restrict public bucket policies for this bucket.



544
545
546
547
548
549
550
551
552
553
# File 's3/cfn_multi_region_access_point.rb', line 544

def initialize(block_public_acls: nil, block_public_policy: nil, ignore_public_acls: nil, restrict_public_buckets: nil)
  @block_public_acls = block_public_acls
  Jsii::Type.check_type(@block_public_acls, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "blockPublicAcls") unless @block_public_acls.nil?
  @block_public_policy = block_public_policy
  Jsii::Type.check_type(@block_public_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "blockPublicPolicy") unless @block_public_policy.nil?
  @ignore_public_acls = ignore_public_acls
  Jsii::Type.check_type(@ignore_public_acls, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "ignorePublicAcls") unless @ignore_public_acls.nil?
  @restrict_public_buckets = restrict_public_buckets
  Jsii::Type.check_type(@restrict_public_buckets, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "restrictPublicBuckets") unless @restrict_public_buckets.nil?
end

Instance Attribute Details

#block_public_aclsBoolean, ... (readonly)

Specifies whether Amazon S3 should block public access control lists (ACLs) for this bucket and objects in this bucket.

Setting this element to TRUE causes the following behavior:

  • PUT Bucket ACL and PUT Object ACL calls fail if the specified ACL is public.
  • PUT Object calls fail if the request includes a public ACL.
  • PUT Bucket calls fail if the request includes a public ACL.

Enabling this setting doesn't affect existing policies or ACLs.



567
568
569
# File 's3/cfn_multi_region_access_point.rb', line 567

def block_public_acls
  @block_public_acls
end

#block_public_policyBoolean, ... (readonly)

Specifies whether Amazon S3 should block public bucket policies for this bucket.

Setting this element to TRUE causes Amazon S3 to reject calls to PUT Bucket policy if the specified bucket policy allows public access.

Enabling this setting doesn't affect existing bucket policies.



576
577
578
# File 's3/cfn_multi_region_access_point.rb', line 576

def block_public_policy
  @block_public_policy
end

#ignore_public_aclsBoolean, ... (readonly)

Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket.

Setting this element to TRUE causes Amazon S3 to ignore all public ACLs on this bucket and objects in this bucket.

Enabling this setting doesn't affect the persistence of any existing ACLs and doesn't prevent new public ACLs from being set.



585
586
587
# File 's3/cfn_multi_region_access_point.rb', line 585

def ignore_public_acls
  @ignore_public_acls
end

#restrict_public_bucketsBoolean, ... (readonly)

Specifies whether Amazon S3 should restrict public bucket policies for this bucket.

Setting this element to TRUE restricts access to this bucket to only AWS service principals and authorized users within this account if the bucket has a public policy.

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.



594
595
596
# File 's3/cfn_multi_region_access_point.rb', line 594

def restrict_public_buckets
  @restrict_public_buckets
end

Class Method Details

.jsii_propertiesObject



596
597
598
599
600
601
602
603
# File 's3/cfn_multi_region_access_point.rb', line 596

def self.jsii_properties
  {
    :block_public_acls => "blockPublicAcls",
    :block_public_policy => "blockPublicPolicy",
    :ignore_public_acls => "ignorePublicAcls",
    :restrict_public_buckets => "restrictPublicBuckets",
  }
end

Instance Method Details

#to_jsiiObject



605
606
607
608
609
610
611
612
613
614
# File 's3/cfn_multi_region_access_point.rb', line 605

def to_jsii
  result = {}
  result.merge!({
    "blockPublicAcls" => @block_public_acls,
    "blockPublicPolicy" => @block_public_policy,
    "ignorePublicAcls" => @ignore_public_acls,
    "restrictPublicBuckets" => @restrict_public_buckets,
  })
  result.compact
end