Class CfnDistributionPropsMixin

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.mixins.preview.core.Mixin
software.amazon.awscdk.mixins.preview.services.cloudfront.mixins.CfnDistributionPropsMixin
All Implemented Interfaces:
IMixin, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)", date="2025-12-18T18:20:23.793Z") @Stability(Stable) public class CfnDistributionPropsMixin extends Mixin implements 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:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.mixins.preview.mixins.*;
 import software.amazon.awscdk.mixins.preview.services.cloudfront.mixins.*;
 CfnDistributionPropsMixin cfnDistributionPropsMixin = CfnDistributionPropsMixin.Builder.create(CfnDistributionMixinProps.builder()
         .distributionConfig(DistributionConfigProperty.builder()
                 .aliases(List.of("aliases"))
                 .anycastIpListId("anycastIpListId")
                 .cacheBehaviors(List.of(CacheBehaviorProperty.builder()
                         .allowedMethods(List.of("allowedMethods"))
                         .cachedMethods(List.of("cachedMethods"))
                         .cachePolicyId("cachePolicyId")
                         .compress(false)
                         .defaultTtl(123)
                         .fieldLevelEncryptionId("fieldLevelEncryptionId")
                         .forwardedValues(ForwardedValuesProperty.builder()
                                 .cookies(CookiesProperty.builder()
                                         .forward("forward")
                                         .whitelistedNames(List.of("whitelistedNames"))
                                         .build())
                                 .headers(List.of("headers"))
                                 .queryString(false)
                                 .queryStringCacheKeys(List.of("queryStringCacheKeys"))
                                 .build())
                         .functionAssociations(List.of(FunctionAssociationProperty.builder()
                                 .eventType("eventType")
                                 .functionArn("functionArn")
                                 .build()))
                         .grpcConfig(GrpcConfigProperty.builder()
                                 .enabled(false)
                                 .build())
                         .lambdaFunctionAssociations(List.of(LambdaFunctionAssociationProperty.builder()
                                 .eventType("eventType")
                                 .includeBody(false)
                                 .lambdaFunctionArn("lambdaFunctionArn")
                                 .build()))
                         .maxTtl(123)
                         .minTtl(123)
                         .originRequestPolicyId("originRequestPolicyId")
                         .pathPattern("pathPattern")
                         .realtimeLogConfigArn("realtimeLogConfigArn")
                         .responseHeadersPolicyId("responseHeadersPolicyId")
                         .smoothStreaming(false)
                         .targetOriginId("targetOriginId")
                         .trustedKeyGroups(List.of("trustedKeyGroups"))
                         .trustedSigners(List.of("trustedSigners"))
                         .viewerProtocolPolicy("viewerProtocolPolicy")
                         .build()))
                 .cnamEs(List.of("cnamEs"))
                 .comment("comment")
                 .connectionFunctionAssociation(ConnectionFunctionAssociationProperty.builder()
                         .id("id")
                         .build())
                 .connectionMode("connectionMode")
                 .continuousDeploymentPolicyId("continuousDeploymentPolicyId")
                 .customErrorResponses(List.of(CustomErrorResponseProperty.builder()
                         .errorCachingMinTtl(123)
                         .errorCode(123)
                         .responseCode(123)
                         .responsePagePath("responsePagePath")
                         .build()))
                 .customOrigin(LegacyCustomOriginProperty.builder()
                         .dnsName("dnsName")
                         .httpPort(123)
                         .httpsPort(123)
                         .originProtocolPolicy("originProtocolPolicy")
                         .originSslProtocols(List.of("originSslProtocols"))
                         .build())
                 .defaultCacheBehavior(DefaultCacheBehaviorProperty.builder()
                         .allowedMethods(List.of("allowedMethods"))
                         .cachedMethods(List.of("cachedMethods"))
                         .cachePolicyId("cachePolicyId")
                         .compress(false)
                         .defaultTtl(123)
                         .fieldLevelEncryptionId("fieldLevelEncryptionId")
                         .forwardedValues(ForwardedValuesProperty.builder()
                                 .cookies(CookiesProperty.builder()
                                         .forward("forward")
                                         .whitelistedNames(List.of("whitelistedNames"))
                                         .build())
                                 .headers(List.of("headers"))
                                 .queryString(false)
                                 .queryStringCacheKeys(List.of("queryStringCacheKeys"))
                                 .build())
                         .functionAssociations(List.of(FunctionAssociationProperty.builder()
                                 .eventType("eventType")
                                 .functionArn("functionArn")
                                 .build()))
                         .grpcConfig(GrpcConfigProperty.builder()
                                 .enabled(false)
                                 .build())
                         .lambdaFunctionAssociations(List.of(LambdaFunctionAssociationProperty.builder()
                                 .eventType("eventType")
                                 .includeBody(false)
                                 .lambdaFunctionArn("lambdaFunctionArn")
                                 .build()))
                         .maxTtl(123)
                         .minTtl(123)
                         .originRequestPolicyId("originRequestPolicyId")
                         .realtimeLogConfigArn("realtimeLogConfigArn")
                         .responseHeadersPolicyId("responseHeadersPolicyId")
                         .smoothStreaming(false)
                         .targetOriginId("targetOriginId")
                         .trustedKeyGroups(List.of("trustedKeyGroups"))
                         .trustedSigners(List.of("trustedSigners"))
                         .viewerProtocolPolicy("viewerProtocolPolicy")
                         .build())
                 .defaultRootObject("defaultRootObject")
                 .enabled(false)
                 .httpVersion("httpVersion")
                 .ipv6Enabled(false)
                 .logging(LoggingProperty.builder()
                         .bucket("bucket")
                         .includeCookies(false)
                         .prefix("prefix")
                         .build())
                 .originGroups(OriginGroupsProperty.builder()
                         .items(List.of(OriginGroupProperty.builder()
                                 .failoverCriteria(OriginGroupFailoverCriteriaProperty.builder()
                                         .statusCodes(StatusCodesProperty.builder()
                                                 .items(List.of(123))
                                                 .quantity(123)
                                                 .build())
                                         .build())
                                 .id("id")
                                 .members(OriginGroupMembersProperty.builder()
                                         .items(List.of(OriginGroupMemberProperty.builder()
                                                 .originId("originId")
                                                 .build()))
                                         .quantity(123)
                                         .build())
                                 .selectionCriteria("selectionCriteria")
                                 .build()))
                         .quantity(123)
                         .build())
                 .origins(List.of(OriginProperty.builder()
                         .connectionAttempts(123)
                         .connectionTimeout(123)
                         .customOriginConfig(CustomOriginConfigProperty.builder()
                                 .httpPort(123)
                                 .httpsPort(123)
                                 .ipAddressType("ipAddressType")
                                 .originKeepaliveTimeout(123)
                                 .originProtocolPolicy("originProtocolPolicy")
                                 .originReadTimeout(123)
                                 .originSslProtocols(List.of("originSslProtocols"))
                                 .build())
                         .domainName("domainName")
                         .id("id")
                         .originAccessControlId("originAccessControlId")
                         .originCustomHeaders(List.of(OriginCustomHeaderProperty.builder()
                                 .headerName("headerName")
                                 .headerValue("headerValue")
                                 .build()))
                         .originPath("originPath")
                         .originShield(OriginShieldProperty.builder()
                                 .enabled(false)
                                 .originShieldRegion("originShieldRegion")
                                 .build())
                         .responseCompletionTimeout(123)
                         .s3OriginConfig(S3OriginConfigProperty.builder()
                                 .originAccessIdentity("originAccessIdentity")
                                 .originReadTimeout(123)
                                 .build())
                         .vpcOriginConfig(VpcOriginConfigProperty.builder()
                                 .originKeepaliveTimeout(123)
                                 .originReadTimeout(123)
                                 .ownerAccountId("ownerAccountId")
                                 .vpcOriginId("vpcOriginId")
                                 .build())
                         .build()))
                 .priceClass("priceClass")
                 .restrictions(RestrictionsProperty.builder()
                         .geoRestriction(GeoRestrictionProperty.builder()
                                 .locations(List.of("locations"))
                                 .restrictionType("restrictionType")
                                 .build())
                         .build())
                 .s3Origin(LegacyS3OriginProperty.builder()
                         .dnsName("dnsName")
                         .originAccessIdentity("originAccessIdentity")
                         .build())
                 .staging(false)
                 .tenantConfig(TenantConfigProperty.builder()
                         .parameterDefinitions(List.of(ParameterDefinitionProperty.builder()
                                 .definition(DefinitionProperty.builder()
                                         .stringSchema(StringSchemaProperty.builder()
                                                 .comment("comment")
                                                 .defaultValue("defaultValue")
                                                 .required(false)
                                                 .build())
                                         .build())
                                 .name("name")
                                 .build()))
                         .build())
                 .viewerCertificate(ViewerCertificateProperty.builder()
                         .acmCertificateArn("acmCertificateArn")
                         .cloudFrontDefaultCertificate(false)
                         .iamCertificateId("iamCertificateId")
                         .minimumProtocolVersion("minimumProtocolVersion")
                         .sslSupportMethod("sslSupportMethod")
                         .build())
                 .viewerMtlsConfig(ViewerMtlsConfigProperty.builder()
                         .mode("mode")
                         .trustStoreConfig(TrustStoreConfigProperty.builder()
                                 .advertiseTrustStoreCaNames(false)
                                 .ignoreCertificateExpiry(false)
                                 .trustStoreId("trustStoreId")
                                 .build())
                         .build())
                 .webAclId("webAclId")
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build())
 .strategy(PropertyMergeStrategy.OVERRIDE)
 .build();
 

See Also:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> CFN_PROPERTY_KEYS
  • Constructor Details

    • CfnDistributionPropsMixin

      protected CfnDistributionPropsMixin(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnDistributionPropsMixin

      protected CfnDistributionPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnDistributionPropsMixin

      @Stability(Stable) public CfnDistributionPropsMixin(@NotNull CfnDistributionMixinProps props, @Nullable CfnPropertyMixinOptions options)
      Create a mixin to apply properties to AWS::CloudFront::Distribution.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnDistributionPropsMixin

      @Stability(Stable) public CfnDistributionPropsMixin(@NotNull CfnDistributionMixinProps props)
      Create a mixin to apply properties to AWS::CloudFront::Distribution.

      Parameters:
      props - L1 properties to apply. This parameter is required.
  • Method Details

    • applyTo

      @Stability(Stable) @NotNull public software.constructs.IConstruct applyTo(@NotNull software.constructs.IConstruct construct)
      Apply the mixin properties to the construct.

      Specified by:
      applyTo in interface IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnDistributionMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected PropertyMergeStrategy getStrategy()