Class: AWSCDK::CloudFront::CfnDistribution::LoggingProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::CfnDistribution::LoggingProperty
- Defined in:
- cloud_front/cfn_distribution.rb
Overview
A complex type that specifies whether access logs are written for the distribution.
If you already enabled standard logging (legacy) and you want to enable standard logging (v2) to send your access logs to Amazon S3, we recommend that you specify a different Amazon S3 bucket or use a separate path in the same bucket (for example, use a log prefix or partitioning). This helps you keep track of which log files are associated with which logging subscription and prevents log files from overwriting each other. For more information, see Standard logging (access logs) in the Amazon CloudFront Developer Guide .
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. -
#include_cookies ⇒ Boolean, ...
readonly
Specifies whether you want CloudFront to include cookies in access logs, specify
trueforIncludeCookies. -
#prefix ⇒ String?
readonly
An optional string that you want CloudFront to prefix to the access log
filenamesfor this distribution, for example,myprefix/.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(bucket: nil, include_cookies: nil, prefix: nil) ⇒ LoggingProperty
constructor
A new instance of LoggingProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(bucket: nil, include_cookies: nil, prefix: nil) ⇒ LoggingProperty
Returns a new instance of LoggingProperty.
2442 2443 2444 2445 2446 2447 2448 2449 |
# File 'cloud_front/cfn_distribution.rb', line 2442 def initialize(bucket: nil, include_cookies: nil, prefix: nil) @bucket = bucket Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucket") unless @bucket.nil? @include_cookies = Jsii::Type.check_type(@include_cookies, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "includeCookies") unless @include_cookies.nil? @prefix = prefix Jsii::Type.check_type(@prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "prefix") unless @prefix.nil? 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 .
2455 2456 2457 |
# File 'cloud_front/cfn_distribution.rb', line 2455 def bucket @bucket end |
#include_cookies ⇒ Boolean, ... (readonly)
Default: - false
Specifies whether you want CloudFront to include cookies in access logs, specify true for IncludeCookies .
If you choose to include cookies in logs, CloudFront logs all cookies regardless of how you configure the cache behaviors for this distribution. If you don't want to include cookies when you create a distribution or if you want to disable include cookies for an existing distribution, specify false for IncludeCookies .
2463 2464 2465 |
# File 'cloud_front/cfn_distribution.rb', line 2463 def @include_cookies end |
#prefix ⇒ String? (readonly)
Default: - ""
An optional string that you want CloudFront to prefix to the access log filenames for this 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.
2471 2472 2473 |
# File 'cloud_front/cfn_distribution.rb', line 2471 def prefix @prefix end |
Class Method Details
.jsii_properties ⇒ Object
2473 2474 2475 2476 2477 2478 2479 |
# File 'cloud_front/cfn_distribution.rb', line 2473 def self.jsii_properties { :bucket => "bucket", :include_cookies => "includeCookies", :prefix => "prefix", } end |
Instance Method Details
#to_jsii ⇒ Object
2481 2482 2483 2484 2485 2486 2487 2488 2489 |
# File 'cloud_front/cfn_distribution.rb', line 2481 def to_jsii result = {} result.merge!({ "bucket" => @bucket, "includeCookies" => @include_cookies, "prefix" => @prefix, }) result.compact end |