Class: AWSCDK::ElasticLoadBalancingv2::CfnLoadBalancer::SubnetMappingProperty

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

Overview

Specifies a subnet for a load balancer.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subnet_id:, allocation_id: nil, i_pv6_address: nil, private_i_pv4_address: nil, source_nat_ipv6_prefix: nil) ⇒ SubnetMappingProperty

Returns a new instance of SubnetMappingProperty.

Parameters:

  • subnet_id (String)

    The ID of the subnet.

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

    [Network Load Balancers] The allocation ID of the Elastic IP address for an internet-facing load balancer.

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

    [Network Load Balancers] The IPv6 address.

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

    [Network Load Balancers] The private IPv4 address for an internal load balancer.

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

    [Network Load Balancers with UDP listeners] The IPv6 prefix to use for source NAT.



857
858
859
860
861
862
863
864
865
866
867
868
# File 'elastic_load_balancingv2/cfn_load_balancer.rb', line 857

def initialize(subnet_id:, allocation_id: nil, i_pv6_address: nil, private_i_pv4_address: nil, source_nat_ipv6_prefix: nil)
  @subnet_id = subnet_id
  Jsii::Type.check_type(@subnet_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subnetId")
  @allocation_id = allocation_id
  Jsii::Type.check_type(@allocation_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "allocationId") unless @allocation_id.nil?
  @i_pv6_address = i_pv6_address
  Jsii::Type.check_type(@i_pv6_address, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "iPv6Address") unless @i_pv6_address.nil?
  @private_i_pv4_address = private_i_pv4_address
  Jsii::Type.check_type(@private_i_pv4_address, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "privateIPv4Address") unless @private_i_pv4_address.nil?
  @source_nat_ipv6_prefix = source_nat_ipv6_prefix
  Jsii::Type.check_type(@source_nat_ipv6_prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourceNatIpv6Prefix") unless @source_nat_ipv6_prefix.nil?
end

Instance Attribute Details

#allocation_idString? (readonly)

[Network Load Balancers] The allocation ID of the Elastic IP address for an internet-facing load balancer.



879
880
881
# File 'elastic_load_balancingv2/cfn_load_balancer.rb', line 879

def allocation_id
  @allocation_id
end

#i_pv6_addressString? (readonly)

[Network Load Balancers] The IPv6 address.



884
885
886
# File 'elastic_load_balancingv2/cfn_load_balancer.rb', line 884

def i_pv6_address
  @i_pv6_address
end

#private_i_pv4_addressString? (readonly)

[Network Load Balancers] The private IPv4 address for an internal load balancer.



889
890
891
# File 'elastic_load_balancingv2/cfn_load_balancer.rb', line 889

def private_i_pv4_address
  @private_i_pv4_address
end

#source_nat_ipv6_prefixString? (readonly)

[Network Load Balancers with UDP listeners] The IPv6 prefix to use for source NAT.

Specify an IPv6 prefix (/80 netmask) from the subnet CIDR block or auto_assigned to use an IPv6 prefix selected at random from the subnet CIDR block.



896
897
898
# File 'elastic_load_balancingv2/cfn_load_balancer.rb', line 896

def source_nat_ipv6_prefix
  @source_nat_ipv6_prefix
end

#subnet_idString (readonly)

The ID of the subnet.



874
875
876
# File 'elastic_load_balancingv2/cfn_load_balancer.rb', line 874

def subnet_id
  @subnet_id
end

Class Method Details

.jsii_propertiesObject



898
899
900
901
902
903
904
905
906
# File 'elastic_load_balancingv2/cfn_load_balancer.rb', line 898

def self.jsii_properties
  {
    :subnet_id => "subnetId",
    :allocation_id => "allocationId",
    :i_pv6_address => "iPv6Address",
    :private_i_pv4_address => "privateIPv4Address",
    :source_nat_ipv6_prefix => "sourceNatIpv6Prefix",
  }
end

Instance Method Details

#to_jsiiObject



908
909
910
911
912
913
914
915
916
917
918
# File 'elastic_load_balancingv2/cfn_load_balancer.rb', line 908

def to_jsii
  result = {}
  result.merge!({
    "subnetId" => @subnet_id,
    "allocationId" => @allocation_id,
    "iPv6Address" => @i_pv6_address,
    "privateIPv4Address" => @private_i_pv4_address,
    "sourceNatIpv6Prefix" => @source_nat_ipv6_prefix,
  })
  result.compact
end