Class: AWSCDK::CloudFrontOrigins::S3Origin Deprecated
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::CloudFrontOrigins::S3Origin
- Includes:
- AWSCDK::CloudFront::IOrigin
- Defined in:
- cloud_front_origins/s3_origin.rb
Overview
Deprecated.
Use S3BucketOrigin or S3StaticWebsiteOrigin instead.
An Origin that is backed by an S3 bucket.
If the bucket is configured for website hosting, this origin will be configured to use the bucket as an HTTP server origin and will use the bucket's configured website redirects and error handling. Otherwise, the origin is created as a bucket origin and will use CloudFront's redirect and error handling.
Class Method Summary collapse
Instance Method Summary collapse
-
#bind(scope, options) ⇒ AWSCDK::CloudFront::OriginBindConfig
The method called when a given Origin is added (for the first time) to a Distribution.
-
#initialize(bucket, props = nil) ⇒ S3Origin
constructor
A new instance of S3Origin.
Constructor Details
#initialize(bucket, props = nil) ⇒ S3Origin
Returns a new instance of S3Origin.
17 18 19 20 21 22 |
# File 'cloud_front_origins/s3_origin.rb', line 17 def initialize(bucket, props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudFrontOrigins::S3OriginProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWRmcm9udF9vcmlnaW5zLlMzT3JpZ2luUHJvcHMifQ==")), "props") unless props.nil? Jsii::Object.instance_method(:initialize).bind(self).call(bucket, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
24 25 26 27 28 |
# File 'cloud_front_origins/s3_origin.rb', line 24 def self.jsii_overridable_methods { :bind => { kind: :method, name: "bind", is_optional: false }, } end |
Instance Method Details
#bind(scope, options) ⇒ AWSCDK::CloudFront::OriginBindConfig
The method called when a given Origin is added (for the first time) to a Distribution.
35 36 37 38 39 40 |
# File 'cloud_front_origins/s3_origin.rb', line 35 def bind(scope, ) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") = .is_a?(Hash) ? ::AWSCDK::CloudFront::OriginBindOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWRmcm9udC5PcmlnaW5CaW5kT3B0aW9ucyJ9")), "options") jsii_call_method("bind", [scope, ]) end |