Class: AWSCDK::Lightsail::CfnBucket::AccessRulesProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lightsail/cfn_bucket.rb

Overview

AccessRules is a property of the AWS::Lightsail::Bucket resource. It describes access rules for a bucket.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allow_public_overrides: nil, object_access: nil) ⇒ AccessRulesProperty

Returns a new instance of AccessRulesProperty.

Parameters:

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

    A Boolean value indicating whether the access control list (ACL) permissions that are applied to individual objects override the GetObject option that is currently specified.

  • object_access (String, nil) (defaults to: nil)

    Specifies the anonymous access to all objects in a bucket.



613
614
615
616
617
618
# File 'lightsail/cfn_bucket.rb', line 613

def initialize(allow_public_overrides: nil, object_access: nil)
  @allow_public_overrides = allow_public_overrides
  Jsii::Type.check_type(@allow_public_overrides, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "allowPublicOverrides") unless @allow_public_overrides.nil?
  @object_access = object_access
  Jsii::Type.check_type(@object_access, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "objectAccess") unless @object_access.nil?
end

Instance Attribute Details

#allow_public_overridesBoolean, ... (readonly)

A Boolean value indicating whether the access control list (ACL) permissions that are applied to individual objects override the GetObject option that is currently specified.

When this is true, you can use the PutObjectAcl Amazon S3 API operation to set individual objects to public (read-only) or private, using either the public-read ACL or the private ACL.



626
627
628
# File 'lightsail/cfn_bucket.rb', line 626

def allow_public_overrides
  @allow_public_overrides
end

#object_accessString? (readonly)

Specifies the anonymous access to all objects in a bucket.

The following options can be specified:

  • public - Sets all objects in the bucket to public (read-only), making them readable by everyone on the internet.

If the GetObject value is set to public , then all objects in the bucket default to public regardless of the allow_public_overrides value.

  • private - Sets all objects in the bucket to private, making them readable only by you and anyone that you grant access to.

If the GetObject value is set to private , and the allow_public_overrides value is set to true , then all objects in the bucket default to private unless they are configured with a public-read ACL. Individual objects with a public-read ACL are readable by everyone on the internet.



641
642
643
# File 'lightsail/cfn_bucket.rb', line 641

def object_access
  @object_access
end

Class Method Details

.jsii_propertiesObject



643
644
645
646
647
648
# File 'lightsail/cfn_bucket.rb', line 643

def self.jsii_properties
  {
    :allow_public_overrides => "allowPublicOverrides",
    :object_access => "objectAccess",
  }
end

Instance Method Details

#to_jsiiObject



650
651
652
653
654
655
656
657
# File 'lightsail/cfn_bucket.rb', line 650

def to_jsii
  result = {}
  result.merge!({
    "allowPublicOverrides" => @allow_public_overrides,
    "objectAccess" => @object_access,
  })
  result.compact
end