Class: AWSCDK::CloudFront::CfnDistribution::CacheTagConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::CfnDistribution::CacheTagConfigProperty
- Defined in:
- cloud_front/cfn_distribution.rb
Overview
A complex type that specifies the HTTP header name from which CloudFront extracts cache tags from origin responses.
When you add CacheTagConfig to a distribution, CloudFront reads the specified header from origin responses, parses the comma-separated tag values, and stores them with the cached object. You can then invalidate cached objects by tag using the CreateInvalidation API.
Instance Attribute Summary collapse
-
#header_name ⇒ String
readonly
The name of the HTTP header that your origin includes in responses.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(header_name:) ⇒ CacheTagConfigProperty
constructor
A new instance of CacheTagConfigProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(header_name:) ⇒ CacheTagConfigProperty
Returns a new instance of CacheTagConfigProperty.
894 895 896 897 |
# File 'cloud_front/cfn_distribution.rb', line 894 def initialize(header_name:) @header_name = header_name Jsii::Type.check_type(@header_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "headerName") end |
Instance Attribute Details
#header_name ⇒ String (readonly)
The name of the HTTP header that your origin includes in responses.
CloudFront uses this header to extract cache tags. The header value must contain comma-separated tag values (for example, product:electronics, category:tv, brand:example).
905 906 907 |
# File 'cloud_front/cfn_distribution.rb', line 905 def header_name @header_name end |
Class Method Details
.jsii_properties ⇒ Object
907 908 909 910 911 |
# File 'cloud_front/cfn_distribution.rb', line 907 def self.jsii_properties { :header_name => "headerName", } end |
Instance Method Details
#to_jsii ⇒ Object
913 914 915 916 917 918 919 |
# File 'cloud_front/cfn_distribution.rb', line 913 def to_jsii result = {} result.merge!({ "headerName" => @header_name, }) result.compact end |