Class: AWSCDK::ElasticLoadBalancing::CfnLoadBalancer::PoliciesProperty

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

Overview

Specifies policies for your Classic Load Balancer.

To associate policies 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(attributes:, policy_name:, policy_type:, instance_ports: nil, load_balancer_ports: nil) ⇒ PoliciesProperty

Returns a new instance of PoliciesProperty.

Parameters:

  • attributes (Array<Object>, AWSCDK::IResolvable)

    The policy attributes.

  • policy_name (String)

    The name of the policy.

  • policy_type (String)

    The name of the policy type.

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

    The instance ports for the policy.

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

    The load balancer ports for the policy.



1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1200

def initialize(attributes:, policy_name:, policy_type:, instance_ports: nil, load_balancer_ports: nil)
  @attributes = attributes
  Jsii::Type.check_type(@attributes, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siY29sbGVjdGlvbiI6eyJlbGVtZW50dHlwZSI6eyJwcmltaXRpdmUiOiJhbnkifSwia2luZCI6ImFycmF5In19LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "attributes")
  @policy_name = policy_name
  Jsii::Type.check_type(@policy_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "policyName")
  @policy_type = policy_type
  Jsii::Type.check_type(@policy_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "policyType")
  @instance_ports = instance_ports
  Jsii::Type.check_type(@instance_ports, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "instancePorts") unless @instance_ports.nil?
  @load_balancer_ports = load_balancer_ports
  Jsii::Type.check_type(@load_balancer_ports, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "loadBalancerPorts") unless @load_balancer_ports.nil?
end

Instance Attribute Details

#attributesArray<Object>, AWSCDK::IResolvable (readonly)

The policy attributes.



1217
1218
1219
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1217

def attributes
  @attributes
end

#instance_portsArray<String>? (readonly)

The instance ports for the policy.

Required only for some policy types.



1234
1235
1236
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1234

def instance_ports
  @instance_ports
end

#load_balancer_portsArray<String>? (readonly)

The load balancer ports for the policy.

Required only for some policy types.



1241
1242
1243
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1241

def load_balancer_ports
  @load_balancer_ports
end

#policy_nameString (readonly)

The name of the policy.



1222
1223
1224
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1222

def policy_name
  @policy_name
end

#policy_typeString (readonly)

The name of the policy type.



1227
1228
1229
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1227

def policy_type
  @policy_type
end

Class Method Details

.jsii_propertiesObject



1243
1244
1245
1246
1247
1248
1249
1250
1251
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1243

def self.jsii_properties
  {
    :attributes => "attributes",
    :policy_name => "policyName",
    :policy_type => "policyType",
    :instance_ports => "instancePorts",
    :load_balancer_ports => "loadBalancerPorts",
  }
end

Instance Method Details

#to_jsiiObject



1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1253

def to_jsii
  result = {}
  result.merge!({
    "attributes" => @attributes,
    "policyName" => @policy_name,
    "policyType" => @policy_type,
    "instancePorts" => @instance_ports,
    "loadBalancerPorts" => @load_balancer_ports,
  })
  result.compact
end