Class: AWSCDK::CloudFront::CfnDistribution::S3OriginConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::CfnDistribution::S3OriginConfigProperty
- Defined in:
- cloud_front/cfn_distribution.rb
Overview
A complex type that contains information about the Amazon S3 origin.
If the origin is a custom origin or an S3 bucket that is configured as a website endpoint, use the CustomOriginConfig element instead.
Instance Attribute Summary collapse
-
#origin_access_identity ⇒ String?
readonly
If you're using origin access control (OAC) instead of origin access identity, specify an empty
OriginAccessIdentityelement. -
#origin_read_timeout ⇒ Numeric?
readonly
Specifies how long, in seconds, CloudFront waits for a response from the origin.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(origin_access_identity: nil, origin_read_timeout: nil) ⇒ S3OriginConfigProperty
constructor
A new instance of S3OriginConfigProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(origin_access_identity: nil, origin_read_timeout: nil) ⇒ S3OriginConfigProperty
Returns a new instance of S3OriginConfigProperty.
3121 3122 3123 3124 3125 3126 |
# File 'cloud_front/cfn_distribution.rb', line 3121 def initialize(origin_access_identity: nil, origin_read_timeout: nil) @origin_access_identity = origin_access_identity Jsii::Type.check_type(@origin_access_identity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "originAccessIdentity") unless @origin_access_identity.nil? @origin_read_timeout = origin_read_timeout Jsii::Type.check_type(@origin_read_timeout, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "originReadTimeout") unless @origin_read_timeout.nil? end |
Instance Attribute Details
#origin_access_identity ⇒ String? (readonly)
Default: - ""
If you're using origin access control (OAC) instead of origin access identity, specify an empty
OriginAccessIdentityelement.
For more information, see Restricting access to an AWS in the Amazon CloudFront Developer Guide .
The CloudFront origin access identity to associate with the origin. Use an origin access identity to configure the origin so that viewers can only access objects in an Amazon S3 bucket through CloudFront. The format of the value is:
origin-access-identity/cloudfront/ID-of-origin-access-identity
The *ID-of-origin-access-identity* is the value that CloudFront returned in the ID element when you created the origin access identity.
If you want viewers to be able to access objects using either the CloudFront URL or the Amazon S3 URL, specify an empty OriginAccessIdentity element.
To delete the origin access identity from an existing distribution, update the distribution configuration and include an empty OriginAccessIdentity element.
To replace the origin access identity, update the distribution configuration and specify the new origin access identity.
For more information about the origin access identity, see Serving Private Content through CloudFront in the Amazon CloudFront Developer Guide .
3149 3150 3151 |
# File 'cloud_front/cfn_distribution.rb', line 3149 def origin_access_identity @origin_access_identity end |
#origin_read_timeout ⇒ Numeric? (readonly)
Default: - 30
Specifies how long, in seconds, CloudFront waits for a response from the origin.
This is also known as the origin response timeout . The minimum timeout is 1 second, the maximum is 120 seconds, and the default (if you don't specify otherwise) is 30 seconds.
For more information, see Response timeout in the Amazon CloudFront Developer Guide .
3159 3160 3161 |
# File 'cloud_front/cfn_distribution.rb', line 3159 def origin_read_timeout @origin_read_timeout end |
Class Method Details
.jsii_properties ⇒ Object
3161 3162 3163 3164 3165 3166 |
# File 'cloud_front/cfn_distribution.rb', line 3161 def self.jsii_properties { :origin_access_identity => "originAccessIdentity", :origin_read_timeout => "originReadTimeout", } end |
Instance Method Details
#to_jsii ⇒ Object
3168 3169 3170 3171 3172 3173 3174 3175 |
# File 'cloud_front/cfn_distribution.rb', line 3168 def to_jsii result = {} result.merge!({ "originAccessIdentity" => @origin_access_identity, "originReadTimeout" => @origin_read_timeout, }) result.compact end |