Class: AWSCDK::CloudFront::OriginRequestCookieBehavior
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::CloudFront::OriginRequestCookieBehavior
- Defined in:
- cloud_front/origin_request_cookie_behavior.rb
Overview
Determines whether any cookies in viewer requests (and if so, which cookies) are included in requests that CloudFront sends to the origin.
Class Method Summary collapse
-
.all ⇒ AWSCDK::CloudFront::OriginRequestCookieBehavior
All cookies in viewer requests are included in requests that CloudFront sends to the origin.
-
.allow_list(*cookies) ⇒ AWSCDK::CloudFront::OriginRequestCookieBehavior
Only the provided
cookiesare included in requests that CloudFront sends to the origin. -
.deny_list(*cookies) ⇒ AWSCDK::CloudFront::OriginRequestCookieBehavior
All cookies except the provided
cookiesare included in requests that CloudFront sends to the origin. - .jsii_overridable_methods ⇒ Object
-
.none ⇒ AWSCDK::CloudFront::OriginRequestCookieBehavior
Cookies in viewer requests are not included in requests that CloudFront sends to the origin.
Instance Method Summary collapse
-
#behavior ⇒ String
The behavior of cookies: allow all, none or an allow list.
-
#cookies ⇒ Array<String>?
The cookies to allow, if the behavior is an allow list.
-
#initialize(*args) ⇒ OriginRequestCookieBehavior
constructor
A new instance of OriginRequestCookieBehavior.
Constructor Details
#initialize(*args) ⇒ OriginRequestCookieBehavior
Returns a new instance of OriginRequestCookieBehavior.
8 9 10 |
# File 'cloud_front/origin_request_cookie_behavior.rb', line 8 def initialize(*args) raise NoMethodError, "aws-cdk-lib.aws_cloudfront.OriginRequestCookieBehavior does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.all ⇒ AWSCDK::CloudFront::OriginRequestCookieBehavior
All cookies in viewer requests are included in requests that CloudFront sends to the origin.
22 23 24 |
# File 'cloud_front/origin_request_cookie_behavior.rb', line 22 def self.all() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudfront.OriginRequestCookieBehavior", "all", []) end |
.allow_list(*cookies) ⇒ AWSCDK::CloudFront::OriginRequestCookieBehavior
Only the provided cookies are included in requests that CloudFront sends to the origin.
30 31 32 33 34 35 |
# File 'cloud_front/origin_request_cookie_behavior.rb', line 30 def self.allow_list(*) .each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cookies[#{index}]") end Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudfront.OriginRequestCookieBehavior", "allowList", [*]) end |
.deny_list(*cookies) ⇒ AWSCDK::CloudFront::OriginRequestCookieBehavior
All cookies except the provided cookies are included in requests that CloudFront sends to the origin.
41 42 43 44 45 46 |
# File 'cloud_front/origin_request_cookie_behavior.rb', line 41 def self.deny_list(*) .each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cookies[#{index}]") end Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudfront.OriginRequestCookieBehavior", "denyList", [*]) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 17 |
# File 'cloud_front/origin_request_cookie_behavior.rb', line 12 def self.jsii_overridable_methods { :behavior => { kind: :property, name: "behavior", is_optional: false }, :cookies => { kind: :property, name: "cookies", is_optional: true }, } end |
.none ⇒ AWSCDK::CloudFront::OriginRequestCookieBehavior
Cookies in viewer requests are not included in requests that CloudFront sends to the origin.
Any cookies that are listed in a CachePolicy are still included in origin requests.
53 54 55 |
# File 'cloud_front/origin_request_cookie_behavior.rb', line 53 def self.none() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudfront.OriginRequestCookieBehavior", "none", []) end |
Instance Method Details
#behavior ⇒ String
The behavior of cookies: allow all, none or an allow list.
60 61 62 |
# File 'cloud_front/origin_request_cookie_behavior.rb', line 60 def behavior() jsii_get_property("behavior") end |
#cookies ⇒ Array<String>?
The cookies to allow, if the behavior is an allow list.
67 68 69 |
# File 'cloud_front/origin_request_cookie_behavior.rb', line 67 def () jsii_get_property("cookies") end |