AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
New-CFCachePolicy-CachePolicyConfig_Comment <String>-CookiesConfig_CookieBehavior <CachePolicyCookieBehavior>-CachePolicyConfig_DefaultTTL <Int64>-ParametersInCacheKeyAndForwardedToOrigin_EnableAcceptEncodingBrotli <Boolean>-ParametersInCacheKeyAndForwardedToOrigin_EnableAcceptEncodingGzip <Boolean>-HeadersConfig_HeaderBehavior <CachePolicyHeaderBehavior>-Cookies_Item <String[]>-Headers_Item <String[]>-QueryStrings_Item <String[]>-CachePolicyConfig_MaxTTL <Int64>-CachePolicyConfig_MinTTL <Int64>-CachePolicyConfig_Name <String>-Cookies_Quantity <Int32>-Headers_Quantity <Int32>-QueryStrings_Quantity <Int32>-QueryStringsConfig_QueryStringBehavior <CachePolicyQueryStringBehavior>-Select <String>-Force <SwitchParameter>
OriginRequestPolicy
.
For more information about cache policies, see Controlling the cache key in the Amazon CloudFront Developer Guide. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Cache-Control
or Expires
headers with the object. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.The default value for this field is 86400 seconds (one day). If the value of MinTTL
is more than 86400 seconds, then the default value for this field is the same as the value of MinTTL
. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Cache-Control
or Expires
headers with the object. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.The default value for this field is 31536000 seconds (one year). If the value of MinTTL
or DefaultTTL
is more than 31536000 seconds, then the default value for this field is the same as the value of DefaultTTL
. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | True |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | True |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | CachePolicyConfig_ParametersInCacheKeyAndForwardedToOrigin_CookiesConfig_Cookies_Items |
Items
list. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | CachePolicyConfig_ParametersInCacheKeyAndForwardedToOrigin_CookiesConfig_Cookies_Quantity |
none
– Cookies in viewer requests are not included in the cache key and are not automatically included in requests that CloudFront sends to the origin. Even when this field is set to none
, any cookies that are listed in an OriginRequestPolicy
are included in origin requests.whitelist
– The cookies in viewer requests that are listed in the CookieNames
type are included in the cache key and automatically included in requests that CloudFront sends to the origin.allExcept
– All cookies in viewer requests that are not listed in the CookieNames
type are included in the cache key and automatically included in requests that CloudFront sends to the origin.all
– All cookies in viewer requests are included in the cache key and are automatically included in requests that CloudFront sends to the origin.Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | CachePolicyConfig_ParametersInCacheKeyAndForwardedToOrigin_CookiesConfig_CookieBehavior |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | CachePolicyConfig_ParametersInCacheKeyAndForwardedToOrigin_HeadersConfig_Headers_Items |
Items
list. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | CachePolicyConfig_ParametersInCacheKeyAndForwardedToOrigin_HeadersConfig_Headers_Quantity |
none
– HTTP headers are not included in the cache key and are not automatically included in requests that CloudFront sends to the origin. Even when this field is set to none
, any headers that are listed in an OriginRequestPolicy
are included in origin requests.whitelist
– The HTTP headers that are listed in the Headers
type are included in the cache key and are automatically included in requests that CloudFront sends to the origin.Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | CachePolicyConfig_ParametersInCacheKeyAndForwardedToOrigin_HeadersConfig_HeaderBehavior |
Accept-Encoding
HTTP header is included in the cache key and included in requests that CloudFront sends to the origin.This field is related to the EnableAcceptEncodingGzip
field. If one or both of these fields is true
and the viewer request includes the Accept-Encoding
header, then CloudFront does the following:Accept-Encoding
headertrue
, and this cache behavior also has an origin request policy attached, do not include the Accept-Encoding
header in the origin request policy. CloudFront always includes the Accept-Encoding
header in origin requests when the value of this field is true
, so including this header in an origin request policy has no effect.If both of these fields are false
, then CloudFront treats the Accept-Encoding
header the same as any other HTTP header in the viewer request. By default, it’s not included in the cache key and it’s not included in origin requests. In this case, you can manually add Accept-Encoding
to the headers whitelist like any other HTTP header. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | CachePolicyConfig_ParametersInCacheKeyAndForwardedToOrigin_EnableAcceptEncodingBrotli |
Accept-Encoding
HTTP header is included in the cache key and included in requests that CloudFront sends to the origin.This field is related to the EnableAcceptEncodingBrotli
field. If one or both of these fields is true
and the viewer request includes the Accept-Encoding
header, then CloudFront does the following:Accept-Encoding
headertrue
, and this cache behavior also has an origin request policy attached, do not include the Accept-Encoding
header in the origin request policy. CloudFront always includes the Accept-Encoding
header in origin requests when the value of this field is true
, so including this header in an origin request policy has no effect.If both of these fields are false
, then CloudFront treats the Accept-Encoding
header the same as any other HTTP header in the viewer request. By default, it’s not included in the cache key and it’s not included in origin requests. In this case, you can manually add Accept-Encoding
to the headers whitelist like any other HTTP header. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | CachePolicyConfig_ParametersInCacheKeyAndForwardedToOrigin_EnableAcceptEncodingGzip |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | CachePolicyConfig_ParametersInCacheKeyAndForwardedToOrigin_QueryStringsConfig_QueryStrings_Items |
Items
list. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | CachePolicyConfig_ParametersInCacheKeyAndForwardedToOrigin_QueryStringsConfig_QueryStrings_Quantity |
none
– Query strings in viewer requests are not included in the cache key and are not automatically included in requests that CloudFront sends to the origin. Even when this field is set to none
, any query strings that are listed in an OriginRequestPolicy
are included in origin requests.whitelist
– The query strings in viewer requests that are listed in the QueryStringNames
type are included in the cache key and automatically included in requests that CloudFront sends to the origin.allExcept
– All query strings in viewer requests that are not listed in the QueryStringNames
type are included in the cache key and automatically included in requests that CloudFront sends to the origin.all
– All query strings in viewer requests are included in the cache key and are automatically included in requests that CloudFront sends to the origin.Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | CachePolicyConfig_ParametersInCacheKeyAndForwardedToOrigin_QueryStringsConfig_QueryStringBehavior |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AK |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AWSProfilesLocation, ProfilesLocation |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | StoredCredentials, AWSProfileName |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | RegionToCall |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | SK, SecretAccessKey |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ST |
AWS Tools for PowerShell: 2.x.y.z