Class: AWSCDK::EC2::CfnEIPAssociationProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnEIPAssociationProps
- Defined in:
- ec2/cfn_eip_association_props.rb
Overview
Properties for defining a CfnEIPAssociation.
Instance Attribute Summary collapse
-
#allocation_id ⇒ String?
readonly
The allocation ID.
-
#eip ⇒ String, ...
readonly
deprecated
Deprecated.
this property has been deprecated
-
#instance_id ⇒ String, ...
readonly
The ID of the instance.
-
#network_interface_id ⇒ String, ...
readonly
The ID of the network interface.
-
#private_ip_address ⇒ String?
readonly
The primary or secondary private IP address to associate with the Elastic IP address.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(allocation_id: nil, eip: nil, instance_id: nil, network_interface_id: nil, private_ip_address: nil) ⇒ CfnEIPAssociationProps
constructor
A new instance of CfnEIPAssociationProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(allocation_id: nil, eip: nil, instance_id: nil, network_interface_id: nil, private_ip_address: nil) ⇒ CfnEIPAssociationProps
Returns a new instance of CfnEIPAssociationProps.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'ec2/cfn_eip_association_props.rb', line 14 def initialize(allocation_id: nil, eip: nil, instance_id: nil, network_interface_id: nil, private_ip_address: nil) @allocation_id = allocation_id Jsii::Type.check_type(@allocation_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "allocationId") unless @allocation_id.nil? @eip = eip Jsii::Type.check_type(@eip, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSUVJUFJlZiJ9XX19")), "eip") unless @eip.nil? @instance_id = instance_id Jsii::Type.check_type(@instance_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSUluc3RhbmNlUmVmIn1dfX0=")), "instanceId") unless @instance_id.nil? @network_interface_id = network_interface_id Jsii::Type.check_type(@network_interface_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSU5ldHdvcmtJbnRlcmZhY2VSZWYifV19fQ==")), "networkInterfaceId") unless @network_interface_id.nil? @private_ip_address = private_ip_address Jsii::Type.check_type(@private_ip_address, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "privateIpAddress") unless @private_ip_address.nil? end |
Instance Attribute Details
#allocation_id ⇒ String? (readonly)
The allocation ID.
This is required.
33 34 35 |
# File 'ec2/cfn_eip_association_props.rb', line 33 def allocation_id @allocation_id end |
#eip ⇒ String, ... (readonly)
this property has been deprecated
37 38 39 |
# File 'ec2/cfn_eip_association_props.rb', line 37 def eip @eip end |
#instance_id ⇒ String, ... (readonly)
The ID of the instance.
The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.
44 45 46 |
# File 'ec2/cfn_eip_association_props.rb', line 44 def instance_id @instance_id end |
#network_interface_id ⇒ String, ... (readonly)
The ID of the network interface.
If the instance has more than one network interface, you must specify a network interface ID.
You can specify either the instance ID or the network interface ID, but not both.
53 54 55 |
# File 'ec2/cfn_eip_association_props.rb', line 53 def network_interface_id @network_interface_id end |
#private_ip_address ⇒ String? (readonly)
The primary or secondary private IP address to associate with the Elastic IP address.
If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.
60 61 62 |
# File 'ec2/cfn_eip_association_props.rb', line 60 def private_ip_address @private_ip_address end |
Class Method Details
.jsii_properties ⇒ Object
62 63 64 65 66 67 68 69 70 |
# File 'ec2/cfn_eip_association_props.rb', line 62 def self.jsii_properties { :allocation_id => "allocationId", :eip => "eip", :instance_id => "instanceId", :network_interface_id => "networkInterfaceId", :private_ip_address => "privateIpAddress", } end |
Instance Method Details
#to_jsii ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 |
# File 'ec2/cfn_eip_association_props.rb', line 72 def to_jsii result = {} result.merge!({ "allocationId" => @allocation_id, "eip" => @eip, "instanceId" => @instance_id, "networkInterfaceId" => @network_interface_id, "privateIpAddress" => @private_ip_address, }) result.compact end |