Class CfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty>
- Enclosing interface:
CfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.cookiesConfig(CfnCachePolicyPropsMixin.CookiesConfigProperty cookiesConfig) cookiesConfig(IResolvable cookiesConfig) enableAcceptEncodingBrotli(Boolean enableAcceptEncodingBrotli) enableAcceptEncodingBrotli(IResolvable enableAcceptEncodingBrotli) enableAcceptEncodingGzip(Boolean enableAcceptEncodingGzip) enableAcceptEncodingGzip(IResolvable enableAcceptEncodingGzip) headersConfig(CfnCachePolicyPropsMixin.HeadersConfigProperty headersConfig) headersConfig(IResolvable headersConfig) queryStringsConfig(CfnCachePolicyPropsMixin.QueryStringsConfigProperty queryStringsConfig) queryStringsConfig(IResolvable queryStringsConfig)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cookiesConfig
@Stability(Stable) public CfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.Builder cookiesConfig(IResolvable cookiesConfig) Sets the value ofCfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.getCookiesConfig()- Parameters:
cookiesConfig- 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.- Returns:
this
-
cookiesConfig
@Stability(Stable) public CfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.Builder cookiesConfig(CfnCachePolicyPropsMixin.CookiesConfigProperty cookiesConfig) Sets the value ofCfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.getCookiesConfig()- Parameters:
cookiesConfig- 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.- Returns:
this
-
enableAcceptEncodingBrotli
@Stability(Stable) public CfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.Builder enableAcceptEncodingBrotli(Boolean enableAcceptEncodingBrotli) Sets the value ofCfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.getEnableAcceptEncodingBrotli()- Parameters:
enableAcceptEncodingBrotli- A flag that can affect whether theAccept-EncodingHTTP header is included in the cache key and included in requests that CloudFront sends to the origin. This field is related to theEnableAcceptEncodingGzipfield. If one or both of these fields istrueand the viewer request includes theAccept-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 theAccept-Encodingheader in the origin request policy. CloudFront always includes theAccept-Encodingheader 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-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 addAccept-Encodingto the headers whitelist like any other HTTP header.- Normalizes the value of the viewer's
- Returns:
this
-
enableAcceptEncodingBrotli
@Stability(Stable) public CfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.Builder enableAcceptEncodingBrotli(IResolvable enableAcceptEncodingBrotli) Sets the value ofCfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.getEnableAcceptEncodingBrotli()- Parameters:
enableAcceptEncodingBrotli- A flag that can affect whether theAccept-EncodingHTTP header is included in the cache key and included in requests that CloudFront sends to the origin. This field is related to theEnableAcceptEncodingGzipfield. If one or both of these fields istrueand the viewer request includes theAccept-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 theAccept-Encodingheader in the origin request policy. CloudFront always includes theAccept-Encodingheader 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-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 addAccept-Encodingto the headers whitelist like any other HTTP header.- Normalizes the value of the viewer's
- Returns:
this
-
enableAcceptEncodingGzip
@Stability(Stable) public CfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.Builder enableAcceptEncodingGzip(Boolean enableAcceptEncodingGzip) Sets the value ofCfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.getEnableAcceptEncodingGzip()- Parameters:
enableAcceptEncodingGzip- A flag that can affect whether theAccept-EncodingHTTP header is included in the cache key and included in requests that CloudFront sends to the origin. This field is related to theEnableAcceptEncodingBrotlifield. If one or both of these fields istrueand the viewer request includes theAccept-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 theAccept-Encodingheader in the origin request policy. CloudFront always includes theAccept-Encodingheader 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-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 addAccept-Encodingto the headers whitelist like any other HTTP header.- Normalizes the value of the viewer's
- Returns:
this
-
enableAcceptEncodingGzip
@Stability(Stable) public CfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.Builder enableAcceptEncodingGzip(IResolvable enableAcceptEncodingGzip) Sets the value ofCfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.getEnableAcceptEncodingGzip()- Parameters:
enableAcceptEncodingGzip- A flag that can affect whether theAccept-EncodingHTTP header is included in the cache key and included in requests that CloudFront sends to the origin. This field is related to theEnableAcceptEncodingBrotlifield. If one or both of these fields istrueand the viewer request includes theAccept-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 theAccept-Encodingheader in the origin request policy. CloudFront always includes theAccept-Encodingheader 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-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 addAccept-Encodingto the headers whitelist like any other HTTP header.- Normalizes the value of the viewer's
- Returns:
this
-
headersConfig
@Stability(Stable) public CfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.Builder headersConfig(IResolvable headersConfig) Sets the value ofCfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.getHeadersConfig()- Parameters:
headersConfig- 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.- Returns:
this
-
headersConfig
@Stability(Stable) public CfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.Builder headersConfig(CfnCachePolicyPropsMixin.HeadersConfigProperty headersConfig) Sets the value ofCfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.getHeadersConfig()- Parameters:
headersConfig- 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.- Returns:
this
-
queryStringsConfig
@Stability(Stable) public CfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.Builder queryStringsConfig(IResolvable queryStringsConfig) Sets the value ofCfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.getQueryStringsConfig()- Parameters:
queryStringsConfig- 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.- Returns:
this
-
queryStringsConfig
@Stability(Stable) public CfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.Builder queryStringsConfig(CfnCachePolicyPropsMixin.QueryStringsConfigProperty queryStringsConfig) Sets the value ofCfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty.getQueryStringsConfig()- Parameters:
queryStringsConfig- 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.- Returns:
this
-
build
@Stability(Stable) public CfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty build()Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty>- Returns:
- a new instance of
CfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty - Throws:
NullPointerException- if any required attribute was not provided
-