Class: AWSCDK::ElasticLoadBalancingv2::BaseLoadBalancerProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ElasticLoadBalancingv2::BaseLoadBalancerProps
- Defined in:
- elastic_load_balancingv2/base_load_balancer_props.rb
Overview
Shared properties of both Application and Network Load Balancers.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#cross_zone_enabled ⇒ Boolean?
readonly
Indicates whether cross-zone load balancing is enabled.
-
#deletion_protection ⇒ Boolean?
readonly
Indicates whether deletion protection is enabled.
-
#deny_all_igw_traffic ⇒ Boolean?
readonly
Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW).
-
#internet_facing ⇒ Boolean?
readonly
Whether the load balancer has an internet-routable address.
-
#load_balancer_name ⇒ String?
readonly
Name of the load balancer.
-
#minimum_capacity_unit ⇒ Numeric?
readonly
The minimum capacity (LCU) for a load balancer.
-
#vpc ⇒ AWSCDK::EC2::IVPC
readonly
The VPC network to place the load balancer in.
-
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection?
readonly
Which subnets place the load balancer in.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(vpc:, cross_zone_enabled: nil, deletion_protection: nil, deny_all_igw_traffic: nil, internet_facing: nil, load_balancer_name: nil, minimum_capacity_unit: nil, vpc_subnets: nil) ⇒ BaseLoadBalancerProps
constructor
A new instance of BaseLoadBalancerProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(vpc:, cross_zone_enabled: nil, deletion_protection: nil, deny_all_igw_traffic: nil, internet_facing: nil, load_balancer_name: nil, minimum_capacity_unit: nil, vpc_subnets: nil) ⇒ BaseLoadBalancerProps
Returns a new instance of BaseLoadBalancerProps.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'elastic_load_balancingv2/base_load_balancer_props.rb', line 15 def initialize(vpc:, cross_zone_enabled: nil, deletion_protection: nil, deny_all_igw_traffic: nil, internet_facing: nil, load_balancer_name: nil, minimum_capacity_unit: nil, vpc_subnets: nil) @vpc = vpc Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") @cross_zone_enabled = cross_zone_enabled Jsii::Type.check_type(@cross_zone_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "crossZoneEnabled") unless @cross_zone_enabled.nil? @deletion_protection = deletion_protection Jsii::Type.check_type(@deletion_protection, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "deletionProtection") unless @deletion_protection.nil? @deny_all_igw_traffic = deny_all_igw_traffic Jsii::Type.check_type(@deny_all_igw_traffic, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "denyAllIgwTraffic") unless @deny_all_igw_traffic.nil? @internet_facing = internet_facing Jsii::Type.check_type(@internet_facing, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "internetFacing") unless @internet_facing.nil? @load_balancer_name = load_balancer_name Jsii::Type.check_type(@load_balancer_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "loadBalancerName") unless @load_balancer_name.nil? @minimum_capacity_unit = minimum_capacity_unit Jsii::Type.check_type(@minimum_capacity_unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minimumCapacityUnit") unless @minimum_capacity_unit.nil? @vpc_subnets = vpc_subnets.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**vpc_subnets.transform_keys(&:to_sym)) : vpc_subnets Jsii::Type.check_type(@vpc_subnets, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlN1Ym5ldFNlbGVjdGlvbiJ9")), "vpcSubnets") unless @vpc_subnets.nil? end |
Instance Attribute Details
#cross_zone_enabled ⇒ Boolean? (readonly)
Default: - false for Network Load Balancers and true for Application Load Balancers. This can not be false for Application Load Balancers.
Indicates whether cross-zone load balancing is enabled.
43 44 45 |
# File 'elastic_load_balancingv2/base_load_balancer_props.rb', line 43 def cross_zone_enabled @cross_zone_enabled end |
#deletion_protection ⇒ Boolean? (readonly)
Default: false
Indicates whether deletion protection is enabled.
48 49 50 |
# File 'elastic_load_balancingv2/base_load_balancer_props.rb', line 48 def deletion_protection @deletion_protection end |
#deny_all_igw_traffic ⇒ Boolean? (readonly)
Default: - false for internet-facing load balancers and true for internal load balancers
Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW).
53 54 55 |
# File 'elastic_load_balancingv2/base_load_balancer_props.rb', line 53 def deny_all_igw_traffic @deny_all_igw_traffic end |
#internet_facing ⇒ Boolean? (readonly)
Default: false
Whether the load balancer has an internet-routable address.
58 59 60 |
# File 'elastic_load_balancingv2/base_load_balancer_props.rb', line 58 def internet_facing @internet_facing end |
#load_balancer_name ⇒ String? (readonly)
Default: - Automatically generated name.
Name of the load balancer.
63 64 65 |
# File 'elastic_load_balancingv2/base_load_balancer_props.rb', line 63 def load_balancer_name @load_balancer_name end |
#minimum_capacity_unit ⇒ Numeric? (readonly)
Default: undefined - ELB default is 0 LCU
The minimum capacity (LCU) for a load balancer.
69 70 71 |
# File 'elastic_load_balancingv2/base_load_balancer_props.rb', line 69 def minimum_capacity_unit @minimum_capacity_unit end |
#vpc ⇒ AWSCDK::EC2::IVPC (readonly)
The VPC network to place the load balancer in.
37 38 39 |
# File 'elastic_load_balancingv2/base_load_balancer_props.rb', line 37 def vpc @vpc end |
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection? (readonly)
Default: - the Vpc default strategy.
Which subnets place the load balancer in.
74 75 76 |
# File 'elastic_load_balancingv2/base_load_balancer_props.rb', line 74 def vpc_subnets @vpc_subnets end |
Class Method Details
.jsii_properties ⇒ Object
76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'elastic_load_balancingv2/base_load_balancer_props.rb', line 76 def self.jsii_properties { :vpc => "vpc", :cross_zone_enabled => "crossZoneEnabled", :deletion_protection => "deletionProtection", :deny_all_igw_traffic => "denyAllIgwTraffic", :internet_facing => "internetFacing", :load_balancer_name => "loadBalancerName", :minimum_capacity_unit => "minimumCapacityUnit", :vpc_subnets => "vpcSubnets", } end |
Instance Method Details
#to_jsii ⇒ Object
89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'elastic_load_balancingv2/base_load_balancer_props.rb', line 89 def to_jsii result = {} result.merge!({ "vpc" => @vpc, "crossZoneEnabled" => @cross_zone_enabled, "deletionProtection" => @deletion_protection, "denyAllIgwTraffic" => @deny_all_igw_traffic, "internetFacing" => @internet_facing, "loadBalancerName" => @load_balancer_name, "minimumCapacityUnit" => @minimum_capacity_unit, "vpcSubnets" => @vpc_subnets, }) result.compact end |