Class: AWSCDK::S3::CfnBucket::CorsConfigurationProperty

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

Overview

Describes the cross-origin access configuration for objects in an Amazon S3 bucket.

For more information, see Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cors_rules:) ⇒ CorsConfigurationProperty

Returns a new instance of CorsConfigurationProperty.

Parameters:



1317
1318
1319
1320
# File 's3/cfn_bucket.rb', line 1317

def initialize(cors_rules:)
  @cors_rules = cors_rules
  Jsii::Type.check_type(@cors_rules, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuQ2ZuQnVja2V0LkNvcnNSdWxlUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "corsRules")
end

Instance Attribute Details

#cors_rulesAWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::S3::CfnBucket::CorsRuleProperty> (readonly)

A set of origins and methods (cross-origin access that you want to allow).

You can add up to 100 rules to the configuration.



1328
1329
1330
# File 's3/cfn_bucket.rb', line 1328

def cors_rules
  @cors_rules
end

Class Method Details

.jsii_propertiesObject



1330
1331
1332
1333
1334
# File 's3/cfn_bucket.rb', line 1330

def self.jsii_properties
  {
    :cors_rules => "corsRules",
  }
end

Instance Method Details

#to_jsiiObject



1336
1337
1338
1339
1340
1341
1342
# File 's3/cfn_bucket.rb', line 1336

def to_jsii
  result = {}
  result.merge!({
    "corsRules" => @cors_rules,
  })
  result.compact
end