com.amazonaws.util
Class EC2MetadataUtils.NetworkInterface

java.lang.Object
  extended by com.amazonaws.util.EC2MetadataUtils.NetworkInterface
Enclosing class:
EC2MetadataUtils

public static class EC2MetadataUtils.NetworkInterface
extends Object

All of the metada associated with a network interface on the instance.


Constructor Summary
EC2MetadataUtils.NetworkInterface(String macAddress)
           
 
Method Summary
 String getHostname()
          The interface's local hostname.
 List<String> getIPv4Association(String publicIp)
          Get the private IPv4 address(es) that are associated with the public-ip address and assigned to that interface.
 List<String> getLocalIPv4s()
          The private IP addresses associated with the interface.
 String getMacAddress()
          The interface's Media Acess Control (mac) address
 String getOwnerId()
          The ID of the owner of the network interface.
In multiple-interface environments, an interface can be attached by a third party, such as Elastic Load Balancing.
 String getProfile()
          The interface's profile.
 String getPublicHostname()
          The interface's public hostname.
 List<String> getPublicIPv4s()
          The elastic IP addresses associated with the interface.
There may be multiple IP addresses on an instance.
 List<String> getSecurityGroupIds()
          IDs of the security groups to which the network interface belongs.
 List<String> getSecurityGroups()
          Security groups to which the network interface belongs.
 String getSubnetIPv4CidrBlock()
          The CIDR block of the Amazon EC2-VPC subnet in which the interface resides.
Returned only for Amazon EC2 instances launched into a VPC.
 String getVpcId()
          The CIDR block of the Amazon EC2-VPC subnet in which the interface resides.
Returned only for Amazon EC2 instances launched into a VPC.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EC2MetadataUtils.NetworkInterface

public EC2MetadataUtils.NetworkInterface(String macAddress)
Method Detail

getMacAddress

public String getMacAddress()
The interface's Media Acess Control (mac) address


getOwnerId

public String getOwnerId()
The ID of the owner of the network interface.
In multiple-interface environments, an interface can be attached by a third party, such as Elastic Load Balancing. Traffic on an interface is always billed to the interface owner.


getProfile

public String getProfile()
The interface's profile.


getHostname

public String getHostname()
The interface's local hostname.


getLocalIPv4s

public List<String> getLocalIPv4s()
The private IP addresses associated with the interface.


getPublicHostname

public String getPublicHostname()
The interface's public hostname.


getPublicIPv4s

public List<String> getPublicIPv4s()
The elastic IP addresses associated with the interface.
There may be multiple IP addresses on an instance.


getSecurityGroups

public List<String> getSecurityGroups()
Security groups to which the network interface belongs.


getSecurityGroupIds

public List<String> getSecurityGroupIds()
IDs of the security groups to which the network interface belongs. Returned only for Amazon EC2 instances launched into a VPC.


getSubnetIPv4CidrBlock

public String getSubnetIPv4CidrBlock()
The CIDR block of the Amazon EC2-VPC subnet in which the interface resides.
Returned only for Amazon EC2 instances launched into a VPC.


getVpcId

public String getVpcId()
The CIDR block of the Amazon EC2-VPC subnet in which the interface resides.
Returned only for Amazon EC2 instances launched into a VPC.


getIPv4Association

public List<String> getIPv4Association(String publicIp)
Get the private IPv4 address(es) that are associated with the public-ip address and assigned to that interface.

Parameters:
publicIp - The public IP address
Returns:
Private IPv4 address(es) associated with the public IP address.


Copyright © 2016. All rights reserved.