Class NetworkInterface
- java.lang.Object
-
- com.amazonaws.services.ec2.model.NetworkInterface
-
- All Implemented Interfaces:
Serializable,Cloneable
public class NetworkInterface extends Object implements Serializable, Cloneable
Describes a network interface.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NetworkInterface()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NetworkInterfaceclone()booleanequals(Object obj)NetworkInterfaceAssociationgetAssociation()The association information for an Elastic IP associated with the network interface.NetworkInterfaceAttachmentgetAttachment()The network interface attachment.StringgetAvailabilityZone()The Availability Zone.StringgetDescription()A description.List<GroupIdentifier>getGroups()Any security groups for the network interface.StringgetInterfaceType()The type of interface.StringgetMacAddress()The MAC address.StringgetNetworkInterfaceId()The ID of the network interface.StringgetOwnerId()The AWS account ID of the owner of the network interface.StringgetPrivateDnsName()The private DNS name.StringgetPrivateIpAddress()The IP address of the network interface within the subnet.List<NetworkInterfacePrivateIpAddress>getPrivateIpAddresses()The private IP addresses associated with the network interface.StringgetRequesterId()The ID of the entity that launched the instance on your behalf (for example, AWS Management Console or Auto Scaling).BooleangetRequesterManaged()Indicates whether the network interface is being managed by AWS.BooleangetSourceDestCheck()Indicates whether traffic to or from the instance is validated.StringgetStatus()The status of the network interface.StringgetSubnetId()The ID of the subnet.List<Tag>getTagSet()Any tags assigned to the network interface.StringgetVpcId()The ID of the VPC.inthashCode()BooleanisRequesterManaged()Indicates whether the network interface is being managed by AWS.BooleanisSourceDestCheck()Indicates whether traffic to or from the instance is validated.voidsetAssociation(NetworkInterfaceAssociation association)The association information for an Elastic IP associated with the network interface.voidsetAttachment(NetworkInterfaceAttachment attachment)The network interface attachment.voidsetAvailabilityZone(String availabilityZone)The Availability Zone.voidsetDescription(String description)A description.voidsetGroups(Collection<GroupIdentifier> groups)Any security groups for the network interface.voidsetInterfaceType(NetworkInterfaceType interfaceType)The type of interface.voidsetInterfaceType(String interfaceType)The type of interface.voidsetMacAddress(String macAddress)The MAC address.voidsetNetworkInterfaceId(String networkInterfaceId)The ID of the network interface.voidsetOwnerId(String ownerId)The AWS account ID of the owner of the network interface.voidsetPrivateDnsName(String privateDnsName)The private DNS name.voidsetPrivateIpAddress(String privateIpAddress)The IP address of the network interface within the subnet.voidsetPrivateIpAddresses(Collection<NetworkInterfacePrivateIpAddress> privateIpAddresses)The private IP addresses associated with the network interface.voidsetRequesterId(String requesterId)The ID of the entity that launched the instance on your behalf (for example, AWS Management Console or Auto Scaling).voidsetRequesterManaged(Boolean requesterManaged)Indicates whether the network interface is being managed by AWS.voidsetSourceDestCheck(Boolean sourceDestCheck)Indicates whether traffic to or from the instance is validated.voidsetStatus(NetworkInterfaceStatus status)The status of the network interface.voidsetStatus(String status)The status of the network interface.voidsetSubnetId(String subnetId)The ID of the subnet.voidsetTagSet(Collection<Tag> tagSet)Any tags assigned to the network interface.voidsetVpcId(String vpcId)The ID of the VPC.StringtoString()Returns a string representation of this object; useful for testing and debugging.NetworkInterfacewithAssociation(NetworkInterfaceAssociation association)The association information for an Elastic IP associated with the network interface.NetworkInterfacewithAttachment(NetworkInterfaceAttachment attachment)The network interface attachment.NetworkInterfacewithAvailabilityZone(String availabilityZone)The Availability Zone.NetworkInterfacewithDescription(String description)A description.NetworkInterfacewithGroups(GroupIdentifier... groups)Any security groups for the network interface.NetworkInterfacewithGroups(Collection<GroupIdentifier> groups)Any security groups for the network interface.NetworkInterfacewithInterfaceType(NetworkInterfaceType interfaceType)The type of interface.NetworkInterfacewithInterfaceType(String interfaceType)The type of interface.NetworkInterfacewithMacAddress(String macAddress)The MAC address.NetworkInterfacewithNetworkInterfaceId(String networkInterfaceId)The ID of the network interface.NetworkInterfacewithOwnerId(String ownerId)The AWS account ID of the owner of the network interface.NetworkInterfacewithPrivateDnsName(String privateDnsName)The private DNS name.NetworkInterfacewithPrivateIpAddress(String privateIpAddress)The IP address of the network interface within the subnet.NetworkInterfacewithPrivateIpAddresses(NetworkInterfacePrivateIpAddress... privateIpAddresses)The private IP addresses associated with the network interface.NetworkInterfacewithPrivateIpAddresses(Collection<NetworkInterfacePrivateIpAddress> privateIpAddresses)The private IP addresses associated with the network interface.NetworkInterfacewithRequesterId(String requesterId)The ID of the entity that launched the instance on your behalf (for example, AWS Management Console or Auto Scaling).NetworkInterfacewithRequesterManaged(Boolean requesterManaged)Indicates whether the network interface is being managed by AWS.NetworkInterfacewithSourceDestCheck(Boolean sourceDestCheck)Indicates whether traffic to or from the instance is validated.NetworkInterfacewithStatus(NetworkInterfaceStatus status)The status of the network interface.NetworkInterfacewithStatus(String status)The status of the network interface.NetworkInterfacewithSubnetId(String subnetId)The ID of the subnet.NetworkInterfacewithTagSet(Tag... tagSet)Any tags assigned to the network interface.NetworkInterfacewithTagSet(Collection<Tag> tagSet)Any tags assigned to the network interface.NetworkInterfacewithVpcId(String vpcId)The ID of the VPC.
-
-
-
Method Detail
-
setNetworkInterfaceId
public void setNetworkInterfaceId(String networkInterfaceId)
The ID of the network interface.
- Parameters:
networkInterfaceId- The ID of the network interface.
-
getNetworkInterfaceId
public String getNetworkInterfaceId()
The ID of the network interface.
- Returns:
- The ID of the network interface.
-
withNetworkInterfaceId
public NetworkInterface withNetworkInterfaceId(String networkInterfaceId)
The ID of the network interface.
- Parameters:
networkInterfaceId- The ID of the network interface.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSubnetId
public void setSubnetId(String subnetId)
The ID of the subnet.
- Parameters:
subnetId- The ID of the subnet.
-
getSubnetId
public String getSubnetId()
The ID of the subnet.
- Returns:
- The ID of the subnet.
-
withSubnetId
public NetworkInterface withSubnetId(String subnetId)
The ID of the subnet.
- Parameters:
subnetId- The ID of the subnet.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setVpcId
public void setVpcId(String vpcId)
The ID of the VPC.
- Parameters:
vpcId- The ID of the VPC.
-
getVpcId
public String getVpcId()
The ID of the VPC.
- Returns:
- The ID of the VPC.
-
withVpcId
public NetworkInterface withVpcId(String vpcId)
The ID of the VPC.
- Parameters:
vpcId- The ID of the VPC.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAvailabilityZone
public void setAvailabilityZone(String availabilityZone)
The Availability Zone.
- Parameters:
availabilityZone- The Availability Zone.
-
getAvailabilityZone
public String getAvailabilityZone()
The Availability Zone.
- Returns:
- The Availability Zone.
-
withAvailabilityZone
public NetworkInterface withAvailabilityZone(String availabilityZone)
The Availability Zone.
- Parameters:
availabilityZone- The Availability Zone.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDescription
public void setDescription(String description)
A description.
- Parameters:
description- A description.
-
getDescription
public String getDescription()
A description.
- Returns:
- A description.
-
withDescription
public NetworkInterface withDescription(String description)
A description.
- Parameters:
description- A description.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setOwnerId
public void setOwnerId(String ownerId)
The AWS account ID of the owner of the network interface.
- Parameters:
ownerId- The AWS account ID of the owner of the network interface.
-
getOwnerId
public String getOwnerId()
The AWS account ID of the owner of the network interface.
- Returns:
- The AWS account ID of the owner of the network interface.
-
withOwnerId
public NetworkInterface withOwnerId(String ownerId)
The AWS account ID of the owner of the network interface.
- Parameters:
ownerId- The AWS account ID of the owner of the network interface.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRequesterId
public void setRequesterId(String requesterId)
The ID of the entity that launched the instance on your behalf (for example, AWS Management Console or Auto Scaling).
- Parameters:
requesterId- The ID of the entity that launched the instance on your behalf (for example, AWS Management Console or Auto Scaling).
-
getRequesterId
public String getRequesterId()
The ID of the entity that launched the instance on your behalf (for example, AWS Management Console or Auto Scaling).
- Returns:
- The ID of the entity that launched the instance on your behalf (for example, AWS Management Console or Auto Scaling).
-
withRequesterId
public NetworkInterface withRequesterId(String requesterId)
The ID of the entity that launched the instance on your behalf (for example, AWS Management Console or Auto Scaling).
- Parameters:
requesterId- The ID of the entity that launched the instance on your behalf (for example, AWS Management Console or Auto Scaling).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRequesterManaged
public void setRequesterManaged(Boolean requesterManaged)
Indicates whether the network interface is being managed by AWS.
- Parameters:
requesterManaged- Indicates whether the network interface is being managed by AWS.
-
getRequesterManaged
public Boolean getRequesterManaged()
Indicates whether the network interface is being managed by AWS.
- Returns:
- Indicates whether the network interface is being managed by AWS.
-
withRequesterManaged
public NetworkInterface withRequesterManaged(Boolean requesterManaged)
Indicates whether the network interface is being managed by AWS.
- Parameters:
requesterManaged- Indicates whether the network interface is being managed by AWS.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isRequesterManaged
public Boolean isRequesterManaged()
Indicates whether the network interface is being managed by AWS.
- Returns:
- Indicates whether the network interface is being managed by AWS.
-
setStatus
public void setStatus(String status)
The status of the network interface.
- Parameters:
status- The status of the network interface.- See Also:
NetworkInterfaceStatus
-
getStatus
public String getStatus()
The status of the network interface.
- Returns:
- The status of the network interface.
- See Also:
NetworkInterfaceStatus
-
withStatus
public NetworkInterface withStatus(String status)
The status of the network interface.
- Parameters:
status- The status of the network interface.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
NetworkInterfaceStatus
-
setStatus
public void setStatus(NetworkInterfaceStatus status)
The status of the network interface.
- Parameters:
status- The status of the network interface.- See Also:
NetworkInterfaceStatus
-
withStatus
public NetworkInterface withStatus(NetworkInterfaceStatus status)
The status of the network interface.
- Parameters:
status- The status of the network interface.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
NetworkInterfaceStatus
-
setMacAddress
public void setMacAddress(String macAddress)
The MAC address.
- Parameters:
macAddress- The MAC address.
-
getMacAddress
public String getMacAddress()
The MAC address.
- Returns:
- The MAC address.
-
withMacAddress
public NetworkInterface withMacAddress(String macAddress)
The MAC address.
- Parameters:
macAddress- The MAC address.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPrivateIpAddress
public void setPrivateIpAddress(String privateIpAddress)
The IP address of the network interface within the subnet.
- Parameters:
privateIpAddress- The IP address of the network interface within the subnet.
-
getPrivateIpAddress
public String getPrivateIpAddress()
The IP address of the network interface within the subnet.
- Returns:
- The IP address of the network interface within the subnet.
-
withPrivateIpAddress
public NetworkInterface withPrivateIpAddress(String privateIpAddress)
The IP address of the network interface within the subnet.
- Parameters:
privateIpAddress- The IP address of the network interface within the subnet.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPrivateDnsName
public void setPrivateDnsName(String privateDnsName)
The private DNS name.
- Parameters:
privateDnsName- The private DNS name.
-
getPrivateDnsName
public String getPrivateDnsName()
The private DNS name.
- Returns:
- The private DNS name.
-
withPrivateDnsName
public NetworkInterface withPrivateDnsName(String privateDnsName)
The private DNS name.
- Parameters:
privateDnsName- The private DNS name.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSourceDestCheck
public void setSourceDestCheck(Boolean sourceDestCheck)
Indicates whether traffic to or from the instance is validated.
- Parameters:
sourceDestCheck- Indicates whether traffic to or from the instance is validated.
-
getSourceDestCheck
public Boolean getSourceDestCheck()
Indicates whether traffic to or from the instance is validated.
- Returns:
- Indicates whether traffic to or from the instance is validated.
-
withSourceDestCheck
public NetworkInterface withSourceDestCheck(Boolean sourceDestCheck)
Indicates whether traffic to or from the instance is validated.
- Parameters:
sourceDestCheck- Indicates whether traffic to or from the instance is validated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isSourceDestCheck
public Boolean isSourceDestCheck()
Indicates whether traffic to or from the instance is validated.
- Returns:
- Indicates whether traffic to or from the instance is validated.
-
getGroups
public List<GroupIdentifier> getGroups()
Any security groups for the network interface.
- Returns:
- Any security groups for the network interface.
-
setGroups
public void setGroups(Collection<GroupIdentifier> groups)
Any security groups for the network interface.
- Parameters:
groups- Any security groups for the network interface.
-
withGroups
public NetworkInterface withGroups(GroupIdentifier... groups)
Any security groups for the network interface.
NOTE: This method appends the values to the existing list (if any). Use
setGroups(java.util.Collection)orwithGroups(java.util.Collection)if you want to override the existing values.- Parameters:
groups- Any security groups for the network interface.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withGroups
public NetworkInterface withGroups(Collection<GroupIdentifier> groups)
Any security groups for the network interface.
- Parameters:
groups- Any security groups for the network interface.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAttachment
public void setAttachment(NetworkInterfaceAttachment attachment)
The network interface attachment.
- Parameters:
attachment- The network interface attachment.
-
getAttachment
public NetworkInterfaceAttachment getAttachment()
The network interface attachment.
- Returns:
- The network interface attachment.
-
withAttachment
public NetworkInterface withAttachment(NetworkInterfaceAttachment attachment)
The network interface attachment.
- Parameters:
attachment- The network interface attachment.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAssociation
public void setAssociation(NetworkInterfaceAssociation association)
The association information for an Elastic IP associated with the network interface.
- Parameters:
association- The association information for an Elastic IP associated with the network interface.
-
getAssociation
public NetworkInterfaceAssociation getAssociation()
The association information for an Elastic IP associated with the network interface.
- Returns:
- The association information for an Elastic IP associated with the network interface.
-
withAssociation
public NetworkInterface withAssociation(NetworkInterfaceAssociation association)
The association information for an Elastic IP associated with the network interface.
- Parameters:
association- The association information for an Elastic IP associated with the network interface.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getTagSet
public List<Tag> getTagSet()
Any tags assigned to the network interface.
- Returns:
- Any tags assigned to the network interface.
-
setTagSet
public void setTagSet(Collection<Tag> tagSet)
Any tags assigned to the network interface.
- Parameters:
tagSet- Any tags assigned to the network interface.
-
withTagSet
public NetworkInterface withTagSet(Tag... tagSet)
Any tags assigned to the network interface.
NOTE: This method appends the values to the existing list (if any). Use
setTagSet(java.util.Collection)orwithTagSet(java.util.Collection)if you want to override the existing values.- Parameters:
tagSet- Any tags assigned to the network interface.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withTagSet
public NetworkInterface withTagSet(Collection<Tag> tagSet)
Any tags assigned to the network interface.
- Parameters:
tagSet- Any tags assigned to the network interface.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getPrivateIpAddresses
public List<NetworkInterfacePrivateIpAddress> getPrivateIpAddresses()
The private IP addresses associated with the network interface.
- Returns:
- The private IP addresses associated with the network interface.
-
setPrivateIpAddresses
public void setPrivateIpAddresses(Collection<NetworkInterfacePrivateIpAddress> privateIpAddresses)
The private IP addresses associated with the network interface.
- Parameters:
privateIpAddresses- The private IP addresses associated with the network interface.
-
withPrivateIpAddresses
public NetworkInterface withPrivateIpAddresses(NetworkInterfacePrivateIpAddress... privateIpAddresses)
The private IP addresses associated with the network interface.
NOTE: This method appends the values to the existing list (if any). Use
setPrivateIpAddresses(java.util.Collection)orwithPrivateIpAddresses(java.util.Collection)if you want to override the existing values.- Parameters:
privateIpAddresses- The private IP addresses associated with the network interface.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withPrivateIpAddresses
public NetworkInterface withPrivateIpAddresses(Collection<NetworkInterfacePrivateIpAddress> privateIpAddresses)
The private IP addresses associated with the network interface.
- Parameters:
privateIpAddresses- The private IP addresses associated with the network interface.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setInterfaceType
public void setInterfaceType(String interfaceType)
The type of interface.
- Parameters:
interfaceType- The type of interface.- See Also:
NetworkInterfaceType
-
getInterfaceType
public String getInterfaceType()
The type of interface.
- Returns:
- The type of interface.
- See Also:
NetworkInterfaceType
-
withInterfaceType
public NetworkInterface withInterfaceType(String interfaceType)
The type of interface.
- Parameters:
interfaceType- The type of interface.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
NetworkInterfaceType
-
setInterfaceType
public void setInterfaceType(NetworkInterfaceType interfaceType)
The type of interface.
- Parameters:
interfaceType- The type of interface.- See Also:
NetworkInterfaceType
-
withInterfaceType
public NetworkInterface withInterfaceType(NetworkInterfaceType interfaceType)
The type of interface.
- Parameters:
interfaceType- The type of interface.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
NetworkInterfaceType
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public NetworkInterface clone()
-
-