Class: AWSCDK::S3Express::CfnBucketPolicyProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3Express::CfnBucketPolicyProps
- Defined in:
- s3_express/cfn_bucket_policy_props.rb
Overview
Properties for defining a CfnBucketPolicy.
Instance Attribute Summary collapse
-
#bucket ⇒ String
readonly
The name of the S3 directory bucket to which the policy applies.
-
#policy_document ⇒ Object
readonly
A policy document containing permissions to add to the specified bucket.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(bucket:, policy_document:) ⇒ CfnBucketPolicyProps
constructor
A new instance of CfnBucketPolicyProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(bucket:, policy_document:) ⇒ CfnBucketPolicyProps
Returns a new instance of CfnBucketPolicyProps.
11 12 13 14 15 16 |
# File 's3_express/cfn_bucket_policy_props.rb', line 11 def initialize(bucket:, policy_document:) @bucket = bucket Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucket") @policy_document = policy_document Jsii::Type.check_type(@policy_document, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "policyDocument") end |
Instance Attribute Details
#bucket ⇒ String (readonly)
The name of the S3 directory bucket to which the policy applies.
22 23 24 |
# File 's3_express/cfn_bucket_policy_props.rb', line 22 def bucket @bucket end |
#policy_document ⇒ Object (readonly)
A policy document containing permissions to add to the specified bucket.
In IAM, you must provide policy documents in JSON format. However, in CloudFormation you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to IAM. For more information, see the AWS::IAM::Policy PolicyDocument resource description in this guide and Policies and Permissions in Amazon S3 in the Amazon S3 User Guide .
29 30 31 |
# File 's3_express/cfn_bucket_policy_props.rb', line 29 def policy_document @policy_document end |
Class Method Details
.jsii_properties ⇒ Object
31 32 33 34 35 36 |
# File 's3_express/cfn_bucket_policy_props.rb', line 31 def self.jsii_properties { :bucket => "bucket", :policy_document => "policyDocument", } end |
Instance Method Details
#to_jsii ⇒ Object
38 39 40 41 42 43 44 45 |
# File 's3_express/cfn_bucket_policy_props.rb', line 38 def to_jsii result = {} result.merge!({ "bucket" => @bucket, "policyDocument" => @policy_document, }) result.compact end |