Class: AWSCDK::CloudFront::CfnOriginRequestPolicy::QueryStringsConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_front/cfn_origin_request_policy.rb

Overview

An object that 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.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(query_string_behavior:, query_strings: nil) ⇒ QueryStringsConfigProperty

Returns a new instance of QueryStringsConfigProperty.

Parameters:

  • query_string_behavior (String)

    Determines whether any URL query strings in viewer requests are included in requests that CloudFront sends to the origin.

  • query_strings (Array<String>, nil) (defaults to: nil)

    Contains a list of query string names.



709
710
711
712
713
714
# File 'cloud_front/cfn_origin_request_policy.rb', line 709

def initialize(query_string_behavior:, query_strings: nil)
  @query_string_behavior = query_string_behavior
  Jsii::Type.check_type(@query_string_behavior, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "queryStringBehavior")
  @query_strings = query_strings
  Jsii::Type.check_type(@query_strings, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "queryStrings") unless @query_strings.nil?
end

Instance Attribute Details

#query_string_behaviorString (readonly)

Determines whether any URL query strings in viewer requests are included in requests that CloudFront sends to the origin.

Valid values are:

  • none – No query strings in viewer requests are included in requests that CloudFront sends to the origin. Even when this field is set to none , any query strings that are listed in a CachePolicy are included in origin requests.
  • whitelist – Only the query strings in viewer requests that are listed in the QueryStringNames type are included in requests that CloudFront sends to the origin.
  • all – All query strings in viewer requests are included in requests that CloudFront sends to the origin.
  • all_except – All query strings in viewer requests are included in requests that CloudFront sends to the origin, except for those listed in the QueryStringNames type, which are not included.


727
728
729
# File 'cloud_front/cfn_origin_request_policy.rb', line 727

def query_string_behavior
  @query_string_behavior
end

#query_stringsArray<String>? (readonly)

Contains a list of query string names.



732
733
734
# File 'cloud_front/cfn_origin_request_policy.rb', line 732

def query_strings
  @query_strings
end

Class Method Details

.jsii_propertiesObject



734
735
736
737
738
739
# File 'cloud_front/cfn_origin_request_policy.rb', line 734

def self.jsii_properties
  {
    :query_string_behavior => "queryStringBehavior",
    :query_strings => "queryStrings",
  }
end

Instance Method Details

#to_jsiiObject



741
742
743
744
745
746
747
748
# File 'cloud_front/cfn_origin_request_policy.rb', line 741

def to_jsii
  result = {}
  result.merge!({
    "queryStringBehavior" => @query_string_behavior,
    "queryStrings" => @query_strings,
  })
  result.compact
end