Interface CfnDistributionPropsMixin.DefaultCacheBehaviorProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnDistributionPropsMixin.DefaultCacheBehaviorProperty.Jsii$Proxy
Enclosing class:
CfnDistributionPropsMixin

@Stability(Stable) public static interface CfnDistributionPropsMixin.DefaultCacheBehaviorProperty extends software.amazon.jsii.JsiiSerializable
A complex type that describes the default cache behavior if you don't specify a CacheBehavior element or if request URLs don't match any of the values of PathPattern in CacheBehavior elements.

You must create exactly one default cache behavior.

If your minimum TTL is greater than 0, CloudFront will cache content for at least the duration specified in the cache policy's minimum TTL, even if the Cache-Control: no-cache , no-store , or private directives are present in the origin headers.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.cfnpropertymixins.services.cloudfront.*;
 DefaultCacheBehaviorProperty defaultCacheBehaviorProperty = 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();
 

See Also: