aws-cdk-lib.aws_cloudfront.CfnCachePolicyProps

interface CfnCachePolicyProps

LanguageType name
.NETAmazon.CDK.AWS.CloudFront.CfnCachePolicyProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscloudfront#CfnCachePolicyProps
Javasoftware.amazon.awscdk.services.cloudfront.CfnCachePolicyProps
Pythonaws_cdk.aws_cloudfront.CfnCachePolicyProps
TypeScript aws-cdk-lib » aws_cloudfront » CfnCachePolicyProps

Properties for defining a CfnCachePolicy.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudfront as cloudfront } from 'aws-cdk-lib';
const cfnCachePolicyProps: cloudfront.CfnCachePolicyProps = {
  cachePolicyConfig: {
    defaultTtl: 123,
    maxTtl: 123,
    minTtl: 123,
    name: 'name',
    parametersInCacheKeyAndForwardedToOrigin: {
      cookiesConfig: {
        cookieBehavior: 'cookieBehavior',

        // the properties below are optional
        cookies: ['cookies'],
      },
      enableAcceptEncodingGzip: false,
      headersConfig: {
        headerBehavior: 'headerBehavior',

        // the properties below are optional
        headers: ['headers'],
      },
      queryStringsConfig: {
        queryStringBehavior: 'queryStringBehavior',

        // the properties below are optional
        queryStrings: ['queryStrings'],
      },

      // the properties below are optional
      enableAcceptEncodingBrotli: false,
    },

    // the properties below are optional
    comment: 'comment',
  },
};

Properties

NameTypeDescription
cachePolicyConfigIResolvable | CachePolicyConfigPropertyThe cache policy configuration.

cachePolicyConfig

Type: IResolvable | CachePolicyConfigProperty

The cache policy configuration.