Class: AWSCDK::CloudFront::CfnStreamingDistribution::LoggingProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::CfnStreamingDistribution::LoggingProperty
- Defined in:
- cloud_front/cfn_streaming_distribution.rb
Overview
A complex type that controls whether access logs are written for the streaming distribution.
Instance Attribute Summary collapse
-
#bucket ⇒ String
readonly
The Amazon S3 bucket to store the access logs in, for example,
amzn-s3-demo-bucket.s3.amazonaws.com. -
#enabled ⇒ Boolean, AWSCDK::IResolvable
readonly
Specifies whether you want CloudFront to save access logs to an Amazon S3 bucket.
-
#prefix ⇒ String
readonly
An optional string that you want CloudFront to prefix to the access log filenames for this streaming distribution, for example,
myprefix/.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(bucket:, enabled:, prefix:) ⇒ LoggingProperty
constructor
A new instance of LoggingProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(bucket:, enabled:, prefix:) ⇒ LoggingProperty
Returns a new instance of LoggingProperty.
534 535 536 537 538 539 540 541 |
# File 'cloud_front/cfn_streaming_distribution.rb', line 534 def initialize(bucket:, enabled:, prefix:) @bucket = bucket Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucket") @enabled = enabled Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled") @prefix = prefix Jsii::Type.check_type(@prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "prefix") end |
Instance Attribute Details
#bucket ⇒ String (readonly)
The Amazon S3 bucket to store the access logs in, for example, amzn-s3-demo-bucket.s3.amazonaws.com .
547 548 549 |
# File 'cloud_front/cfn_streaming_distribution.rb', line 547 def bucket @bucket end |
#enabled ⇒ Boolean, AWSCDK::IResolvable (readonly)
Specifies whether you want CloudFront to save access logs to an Amazon S3 bucket.
If you don't want to enable logging when you create a streaming distribution or if you want to disable logging for an existing streaming distribution, specify false for Enabled , and specify empty Bucket and Prefix elements. If you specify false for Enabled but you specify values for Bucket and Prefix , the values are automatically deleted.
554 555 556 |
# File 'cloud_front/cfn_streaming_distribution.rb', line 554 def enabled @enabled end |
#prefix ⇒ String (readonly)
An optional string that you want CloudFront to prefix to the access log filenames for this streaming distribution, for example, myprefix/ .
If you want to enable logging, but you don't want to specify a prefix, you still must include an empty Prefix element in the Logging element.
561 562 563 |
# File 'cloud_front/cfn_streaming_distribution.rb', line 561 def prefix @prefix end |
Class Method Details
.jsii_properties ⇒ Object
563 564 565 566 567 568 569 |
# File 'cloud_front/cfn_streaming_distribution.rb', line 563 def self.jsii_properties { :bucket => "bucket", :enabled => "enabled", :prefix => "prefix", } end |
Instance Method Details
#to_jsii ⇒ Object
571 572 573 574 575 576 577 578 579 |
# File 'cloud_front/cfn_streaming_distribution.rb', line 571 def to_jsii result = {} result.merge!({ "bucket" => @bucket, "enabled" => @enabled, "prefix" => @prefix, }) result.compact end |