Class: AWSCDK::CloudFront::CfnCachePolicy::CookiesConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::CfnCachePolicy::CookiesConfigProperty
- Defined in:
- cloud_front/cfn_cache_policy.rb
Overview
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.
Instance Attribute Summary collapse
-
#cookie_behavior ⇒ String
readonly
Determines whether any cookies in viewer requests are included in the cache key and in requests that CloudFront sends to the origin.
-
#cookies ⇒ Array<String>?
readonly
Contains a list of cookie names.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cookie_behavior:, cookies: nil) ⇒ CookiesConfigProperty
constructor
A new instance of CookiesConfigProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cookie_behavior:, cookies: nil) ⇒ CookiesConfigProperty
Returns a new instance of CookiesConfigProperty.
632 633 634 635 636 637 |
# File 'cloud_front/cfn_cache_policy.rb', line 632 def initialize(cookie_behavior:, cookies: nil) @cookie_behavior = Jsii::Type.check_type(@cookie_behavior, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cookieBehavior") @cookies = Jsii::Type.check_type(@cookies, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "cookies") unless @cookies.nil? end |
Instance Attribute Details
#cookie_behavior ⇒ String (readonly)
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 anOriginRequestPolicyare included in origin requests.whitelist– Only the cookies in viewer requests that are listed in theCookieNamestype are included in the cache key and in requests that CloudFront sends to the origin.all_except– 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 theCookieNamestype, 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.
650 651 652 |
# File 'cloud_front/cfn_cache_policy.rb', line 650 def @cookie_behavior end |
#cookies ⇒ Array<String>? (readonly)
Contains a list of cookie names.
655 656 657 |
# File 'cloud_front/cfn_cache_policy.rb', line 655 def @cookies end |
Class Method Details
.jsii_properties ⇒ Object
657 658 659 660 661 662 |
# File 'cloud_front/cfn_cache_policy.rb', line 657 def self.jsii_properties { :cookie_behavior => "cookieBehavior", :cookies => "cookies", } end |
Instance Method Details
#to_jsii ⇒ Object
664 665 666 667 668 669 670 671 |
# File 'cloud_front/cfn_cache_policy.rb', line 664 def to_jsii result = {} result.merge!({ "cookieBehavior" => @cookie_behavior, "cookies" => @cookies, }) result.compact end |