Class: AWSCDK::CloudFront::CfnDistribution::ForwardedValuesProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::CfnDistribution::ForwardedValuesProperty
- Defined in:
- cloud_front/cfn_distribution.rb
Overview
This field only supports standard distributions.
You can't specify this field for multi-tenant distributions. For more information, see Unsupported features for SaaS Manager for Amazon CloudFront in the Amazon CloudFront Developer Guide .
This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field.
If you want to include values in the cache key, use a cache policy. For more information, see Creating cache policies in the Amazon CloudFront Developer Guide .
If you want to send values to the origin but not include them in the cache key, use an origin request policy. For more information, see Creating origin request policies in the Amazon CloudFront Developer Guide .
A complex type that specifies how CloudFront handles query strings, cookies, and HTTP headers.
Instance Attribute Summary collapse
-
#cookies ⇒ AWSCDK::IResolvable, ...
readonly
This field is deprecated.
-
#headers ⇒ Array<String>?
readonly
This field is deprecated.
-
#query_string ⇒ Boolean, AWSCDK::IResolvable
readonly
This field is deprecated.
-
#query_string_cache_keys ⇒ Array<String>?
readonly
This field is deprecated.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(query_string:, cookies: nil, headers: nil, query_string_cache_keys: nil) ⇒ ForwardedValuesProperty
constructor
A new instance of ForwardedValuesProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(query_string:, cookies: nil, headers: nil, query_string_cache_keys: nil) ⇒ ForwardedValuesProperty
Returns a new instance of ForwardedValuesProperty.
2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 |
# File 'cloud_front/cfn_distribution.rb', line 2000 def initialize(query_string:, cookies: nil, headers: nil, query_string_cache_keys: nil) @query_string = query_string Jsii::Type.check_type(@query_string, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "queryString") @cookies = .is_a?(Hash) ? ::AWSCDK::CloudFront::CfnDistribution::CookiesProperty.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@cookies, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250LkNmbkRpc3RyaWJ1dGlvbi5Db29raWVzUHJvcGVydHkifV19fQ==")), "cookies") unless @cookies.nil? @headers = headers Jsii::Type.check_type(@headers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "headers") unless @headers.nil? @query_string_cache_keys = query_string_cache_keys Jsii::Type.check_type(@query_string_cache_keys, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "queryStringCacheKeys") unless @query_string_cache_keys.nil? end |
Instance Attribute Details
#cookies ⇒ AWSCDK::IResolvable, ... (readonly)
This field is deprecated.
We recommend that you use a cache policy or an origin request policy instead of this field.
If you want to include cookies in the cache key, use a cache policy. For more information, see Creating cache policies in the Amazon CloudFront Developer Guide .
If you want to send cookies to the origin but not include them in the cache key, use an origin request policy. For more information, see Creating origin request policies in the Amazon CloudFront Developer Guide .
A complex type that specifies whether you want CloudFront to forward cookies to the origin and, if so, which ones. For more information about forwarding cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies in the Amazon CloudFront Developer Guide .
2044 2045 2046 |
# File 'cloud_front/cfn_distribution.rb', line 2044 def @cookies end |
#headers ⇒ Array<String>? (readonly)
This field is deprecated.
We recommend that you use a cache policy or an origin request policy instead of this field.
If you want to include headers in the cache key, use a cache policy. For more information, see Creating cache policies in the Amazon CloudFront Developer Guide .
If you want to send headers to the origin but not include them in the cache key, use an origin request policy. For more information, see Creating origin request policies in the Amazon CloudFront Developer Guide .
A complex type that specifies the Headers , if any, that you want CloudFront to forward to the origin for this cache behavior (whitelisted headers). For the headers that you specify, CloudFront also caches separate versions of a specified object that is based on the header values in viewer requests.
For more information, see Caching Content Based on Request Headers in the Amazon CloudFront Developer Guide .
2059 2060 2061 |
# File 'cloud_front/cfn_distribution.rb', line 2059 def headers @headers end |
#query_string ⇒ Boolean, AWSCDK::IResolvable (readonly)
This field is deprecated.
We recommend that you use a cache policy or an origin request policy instead of this field.
If you want to include query strings in the cache key, use a cache policy. For more information, see Creating cache policies in the Amazon CloudFront Developer Guide .
If you want to send query strings to the origin but not include them in the cache key, use an origin request policy. For more information, see Creating origin request policies in the Amazon CloudFront Developer Guide .
Indicates whether you want CloudFront to forward query strings to the origin that is associated with this cache behavior and cache based on the query string parameters. CloudFront behavior depends on the value of QueryString and on the values that you specify for QueryStringCacheKeys , if any:
If you specify true for QueryString and you don't specify any values for QueryStringCacheKeys , CloudFront forwards all query string parameters to the origin and caches based on all query string parameters. Depending on how many query string parameters and values you have, this can adversely affect performance because CloudFront must forward more requests to the origin.
If you specify true for QueryString and you specify one or more values for QueryStringCacheKeys , CloudFront forwards all query string parameters to the origin, but it only caches based on the query string parameters that you specify.
If you specify false for QueryString , CloudFront doesn't forward any query string parameters to the origin, and doesn't cache based on query string parameters.
For more information, see Configuring CloudFront to Cache Based on Query String Parameters in the Amazon CloudFront Developer Guide .
2031 2032 2033 |
# File 'cloud_front/cfn_distribution.rb', line 2031 def query_string @query_string end |
#query_string_cache_keys ⇒ Array<String>? (readonly)
This field is deprecated.
We recommend that you use a cache policy or an origin request policy instead of this field.
If you want to include query strings in the cache key, use a cache policy. For more information, see Creating cache policies in the Amazon CloudFront Developer Guide .
If you want to send query strings to the origin but not include them in the cache key, use an origin request policy. For more information, see Creating origin request policies in the Amazon CloudFront Developer Guide .
A complex type that contains information about the query string parameters that you want CloudFront to use for caching for this cache behavior.
2072 2073 2074 |
# File 'cloud_front/cfn_distribution.rb', line 2072 def query_string_cache_keys @query_string_cache_keys end |
Class Method Details
.jsii_properties ⇒ Object
2074 2075 2076 2077 2078 2079 2080 2081 |
# File 'cloud_front/cfn_distribution.rb', line 2074 def self.jsii_properties { :query_string => "queryString", :cookies => "cookies", :headers => "headers", :query_string_cache_keys => "queryStringCacheKeys", } end |
Instance Method Details
#to_jsii ⇒ Object
2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 |
# File 'cloud_front/cfn_distribution.rb', line 2083 def to_jsii result = {} result.merge!({ "queryString" => @query_string, "cookies" => @cookies, "headers" => @headers, "queryStringCacheKeys" => @query_string_cache_keys, }) result.compact end |