Class: AWSCDK::CloudFront::CfnDistribution::OriginCustomHeaderProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::CfnDistribution::OriginCustomHeaderProperty
- Defined in:
- cloud_front/cfn_distribution.rb
Overview
A complex type that contains HeaderName and HeaderValue elements, if any, for this distribution.
Instance Attribute Summary collapse
-
#header_name ⇒ String
readonly
The name of a header that you want CloudFront to send to your origin.
-
#header_value ⇒ String
readonly
The value for the header that you specified in the
HeaderNamefield.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(header_name:, header_value:) ⇒ OriginCustomHeaderProperty
constructor
A new instance of OriginCustomHeaderProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(header_name:, header_value:) ⇒ OriginCustomHeaderProperty
Returns a new instance of OriginCustomHeaderProperty.
2500 2501 2502 2503 2504 2505 |
# File 'cloud_front/cfn_distribution.rb', line 2500 def initialize(header_name:, header_value:) @header_name = header_name Jsii::Type.check_type(@header_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "headerName") @header_value = header_value Jsii::Type.check_type(@header_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "headerValue") end |
Instance Attribute Details
#header_name ⇒ String (readonly)
The name of a header that you want CloudFront to send to your origin.
For more information, see Adding Custom Headers to Origin Requests in the Amazon CloudFront Developer Guide .
2513 2514 2515 |
# File 'cloud_front/cfn_distribution.rb', line 2513 def header_name @header_name end |
#header_value ⇒ String (readonly)
The value for the header that you specified in the HeaderName field.
2518 2519 2520 |
# File 'cloud_front/cfn_distribution.rb', line 2518 def header_value @header_value end |
Class Method Details
.jsii_properties ⇒ Object
2520 2521 2522 2523 2524 2525 |
# File 'cloud_front/cfn_distribution.rb', line 2520 def self.jsii_properties { :header_name => "headerName", :header_value => "headerValue", } end |
Instance Method Details
#to_jsii ⇒ Object
2527 2528 2529 2530 2531 2532 2533 2534 |
# File 'cloud_front/cfn_distribution.rb', line 2527 def to_jsii result = {} result.merge!({ "headerName" => @header_name, "headerValue" => @header_value, }) result.compact end |