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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnDistributionPropsMixin.static interfaceA complex type that describes how CloudFront processes requests.static interfaceA connection function association.static interfaceThis field is deprecated.static interfaceA complex type that controls:.static interfaceA custom origin.static interfaceA complex type that describes the default cache behavior if you don't specify aCacheBehaviorelement or if request URLs don't match any of the values ofPathPatterninCacheBehaviorelements.static interfaceThe value that you assigned to the parameter.static interfaceA distribution configuration.static interfacestatic interfaceA CloudFront function that is associated with a cache behavior in a CloudFront distribution.static interfaceA complex type that controls the countries in which your content is distributed.static interfaceAmazon CloudFront supports gRPC, an open-source remote procedure call (RPC) framework built on HTTP/2.static interfaceA complex type that contains a Lambda@Edge function association.static interfaceA custom origin.static interfaceThe origin as an Amazon S3 bucket.static interfaceA complex type that specifies whether access logs are written for the distribution.static interfaceA complex type that containsHeaderNameandHeaderValueelements, if any, for this distribution.static interfaceA complex data type that includes information about the failover criteria for an origin group, including the status codes for which CloudFront will failover from the primary origin to the second origin.static interfaceAn origin in an origin group.static interfaceA complex data type for the origins included in an origin group.static interfaceAn origin group includes two origins (a primary origin and a secondary origin to failover to) and a failover criteria that you specify.static interfaceA complex data type for the origin groups specified for a distribution.static interfaceAn origin.static interfaceCloudFront Origin Shield.static interfaceA list of parameter values to add to the resource.static interfaceA complex type that identifies ways in which you want to restrict distribution of your content.static interfaceA complex type that contains information about the Amazon S3 origin.static interfaceA complex data type for the status codes that you specify that, when returned by a primary origin, trigger CloudFront to failover to a second origin.static interfaceExample:static interfacestatic interfaceA trust store configuration.static interfaceA complex type that determines the distribution's SSL/TLS configuration for communicating with viewers.static interfaceA viewer mTLS configuration.static interfaceAn Amazon CloudFront VPC origin configuration.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.mixins.preview.core.IMixin
IMixin.Jsii$Default, IMixin.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate a mixin to apply properties toAWS::CloudFront::Distribution.Create a mixin to apply properties toAWS::CloudFront::Distribution.protectedCfnDistributionPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnDistributionPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionsoftware.constructs.IConstructapplyTo(software.constructs.IConstruct construct) Apply the mixin properties to the construct.protected CfnDistributionMixinPropsgetProps()protected PropertyMergeStrategysupports(software.constructs.IConstruct construct) Check if this mixin supports the given construct.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
-
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 toAWS::CloudFront::Distribution.- Parameters:
props- L1 properties to apply. This parameter is required.options- Mixin options.
-
CfnDistributionPropsMixin
Create a mixin to apply properties toAWS::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. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct. -
getProps
-
getStrategy
-