Class CfnDistributionLogsMixin
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.mixins.preview.services.cloudfront.mixins.CfnDistributionLogsMixin
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IMixin
@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)",
date="2026-03-02T12:05:22.894Z")
@Stability(Stable)
public class CfnDistributionLogsMixin
extends Mixin
implements software.constructs.IMixin
A distribution tells CloudFront where you want content to be delivered from, and the details about how to track and manage content delivery.
Example:
import software.amazon.awscdk.mixins.preview.services.cloudfront.mixins.*;
// Create CloudFront distribution
IBucket origin;
Distribution distribution = Distribution.Builder.create(scope, "Distribution")
.defaultBehavior(BehaviorOptions.builder()
.origin(S3BucketOrigin.withOriginAccessControl(origin))
.build())
.build();
// Create destination bucket
Bucket destBucket = new Bucket(scope, "DeliveryBucket");
// Add permissions to bucket to facilitate log delivery
BucketPolicy bucketPolicy = BucketPolicy.Builder.create(scope, "DeliveryBucketPolicy")
.bucket(destBucket)
.document(new PolicyDocument())
.build();
// Create S3 delivery destination for logs
CfnDeliveryDestination destination = CfnDeliveryDestination.Builder.create(scope, "Destination")
.destinationResourceArn(destBucket.getBucketArn())
.name("unique-destination-name")
.deliveryDestinationType("S3")
.build();
distribution.with(CfnDistributionLogsMixin.CONNECTION_LOGS.toDestination(destination));
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IMixin
software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CfnDistributionAccessLogsstatic final CfnDistributionConnectionLogs -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnDistributionLogsMixin(String logType, ILogsDelivery logDelivery) Create a mixin to enable vended logs forAWS::CloudFront::Distribution.protectedCfnDistributionLogsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnDistributionLogsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(software.constructs.IConstruct resource) Apply vended logs configuration to the construct.protected ILogsDeliveryprotected Stringsupports(software.constructs.IConstruct construct) Check if this mixin supports the given construct (has vendedLogs property).Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
ACCESS_LOGS
-
CONNECTION_LOGS
-
-
Constructor Details
-
CfnDistributionLogsMixin
protected CfnDistributionLogsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
CfnDistributionLogsMixin
protected CfnDistributionLogsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnDistributionLogsMixin
@Stability(Stable) public CfnDistributionLogsMixin(@NotNull String logType, @NotNull ILogsDelivery logDelivery) Create a mixin to enable vended logs forAWS::CloudFront::Distribution.- Parameters:
logType- Type of logs that are getting vended. This parameter is required.logDelivery- Object in charge of setting up the delivery source, delivery destination, and delivery connection. This parameter is required.
-
-
Method Details
-
applyTo
@Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct resource) Apply vended logs configuration to the construct. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct (has vendedLogs property). -
getLogDelivery
-
getLogType
-