We recommend new projects start with resources from the AWS provider.
aws-native.cloudfront.CachePolicy
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
Resource Type definition for AWS::CloudFront::CachePolicy
Create CachePolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CachePolicy(name: string, args: CachePolicyArgs, opts?: CustomResourceOptions);
@overload
def CachePolicy(resource_name: str,
args: CachePolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CachePolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
cache_policy_config: Optional[CachePolicyConfigArgs] = None)
func NewCachePolicy(ctx *Context, name string, args CachePolicyArgs, opts ...ResourceOption) (*CachePolicy, error)
public CachePolicy(string name, CachePolicyArgs args, CustomResourceOptions? opts = null)
public CachePolicy(String name, CachePolicyArgs args)
public CachePolicy(String name, CachePolicyArgs args, CustomResourceOptions options)
type: aws-native:cloudfront:CachePolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CachePolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CachePolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CachePolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CachePolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CachePolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CachePolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The CachePolicy resource accepts the following input properties:
- Cache
Policy Pulumi.Config Aws Native. Cloud Front. Inputs. Cache Policy Config - The cache policy configuration.
- Cache
Policy CacheConfig Policy Config Args - The cache policy configuration.
- cache
Policy CacheConfig Policy Config - The cache policy configuration.
- cache
Policy CacheConfig Policy Config - The cache policy configuration.
- cache_
policy_ Cacheconfig Policy Config Args - The cache policy configuration.
- cache
Policy Property MapConfig - The cache policy configuration.
Outputs
All input properties are implicitly available as output properties. Additionally, the CachePolicy resource produces the following output properties:
- Aws
Id string - The unique identifier for the cache policy. For example:
2766f7b2-75c5-41c6-8f06-bf4303a2f2f5
. - Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified stringTime - The date and time when the cache policy was last modified.
- Aws
Id string - The unique identifier for the cache policy. For example:
2766f7b2-75c5-41c6-8f06-bf4303a2f2f5
. - Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified stringTime - The date and time when the cache policy was last modified.
- aws
Id String - The unique identifier for the cache policy. For example:
2766f7b2-75c5-41c6-8f06-bf4303a2f2f5
. - id String
- The provider-assigned unique ID for this managed resource.
- last
Modified StringTime - The date and time when the cache policy was last modified.
- aws
Id string - The unique identifier for the cache policy. For example:
2766f7b2-75c5-41c6-8f06-bf4303a2f2f5
. - id string
- The provider-assigned unique ID for this managed resource.
- last
Modified stringTime - The date and time when the cache policy was last modified.
- aws_
id str - The unique identifier for the cache policy. For example:
2766f7b2-75c5-41c6-8f06-bf4303a2f2f5
. - id str
- The provider-assigned unique ID for this managed resource.
- last_
modified_ strtime - The date and time when the cache policy was last modified.
- aws
Id String - The unique identifier for the cache policy. For example:
2766f7b2-75c5-41c6-8f06-bf4303a2f2f5
. - id String
- The provider-assigned unique ID for this managed resource.
- last
Modified StringTime - The date and time when the cache policy was last modified.
Supporting Types
CachePolicyConfig, CachePolicyConfigArgs
- Default
Ttl 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
orExpires
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 ofMinTTL
.- Max
Ttl 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
orExpires
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
orDefaultTTL
is more than 31536000 seconds, then the default value for this field is the same as the value ofDefaultTTL
.- Min
Ttl 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.
- Parameters
In 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.
- Default
Ttl 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
orExpires
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 ofMinTTL
.- Max
Ttl 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
orExpires
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
orDefaultTTL
is more than 31536000 seconds, then the default value for this field is the same as the value ofDefaultTTL
.- Min
Ttl 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.
- 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 string
- A comment to describe the cache policy. The comment cannot be longer than 128 characters.
- default
Ttl 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
orExpires
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 ofMinTTL
.- max
Ttl 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
orExpires
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
orDefaultTTL
is more than 31536000 seconds, then the default value for this field is the same as the value ofDefaultTTL
.- min
Ttl 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.
- 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 String
- A comment to describe the cache policy. The comment cannot be longer than 128 characters.
- default
Ttl 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
orExpires
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 ofMinTTL
.- max
Ttl 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
orExpires
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
orDefaultTTL
is more than 31536000 seconds, then the default value for this field is the same as the value ofDefaultTTL
.- min
Ttl 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.
- 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 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
orExpires
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 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-Control
orExpires
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
orDefaultTTL
is 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.
- default
Ttl 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
orExpires
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 ofMinTTL
.- max
Ttl 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
orExpires
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
orDefaultTTL
is more than 31536000 seconds, then the default value for this field is the same as the value ofDefaultTTL
.- min
Ttl 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.
- parameters
In 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, CachePolicyCookiesConfigArgs
- 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 tonone
, any cookies that are listed in anOriginRequestPolicy
are included in origin requests.whitelist
– Only the cookies in viewer requests that are listed in theCookieNames
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 theCookieNames
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.
- 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 tonone
, any cookies that are listed in anOriginRequestPolicy
are included in origin requests.whitelist
– Only the cookies in viewer requests that are listed in theCookieNames
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 theCookieNames
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.
- []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 tonone
, any cookies that are listed in anOriginRequestPolicy
are included in origin requests.whitelist
– Only the cookies in viewer requests that are listed in theCookieNames
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 theCookieNames
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.
- 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 tonone
, any cookies that are listed in anOriginRequestPolicy
are included in origin requests.whitelist
– Only the cookies in viewer requests that are listed in theCookieNames
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 theCookieNames
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.
- 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 tonone
, any cookies that are listed in anOriginRequestPolicy
are included in origin requests.whitelist
– Only the cookies in viewer requests that are listed in theCookieNames
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 theCookieNames
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.
- 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 tonone
, any cookies that are listed in anOriginRequestPolicy
are included in origin requests.whitelist
– Only the cookies in viewer requests that are listed in theCookieNames
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 theCookieNames
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.
- List<String>
- Contains a list of cookie names.
CachePolicyHeadersConfig, CachePolicyHeadersConfigArgs
- Header
Behavior 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 tonone
, any headers that are listed in anOriginRequestPolicy
are included in origin requests.whitelist
– Only the HTTP headers that are listed in theHeaders
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.
- Header
Behavior 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 tonone
, any headers that are listed in anOriginRequestPolicy
are included in origin requests.whitelist
– Only the HTTP headers that are listed in theHeaders
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 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 tonone
, any headers that are listed in anOriginRequestPolicy
are included in origin requests.whitelist
– Only the HTTP headers that are listed in theHeaders
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.
- header
Behavior 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 tonone
, any headers that are listed in anOriginRequestPolicy
are included in origin requests.whitelist
– Only the HTTP headers that are listed in theHeaders
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 tonone
, any headers that are listed in anOriginRequestPolicy
are included in origin requests.whitelist
– Only the HTTP headers that are listed in theHeaders
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.
- header
Behavior 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 tonone
, any headers that are listed in anOriginRequestPolicy
are included in origin requests.whitelist
– Only the HTTP headers that are listed in theHeaders
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, CachePolicyParametersInCacheKeyAndForwardedToOriginArgs
- 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.
- Enable
Accept boolEncoding Gzip 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 istrue
and the viewer request includes theAccept-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 theAccept-Encoding
header in the origin request policy. CloudFront always includes theAccept-Encoding
header in origin requests when the value of this field istrue
, so including this header in an origin request policy has no effect.If both of these fields are
false
, then CloudFront treats theAccept-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 addAccept-Encoding
to the headers whitelist like any other HTTP header.- Normalizes the value of the viewer's
- Headers
Config 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.
- Query
Strings 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.
- Enable
Accept boolEncoding Brotli 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 istrue
and the viewer request includes theAccept-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 theAccept-Encoding
header in the origin request policy. CloudFront always includes theAccept-Encoding
header in origin requests when the value of this field istrue
, so including this header in an origin request policy has no effect.If both of these fields are
false
, then CloudFront treats theAccept-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 addAccept-Encoding
to the headers whitelist like any other HTTP header.- Normalizes the value of the viewer's
- 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.
- Enable
Accept boolEncoding Gzip 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 istrue
and the viewer request includes theAccept-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 theAccept-Encoding
header in the origin request policy. CloudFront always includes theAccept-Encoding
header in origin requests when the value of this field istrue
, so including this header in an origin request policy has no effect.If both of these fields are
false
, then CloudFront treats theAccept-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 addAccept-Encoding
to 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-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 istrue
and the viewer request includes theAccept-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 theAccept-Encoding
header in the origin request policy. CloudFront always includes theAccept-Encoding
header in origin requests when the value of this field istrue
, so including this header in an origin request policy has no effect.If both of these fields are
false
, then CloudFront treats theAccept-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 addAccept-Encoding
to the headers whitelist like any other HTTP header.- Normalizes the value of the viewer's
- 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.
- enable
Accept BooleanEncoding Gzip 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 istrue
and the viewer request includes theAccept-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 theAccept-Encoding
header in the origin request policy. CloudFront always includes theAccept-Encoding
header in origin requests when the value of this field istrue
, so including this header in an origin request policy has no effect.If both of these fields are
false
, then CloudFront treats theAccept-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 addAccept-Encoding
to 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 BooleanEncoding Brotli 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 istrue
and the viewer request includes theAccept-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 theAccept-Encoding
header in the origin request policy. CloudFront always includes theAccept-Encoding
header in origin requests when the value of this field istrue
, so including this header in an origin request policy has no effect.If both of these fields are
false
, then CloudFront treats theAccept-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 addAccept-Encoding
to the headers whitelist like any other HTTP header.- Normalizes the value of the viewer's
- 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.
- enable
Accept booleanEncoding Gzip 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 istrue
and the viewer request includes theAccept-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 theAccept-Encoding
header in the origin request policy. CloudFront always includes theAccept-Encoding
header in origin requests when the value of this field istrue
, so including this header in an origin request policy has no effect.If both of these fields are
false
, then CloudFront treats theAccept-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 addAccept-Encoding
to 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 booleanEncoding Brotli 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 istrue
and the viewer request includes theAccept-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 theAccept-Encoding
header in the origin request policy. CloudFront always includes theAccept-Encoding
header in origin requests when the value of this field istrue
, so including this header in an origin request policy has no effect.If both of these fields are
false
, then CloudFront treats theAccept-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 addAccept-Encoding
to the headers whitelist like any other HTTP header.- Normalizes the value of the viewer's
- 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.
- enable_
accept_ boolencoding_ gzip 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 istrue
and the viewer request includes theAccept-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 theAccept-Encoding
header in the origin request policy. CloudFront always includes theAccept-Encoding
header in origin requests when the value of this field istrue
, so including this header in an origin request policy has no effect.If both of these fields are
false
, then CloudFront treats theAccept-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 addAccept-Encoding
to 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-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 istrue
and the viewer request includes theAccept-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 theAccept-Encoding
header in the origin request policy. CloudFront always includes theAccept-Encoding
header in origin requests when the value of this field istrue
, so including this header in an origin request policy has no effect.If both of these fields are
false
, then CloudFront treats theAccept-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 addAccept-Encoding
to 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.
- enable
Accept BooleanEncoding Gzip 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 istrue
and the viewer request includes theAccept-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 theAccept-Encoding
header in the origin request policy. CloudFront always includes theAccept-Encoding
header in origin requests when the value of this field istrue
, so including this header in an origin request policy has no effect.If both of these fields are
false
, then CloudFront treats theAccept-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 addAccept-Encoding
to the headers whitelist like any other HTTP header.- Normalizes the value of the viewer's
- headers
Config 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.
- query
Strings 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.
- enable
Accept BooleanEncoding Brotli 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 istrue
and the viewer request includes theAccept-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 theAccept-Encoding
header in the origin request policy. CloudFront always includes theAccept-Encoding
header in origin requests when the value of this field istrue
, so including this header in an origin request policy has no effect.If both of these fields are
false
, then CloudFront treats theAccept-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 addAccept-Encoding
to the headers whitelist like any other HTTP header.- Normalizes the value of the viewer's
CachePolicyQueryStringsConfig, CachePolicyQueryStringsConfigArgs
- Query
String 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 tonone
, any query strings that are listed in anOriginRequestPolicy
are included in origin requests.whitelist
– Only the query strings in viewer requests that are listed in theQueryStringNames
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 theQueryStringNames
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 List<string> - Contains a list of query string names.
- Query
String 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 tonone
, any query strings that are listed in anOriginRequestPolicy
are included in origin requests.whitelist
– Only the query strings in viewer requests that are listed in theQueryStringNames
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 theQueryStringNames
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 []string - Contains a list of query string names.
- query
String 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 tonone
, any query strings that are listed in anOriginRequestPolicy
are included in origin requests.whitelist
– Only the query strings in viewer requests that are listed in theQueryStringNames
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 theQueryStringNames
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 List<String> - Contains a list of query string names.
- query
String 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 tonone
, any query strings that are listed in anOriginRequestPolicy
are included in origin requests.whitelist
– Only the query strings in viewer requests that are listed in theQueryStringNames
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 theQueryStringNames
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 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 tonone
, any query strings that are listed in anOriginRequestPolicy
are included in origin requests.whitelist
– Only the query strings in viewer requests that are listed in theQueryStringNames
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 theQueryStringNames
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.
- query
String 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 tonone
, any query strings that are listed in anOriginRequestPolicy
are included in origin requests.whitelist
– Only the query strings in viewer requests that are listed in theQueryStringNames
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 theQueryStringNames
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 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.