Class: AWSCDK::CloudFront::CfnCachePolicy::HeadersConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::CfnCachePolicy::HeadersConfigProperty
- Defined in:
- cloud_front/cfn_cache_policy.rb
Overview
An object that determines whether any HTTP headers (and if so, which headers) are included in the cache key and in requests that CloudFront sends to the origin.
Instance Attribute Summary collapse
-
#header_behavior ⇒ String
readonly
Determines whether any HTTP headers are included in the cache key and in requests that CloudFront sends to the origin.
-
#headers ⇒ Array<String>?
readonly
Contains a list of HTTP header names.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(header_behavior:, headers: nil) ⇒ HeadersConfigProperty
constructor
A new instance of HeadersConfigProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(header_behavior:, headers: nil) ⇒ HeadersConfigProperty
Returns a new instance of HeadersConfigProperty.
682 683 684 685 686 687 |
# File 'cloud_front/cfn_cache_policy.rb', line 682 def initialize(header_behavior:, headers: nil) @header_behavior = header_behavior Jsii::Type.check_type(@header_behavior, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "headerBehavior") @headers = headers Jsii::Type.check_type(@headers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "headers") unless @headers.nil? end |
Instance Attribute Details
#header_behavior ⇒ String (readonly)
Determines whether any HTTP headers are included in the cache key and in requests that CloudFront sends to the origin.
Valid values are:
none– No HTTP headers are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set tonone, any headers that are listed in anOriginRequestPolicyare included in origin requests.whitelist– Only the HTTP headers that are listed in theHeaderstype are included in the cache key and in requests that CloudFront sends to the origin.
698 699 700 |
# File 'cloud_front/cfn_cache_policy.rb', line 698 def header_behavior @header_behavior end |
#headers ⇒ Array<String>? (readonly)
Contains a list of HTTP header names.
703 704 705 |
# File 'cloud_front/cfn_cache_policy.rb', line 703 def headers @headers end |
Class Method Details
.jsii_properties ⇒ Object
705 706 707 708 709 710 |
# File 'cloud_front/cfn_cache_policy.rb', line 705 def self.jsii_properties { :header_behavior => "headerBehavior", :headers => "headers", } end |
Instance Method Details
#to_jsii ⇒ Object
712 713 714 715 716 717 718 719 |
# File 'cloud_front/cfn_cache_policy.rb', line 712 def to_jsii result = {} result.merge!({ "headerBehavior" => @header_behavior, "headers" => @headers, }) result.compact end |