Class EC2MetadataUtils.NetworkInterface

java.lang.Object
software.amazon.awssdk.regions.internal.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 Details

    • NetworkInterface

      public NetworkInterface(String macAddress)
  • Method Details

    • 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.
    • getSubnetId

      public String getSubnetId()
      ID of the subnet in which the interface resides.
      Returned only for Amazon EC2 instances launched into a VPC.
    • getVpcIPv4CidrBlock

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

      public String getVpcId()
      ID of the Amazon EC2-VPC 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.