class AWS::EC2::ElasticIp
The ID of the AWS account that owns the network interface (VPC only).
@attr_reader [String,nil] network_interface_owner_id
@attr_reader [String,nil] The ID of the network interface (VPC only).
ip address and an EC2 VPC instance (VPC only).
@attr_reader [String,nil] The ID of the association between this elastic
EC2 instances (‘standard’) or VPC instances (‘vpc’).
@attr_reader [String] Indicates whether this elastic ip address is for
VPC.
The ID representing the allocation of the address for use with Amazon
@attr_reader [String,nil] allocation_id
assigned to an EC2 instance, nil otherwise.
@attr_reader [String,nil] instance_id Returns the instance id if
def self.describe_call_name
def self.describe_call_name :describe_addresses end
def associated?
-
(Boolean)
- Returns true if this IP address is attached to
def associated? !!instance_id end
def delete
-
(nil)
-
def delete if vpc? client.release_address(:allocation_id => allocation_id) else client.release_address(:public_ip => public_ip) end nil end
def describe_call_name
def describe_call_name :describe_addresses end
def disassociate
-
(nil)
-
def disassociate if vpc? client.disassociate_address(:association_id => association_id) else client.disassociate_address(:public_ip => public_ip) end nil end
def exists?
-
(Boolean)
- Returns true the elastic ip address exists in
def exists? begin get_resource true rescue Errors::InvalidAddress::NotFound false end end
def initialize public_ip, options = {}
def initialize public_ip, options = {} @public_ip = public_ip super end
def instance
-
(Instance, nil)
- If associated, returns the {Instance} this
def instance if instance_id = self.instance_id Instance.new(instance_id, :config => config) end end
def resource_id_method
def resource_id_method :public_ip end
def response_id_method
def response_id_method :public_ip end
def to_s
-
(String)
- Returns the public IP address
def to_s public_ip.to_s end
def vpc?
-
(Boolean)
- Returns true if this is an EC2 VPC Elastic IP.
def vpc? domain == 'vpc' end