Class: AWSCDK::EC2::CfnNetworkInterface::PrivateIPAddressSpecificationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnNetworkInterface::PrivateIPAddressSpecificationProperty
- Defined in:
- ec2/cfn_network_interface.rb
Overview
Describes a secondary private IPv4 address for a network interface.
Instance Attribute Summary collapse
-
#primary ⇒ Boolean, AWSCDK::IResolvable
readonly
Sets the private IP address as the primary private address.
-
#private_ip_address ⇒ String
readonly
The private IP address of the network interface.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(primary:, private_ip_address:) ⇒ PrivateIPAddressSpecificationProperty
constructor
A new instance of PrivateIPAddressSpecificationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(primary:, private_ip_address:) ⇒ PrivateIPAddressSpecificationProperty
Returns a new instance of PrivateIPAddressSpecificationProperty.
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
#primary ⇒ Boolean, 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_address ⇒ String (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_properties ⇒ Object
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_jsii ⇒ Object
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 |