Class | AWS::EC2::ElasticIp |
In: |
lib/aws/ec2/elastic_ip.rb
|
Parent: | Resource |
@attr_reader [String,nil] instance_id Returns the instance id if
assigned to an EC2 instance, nil otherwise.
@attr_reader [String,nil] allocation_id
The ID representing the allocation of the address for use with Amazon VPC.
@attr_reader [String] domain Indicates whether this elastic ip address
is for EC2 instances ('standard') or VPC instances ('vpc').
@attr_reader [String,nil] association_id The ID of the association
between this elastic ip address and an EC2 VPC instance (VPC only).
@attr_reader [String,nil] network_interface_id The ID of the network
interface (VPC only).
@attr_reader [String,nil] network_interface_owner_id
The ID of the AWS account that owns the network interface (VPC only).
public_ip | -> | ip_address |
public_ip | [R] | @return [String] The public IP address. |
Associates this elastic IP address with an instance or a network interface. You may provide `:instance` or `:network_interface` but not both options.
# associate with an instance eip.associate :instance => 'i-12345678' # associate with a network interface eip.associate :network_interface => 'ni-12345678'
@param [Hash] options
@option options [String,Instance] :instance The id of an instance
or an {Instance} object.
@option options [String,NetworkInterface] :network_interface The id
of a network interface or a {NetworkInterface} object.
@return [String] Returns the resulting association id.
@return [Boolean] Returns true if this IP address is associated
with an EC2 instance or a network interface.
@return [NetworkInterface,nil] Returns the network interface this
elastic ip is associated with. Returns `nil` if this is not associated with an elastic ip address.