1. Packages
  2. AWS Native
  3. API Docs
  4. cloudfront
  5. getCachePolicy

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.111.0 published on Tuesday, Jul 9, 2024 by Pulumi

aws-native.cloudfront.getCachePolicy

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.111.0 published on Tuesday, Jul 9, 2024 by Pulumi

    Resource Type definition for AWS::CloudFront::CachePolicy

    Using getCachePolicy

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getCachePolicy(args: GetCachePolicyArgs, opts?: InvokeOptions): Promise<GetCachePolicyResult>
    function getCachePolicyOutput(args: GetCachePolicyOutputArgs, opts?: InvokeOptions): Output<GetCachePolicyResult>
    def get_cache_policy(id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetCachePolicyResult
    def get_cache_policy_output(id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetCachePolicyResult]
    func LookupCachePolicy(ctx *Context, args *LookupCachePolicyArgs, opts ...InvokeOption) (*LookupCachePolicyResult, error)
    func LookupCachePolicyOutput(ctx *Context, args *LookupCachePolicyOutputArgs, opts ...InvokeOption) LookupCachePolicyResultOutput

    > Note: This function is named LookupCachePolicy in the Go SDK.

    public static class GetCachePolicy 
    {
        public static Task<GetCachePolicyResult> InvokeAsync(GetCachePolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetCachePolicyResult> Invoke(GetCachePolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCachePolicyResult> getCachePolicy(GetCachePolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws-native:cloudfront:getCachePolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The unique identifier for the cache policy. For example: 2766f7b2-75c5-41c6-8f06-bf4303a2f2f5 .
    Id string
    The unique identifier for the cache policy. For example: 2766f7b2-75c5-41c6-8f06-bf4303a2f2f5 .
    id String
    The unique identifier for the cache policy. For example: 2766f7b2-75c5-41c6-8f06-bf4303a2f2f5 .
    id string
    The unique identifier for the cache policy. For example: 2766f7b2-75c5-41c6-8f06-bf4303a2f2f5 .
    id str
    The unique identifier for the cache policy. For example: 2766f7b2-75c5-41c6-8f06-bf4303a2f2f5 .
    id String
    The unique identifier for the cache policy. For example: 2766f7b2-75c5-41c6-8f06-bf4303a2f2f5 .

    getCachePolicy Result

    The following output properties are available:

    CachePolicyConfig Pulumi.AwsNative.CloudFront.Outputs.CachePolicyConfig
    The cache policy configuration.
    Id string
    The unique identifier for the cache policy. For example: 2766f7b2-75c5-41c6-8f06-bf4303a2f2f5 .
    LastModifiedTime string
    The date and time when the cache policy was last modified.
    CachePolicyConfig CachePolicyConfig
    The cache policy configuration.
    Id string
    The unique identifier for the cache policy. For example: 2766f7b2-75c5-41c6-8f06-bf4303a2f2f5 .
    LastModifiedTime string
    The date and time when the cache policy was last modified.
    cachePolicyConfig CachePolicyConfig
    The cache policy configuration.
    id String
    The unique identifier for the cache policy. For example: 2766f7b2-75c5-41c6-8f06-bf4303a2f2f5 .
    lastModifiedTime String
    The date and time when the cache policy was last modified.
    cachePolicyConfig CachePolicyConfig
    The cache policy configuration.
    id string
    The unique identifier for the cache policy. For example: 2766f7b2-75c5-41c6-8f06-bf4303a2f2f5 .
    lastModifiedTime string
    The date and time when the cache policy was last modified.
    cache_policy_config CachePolicyConfig
    The cache policy configuration.
    id str
    The unique identifier for the cache policy. For example: 2766f7b2-75c5-41c6-8f06-bf4303a2f2f5 .
    last_modified_time str
    The date and time when the cache policy was last modified.
    cachePolicyConfig Property Map
    The cache policy configuration.
    id String
    The unique identifier for the cache policy. For example: 2766f7b2-75c5-41c6-8f06-bf4303a2f2f5 .
    lastModifiedTime String
    The date and time when the cache policy was last modified.

    Supporting Types

    CachePolicyConfig

    DefaultTtl double

    The default amount of time, in seconds, that you want objects to stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. CloudFront uses this value as the object's time to live (TTL) only when the origin does not send Cache-Control or Expires headers with the object. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .

    The default value for this field is 86400 seconds (one day). If the value of MinTTL is more than 86400 seconds, then the default value for this field is the same as the value of MinTTL .

    MaxTtl double

    The maximum amount of time, in seconds, that objects stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. CloudFront uses this value only when the origin sends Cache-Control or Expires headers with the object. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .

    The default value for this field is 31536000 seconds (one year). If the value of MinTTL or DefaultTTL is more than 31536000 seconds, then the default value for this field is the same as the value of DefaultTTL .

    MinTtl double
    The minimum amount of time, in seconds, that you want objects to stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .
    Name string
    A unique name to identify the cache policy.
    ParametersInCacheKeyAndForwardedToOrigin Pulumi.AwsNative.CloudFront.Inputs.CachePolicyParametersInCacheKeyAndForwardedToOrigin
    The HTTP headers, cookies, and URL query strings to include in the cache key. The values included in the cache key are also included in requests that CloudFront sends to the origin.
    Comment string
    A comment to describe the cache policy. The comment cannot be longer than 128 characters.
    DefaultTtl float64

    The default amount of time, in seconds, that you want objects to stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. CloudFront uses this value as the object's time to live (TTL) only when the origin does not send Cache-Control or Expires headers with the object. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .

    The default value for this field is 86400 seconds (one day). If the value of MinTTL is more than 86400 seconds, then the default value for this field is the same as the value of MinTTL .

    MaxTtl float64

    The maximum amount of time, in seconds, that objects stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. CloudFront uses this value only when the origin sends Cache-Control or Expires headers with the object. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .

    The default value for this field is 31536000 seconds (one year). If the value of MinTTL or DefaultTTL is more than 31536000 seconds, then the default value for this field is the same as the value of DefaultTTL .

    MinTtl float64
    The minimum amount of time, in seconds, that you want objects to stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .
    Name string
    A unique name to identify the cache policy.
    ParametersInCacheKeyAndForwardedToOrigin CachePolicyParametersInCacheKeyAndForwardedToOrigin
    The HTTP headers, cookies, and URL query strings to include in the cache key. The values included in the cache key are also included in requests that CloudFront sends to the origin.
    Comment string
    A comment to describe the cache policy. The comment cannot be longer than 128 characters.
    defaultTtl Double

    The default amount of time, in seconds, that you want objects to stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. CloudFront uses this value as the object's time to live (TTL) only when the origin does not send Cache-Control or Expires headers with the object. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .

    The default value for this field is 86400 seconds (one day). If the value of MinTTL is more than 86400 seconds, then the default value for this field is the same as the value of MinTTL .

    maxTtl Double

    The maximum amount of time, in seconds, that objects stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. CloudFront uses this value only when the origin sends Cache-Control or Expires headers with the object. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .

    The default value for this field is 31536000 seconds (one year). If the value of MinTTL or DefaultTTL is more than 31536000 seconds, then the default value for this field is the same as the value of DefaultTTL .

    minTtl Double
    The minimum amount of time, in seconds, that you want objects to stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .
    name String
    A unique name to identify the cache policy.
    parametersInCacheKeyAndForwardedToOrigin CachePolicyParametersInCacheKeyAndForwardedToOrigin
    The HTTP headers, cookies, and URL query strings to include in the cache key. The values included in the cache key are also included in requests that CloudFront sends to the origin.
    comment String
    A comment to describe the cache policy. The comment cannot be longer than 128 characters.
    defaultTtl number

    The default amount of time, in seconds, that you want objects to stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. CloudFront uses this value as the object's time to live (TTL) only when the origin does not send Cache-Control or Expires headers with the object. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .

    The default value for this field is 86400 seconds (one day). If the value of MinTTL is more than 86400 seconds, then the default value for this field is the same as the value of MinTTL .

    maxTtl number

    The maximum amount of time, in seconds, that objects stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. CloudFront uses this value only when the origin sends Cache-Control or Expires headers with the object. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .

    The default value for this field is 31536000 seconds (one year). If the value of MinTTL or DefaultTTL is more than 31536000 seconds, then the default value for this field is the same as the value of DefaultTTL .

    minTtl number
    The minimum amount of time, in seconds, that you want objects to stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .
    name string
    A unique name to identify the cache policy.
    parametersInCacheKeyAndForwardedToOrigin CachePolicyParametersInCacheKeyAndForwardedToOrigin
    The HTTP headers, cookies, and URL query strings to include in the cache key. The values included in the cache key are also included in requests that CloudFront sends to the origin.
    comment string
    A comment to describe the cache policy. The comment cannot be longer than 128 characters.
    default_ttl float

    The default amount of time, in seconds, that you want objects to stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. CloudFront uses this value as the object's time to live (TTL) only when the origin does not send Cache-Control or Expires headers with the object. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .

    The default value for this field is 86400 seconds (one day). If the value of MinTTL is more than 86400 seconds, then the default value for this field is the same as the value of MinTTL .

    max_ttl float

    The maximum amount of time, in seconds, that objects stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. CloudFront uses this value only when the origin sends Cache-Control or Expires headers with the object. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .

    The default value for this field is 31536000 seconds (one year). If the value of MinTTL or DefaultTTL is more than 31536000 seconds, then the default value for this field is the same as the value of DefaultTTL .

    min_ttl float
    The minimum amount of time, in seconds, that you want objects to stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .
    name str
    A unique name to identify the cache policy.
    parameters_in_cache_key_and_forwarded_to_origin CachePolicyParametersInCacheKeyAndForwardedToOrigin
    The HTTP headers, cookies, and URL query strings to include in the cache key. The values included in the cache key are also included in requests that CloudFront sends to the origin.
    comment str
    A comment to describe the cache policy. The comment cannot be longer than 128 characters.
    defaultTtl Number

    The default amount of time, in seconds, that you want objects to stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. CloudFront uses this value as the object's time to live (TTL) only when the origin does not send Cache-Control or Expires headers with the object. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .

    The default value for this field is 86400 seconds (one day). If the value of MinTTL is more than 86400 seconds, then the default value for this field is the same as the value of MinTTL .

    maxTtl Number

    The maximum amount of time, in seconds, that objects stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. CloudFront uses this value only when the origin sends Cache-Control or Expires headers with the object. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .

    The default value for this field is 31536000 seconds (one year). If the value of MinTTL or DefaultTTL is more than 31536000 seconds, then the default value for this field is the same as the value of DefaultTTL .

    minTtl Number
    The minimum amount of time, in seconds, that you want objects to stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .
    name String
    A unique name to identify the cache policy.
    parametersInCacheKeyAndForwardedToOrigin Property Map
    The HTTP headers, cookies, and URL query strings to include in the cache key. The values included in the cache key are also included in requests that CloudFront sends to the origin.
    comment String
    A comment to describe the cache policy. The comment cannot be longer than 128 characters.

    CachePolicyCookiesConfig

    CookieBehavior string
    Determines whether any cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:

    • none – No cookies in viewer requests are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none , any cookies that are listed in an OriginRequestPolicy are included in origin requests.
    • whitelist – Only the cookies in viewer requests that are listed in the CookieNames type are included in the cache key and in requests that CloudFront sends to the origin.
    • allExcept – All cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin, except for those that are listed in the CookieNames type, which are not included.
    • all – All cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin.
    Cookies List<string>
    Contains a list of cookie names.
    CookieBehavior string
    Determines whether any cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:

    • none – No cookies in viewer requests are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none , any cookies that are listed in an OriginRequestPolicy are included in origin requests.
    • whitelist – Only the cookies in viewer requests that are listed in the CookieNames type are included in the cache key and in requests that CloudFront sends to the origin.
    • allExcept – All cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin, except for those that are listed in the CookieNames type, which are not included.
    • all – All cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin.
    Cookies []string
    Contains a list of cookie names.
    cookieBehavior String
    Determines whether any cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:

    • none – No cookies in viewer requests are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none , any cookies that are listed in an OriginRequestPolicy are included in origin requests.
    • whitelist – Only the cookies in viewer requests that are listed in the CookieNames type are included in the cache key and in requests that CloudFront sends to the origin.
    • allExcept – All cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin, except for those that are listed in the CookieNames type, which are not included.
    • all – All cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin.
    cookies List<String>
    Contains a list of cookie names.
    cookieBehavior string
    Determines whether any cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:

    • none – No cookies in viewer requests are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none , any cookies that are listed in an OriginRequestPolicy are included in origin requests.
    • whitelist – Only the cookies in viewer requests that are listed in the CookieNames type are included in the cache key and in requests that CloudFront sends to the origin.
    • allExcept – All cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin, except for those that are listed in the CookieNames type, which are not included.
    • all – All cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin.
    cookies string[]
    Contains a list of cookie names.
    cookie_behavior str
    Determines whether any cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:

    • none – No cookies in viewer requests are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none , any cookies that are listed in an OriginRequestPolicy are included in origin requests.
    • whitelist – Only the cookies in viewer requests that are listed in the CookieNames type are included in the cache key and in requests that CloudFront sends to the origin.
    • allExcept – All cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin, except for those that are listed in the CookieNames type, which are not included.
    • all – All cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin.
    cookies Sequence[str]
    Contains a list of cookie names.
    cookieBehavior String
    Determines whether any cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:

    • none – No cookies in viewer requests are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none , any cookies that are listed in an OriginRequestPolicy are included in origin requests.
    • whitelist – Only the cookies in viewer requests that are listed in the CookieNames type are included in the cache key and in requests that CloudFront sends to the origin.
    • allExcept – All cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin, except for those that are listed in the CookieNames type, which are not included.
    • all – All cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin.
    cookies List<String>
    Contains a list of cookie names.

    CachePolicyHeadersConfig

    HeaderBehavior string
    Determines whether any HTTP headers are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:

    • none – No HTTP headers are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none , any headers that are listed in an OriginRequestPolicy are included in origin requests.
    • whitelist – Only the HTTP headers that are listed in the Headers type are included in the cache key and in requests that CloudFront sends to the origin.
    Headers List<string>
    Contains a list of HTTP header names.
    HeaderBehavior string
    Determines whether any HTTP headers are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:

    • none – No HTTP headers are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none , any headers that are listed in an OriginRequestPolicy are included in origin requests.
    • whitelist – Only the HTTP headers that are listed in the Headers type are included in the cache key and in requests that CloudFront sends to the origin.
    Headers []string
    Contains a list of HTTP header names.
    headerBehavior String
    Determines whether any HTTP headers are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:

    • none – No HTTP headers are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none , any headers that are listed in an OriginRequestPolicy are included in origin requests.
    • whitelist – Only the HTTP headers that are listed in the Headers type are included in the cache key and in requests that CloudFront sends to the origin.
    headers List<String>
    Contains a list of HTTP header names.
    headerBehavior string
    Determines whether any HTTP headers are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:

    • none – No HTTP headers are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none , any headers that are listed in an OriginRequestPolicy are included in origin requests.
    • whitelist – Only the HTTP headers that are listed in the Headers type are included in the cache key and in requests that CloudFront sends to the origin.
    headers string[]
    Contains a list of HTTP header names.
    header_behavior str
    Determines whether any HTTP headers are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:

    • none – No HTTP headers are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none , any headers that are listed in an OriginRequestPolicy are included in origin requests.
    • whitelist – Only the HTTP headers that are listed in the Headers type are included in the cache key and in requests that CloudFront sends to the origin.
    headers Sequence[str]
    Contains a list of HTTP header names.
    headerBehavior String
    Determines whether any HTTP headers are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:

    • none – No HTTP headers are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none , any headers that are listed in an OriginRequestPolicy are included in origin requests.
    • whitelist – Only the HTTP headers that are listed in the Headers type are included in the cache key and in requests that CloudFront sends to the origin.
    headers List<String>
    Contains a list of HTTP header names.

    CachePolicyParametersInCacheKeyAndForwardedToOrigin

    CookiesConfig Pulumi.AwsNative.CloudFront.Inputs.CachePolicyCookiesConfig
    An object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the cache key and in requests that CloudFront sends to the origin.
    EnableAcceptEncodingGzip bool

    A flag that can affect whether the Accept-Encoding HTTP header is included in the cache key and included in requests that CloudFront sends to the origin.

    This field is related to the EnableAcceptEncodingBrotli field. If one or both of these fields is true and the viewer request includes the Accept-Encoding header, then CloudFront does the following:

    • Normalizes the value of the viewer's Accept-Encoding header
    • Includes the normalized header in the cache key
    • Includes the normalized header in the request to the origin, if a request is necessary

    For more information, see Compression support in the Amazon CloudFront Developer Guide .

    If you set this value to true , and this cache behavior also has an origin request policy attached, do not include the Accept-Encoding header in the origin request policy. CloudFront always includes the Accept-Encoding header in origin requests when the value of this field is true , so including this header in an origin request policy has no effect.

    If both of these fields are false , then CloudFront treats the Accept-Encoding header the same as any other HTTP header in the viewer request. By default, it's not included in the cache key and it's not included in origin requests. In this case, you can manually add Accept-Encoding to the headers whitelist like any other HTTP header.

    HeadersConfig Pulumi.AwsNative.CloudFront.Inputs.CachePolicyHeadersConfig
    An object that determines whether any HTTP headers (and if so, which headers) are included in the cache key and in requests that CloudFront sends to the origin.
    QueryStringsConfig Pulumi.AwsNative.CloudFront.Inputs.CachePolicyQueryStringsConfig
    An object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the cache key and in requests that CloudFront sends to the origin.
    EnableAcceptEncodingBrotli bool

    A flag that can affect whether the Accept-Encoding HTTP header is included in the cache key and included in requests that CloudFront sends to the origin.

    This field is related to the EnableAcceptEncodingGzip field. If one or both of these fields is true and the viewer request includes the Accept-Encoding header, then CloudFront does the following:

    • Normalizes the value of the viewer's Accept-Encoding header
    • Includes the normalized header in the cache key
    • Includes the normalized header in the request to the origin, if a request is necessary

    For more information, see Compression support in the Amazon CloudFront Developer Guide .

    If you set this value to true , and this cache behavior also has an origin request policy attached, do not include the Accept-Encoding header in the origin request policy. CloudFront always includes the Accept-Encoding header in origin requests when the value of this field is true , so including this header in an origin request policy has no effect.

    If both of these fields are false , then CloudFront treats the Accept-Encoding header the same as any other HTTP header in the viewer request. By default, it's not included in the cache key and it's not included in origin requests. In this case, you can manually add Accept-Encoding to the headers whitelist like any other HTTP header.

    CookiesConfig CachePolicyCookiesConfig
    An object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the cache key and in requests that CloudFront sends to the origin.
    EnableAcceptEncodingGzip bool

    A flag that can affect whether the Accept-Encoding HTTP header is included in the cache key and included in requests that CloudFront sends to the origin.

    This field is related to the EnableAcceptEncodingBrotli field. If one or both of these fields is true and the viewer request includes the Accept-Encoding header, then CloudFront does the following:

    • Normalizes the value of the viewer's Accept-Encoding header
    • Includes the normalized header in the cache key
    • Includes the normalized header in the request to the origin, if a request is necessary

    For more information, see Compression support in the Amazon CloudFront Developer Guide .

    If you set this value to true , and this cache behavior also has an origin request policy attached, do not include the Accept-Encoding header in the origin request policy. CloudFront always includes the Accept-Encoding header in origin requests when the value of this field is true , so including this header in an origin request policy has no effect.

    If both of these fields are false , then CloudFront treats the Accept-Encoding header the same as any other HTTP header in the viewer request. By default, it's not included in the cache key and it's not included in origin requests. In this case, you can manually add Accept-Encoding to the headers whitelist like any other HTTP header.

    HeadersConfig CachePolicyHeadersConfig
    An object that determines whether any HTTP headers (and if so, which headers) are included in the cache key and in requests that CloudFront sends to the origin.
    QueryStringsConfig CachePolicyQueryStringsConfig
    An object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the cache key and in requests that CloudFront sends to the origin.
    EnableAcceptEncodingBrotli bool

    A flag that can affect whether the Accept-Encoding HTTP header is included in the cache key and included in requests that CloudFront sends to the origin.

    This field is related to the EnableAcceptEncodingGzip field. If one or both of these fields is true and the viewer request includes the Accept-Encoding header, then CloudFront does the following:

    • Normalizes the value of the viewer's Accept-Encoding header
    • Includes the normalized header in the cache key
    • Includes the normalized header in the request to the origin, if a request is necessary

    For more information, see Compression support in the Amazon CloudFront Developer Guide .

    If you set this value to true , and this cache behavior also has an origin request policy attached, do not include the Accept-Encoding header in the origin request policy. CloudFront always includes the Accept-Encoding header in origin requests when the value of this field is true , so including this header in an origin request policy has no effect.

    If both of these fields are false , then CloudFront treats the Accept-Encoding header the same as any other HTTP header in the viewer request. By default, it's not included in the cache key and it's not included in origin requests. In this case, you can manually add Accept-Encoding to the headers whitelist like any other HTTP header.

    cookiesConfig CachePolicyCookiesConfig
    An object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the cache key and in requests that CloudFront sends to the origin.
    enableAcceptEncodingGzip Boolean

    A flag that can affect whether the Accept-Encoding HTTP header is included in the cache key and included in requests that CloudFront sends to the origin.

    This field is related to the EnableAcceptEncodingBrotli field. If one or both of these fields is true and the viewer request includes the Accept-Encoding header, then CloudFront does the following:

    • Normalizes the value of the viewer's Accept-Encoding header
    • Includes the normalized header in the cache key
    • Includes the normalized header in the request to the origin, if a request is necessary

    For more information, see Compression support in the Amazon CloudFront Developer Guide .

    If you set this value to true , and this cache behavior also has an origin request policy attached, do not include the Accept-Encoding header in the origin request policy. CloudFront always includes the Accept-Encoding header in origin requests when the value of this field is true , so including this header in an origin request policy has no effect.

    If both of these fields are false , then CloudFront treats the Accept-Encoding header the same as any other HTTP header in the viewer request. By default, it's not included in the cache key and it's not included in origin requests. In this case, you can manually add Accept-Encoding to the headers whitelist like any other HTTP header.

    headersConfig CachePolicyHeadersConfig
    An object that determines whether any HTTP headers (and if so, which headers) are included in the cache key and in requests that CloudFront sends to the origin.
    queryStringsConfig CachePolicyQueryStringsConfig
    An object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the cache key and in requests that CloudFront sends to the origin.
    enableAcceptEncodingBrotli Boolean

    A flag that can affect whether the Accept-Encoding HTTP header is included in the cache key and included in requests that CloudFront sends to the origin.

    This field is related to the EnableAcceptEncodingGzip field. If one or both of these fields is true and the viewer request includes the Accept-Encoding header, then CloudFront does the following:

    • Normalizes the value of the viewer's Accept-Encoding header
    • Includes the normalized header in the cache key
    • Includes the normalized header in the request to the origin, if a request is necessary

    For more information, see Compression support in the Amazon CloudFront Developer Guide .

    If you set this value to true , and this cache behavior also has an origin request policy attached, do not include the Accept-Encoding header in the origin request policy. CloudFront always includes the Accept-Encoding header in origin requests when the value of this field is true , so including this header in an origin request policy has no effect.

    If both of these fields are false , then CloudFront treats the Accept-Encoding header the same as any other HTTP header in the viewer request. By default, it's not included in the cache key and it's not included in origin requests. In this case, you can manually add Accept-Encoding to the headers whitelist like any other HTTP header.

    cookiesConfig CachePolicyCookiesConfig
    An object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the cache key and in requests that CloudFront sends to the origin.
    enableAcceptEncodingGzip boolean

    A flag that can affect whether the Accept-Encoding HTTP header is included in the cache key and included in requests that CloudFront sends to the origin.

    This field is related to the EnableAcceptEncodingBrotli field. If one or both of these fields is true and the viewer request includes the Accept-Encoding header, then CloudFront does the following:

    • Normalizes the value of the viewer's Accept-Encoding header
    • Includes the normalized header in the cache key
    • Includes the normalized header in the request to the origin, if a request is necessary

    For more information, see Compression support in the Amazon CloudFront Developer Guide .

    If you set this value to true , and this cache behavior also has an origin request policy attached, do not include the Accept-Encoding header in the origin request policy. CloudFront always includes the Accept-Encoding header in origin requests when the value of this field is true , so including this header in an origin request policy has no effect.

    If both of these fields are false , then CloudFront treats the Accept-Encoding header the same as any other HTTP header in the viewer request. By default, it's not included in the cache key and it's not included in origin requests. In this case, you can manually add Accept-Encoding to the headers whitelist like any other HTTP header.

    headersConfig CachePolicyHeadersConfig
    An object that determines whether any HTTP headers (and if so, which headers) are included in the cache key and in requests that CloudFront sends to the origin.
    queryStringsConfig CachePolicyQueryStringsConfig
    An object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the cache key and in requests that CloudFront sends to the origin.
    enableAcceptEncodingBrotli boolean

    A flag that can affect whether the Accept-Encoding HTTP header is included in the cache key and included in requests that CloudFront sends to the origin.

    This field is related to the EnableAcceptEncodingGzip field. If one or both of these fields is true and the viewer request includes the Accept-Encoding header, then CloudFront does the following:

    • Normalizes the value of the viewer's Accept-Encoding header
    • Includes the normalized header in the cache key
    • Includes the normalized header in the request to the origin, if a request is necessary

    For more information, see Compression support in the Amazon CloudFront Developer Guide .

    If you set this value to true , and this cache behavior also has an origin request policy attached, do not include the Accept-Encoding header in the origin request policy. CloudFront always includes the Accept-Encoding header in origin requests when the value of this field is true , so including this header in an origin request policy has no effect.

    If both of these fields are false , then CloudFront treats the Accept-Encoding header the same as any other HTTP header in the viewer request. By default, it's not included in the cache key and it's not included in origin requests. In this case, you can manually add Accept-Encoding to the headers whitelist like any other HTTP header.

    cookies_config CachePolicyCookiesConfig
    An object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the cache key and in requests that CloudFront sends to the origin.
    enable_accept_encoding_gzip bool

    A flag that can affect whether the Accept-Encoding HTTP header is included in the cache key and included in requests that CloudFront sends to the origin.

    This field is related to the EnableAcceptEncodingBrotli field. If one or both of these fields is true and the viewer request includes the Accept-Encoding header, then CloudFront does the following:

    • Normalizes the value of the viewer's Accept-Encoding header
    • Includes the normalized header in the cache key
    • Includes the normalized header in the request to the origin, if a request is necessary

    For more information, see Compression support in the Amazon CloudFront Developer Guide .

    If you set this value to true , and this cache behavior also has an origin request policy attached, do not include the Accept-Encoding header in the origin request policy. CloudFront always includes the Accept-Encoding header in origin requests when the value of this field is true , so including this header in an origin request policy has no effect.

    If both of these fields are false , then CloudFront treats the Accept-Encoding header the same as any other HTTP header in the viewer request. By default, it's not included in the cache key and it's not included in origin requests. In this case, you can manually add Accept-Encoding to the headers whitelist like any other HTTP header.

    headers_config CachePolicyHeadersConfig
    An object that determines whether any HTTP headers (and if so, which headers) are included in the cache key and in requests that CloudFront sends to the origin.
    query_strings_config CachePolicyQueryStringsConfig
    An object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the cache key and in requests that CloudFront sends to the origin.
    enable_accept_encoding_brotli bool

    A flag that can affect whether the Accept-Encoding HTTP header is included in the cache key and included in requests that CloudFront sends to the origin.

    This field is related to the EnableAcceptEncodingGzip field. If one or both of these fields is true and the viewer request includes the Accept-Encoding header, then CloudFront does the following:

    • Normalizes the value of the viewer's Accept-Encoding header
    • Includes the normalized header in the cache key
    • Includes the normalized header in the request to the origin, if a request is necessary

    For more information, see Compression support in the Amazon CloudFront Developer Guide .

    If you set this value to true , and this cache behavior also has an origin request policy attached, do not include the Accept-Encoding header in the origin request policy. CloudFront always includes the Accept-Encoding header in origin requests when the value of this field is true , so including this header in an origin request policy has no effect.

    If both of these fields are false , then CloudFront treats the Accept-Encoding header the same as any other HTTP header in the viewer request. By default, it's not included in the cache key and it's not included in origin requests. In this case, you can manually add Accept-Encoding to the headers whitelist like any other HTTP header.

    cookiesConfig Property Map
    An object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the cache key and in requests that CloudFront sends to the origin.
    enableAcceptEncodingGzip Boolean

    A flag that can affect whether the Accept-Encoding HTTP header is included in the cache key and included in requests that CloudFront sends to the origin.

    This field is related to the EnableAcceptEncodingBrotli field. If one or both of these fields is true and the viewer request includes the Accept-Encoding header, then CloudFront does the following:

    • Normalizes the value of the viewer's Accept-Encoding header
    • Includes the normalized header in the cache key
    • Includes the normalized header in the request to the origin, if a request is necessary

    For more information, see Compression support in the Amazon CloudFront Developer Guide .

    If you set this value to true , and this cache behavior also has an origin request policy attached, do not include the Accept-Encoding header in the origin request policy. CloudFront always includes the Accept-Encoding header in origin requests when the value of this field is true , so including this header in an origin request policy has no effect.

    If both of these fields are false , then CloudFront treats the Accept-Encoding header the same as any other HTTP header in the viewer request. By default, it's not included in the cache key and it's not included in origin requests. In this case, you can manually add Accept-Encoding to the headers whitelist like any other HTTP header.

    headersConfig Property Map
    An object that determines whether any HTTP headers (and if so, which headers) are included in the cache key and in requests that CloudFront sends to the origin.
    queryStringsConfig Property Map
    An object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the cache key and in requests that CloudFront sends to the origin.
    enableAcceptEncodingBrotli Boolean

    A flag that can affect whether the Accept-Encoding HTTP header is included in the cache key and included in requests that CloudFront sends to the origin.

    This field is related to the EnableAcceptEncodingGzip field. If one or both of these fields is true and the viewer request includes the Accept-Encoding header, then CloudFront does the following:

    • Normalizes the value of the viewer's Accept-Encoding header
    • Includes the normalized header in the cache key
    • Includes the normalized header in the request to the origin, if a request is necessary

    For more information, see Compression support in the Amazon CloudFront Developer Guide .

    If you set this value to true , and this cache behavior also has an origin request policy attached, do not include the Accept-Encoding header in the origin request policy. CloudFront always includes the Accept-Encoding header in origin requests when the value of this field is true , so including this header in an origin request policy has no effect.

    If both of these fields are false , then CloudFront treats the Accept-Encoding header the same as any other HTTP header in the viewer request. By default, it's not included in the cache key and it's not included in origin requests. In this case, you can manually add Accept-Encoding to the headers whitelist like any other HTTP header.

    CachePolicyQueryStringsConfig

    QueryStringBehavior string
    Determines whether any URL query strings in viewer requests are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:

    • none – No query strings in viewer requests are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none , any query strings that are listed in an OriginRequestPolicy are included in origin requests.
    • whitelist – Only the query strings in viewer requests that are listed in the QueryStringNames type are included in the cache key and in requests that CloudFront sends to the origin.
    • allExcept – All query strings in viewer requests are included in the cache key and in requests that CloudFront sends to the origin, except those that are listed in the QueryStringNames type, which are not included.
    • all – All query strings in viewer requests are included in the cache key and in requests that CloudFront sends to the origin.
    QueryStrings List<string>
    Contains a list of query string names.
    QueryStringBehavior string
    Determines whether any URL query strings in viewer requests are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:

    • none – No query strings in viewer requests are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none , any query strings that are listed in an OriginRequestPolicy are included in origin requests.
    • whitelist – Only the query strings in viewer requests that are listed in the QueryStringNames type are included in the cache key and in requests that CloudFront sends to the origin.
    • allExcept – All query strings in viewer requests are included in the cache key and in requests that CloudFront sends to the origin, except those that are listed in the QueryStringNames type, which are not included.
    • all – All query strings in viewer requests are included in the cache key and in requests that CloudFront sends to the origin.
    QueryStrings []string
    Contains a list of query string names.
    queryStringBehavior String
    Determines whether any URL query strings in viewer requests are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:

    • none – No query strings in viewer requests are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none , any query strings that are listed in an OriginRequestPolicy are included in origin requests.
    • whitelist – Only the query strings in viewer requests that are listed in the QueryStringNames type are included in the cache key and in requests that CloudFront sends to the origin.
    • allExcept – All query strings in viewer requests are included in the cache key and in requests that CloudFront sends to the origin, except those that are listed in the QueryStringNames type, which are not included.
    • all – All query strings in viewer requests are included in the cache key and in requests that CloudFront sends to the origin.
    queryStrings List<String>
    Contains a list of query string names.
    queryStringBehavior string
    Determines whether any URL query strings in viewer requests are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:

    • none – No query strings in viewer requests are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none , any query strings that are listed in an OriginRequestPolicy are included in origin requests.
    • whitelist – Only the query strings in viewer requests that are listed in the QueryStringNames type are included in the cache key and in requests that CloudFront sends to the origin.
    • allExcept – All query strings in viewer requests are included in the cache key and in requests that CloudFront sends to the origin, except those that are listed in the QueryStringNames type, which are not included.
    • all – All query strings in viewer requests are included in the cache key and in requests that CloudFront sends to the origin.
    queryStrings string[]
    Contains a list of query string names.
    query_string_behavior str
    Determines whether any URL query strings in viewer requests are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:

    • none – No query strings in viewer requests are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none , any query strings that are listed in an OriginRequestPolicy are included in origin requests.
    • whitelist – Only the query strings in viewer requests that are listed in the QueryStringNames type are included in the cache key and in requests that CloudFront sends to the origin.
    • allExcept – All query strings in viewer requests are included in the cache key and in requests that CloudFront sends to the origin, except those that are listed in the QueryStringNames type, which are not included.
    • all – All query strings in viewer requests are included in the cache key and in requests that CloudFront sends to the origin.
    query_strings Sequence[str]
    Contains a list of query string names.
    queryStringBehavior String
    Determines whether any URL query strings in viewer requests are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:

    • none – No query strings in viewer requests are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set to none , any query strings that are listed in an OriginRequestPolicy are included in origin requests.
    • whitelist – Only the query strings in viewer requests that are listed in the QueryStringNames type are included in the cache key and in requests that CloudFront sends to the origin.
    • allExcept – All query strings in viewer requests are included in the cache key and in requests that CloudFront sends to the origin, except those that are listed in the QueryStringNames type, which are not included.
    • all – All query strings in viewer requests are included in the cache key and in requests that CloudFront sends to the origin.
    queryStrings List<String>
    Contains a list of query string names.

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.111.0 published on Tuesday, Jul 9, 2024 by Pulumi