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 NetworkInterface
clone()
boolean
equals(Object obj)
NetworkInterfaceAssociation
getAssociation()
The association information for an Elastic IP associated with the network interface.NetworkInterfaceAttachment
getAttachment()
The network interface attachment.String
getAvailabilityZone()
The Availability Zone.String
getDescription()
A description.List<GroupIdentifier>
getGroups()
Any security groups for the network interface.String
getInterfaceType()
The type of interface.String
getMacAddress()
The MAC address.String
getNetworkInterfaceId()
The ID of the network interface.String
getOwnerId()
The AWS account ID of the owner of the network interface.String
getPrivateDnsName()
The private DNS name.String
getPrivateIpAddress()
The IP address of the network interface within the subnet.List<NetworkInterfacePrivateIpAddress>
getPrivateIpAddresses()
The private IP addresses associated with the network interface.String
getRequesterId()
The ID of the entity that launched the instance on your behalf (for example, AWS Management Console or Auto Scaling).Boolean
getRequesterManaged()
Indicates whether the network interface is being managed by AWS.Boolean
getSourceDestCheck()
Indicates whether traffic to or from the instance is validated.String
getStatus()
The status of the network interface.String
getSubnetId()
The ID of the subnet.List<Tag>
getTagSet()
Any tags assigned to the network interface.String
getVpcId()
The ID of the VPC.int
hashCode()
Boolean
isRequesterManaged()
Indicates whether the network interface is being managed by AWS.Boolean
isSourceDestCheck()
Indicates whether traffic to or from the instance is validated.void
setAssociation(NetworkInterfaceAssociation association)
The association information for an Elastic IP associated with the network interface.void
setAttachment(NetworkInterfaceAttachment attachment)
The network interface attachment.void
setAvailabilityZone(String availabilityZone)
The Availability Zone.void
setDescription(String description)
A description.void
setGroups(Collection<GroupIdentifier> groups)
Any security groups for the network interface.void
setInterfaceType(NetworkInterfaceType interfaceType)
The type of interface.void
setInterfaceType(String interfaceType)
The type of interface.void
setMacAddress(String macAddress)
The MAC address.void
setNetworkInterfaceId(String networkInterfaceId)
The ID of the network interface.void
setOwnerId(String ownerId)
The AWS account ID of the owner of the network interface.void
setPrivateDnsName(String privateDnsName)
The private DNS name.void
setPrivateIpAddress(String privateIpAddress)
The IP address of the network interface within the subnet.void
setPrivateIpAddresses(Collection<NetworkInterfacePrivateIpAddress> privateIpAddresses)
The private IP addresses associated with the network interface.void
setRequesterId(String requesterId)
The ID of the entity that launched the instance on your behalf (for example, AWS Management Console or Auto Scaling).void
setRequesterManaged(Boolean requesterManaged)
Indicates whether the network interface is being managed by AWS.void
setSourceDestCheck(Boolean sourceDestCheck)
Indicates whether traffic to or from the instance is validated.void
setStatus(NetworkInterfaceStatus status)
The status of the network interface.void
setStatus(String status)
The status of the network interface.void
setSubnetId(String subnetId)
The ID of the subnet.void
setTagSet(Collection<Tag> tagSet)
Any tags assigned to the network interface.void
setVpcId(String vpcId)
The ID of the VPC.String
toString()
Returns a string representation of this object; useful for testing and debugging.NetworkInterface
withAssociation(NetworkInterfaceAssociation association)
The association information for an Elastic IP associated with the network interface.NetworkInterface
withAttachment(NetworkInterfaceAttachment attachment)
The network interface attachment.NetworkInterface
withAvailabilityZone(String availabilityZone)
The Availability Zone.NetworkInterface
withDescription(String description)
A description.NetworkInterface
withGroups(GroupIdentifier... groups)
Any security groups for the network interface.NetworkInterface
withGroups(Collection<GroupIdentifier> groups)
Any security groups for the network interface.NetworkInterface
withInterfaceType(NetworkInterfaceType interfaceType)
The type of interface.NetworkInterface
withInterfaceType(String interfaceType)
The type of interface.NetworkInterface
withMacAddress(String macAddress)
The MAC address.NetworkInterface
withNetworkInterfaceId(String networkInterfaceId)
The ID of the network interface.NetworkInterface
withOwnerId(String ownerId)
The AWS account ID of the owner of the network interface.NetworkInterface
withPrivateDnsName(String privateDnsName)
The private DNS name.NetworkInterface
withPrivateIpAddress(String privateIpAddress)
The IP address of the network interface within the subnet.NetworkInterface
withPrivateIpAddresses(NetworkInterfacePrivateIpAddress... privateIpAddresses)
The private IP addresses associated with the network interface.NetworkInterface
withPrivateIpAddresses(Collection<NetworkInterfacePrivateIpAddress> privateIpAddresses)
The private IP addresses associated with the network interface.NetworkInterface
withRequesterId(String requesterId)
The ID of the entity that launched the instance on your behalf (for example, AWS Management Console or Auto Scaling).NetworkInterface
withRequesterManaged(Boolean requesterManaged)
Indicates whether the network interface is being managed by AWS.NetworkInterface
withSourceDestCheck(Boolean sourceDestCheck)
Indicates whether traffic to or from the instance is validated.NetworkInterface
withStatus(NetworkInterfaceStatus status)
The status of the network interface.NetworkInterface
withStatus(String status)
The status of the network interface.NetworkInterface
withSubnetId(String subnetId)
The ID of the subnet.NetworkInterface
withTagSet(Tag... tagSet)
Any tags assigned to the network interface.NetworkInterface
withTagSet(Collection<Tag> tagSet)
Any tags assigned to the network interface.NetworkInterface
withVpcId(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:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public NetworkInterface clone()
-
-