Class: AWSCDK::Lightsail::CfnDistribution::CookieObjectProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lightsail/cfn_distribution.rb

Overview

CookieObject is a property of the CacheSettings property. It describes whether an Amazon Lightsail content delivery network (CDN) distribution forwards cookies to the origin and, if so, which ones.

For the cookies that you specify, your distribution caches separate versions of the specified content based on the cookie values in viewer requests.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cookies_allow_list: nil, option: nil) ⇒ CookieObjectProperty

Returns a new instance of CookieObjectProperty.

Parameters:

  • cookies_allow_list (Array<String>, nil) (defaults to: nil)

    The specific cookies to forward to your distribution's origin.

  • option (String, nil) (defaults to: nil)

    Specifies which cookies to forward to the distribution's origin for a cache behavior.



906
907
908
909
910
911
# File 'lightsail/cfn_distribution.rb', line 906

def initialize(cookies_allow_list: nil, option: nil)
  @cookies_allow_list = cookies_allow_list
  Jsii::Type.check_type(@cookies_allow_list, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "cookiesAllowList") unless @cookies_allow_list.nil?
  @option = option
  Jsii::Type.check_type(@option, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "option") unless @option.nil?
end

Instance Attribute Details

#cookies_allow_listArray<String>? (readonly)

The specific cookies to forward to your distribution's origin.



917
918
919
# File 'lightsail/cfn_distribution.rb', line 917

def cookies_allow_list
  @cookies_allow_list
end

#optionString? (readonly)

Specifies which cookies to forward to the distribution's origin for a cache behavior.

Use one of the following configurations for your distribution:

  • all - Forwards all cookies to your origin.
  • none - Doesn’t forward cookies to your origin.
  • allow-list - Forwards only the cookies that you specify using the CookiesAllowList parameter.


928
929
930
# File 'lightsail/cfn_distribution.rb', line 928

def option
  @option
end

Class Method Details

.jsii_propertiesObject



930
931
932
933
934
935
# File 'lightsail/cfn_distribution.rb', line 930

def self.jsii_properties
  {
    :cookies_allow_list => "cookiesAllowList",
    :option => "option",
  }
end

Instance Method Details

#to_jsiiObject



937
938
939
940
941
942
943
944
# File 'lightsail/cfn_distribution.rb', line 937

def to_jsii
  result = {}
  result.merge!({
    "cookiesAllowList" => @cookies_allow_list,
    "option" => @option,
  })
  result.compact
end