Class NetworkInterfaceMetadata
All of the metadata associated with a network interface on the instance.
public class NetworkInterfaceMetadata
- Inheritance
-
NetworkInterfaceMetadata
- Inherited Members
Constructors
NetworkInterfaceMetadata(string)
Construct an instance of NetworkInterface
public NetworkInterfaceMetadata(string macAddress)
Parameters
macAddress
string
Properties
LocalHostname
The interface's local hostname.
public string LocalHostname { get; }
Property Value
LocalIPv4s
The private IP addresses associated with the interface.
public IEnumerable<string> LocalIPv4s { get; }
Property Value
MacAddress
The interface's Media Access Control (mac) address.
public string MacAddress { get; }
Property Value
OwnerId
The ID of the owner of the network interface.
public string OwnerId { get; }
Property Value
Remarks
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.
Profile
The interface's profile
public string Profile { get; }
Property Value
PublicHostname
The interface's public hostname.
public string PublicHostname { get; }
Property Value
PublicIPv4s
The elastic IP addresses associated with the interface.
public IEnumerable<string> PublicIPv4s { get; }
Property Value
Remarks
There may be multiple IP addresses on an instance.
SecurityGroupIds
IDs of the security groups to which the network interface belongs. Returned only for Amazon EC2 instances launched into a VPC.
public IEnumerable<string> SecurityGroupIds { get; }
Property Value
SecurityGroups
Security groups to which the network interface belongs.
public IEnumerable<string> SecurityGroups { get; }
Property Value
SubnetIPv4CidrBlock
The CIDR block of the Amazon EC2-VPC subnet in which the interface resides.
public string SubnetIPv4CidrBlock { get; }
Property Value
Remarks
Returned only for Amazon EC2 instances launched into a VPC.
SubnetId
The ID of the Amazon EC2-VPC subnet in which the interface resides.
public string SubnetId { get; }
Property Value
Remarks
Returned only for Amazon EC2 instances launched into a VPC.
VpcId
The CIDR block of the Amazon EC2-VPC subnet in which the interface resides.
public string VpcId { get; }
Property Value
Remarks
Returned only for Amazon EC2 instances launched into a VPC.
Methods
GetIpV4Association(string)
Get the private IPv4 address(es) that are associated with the public-ip address and assigned to that interface.
public IEnumerable<string> GetIpV4Association(string publicIp)
Parameters
publicIp
stringThe public IP address
Returns
- IEnumerable<string>
Private IPv4 address(es) associated with the public IP address