Class: AWSCDK::CloudFront::ResponseCustomHeader
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::ResponseCustomHeader
- Defined in:
- cloud_front/response_custom_header.rb
Overview
An HTTP response header name and its value.
CloudFront includes this header in HTTP responses that it sends for requests that match a cache behavior that’s associated with this response headers policy.
Instance Attribute Summary collapse
-
#header ⇒ String
readonly
The HTTP response header name.
-
#override ⇒ Boolean
readonly
A Boolean that determines whether CloudFront overrides a response header with the same name received from the origin with the header specified here.
-
#value ⇒ String
readonly
The value for the HTTP response header.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(header:, override:, value:) ⇒ ResponseCustomHeader
constructor
A new instance of ResponseCustomHeader.
- #to_jsii ⇒ Object
Constructor Details
#initialize(header:, override:, value:) ⇒ ResponseCustomHeader
Returns a new instance of ResponseCustomHeader.
12 13 14 15 16 17 18 19 |
# File 'cloud_front/response_custom_header.rb', line 12 def initialize(header:, override:, value:) @header = header Jsii::Type.check_type(@header, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "header") @override = override Jsii::Type.check_type(@override, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "override") @value = value Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") end |
Instance Attribute Details
#header ⇒ String (readonly)
The HTTP response header name.
24 25 26 |
# File 'cloud_front/response_custom_header.rb', line 24 def header @header end |
#override ⇒ Boolean (readonly)
A Boolean that determines whether CloudFront overrides a response header with the same name received from the origin with the header specified here.
28 29 30 |
# File 'cloud_front/response_custom_header.rb', line 28 def override @override end |
#value ⇒ String (readonly)
The value for the HTTP response header.
32 33 34 |
# File 'cloud_front/response_custom_header.rb', line 32 def value @value end |
Class Method Details
.jsii_properties ⇒ Object
34 35 36 37 38 39 40 |
# File 'cloud_front/response_custom_header.rb', line 34 def self.jsii_properties { :header => "header", :override => "override", :value => "value", } end |
Instance Method Details
#to_jsii ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'cloud_front/response_custom_header.rb', line 42 def to_jsii result = {} result.merge!({ "header" => @header, "override" => @override, "value" => @value, }) result.compact end |