Class: AWSCDK::CloudFront::CfnDistribution::CookiesProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::CfnDistribution::CookiesProperty
- Defined in:
- cloud_front/cfn_distribution.rb
Overview
This field is deprecated.
We recommend that you use a cache policy or an origin request policy instead of this field.
If you want to include cookies in the cache key, use a cache policy. For more information, see Creating cache policies in the Amazon CloudFront Developer Guide .
If you want to send cookies to the origin but not include them in the cache key, use an origin request policy. For more information, see Creating origin request policies in the Amazon CloudFront Developer Guide .
A complex type that specifies whether you want CloudFront to forward cookies to the origin and, if so, which ones. For more information about forwarding cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies in the Amazon CloudFront Developer Guide .
Instance Attribute Summary collapse
-
#forward ⇒ String
readonly
This field is deprecated.
-
#whitelisted_names ⇒ Array<String>?
readonly
This field is deprecated.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(forward:, whitelisted_names: nil) ⇒ CookiesProperty
constructor
A new instance of CookiesProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(forward:, whitelisted_names: nil) ⇒ CookiesProperty
Returns a new instance of CookiesProperty.
971 972 973 974 975 976 |
# File 'cloud_front/cfn_distribution.rb', line 971 def initialize(forward:, whitelisted_names: nil) @forward = forward Jsii::Type.check_type(@forward, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "forward") @whitelisted_names = whitelisted_names Jsii::Type.check_type(@whitelisted_names, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "whitelistedNames") unless @whitelisted_names.nil? end |
Instance Attribute Details
#forward ⇒ String (readonly)
This field is deprecated.
We recommend that you use a cache policy or an origin request policy instead of this field.
If you want to include cookies in the cache key, use a cache policy. For more information, see Creating cache policies in the Amazon CloudFront Developer Guide .
If you want to send cookies to the origin but not include them in the cache key, use origin request policy. For more information, see Creating origin request policies in the Amazon CloudFront Developer Guide .
Specifies which cookies to forward to the origin for this cache behavior: all, none, or the list of cookies specified in the WhitelistedNames complex type.
Amazon S3 doesn't process cookies. When the cache behavior is forwarding requests to an Amazon S3 origin, specify none for the Forward element.
992 993 994 |
# File 'cloud_front/cfn_distribution.rb', line 992 def forward @forward end |
#whitelisted_names ⇒ Array<String>? (readonly)
This field is deprecated.
We recommend that you use a cache policy or an origin request policy instead of this field.
If you want to include cookies in the cache key, use a cache policy. For more information, see Creating cache policies in the Amazon CloudFront Developer Guide .
If you want to send cookies to the origin but not include them in the cache key, use an origin request policy. For more information, see Creating origin request policies in the Amazon CloudFront Developer Guide .
Required if you specify whitelist for the value of Forward . A complex type that specifies how many different cookies you want CloudFront to forward to the origin for this cache behavior and, if you want to forward selected cookies, the names of those cookies.
If you specify all or none for the value of Forward , omit WhitelistedNames . If you change the value of Forward from whitelist to all or none and you don't delete the WhitelistedNames element and its child elements, CloudFront deletes them automatically.
For the current limit on the number of cookie names that you can whitelist for each cache behavior, see CloudFront Limits in the AWS General Reference .
1009 1010 1011 |
# File 'cloud_front/cfn_distribution.rb', line 1009 def whitelisted_names @whitelisted_names end |
Class Method Details
.jsii_properties ⇒ Object
1011 1012 1013 1014 1015 1016 |
# File 'cloud_front/cfn_distribution.rb', line 1011 def self.jsii_properties { :forward => "forward", :whitelisted_names => "whitelistedNames", } end |
Instance Method Details
#to_jsii ⇒ Object
1018 1019 1020 1021 1022 1023 1024 1025 |
# File 'cloud_front/cfn_distribution.rb', line 1018 def to_jsii result = {} result.merge!({ "forward" => @forward, "whitelistedNames" => @whitelisted_names, }) result.compact end |