Class: AWSCDK::EC2::CfnNetworkInterface::PrivateIPAddressSpecificationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/cfn_network_interface.rb

Overview

Describes a secondary private IPv4 address for a network interface.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(primary:, private_ip_address:) ⇒ PrivateIPAddressSpecificationProperty

Returns a new instance of PrivateIPAddressSpecificationProperty.

Parameters:

  • primary (Boolean, AWSCDK::IResolvable)

    Sets the private IP address as the primary private address.

  • private_ip_address (String)

    The private IP address of the network interface.



961
962
963
964
965
966
# File 'ec2/cfn_network_interface.rb', line 961

def initialize(primary:, private_ip_address:)
  @primary = primary
  Jsii::Type.check_type(@primary, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "primary")
  @private_ip_address = private_ip_address
  Jsii::Type.check_type(@private_ip_address, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "privateIpAddress")
end

Instance Attribute Details

#primaryBoolean, AWSCDK::IResolvable (readonly)

Sets the private IP address as the primary private address.

You can set only one primary private IP address. If you don't specify a primary private IP address, Amazon EC2 automatically assigns a primary private IP address.



974
975
976
# File 'ec2/cfn_network_interface.rb', line 974

def primary
  @primary
end

#private_ip_addressString (readonly)

The private IP address of the network interface.



979
980
981
# File 'ec2/cfn_network_interface.rb', line 979

def private_ip_address
  @private_ip_address
end

Class Method Details

.jsii_propertiesObject



981
982
983
984
985
986
# File 'ec2/cfn_network_interface.rb', line 981

def self.jsii_properties
  {
    :primary => "primary",
    :private_ip_address => "privateIpAddress",
  }
end

Instance Method Details

#to_jsiiObject



988
989
990
991
992
993
994
995
# File 'ec2/cfn_network_interface.rb', line 988

def to_jsii
  result = {}
  result.merge!({
    "primary" => @primary,
    "privateIpAddress" => @private_ip_address,
  })
  result.compact
end