Class: AWSCDK::CloudFront::CacheHeaderBehavior
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::CloudFront::CacheHeaderBehavior
- Defined in:
- cloud_front/cache_header_behavior.rb
Overview
Determines whether any HTTP headers are included in the cache key and automatically included in requests that CloudFront sends to the origin.
Class Method Summary collapse
-
.allow_list(*headers) ⇒ AWSCDK::CloudFront::CacheHeaderBehavior
Listed headers are included in the cache key and are automatically included in requests that CloudFront sends to the origin.
- .jsii_overridable_methods ⇒ Object
-
.none ⇒ AWSCDK::CloudFront::CacheHeaderBehavior
HTTP headers are not included in the cache key and are not automatically included in requests that CloudFront sends to the origin.
Instance Method Summary collapse
-
#behavior ⇒ String
If no headers will be passed, or an allow list of headers.
-
#headers ⇒ Array<String>?
The headers for the allow/deny list, if applicable.
-
#initialize(*args) ⇒ CacheHeaderBehavior
constructor
A new instance of CacheHeaderBehavior.
Constructor Details
#initialize(*args) ⇒ CacheHeaderBehavior
Returns a new instance of CacheHeaderBehavior.
8 9 10 |
# File 'cloud_front/cache_header_behavior.rb', line 8 def initialize(*args) raise NoMethodError, "aws-cdk-lib.aws_cloudfront.CacheHeaderBehavior does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.allow_list(*headers) ⇒ AWSCDK::CloudFront::CacheHeaderBehavior
Listed headers are included in the cache key and are automatically included in requests that CloudFront sends to the origin.
23 24 25 26 27 28 |
# File 'cloud_front/cache_header_behavior.rb', line 23 def self.allow_list(*headers) headers.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "headers[#{index}]") end Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudfront.CacheHeaderBehavior", "allowList", [*headers]) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 17 |
# File 'cloud_front/cache_header_behavior.rb', line 12 def self.jsii_overridable_methods { :behavior => { kind: :property, name: "behavior", is_optional: false }, :headers => { kind: :property, name: "headers", is_optional: true }, } end |
.none ⇒ AWSCDK::CloudFront::CacheHeaderBehavior
HTTP headers are not included in the cache key and are not automatically included in requests that CloudFront sends to the origin.
33 34 35 |
# File 'cloud_front/cache_header_behavior.rb', line 33 def self.none() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudfront.CacheHeaderBehavior", "none", []) end |
Instance Method Details
#behavior ⇒ String
If no headers will be passed, or an allow list of headers.
40 41 42 |
# File 'cloud_front/cache_header_behavior.rb', line 40 def behavior() jsii_get_property("behavior") end |
#headers ⇒ Array<String>?
The headers for the allow/deny list, if applicable.
47 48 49 |
# File 'cloud_front/cache_header_behavior.rb', line 47 def headers() jsii_get_property("headers") end |