Class: AWSCDK::CloudFront::ResponseCustomHeadersBehavior
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::ResponseCustomHeadersBehavior
- Defined in:
- cloud_front/response_custom_headers_behavior.rb
Overview
Configuration for a set of HTTP response headers that are sent for requests that match a cache behavior that’s associated with this response headers policy.
Instance Attribute Summary collapse
-
#custom_headers ⇒ Array<AWSCDK::CloudFront::ResponseCustomHeader>
readonly
The list of HTTP response headers and their values.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(custom_headers:) ⇒ ResponseCustomHeadersBehavior
constructor
A new instance of ResponseCustomHeadersBehavior.
- #to_jsii ⇒ Object
Constructor Details
#initialize(custom_headers:) ⇒ ResponseCustomHeadersBehavior
Returns a new instance of ResponseCustomHeadersBehavior.
8 9 10 11 |
# File 'cloud_front/response_custom_headers_behavior.rb', line 8 def initialize(custom_headers:) @custom_headers = custom_headers.is_a?(Array) ? custom_headers.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CloudFront::ResponseCustomHeader.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : custom_headers Jsii::Type.check_type(@custom_headers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250LlJlc3BvbnNlQ3VzdG9tSGVhZGVyIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "customHeaders") end |
Instance Attribute Details
#custom_headers ⇒ Array<AWSCDK::CloudFront::ResponseCustomHeader> (readonly)
The list of HTTP response headers and their values.
16 17 18 |
# File 'cloud_front/response_custom_headers_behavior.rb', line 16 def custom_headers @custom_headers end |
Class Method Details
.jsii_properties ⇒ Object
18 19 20 21 22 |
# File 'cloud_front/response_custom_headers_behavior.rb', line 18 def self.jsii_properties { :custom_headers => "customHeaders", } end |
Instance Method Details
#to_jsii ⇒ Object
24 25 26 27 28 29 30 |
# File 'cloud_front/response_custom_headers_behavior.rb', line 24 def to_jsii result = {} result.merge!({ "customHeaders" => @custom_headers, }) result.compact end |