Class: AWSCDK::S3::BucketPolicyProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3::BucketPolicyProps
- Defined in:
- s3/bucket_policy_props.rb
Instance Attribute Summary collapse
-
#bucket ⇒ AWSCDK::S3::IBucket
readonly
The Amazon S3 bucket that the policy applies to.
-
#document ⇒ AWSCDK::IAM::PolicyDocument?
readonly
Policy document to apply to the bucket.
-
#removal_policy ⇒ AWSCDK::RemovalPolicy?
readonly
Policy to apply when the policy is removed from this stack.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(bucket:, document: nil, removal_policy: nil) ⇒ BucketPolicyProps
constructor
A new instance of BucketPolicyProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(bucket:, document: nil, removal_policy: nil) ⇒ BucketPolicyProps
Returns a new instance of BucketPolicyProps.
9 10 11 12 13 14 15 16 |
# File 's3/bucket_policy_props.rb', line 9 def initialize(bucket:, document: nil, removal_policy: nil) @bucket = bucket Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket") @document = document Jsii::Type.check_type(@document, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLlBvbGljeURvY3VtZW50In0=")), "document") unless @document.nil? @removal_policy = removal_policy Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil? end |
Instance Attribute Details
#bucket ⇒ AWSCDK::S3::IBucket (readonly)
The Amazon S3 bucket that the policy applies to.
21 22 23 |
# File 's3/bucket_policy_props.rb', line 21 def bucket @bucket end |
#document ⇒ AWSCDK::IAM::PolicyDocument? (readonly)
Note:
Default: - A new empty PolicyDocument will be created.
Policy document to apply to the bucket.
26 27 28 |
# File 's3/bucket_policy_props.rb', line 26 def document @document end |
#removal_policy ⇒ AWSCDK::RemovalPolicy? (readonly)
Note:
Default: - RemovalPolicy.DESTROY.
Policy to apply when the policy is removed from this stack.
31 32 33 |
# File 's3/bucket_policy_props.rb', line 31 def removal_policy @removal_policy end |
Class Method Details
.jsii_properties ⇒ Object
33 34 35 36 37 38 39 |
# File 's3/bucket_policy_props.rb', line 33 def self.jsii_properties { :bucket => "bucket", :document => "document", :removal_policy => "removalPolicy", } end |
Instance Method Details
#to_jsii ⇒ Object
41 42 43 44 45 46 47 48 49 |
# File 's3/bucket_policy_props.rb', line 41 def to_jsii result = {} result.merge!({ "bucket" => @bucket, "document" => @document, "removalPolicy" => @removal_policy, }) result.compact end |