Class: AWSCDK::CloudFront::CfnOriginRequestPolicy::HeadersConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::CfnOriginRequestPolicy::HeadersConfigProperty
- Defined in:
- cloud_front/cfn_origin_request_policy.rb
Overview
An object that determines whether any HTTP headers (and if so, which headers) are included in requests that CloudFront sends to the origin.
Instance Attribute Summary collapse
-
#header_behavior ⇒ String
readonly
Determines whether any HTTP headers are included 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.
575 576 577 578 579 580 |
# File 'cloud_front/cfn_origin_request_policy.rb', line 575 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 requests that CloudFront sends to the origin. Valid values are:.
none– No HTTP headers in viewer requests are included in requests that CloudFront sends to the origin. Even when this field is set tonone, any headers that are listed in aCachePolicyare included in origin requests.whitelist– Only the HTTP headers that are listed in theHeaderstype are included in requests that CloudFront sends to the origin.all_viewer– All HTTP headers in viewer requests are included in requests that CloudFront sends to the origin.all_viewer_and_whitelist_cloud_front– All HTTP headers in viewer requests and the additional CloudFront headers that are listed in theHeaderstype are included in requests that CloudFront sends to the origin. The additional headers are added by CloudFront.all_except– All HTTP headers in viewer requests are included in requests that CloudFront sends to the origin, except for those listed in theHeaderstype, which are not included.
592 593 594 |
# File 'cloud_front/cfn_origin_request_policy.rb', line 592 def header_behavior @header_behavior end |
#headers ⇒ Array<String>? (readonly)
Contains a list of HTTP header names.
597 598 599 |
# File 'cloud_front/cfn_origin_request_policy.rb', line 597 def headers @headers end |
Class Method Details
.jsii_properties ⇒ Object
599 600 601 602 603 604 |
# File 'cloud_front/cfn_origin_request_policy.rb', line 599 def self.jsii_properties { :header_behavior => "headerBehavior", :headers => "headers", } end |
Instance Method Details
#to_jsii ⇒ Object
606 607 608 609 610 611 612 613 |
# File 'cloud_front/cfn_origin_request_policy.rb', line 606 def to_jsii result = {} result.merge!({ "headerBehavior" => @header_behavior, "headers" => @headers, }) result.compact end |