Class CfnDistribution.LoggingProperty.Builder

java.lang.Object
software.amazon.awscdk.services.cloudfront.CfnDistribution.LoggingProperty.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnDistribution.LoggingProperty>
Enclosing interface:
CfnDistribution.LoggingProperty

@Stability(Stable) public static final class CfnDistribution.LoggingProperty.Builder extends Object implements software.amazon.jsii.Builder<CfnDistribution.LoggingProperty>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • bucket

      @Stability(Stable) public CfnDistribution.LoggingProperty.Builder bucket(String bucket)
      Parameters:
      bucket - The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com . This parameter is required.
      Returns:
      this
    • includeCookies

      @Stability(Stable) public CfnDistribution.LoggingProperty.Builder includeCookies(Boolean includeCookies)
      Parameters:
      includeCookies - 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 .
      Returns:
      this
    • includeCookies

      @Stability(Stable) public CfnDistribution.LoggingProperty.Builder includeCookies(IResolvable includeCookies)
      Parameters:
      includeCookies - 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 .
      Returns:
      this
    • prefix

      @Stability(Stable) public CfnDistribution.LoggingProperty.Builder prefix(String prefix)
      Parameters:
      prefix - 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.
      Returns:
      this
    • build

      @Stability(Stable) public CfnDistribution.LoggingProperty build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnDistribution.LoggingProperty>
      Returns:
      a new instance of CfnDistribution.LoggingProperty
      Throws:
      NullPointerException - if any required attribute was not provided