Class EC2MetadataUtils.NetworkInterface
java.lang.Object
software.amazon.awssdk.regions.internal.util.EC2MetadataUtils.NetworkInterface
- Enclosing class:
EC2MetadataUtils
All of the metada associated with a network interface on the instance.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe interface's local hostname.getIPv4Association
(String publicIp) Get the private IPv4 address(es) that are associated with the public-ip address and assigned to that interface.The private IP addresses associated with the interface.The interface's Media Acess Control (mac) addressThe 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.The interface's profile.The interface's public hostname.The elastic IP addresses associated with the interface.
There may be multiple IP addresses on an instance.IDs of the security groups to which the network interface belongs.Security groups to which the network interface belongs.ID of the subnet in which the interface resides.
Returned only for Amazon EC2 instances launched into a VPC.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()
ID of the Amazon EC2-VPC in which the interface resides.
Returned only for Amazon EC2 instances launched into a VPC.The CIDR block of the Amazon EC2-VPC in which the interface resides.
Returned only for Amazon EC2 instances launched into a VPC.
-
Constructor Details
-
NetworkInterface
-
-
Method Details
-
getMacAddress
The interface's Media Acess Control (mac) address -
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
The interface's profile. -
getHostname
The interface's local hostname. -
getLocalIPv4s
The private IP addresses associated with the interface. -
getPublicHostname
The interface's public hostname. -
getPublicIPv4s
The elastic IP addresses associated with the interface.
There may be multiple IP addresses on an instance. -
getSecurityGroups
Security groups to which the network interface belongs. -
getSecurityGroupIds
IDs of the security groups to which the network interface belongs. Returned only for Amazon EC2 instances launched into a VPC. -
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
ID of the subnet in which the interface resides.
Returned only for Amazon EC2 instances launched into a VPC. -
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
ID of the Amazon EC2-VPC in which the interface resides.
Returned only for Amazon EC2 instances launched into a VPC. -
getIPv4Association
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.
-