Class: AWSCDK::CloudFront::CfnResponseHeadersPolicy::StrictTransportSecurityProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::CfnResponseHeadersPolicy::StrictTransportSecurityProperty
- Defined in:
- cloud_front/cfn_response_headers_policy.rb
Overview
Determines whether CloudFront includes the Strict-Transport-Security HTTP response header and the header's value.
For more information about the Strict-Transport-Security HTTP response header, see Strict-Transport-Security in the MDN Web Docs.
Instance Attribute Summary collapse
-
#access_control_max_age_sec ⇒ Numeric
readonly
A number that CloudFront uses as the value for the
max-agedirective in theStrict-Transport-SecurityHTTP response header. -
#include_subdomains ⇒ Boolean, ...
readonly
A Boolean that determines whether CloudFront includes the
includeSubDomainsdirective in theStrict-Transport-SecurityHTTP response header. -
#override ⇒ Boolean, AWSCDK::IResolvable
readonly
A Boolean that determines whether CloudFront overrides the
Strict-Transport-SecurityHTTP 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
preloaddirective in theStrict-Transport-SecurityHTTP response header.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(access_control_max_age_sec:, override:, include_subdomains: nil, preload: nil) ⇒ StrictTransportSecurityProperty
constructor
A new instance of StrictTransportSecurityProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(access_control_max_age_sec:, override:, include_subdomains: nil, preload: nil) ⇒ StrictTransportSecurityProperty
Returns a new instance of StrictTransportSecurityProperty.
1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 |
# File 'cloud_front/cfn_response_headers_policy.rb', line 1375 def initialize(access_control_max_age_sec:, override:, include_subdomains: nil, preload: nil) @access_control_max_age_sec = access_control_max_age_sec Jsii::Type.check_type(@access_control_max_age_sec, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "accessControlMaxAgeSec") @override = override Jsii::Type.check_type(@override, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "override") @include_subdomains = include_subdomains Jsii::Type.check_type(@include_subdomains, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "includeSubdomains") unless @include_subdomains.nil? @preload = preload Jsii::Type.check_type(@preload, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "preload") unless @preload.nil? end |
Instance Attribute Details
#access_control_max_age_sec ⇒ Numeric (readonly)
A number that CloudFront uses as the value for the max-age directive in the Strict-Transport-Security HTTP response header.
1390 1391 1392 |
# File 'cloud_front/cfn_response_headers_policy.rb', line 1390 def access_control_max_age_sec @access_control_max_age_sec end |
#include_subdomains ⇒ Boolean, ... (readonly)
A Boolean that determines whether CloudFront includes the includeSubDomains directive in the Strict-Transport-Security HTTP response header.
1400 1401 1402 |
# File 'cloud_front/cfn_response_headers_policy.rb', line 1400 def include_subdomains @include_subdomains end |
#override ⇒ Boolean, AWSCDK::IResolvable (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.
1395 1396 1397 |
# File 'cloud_front/cfn_response_headers_policy.rb', line 1395 def override @override end |
#preload ⇒ Boolean, ... (readonly)
A Boolean that determines whether CloudFront includes the preload directive in the Strict-Transport-Security HTTP response header.
1405 1406 1407 |
# File 'cloud_front/cfn_response_headers_policy.rb', line 1405 def preload @preload end |
Class Method Details
.jsii_properties ⇒ Object
1407 1408 1409 1410 1411 1412 1413 1414 |
# File 'cloud_front/cfn_response_headers_policy.rb', line 1407 def self.jsii_properties { :access_control_max_age_sec => "accessControlMaxAgeSec", :override => "override", :include_subdomains => "includeSubdomains", :preload => "preload", } end |
Instance Method Details
#to_jsii ⇒ Object
1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 |
# File 'cloud_front/cfn_response_headers_policy.rb', line 1416 def to_jsii result = {} result.merge!({ "accessControlMaxAgeSec" => @access_control_max_age_sec, "override" => @override, "includeSubdomains" => @include_subdomains, "preload" => @preload, }) result.compact end |