We recommend new projects start with resources from the AWS provider.
aws-native.cloudfront.getCachePolicy
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
A cache policy. When it’s attached to a cache behavior, the cache policy determines the following:
- The values that CloudFront includes in the cache key. These values can include HTTP headers, cookies, and URL query strings. CloudFront uses the cache key to find an object in its cache that it can return to the viewer.
- The default, minimum, and maximum time to live (TTL) values that you want objects to stay in the CloudFront cache.
The headers, cookies, and query strings that are included in the cache key are also included in requests that CloudFront sends to the origin. CloudFront sends a request when it can’t find a valid object in its cache that matches the request’s cache key. If you want to send values to the origin but not include them in the cache key, use OriginRequestPolicy.
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)
public static Output<GetCachePolicyResult> getCachePolicy(GetCachePolicyArgs args, InvokeOptions options)
fn::invoke:
  function: aws-native:cloudfront:getCachePolicy
  arguments:
    # arguments dictionaryThe 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:
- CachePolicy Pulumi.Config Aws Native. Cloud Front. Outputs. Cache Policy Config 
- The cache policy configuration.
- Id string
- The unique identifier for the cache policy. For example: 2766f7b2-75c5-41c6-8f06-bf4303a2f2f5.
- LastModified stringTime 
- The date and time when the cache policy was last modified.
- CachePolicy CacheConfig Policy Config 
- The cache policy configuration.
- Id string
- The unique identifier for the cache policy. For example: 2766f7b2-75c5-41c6-8f06-bf4303a2f2f5.
- LastModified stringTime 
- The date and time when the cache policy was last modified.
- cachePolicy CacheConfig Policy Config 
- The cache policy configuration.
- id String
- The unique identifier for the cache policy. For example: 2766f7b2-75c5-41c6-8f06-bf4303a2f2f5.
- lastModified StringTime 
- The date and time when the cache policy was last modified.
- cachePolicy CacheConfig Policy Config 
- The cache policy configuration.
- id string
- The unique identifier for the cache policy. For example: 2766f7b2-75c5-41c6-8f06-bf4303a2f2f5.
- lastModified stringTime 
- The date and time when the cache policy was last modified.
- cache_policy_ Cacheconfig Policy Config 
- The cache policy configuration.
- id str
- The unique identifier for the cache policy. For example: 2766f7b2-75c5-41c6-8f06-bf4303a2f2f5.
- last_modified_ strtime 
- The date and time when the cache policy was last modified.
- cachePolicy Property MapConfig 
- The cache policy configuration.
- id String
- The unique identifier for the cache policy. For example: 2766f7b2-75c5-41c6-8f06-bf4303a2f2f5.
- lastModified StringTime 
- 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-ControlorExpiresheaders 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 ofMinTTLis more than 86400 seconds, then the default value for this field is the same as the value ofMinTTL.
- 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-ControlorExpiresheaders 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 ofMinTTLorDefaultTTLis more than 31536000 seconds, then the default value for this field is the same as the value ofDefaultTTL.
- 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.
- ParametersIn Pulumi.Cache Key And Forwarded To Origin Aws Native. Cloud Front. Inputs. Cache Policy Parameters In Cache Key And Forwarded To Origin 
- 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-ControlorExpiresheaders 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 ofMinTTLis more than 86400 seconds, then the default value for this field is the same as the value ofMinTTL.
- 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-ControlorExpiresheaders 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 ofMinTTLorDefaultTTLis more than 31536000 seconds, then the default value for this field is the same as the value ofDefaultTTL.
- 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.
- ParametersIn CacheCache Key And Forwarded To Origin Policy Parameters In Cache Key And Forwarded To Origin 
- 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-ControlorExpiresheaders 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 ofMinTTLis more than 86400 seconds, then the default value for this field is the same as the value ofMinTTL.
- 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-ControlorExpiresheaders 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 ofMinTTLorDefaultTTLis more than 31536000 seconds, then the default value for this field is the same as the value ofDefaultTTL.
- 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.
- parametersIn CacheCache Key And Forwarded To Origin Policy Parameters In Cache Key And Forwarded To Origin 
- 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-ControlorExpiresheaders 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 ofMinTTLis more than 86400 seconds, then the default value for this field is the same as the value ofMinTTL.
- 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-ControlorExpiresheaders 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 ofMinTTLorDefaultTTLis more than 31536000 seconds, then the default value for this field is the same as the value ofDefaultTTL.
- 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.
- parametersIn CacheCache Key And Forwarded To Origin Policy Parameters In Cache Key And Forwarded To Origin 
- 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-ControlorExpiresheaders 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 ofMinTTLis more than 86400 seconds, then the default value for this field is the same as the value ofMinTTL.
- 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-ControlorExpiresheaders 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 ofMinTTLorDefaultTTLis more than 31536000 seconds, then the default value for this field is the same as the value ofDefaultTTL.
- 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_ Cachecache_ key_ and_ forwarded_ to_ origin Policy Parameters In Cache Key And Forwarded To Origin 
- 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-ControlorExpiresheaders 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 ofMinTTLis more than 86400 seconds, then the default value for this field is the same as the value ofMinTTL.
- 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-ControlorExpiresheaders 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 ofMinTTLorDefaultTTLis more than 31536000 seconds, then the default value for this field is the same as the value ofDefaultTTL.
- 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.
- parametersIn Property MapCache Key And Forwarded To Origin 
- 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   
- 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- OriginRequestPolicyare included in origin requests.
- whitelist– Only the cookies in viewer requests that are listed in the- CookieNamestype 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- CookieNamestype, 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.
 
- List<string>
- Contains a list of cookie names.
- 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- OriginRequestPolicyare included in origin requests.
- whitelist– Only the cookies in viewer requests that are listed in the- CookieNamestype 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- CookieNamestype, 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.
 
- []string
- Contains a list of cookie names.
- 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- OriginRequestPolicyare included in origin requests.
- whitelist– Only the cookies in viewer requests that are listed in the- CookieNamestype 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- CookieNamestype, 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.
 
- List<String>
- Contains a list of cookie names.
- 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- OriginRequestPolicyare included in origin requests.
- whitelist– Only the cookies in viewer requests that are listed in the- CookieNamestype 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- CookieNamestype, 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.
 
- string[]
- Contains a list of cookie names.
- 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- OriginRequestPolicyare included in origin requests.
- whitelist– Only the cookies in viewer requests that are listed in the- CookieNamestype 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- CookieNamestype, 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.
 
- Sequence[str]
- Contains a list of cookie names.
- 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- OriginRequestPolicyare included in origin requests.
- whitelist– Only the cookies in viewer requests that are listed in the- CookieNamestype 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- CookieNamestype, 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.
 
- 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- OriginRequestPolicyare included in origin requests.
- whitelist– Only the HTTP headers that are listed in the- Headerstype 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- OriginRequestPolicyare included in origin requests.
- whitelist– Only the HTTP headers that are listed in the- Headerstype 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- OriginRequestPolicyare included in origin requests.
- whitelist– Only the HTTP headers that are listed in the- Headerstype 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- OriginRequestPolicyare included in origin requests.
- whitelist– Only the HTTP headers that are listed in the- Headerstype 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- OriginRequestPolicyare included in origin requests.
- whitelist– Only the HTTP headers that are listed in the- Headerstype 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- OriginRequestPolicyare included in origin requests.
- whitelist– Only the HTTP headers that are listed in the- Headerstype 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         
- 
Pulumi.Aws Native. Cloud Front. Inputs. Cache Policy Cookies Config 
- 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.
- EnableAccept boolEncoding Gzip 
- A flag that can affect whether the - Accept-EncodingHTTP header is included in the cache key and included in requests that CloudFront sends to the origin. This field is related to the- EnableAcceptEncodingBrotlifield. If one or both of these fields is- trueand the viewer request includes the- Accept-Encodingheader, then CloudFront does the following:- Normalizes the value of the viewer's Accept-Encodingheader
- 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-Encodingheader in the origin request policy. CloudFront always includes the- Accept-Encodingheader 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-Encodingheader 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-Encodingto the headers whitelist like any other HTTP header.
- Normalizes the value of the viewer's 
- HeadersConfig Pulumi.Aws Native. Cloud Front. Inputs. Cache Policy Headers Config 
- 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.
- QueryStrings Pulumi.Config Aws Native. Cloud Front. Inputs. Cache Policy Query Strings Config 
- 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.
- EnableAccept boolEncoding Brotli 
- A flag that can affect whether the - Accept-EncodingHTTP header is included in the cache key and included in requests that CloudFront sends to the origin. This field is related to the- EnableAcceptEncodingGzipfield. If one or both of these fields is- trueand the viewer request includes the- Accept-Encodingheader, then CloudFront does the following:- Normalizes the value of the viewer's Accept-Encodingheader
- 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-Encodingheader in the origin request policy. CloudFront always includes the- Accept-Encodingheader 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-Encodingheader 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-Encodingto the headers whitelist like any other HTTP header.
- Normalizes the value of the viewer's 
- 
CachePolicy Cookies Config 
- 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.
- EnableAccept boolEncoding Gzip 
- A flag that can affect whether the - Accept-EncodingHTTP header is included in the cache key and included in requests that CloudFront sends to the origin. This field is related to the- EnableAcceptEncodingBrotlifield. If one or both of these fields is- trueand the viewer request includes the- Accept-Encodingheader, then CloudFront does the following:- Normalizes the value of the viewer's Accept-Encodingheader
- 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-Encodingheader in the origin request policy. CloudFront always includes the- Accept-Encodingheader 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-Encodingheader 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-Encodingto the headers whitelist like any other HTTP header.
- Normalizes the value of the viewer's 
- HeadersConfig CachePolicy Headers Config 
- 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.
- QueryStrings CacheConfig Policy Query Strings Config 
- 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.
- EnableAccept boolEncoding Brotli 
- A flag that can affect whether the - Accept-EncodingHTTP header is included in the cache key and included in requests that CloudFront sends to the origin. This field is related to the- EnableAcceptEncodingGzipfield. If one or both of these fields is- trueand the viewer request includes the- Accept-Encodingheader, then CloudFront does the following:- Normalizes the value of the viewer's Accept-Encodingheader
- 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-Encodingheader in the origin request policy. CloudFront always includes the- Accept-Encodingheader 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-Encodingheader 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-Encodingto the headers whitelist like any other HTTP header.
- Normalizes the value of the viewer's 
- 
CachePolicy Cookies Config 
- 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.
- enableAccept BooleanEncoding Gzip 
- A flag that can affect whether the - Accept-EncodingHTTP header is included in the cache key and included in requests that CloudFront sends to the origin. This field is related to the- EnableAcceptEncodingBrotlifield. If one or both of these fields is- trueand the viewer request includes the- Accept-Encodingheader, then CloudFront does the following:- Normalizes the value of the viewer's Accept-Encodingheader
- 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-Encodingheader in the origin request policy. CloudFront always includes the- Accept-Encodingheader 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-Encodingheader 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-Encodingto the headers whitelist like any other HTTP header.
- Normalizes the value of the viewer's 
- headersConfig CachePolicy Headers Config 
- 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.
- queryStrings CacheConfig Policy Query Strings Config 
- 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.
- enableAccept BooleanEncoding Brotli 
- A flag that can affect whether the - Accept-EncodingHTTP header is included in the cache key and included in requests that CloudFront sends to the origin. This field is related to the- EnableAcceptEncodingGzipfield. If one or both of these fields is- trueand the viewer request includes the- Accept-Encodingheader, then CloudFront does the following:- Normalizes the value of the viewer's Accept-Encodingheader
- 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-Encodingheader in the origin request policy. CloudFront always includes the- Accept-Encodingheader 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-Encodingheader 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-Encodingto the headers whitelist like any other HTTP header.
- Normalizes the value of the viewer's 
- 
CachePolicy Cookies Config 
- 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.
- enableAccept booleanEncoding Gzip 
- A flag that can affect whether the - Accept-EncodingHTTP header is included in the cache key and included in requests that CloudFront sends to the origin. This field is related to the- EnableAcceptEncodingBrotlifield. If one or both of these fields is- trueand the viewer request includes the- Accept-Encodingheader, then CloudFront does the following:- Normalizes the value of the viewer's Accept-Encodingheader
- 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-Encodingheader in the origin request policy. CloudFront always includes the- Accept-Encodingheader 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-Encodingheader 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-Encodingto the headers whitelist like any other HTTP header.
- Normalizes the value of the viewer's 
- headersConfig CachePolicy Headers Config 
- 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.
- queryStrings CacheConfig Policy Query Strings Config 
- 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.
- enableAccept booleanEncoding Brotli 
- A flag that can affect whether the - Accept-EncodingHTTP header is included in the cache key and included in requests that CloudFront sends to the origin. This field is related to the- EnableAcceptEncodingGzipfield. If one or both of these fields is- trueand the viewer request includes the- Accept-Encodingheader, then CloudFront does the following:- Normalizes the value of the viewer's Accept-Encodingheader
- 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-Encodingheader in the origin request policy. CloudFront always includes the- Accept-Encodingheader 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-Encodingheader 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-Encodingto the headers whitelist like any other HTTP header.
- Normalizes the value of the viewer's 
- 
CachePolicy Cookies Config 
- 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_ boolencoding_ gzip 
- A flag that can affect whether the - Accept-EncodingHTTP header is included in the cache key and included in requests that CloudFront sends to the origin. This field is related to the- EnableAcceptEncodingBrotlifield. If one or both of these fields is- trueand the viewer request includes the- Accept-Encodingheader, then CloudFront does the following:- Normalizes the value of the viewer's Accept-Encodingheader
- 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-Encodingheader in the origin request policy. CloudFront always includes the- Accept-Encodingheader 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-Encodingheader 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-Encodingto the headers whitelist like any other HTTP header.
- Normalizes the value of the viewer's 
- headers_config CachePolicy Headers Config 
- 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_ Cacheconfig Policy Query Strings Config 
- 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_ boolencoding_ brotli 
- A flag that can affect whether the - Accept-EncodingHTTP header is included in the cache key and included in requests that CloudFront sends to the origin. This field is related to the- EnableAcceptEncodingGzipfield. If one or both of these fields is- trueand the viewer request includes the- Accept-Encodingheader, then CloudFront does the following:- Normalizes the value of the viewer's Accept-Encodingheader
- 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-Encodingheader in the origin request policy. CloudFront always includes the- Accept-Encodingheader 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-Encodingheader 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-Encodingto the headers whitelist like any other HTTP header.
- Normalizes the value of the viewer's 
- 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.
- enableAccept BooleanEncoding Gzip 
- A flag that can affect whether the - Accept-EncodingHTTP header is included in the cache key and included in requests that CloudFront sends to the origin. This field is related to the- EnableAcceptEncodingBrotlifield. If one or both of these fields is- trueand the viewer request includes the- Accept-Encodingheader, then CloudFront does the following:- Normalizes the value of the viewer's Accept-Encodingheader
- 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-Encodingheader in the origin request policy. CloudFront always includes the- Accept-Encodingheader 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-Encodingheader 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-Encodingto the headers whitelist like any other HTTP header.
- Normalizes the value of the viewer's 
- 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.
- queryStrings Property MapConfig 
- 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.
- enableAccept BooleanEncoding Brotli 
- A flag that can affect whether the - Accept-EncodingHTTP header is included in the cache key and included in requests that CloudFront sends to the origin. This field is related to the- EnableAcceptEncodingGzipfield. If one or both of these fields is- trueand the viewer request includes the- Accept-Encodingheader, then CloudFront does the following:- Normalizes the value of the viewer's Accept-Encodingheader
- 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-Encodingheader in the origin request policy. CloudFront always includes the- Accept-Encodingheader 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-Encodingheader 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-Encodingto the headers whitelist like any other HTTP header.
- Normalizes the value of the viewer's 
CachePolicyQueryStringsConfig    
- QueryString stringBehavior 
- 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- OriginRequestPolicyare included in origin requests.
- whitelist– Only the query strings in viewer requests that are listed in the- QueryStringNamestype 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- QueryStringNamestype, 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.
- QueryString stringBehavior 
- 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- OriginRequestPolicyare included in origin requests.
- whitelist– Only the query strings in viewer requests that are listed in the- QueryStringNamestype 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- QueryStringNamestype, 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.
- queryString StringBehavior 
- 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- OriginRequestPolicyare included in origin requests.
- whitelist– Only the query strings in viewer requests that are listed in the- QueryStringNamestype 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- QueryStringNamestype, 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.
- queryString stringBehavior 
- 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- OriginRequestPolicyare included in origin requests.
- whitelist– Only the query strings in viewer requests that are listed in the- QueryStringNamestype 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- QueryStringNamestype, 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_ strbehavior 
- 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- OriginRequestPolicyare included in origin requests.
- whitelist– Only the query strings in viewer requests that are listed in the- QueryStringNamestype 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- QueryStringNamestype, 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.
- queryString StringBehavior 
- 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- OriginRequestPolicyare included in origin requests.
- whitelist– Only the query strings in viewer requests that are listed in the- QueryStringNamestype 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- QueryStringNamestype, 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
We recommend new projects start with resources from the AWS provider.