Class: AWSCDK::ElasticLoadBalancing::CfnLoadBalancer::LBCookieStickinessPolicyProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
elastic_load_balancing/cfn_load_balancer.rb

Overview

Specifies a policy for duration-based session stickiness for your Classic Load Balancer.

To associate a policy with a listener, use the PolicyNames property for the listener.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cookie_expiration_period: nil, policy_name: nil) ⇒ LBCookieStickinessPolicyProperty

Returns a new instance of LBCookieStickinessPolicyProperty.

Parameters:

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

    The time period, in seconds, after which the cookie should be considered stale.

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

    The name of the policy.



1055
1056
1057
1058
1059
1060
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1055

def initialize(cookie_expiration_period: nil, policy_name: nil)
  @cookie_expiration_period = cookie_expiration_period
  Jsii::Type.check_type(@cookie_expiration_period, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cookieExpirationPeriod") unless @cookie_expiration_period.nil?
  @policy_name = policy_name
  Jsii::Type.check_type(@policy_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "policyName") unless @policy_name.nil?
end

Instance Attribute Details

The time period, in seconds, after which the cookie should be considered stale.

If this parameter is not specified, the stickiness session lasts for the duration of the browser session.



1068
1069
1070
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1068

def cookie_expiration_period
  @cookie_expiration_period
end

#policy_nameString? (readonly)

The name of the policy.

This name must be unique within the set of policies for this load balancer.



1075
1076
1077
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1075

def policy_name
  @policy_name
end

Class Method Details

.jsii_propertiesObject



1077
1078
1079
1080
1081
1082
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1077

def self.jsii_properties
  {
    :cookie_expiration_period => "cookieExpirationPeriod",
    :policy_name => "policyName",
  }
end

Instance Method Details

#to_jsiiObject



1084
1085
1086
1087
1088
1089
1090
1091
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1084

def to_jsii
  result = {}
  result.merge!({
    "cookieExpirationPeriod" => @cookie_expiration_period,
    "policyName" => @policy_name,
  })
  result.compact
end