CfnCachePolicyProps

class aws_cdk.aws_cloudfront.CfnCachePolicyProps(*, cache_policy_config)

Bases: object

Properties for defining a CfnCachePolicy.

Parameters:

cache_policy_config (Union[IResolvable, CachePolicyConfigProperty, Dict[str, Any]]) – The cache policy configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-cachepolicy.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cloudfront as cloudfront

cfn_cache_policy_props = cloudfront.CfnCachePolicyProps(
    cache_policy_config=cloudfront.CfnCachePolicy.CachePolicyConfigProperty(
        default_ttl=123,
        max_ttl=123,
        min_ttl=123,
        name="name",
        parameters_in_cache_key_and_forwarded_to_origin=cloudfront.CfnCachePolicy.ParametersInCacheKeyAndForwardedToOriginProperty(
            cookies_config=cloudfront.CfnCachePolicy.CookiesConfigProperty(
                cookie_behavior="cookieBehavior",

                # the properties below are optional
                cookies=["cookies"]
            ),
            enable_accept_encoding_gzip=False,
            headers_config=cloudfront.CfnCachePolicy.HeadersConfigProperty(
                header_behavior="headerBehavior",

                # the properties below are optional
                headers=["headers"]
            ),
            query_strings_config=cloudfront.CfnCachePolicy.QueryStringsConfigProperty(
                query_string_behavior="queryStringBehavior",

                # the properties below are optional
                query_strings=["queryStrings"]
            ),

            # the properties below are optional
            enable_accept_encoding_brotli=False
        ),

        # the properties below are optional
        comment="comment"
    )
)

Attributes

cache_policy_config

The cache policy configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-cachepolicy.html#cfn-cloudfront-cachepolicy-cachepolicyconfig