Class: AWSCDK::EC2::CfnEIPAssociationProps

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

Overview

Properties for defining a CfnEIPAssociation.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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.

Parameters:



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_idString? (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

#eipString, ... (readonly)

Deprecated.

this property has been deprecated



37
38
39
# File 'ec2/cfn_eip_association_props.rb', line 37

def eip
  @eip
end

#instance_idString, ... (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_idString, ... (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_addressString? (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_propertiesObject



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_jsiiObject



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