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