Class CfnStreamingDistribution.LoggingProperty.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.CfnStreamingDistribution.LoggingProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnStreamingDistribution.LoggingProperty>
- Enclosing interface:
CfnStreamingDistribution.LoggingProperty
@Stability(Stable)
public static final class CfnStreamingDistribution.LoggingProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnStreamingDistribution.LoggingProperty>
A builder for
CfnStreamingDistribution.LoggingProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnStreamingDistribution.LoggingProperty.getBucket()
build()
Builds the configured instance.Sets the value ofCfnStreamingDistribution.LoggingProperty.getEnabled()
enabled
(IResolvable enabled) Sets the value ofCfnStreamingDistribution.LoggingProperty.getEnabled()
Sets the value ofCfnStreamingDistribution.LoggingProperty.getPrefix()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
bucket
Sets the value ofCfnStreamingDistribution.LoggingProperty.getBucket()
- Parameters:
bucket
- The Amazon S3 bucket to store the access logs in, for example,amzn-s3-demo-bucket.s3.amazonaws.com
. This parameter is required.- Returns:
this
-
enabled
Sets the value ofCfnStreamingDistribution.LoggingProperty.getEnabled()
- Parameters:
enabled
- Specifies whether you want CloudFront to save access logs to an Amazon S3 bucket. This parameter is required. 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, specifyfalse
forEnabled
, and specifyempty Bucket
andPrefix
elements. If you specifyfalse
forEnabled
but you specify values forBucket
andPrefix
, the values are automatically deleted.- Returns:
this
-
enabled
@Stability(Stable) public CfnStreamingDistribution.LoggingProperty.Builder enabled(IResolvable enabled) Sets the value ofCfnStreamingDistribution.LoggingProperty.getEnabled()
- Parameters:
enabled
- Specifies whether you want CloudFront to save access logs to an Amazon S3 bucket. This parameter is required. 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, specifyfalse
forEnabled
, and specifyempty Bucket
andPrefix
elements. If you specifyfalse
forEnabled
but you specify values forBucket
andPrefix
, the values are automatically deleted.- Returns:
this
-
prefix
Sets the value ofCfnStreamingDistribution.LoggingProperty.getPrefix()
- Parameters:
prefix
- An optional string that you want CloudFront to prefix to the access log filenames for this streaming distribution, for example,myprefix/
. This parameter is required. If you want to enable logging, but you don't want to specify a prefix, you still must include an emptyPrefix
element in theLogging
element.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnStreamingDistribution.LoggingProperty>
- Returns:
- a new instance of
CfnStreamingDistribution.LoggingProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-