Class: AWSCDK::CloudFront::CfnStreamingDistribution::LoggingProperty

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bucket:, enabled:, prefix:) ⇒ LoggingProperty

Returns a new instance of LoggingProperty.

Parameters:

  • bucket (String)

    The Amazon S3 bucket to store the access logs in, for example, amzn-s3-demo-bucket.s3.amazonaws.com .

  • enabled (Boolean, AWSCDK::IResolvable)

    Specifies whether you want CloudFront to save access logs to an Amazon S3 bucket.

  • prefix (String)

    An optional string that you want CloudFront to prefix to the access log filenames for this streaming distribution, for example, myprefix/ .



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

#bucketString (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

#enabledBoolean, 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

#prefixString (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_propertiesObject



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_jsiiObject



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