Class: AWSCDK::CloudFront::ResponseHeadersStrictTransportSecurity
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::ResponseHeadersStrictTransportSecurity
- Defined in:
- cloud_front/response_headers_strict_transport_security.rb
Overview
Determines whether CloudFront includes the Strict-Transport-Security HTTP response header and the header’s value.
Instance Attribute Summary collapse
-
#access_control_max_age ⇒ AWSCDK::Duration
readonly
A number that CloudFront uses as the value for the max-age directive in the Strict-Transport-Security HTTP response header.
-
#include_subdomains ⇒ Boolean?
readonly
A Boolean that determines whether CloudFront includes the includeSubDomains directive in the Strict-Transport-Security HTTP response header.
-
#override ⇒ Boolean
readonly
A Boolean that determines whether CloudFront overrides the Strict-Transport-Security HTTP response header received from the origin with the one specified in this response headers policy.
-
#preload ⇒ Boolean?
readonly
A Boolean that determines whether CloudFront includes the preload directive in the Strict-Transport-Security HTTP response header.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(access_control_max_age:, override:, include_subdomains: nil, preload: nil) ⇒ ResponseHeadersStrictTransportSecurity
constructor
A new instance of ResponseHeadersStrictTransportSecurity.
- #to_jsii ⇒ Object
Constructor Details
#initialize(access_control_max_age:, override:, include_subdomains: nil, preload: nil) ⇒ ResponseHeadersStrictTransportSecurity
Returns a new instance of ResponseHeadersStrictTransportSecurity.
11 12 13 14 15 16 17 18 19 20 |
# File 'cloud_front/response_headers_strict_transport_security.rb', line 11 def initialize(access_control_max_age:, override:, include_subdomains: nil, preload: nil) @access_control_max_age = access_control_max_age Jsii::Type.check_type(@access_control_max_age, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "accessControlMaxAge") @override = override Jsii::Type.check_type(@override, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "override") @include_subdomains = include_subdomains Jsii::Type.check_type(@include_subdomains, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "includeSubdomains") unless @include_subdomains.nil? @preload = preload Jsii::Type.check_type(@preload, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "preload") unless @preload.nil? end |
Instance Attribute Details
#access_control_max_age ⇒ AWSCDK::Duration (readonly)
A number that CloudFront uses as the value for the max-age directive in the Strict-Transport-Security HTTP response header.
25 26 27 |
# File 'cloud_front/response_headers_strict_transport_security.rb', line 25 def access_control_max_age @access_control_max_age end |
#include_subdomains ⇒ Boolean? (readonly)
Default: false
A Boolean that determines whether CloudFront includes the includeSubDomains directive in the Strict-Transport-Security HTTP response header.
34 35 36 |
# File 'cloud_front/response_headers_strict_transport_security.rb', line 34 def include_subdomains @include_subdomains end |
#override ⇒ Boolean (readonly)
A Boolean that determines whether CloudFront overrides the Strict-Transport-Security HTTP response header received from the origin with the one specified in this response headers policy.
29 30 31 |
# File 'cloud_front/response_headers_strict_transport_security.rb', line 29 def override @override end |
#preload ⇒ Boolean? (readonly)
Default: false
A Boolean that determines whether CloudFront includes the preload directive in the Strict-Transport-Security HTTP response header.
39 40 41 |
# File 'cloud_front/response_headers_strict_transport_security.rb', line 39 def preload @preload end |
Class Method Details
.jsii_properties ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'cloud_front/response_headers_strict_transport_security.rb', line 41 def self.jsii_properties { :access_control_max_age => "accessControlMaxAge", :override => "override", :include_subdomains => "includeSubdomains", :preload => "preload", } end |
Instance Method Details
#to_jsii ⇒ Object
50 51 52 53 54 55 56 57 58 59 |
# File 'cloud_front/response_headers_strict_transport_security.rb', line 50 def to_jsii result = {} result.merge!({ "accessControlMaxAge" => @access_control_max_age, "override" => @override, "includeSubdomains" => @include_subdomains, "preload" => @preload, }) result.compact end |