Class: AWSCDK::Lightsail::CfnBucketProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lightsail::CfnBucketProps
- Defined in:
- lightsail/cfn_bucket_props.rb
Overview
Properties for defining a CfnBucket.
Instance Attribute Summary collapse
-
#access_rules ⇒ AWSCDK::IResolvable, ...
readonly
An object that describes the access rules for the bucket.
-
#bucket_name ⇒ String
readonly
The name of the bucket.
-
#bundle_id ⇒ String
readonly
The bundle ID for the bucket (for example,
small_1_0). -
#object_versioning ⇒ Boolean, ...
readonly
Indicates whether object versioning is enabled for the bucket.
-
#read_only_access_accounts ⇒ Array<String>?
readonly
An array of AWS account IDs that have read-only access to the bucket.
-
#resources_receiving_access ⇒ Array<String>?
readonly
An array of Lightsail instances that have access to the bucket.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
An array of key-value pairs to apply to this resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(bucket_name:, bundle_id:, access_rules: nil, object_versioning: nil, read_only_access_accounts: nil, resources_receiving_access: nil, tags: nil) ⇒ CfnBucketProps
constructor
A new instance of CfnBucketProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(bucket_name:, bundle_id:, access_rules: nil, object_versioning: nil, read_only_access_accounts: nil, resources_receiving_access: nil, tags: nil) ⇒ CfnBucketProps
Returns a new instance of CfnBucketProps.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lightsail/cfn_bucket_props.rb', line 16 def initialize(bucket_name:, bundle_id:, access_rules: nil, object_versioning: nil, read_only_access_accounts: nil, resources_receiving_access: nil, tags: nil) @bucket_name = bucket_name Jsii::Type.check_type(@bucket_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucketName") @bundle_id = bundle_id Jsii::Type.check_type(@bundle_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bundleId") @access_rules = access_rules.is_a?(Hash) ? ::AWSCDK::Lightsail::CfnBucket::AccessRulesProperty.new(**access_rules.transform_keys(&:to_sym)) : access_rules Jsii::Type.check_type(@access_rules, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19saWdodHNhaWwuQ2ZuQnVja2V0LkFjY2Vzc1J1bGVzUHJvcGVydHkifV19fQ==")), "accessRules") unless @access_rules.nil? @object_versioning = object_versioning Jsii::Type.check_type(@object_versioning, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "objectVersioning") unless @object_versioning.nil? @read_only_access_accounts = read_only_access_accounts Jsii::Type.check_type(@read_only_access_accounts, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "readOnlyAccessAccounts") unless @read_only_access_accounts.nil? @resources_receiving_access = resources_receiving_access Jsii::Type.check_type(@resources_receiving_access, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "resourcesReceivingAccess") unless @resources_receiving_access.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#access_rules ⇒ AWSCDK::IResolvable, ... (readonly)
An object that describes the access rules for the bucket.
49 50 51 |
# File 'lightsail/cfn_bucket_props.rb', line 49 def access_rules @access_rules end |
#bucket_name ⇒ String (readonly)
The name of the bucket.
37 38 39 |
# File 'lightsail/cfn_bucket_props.rb', line 37 def bucket_name @bucket_name end |
#bundle_id ⇒ String (readonly)
The bundle ID for the bucket (for example, small_1_0 ).
A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket.
44 45 46 |
# File 'lightsail/cfn_bucket_props.rb', line 44 def bundle_id @bundle_id end |
#object_versioning ⇒ Boolean, ... (readonly)
Indicates whether object versioning is enabled for the bucket.
The following options can be configured:
Enabled- Object versioning is enabled.Suspended- Object versioning was previously enabled but is currently suspended. Existing object versions are retained.NeverEnabled- Object versioning has never been enabled.
60 61 62 |
# File 'lightsail/cfn_bucket_props.rb', line 60 def object_versioning @object_versioning end |
#read_only_access_accounts ⇒ Array<String>? (readonly)
An array of AWS account IDs that have read-only access to the bucket.
65 66 67 |
# File 'lightsail/cfn_bucket_props.rb', line 65 def read_only_access_accounts @read_only_access_accounts end |
#resources_receiving_access ⇒ Array<String>? (readonly)
An array of Lightsail instances that have access to the bucket.
70 71 72 |
# File 'lightsail/cfn_bucket_props.rb', line 70 def resources_receiving_access @resources_receiving_access end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
An array of key-value pairs to apply to this resource.
For more information, see Tag in the AWS CloudFormation User Guide .
The
ValueofTagsis optional for Lightsail resources.
79 80 81 |
# File 'lightsail/cfn_bucket_props.rb', line 79 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 |
# File 'lightsail/cfn_bucket_props.rb', line 81 def self.jsii_properties { :bucket_name => "bucketName", :bundle_id => "bundleId", :access_rules => "accessRules", :object_versioning => "objectVersioning", :read_only_access_accounts => "readOnlyAccessAccounts", :resources_receiving_access => "resourcesReceivingAccess", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lightsail/cfn_bucket_props.rb', line 93 def to_jsii result = {} result.merge!({ "bucketName" => @bucket_name, "bundleId" => @bundle_id, "accessRules" => @access_rules, "objectVersioning" => @object_versioning, "readOnlyAccessAccounts" => @read_only_access_accounts, "resourcesReceivingAccess" => @resources_receiving_access, "tags" => @tags, }) result.compact end |