Class InstanceNetworkInterfaceSpecification
- java.lang.Object
-
- com.amazonaws.services.ec2.model.InstanceNetworkInterfaceSpecification
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class InstanceNetworkInterfaceSpecification extends Object implements Serializable, Cloneable
Describes a network interface.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InstanceNetworkInterfaceSpecification()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InstanceNetworkInterfaceSpecification
clone()
boolean
equals(Object obj)
Boolean
getAssociatePublicIpAddress()
Indicates whether to assign a public IP address to an instance you launch in a VPC.Boolean
getDeleteOnTermination()
If set totrue
, the interface is deleted when the instance is terminated.String
getDescription()
The description of the network interface.Integer
getDeviceIndex()
The index of the device on the instance for the network interface attachment.List<String>
getGroups()
The IDs of the security groups for the network interface.String
getNetworkInterfaceId()
The ID of the network interface.String
getPrivateIpAddress()
The private IP address of the network interface.List<PrivateIpAddressSpecification>
getPrivateIpAddresses()
One or more private IP addresses to assign to the network interface.Integer
getSecondaryPrivateIpAddressCount()
The number of secondary private IP addresses.String
getSubnetId()
The ID of the subnet associated with the network string.int
hashCode()
Boolean
isAssociatePublicIpAddress()
Indicates whether to assign a public IP address to an instance you launch in a VPC.Boolean
isDeleteOnTermination()
If set totrue
, the interface is deleted when the instance is terminated.void
setAssociatePublicIpAddress(Boolean associatePublicIpAddress)
Indicates whether to assign a public IP address to an instance you launch in a VPC.void
setDeleteOnTermination(Boolean deleteOnTermination)
If set totrue
, the interface is deleted when the instance is terminated.void
setDescription(String description)
The description of the network interface.void
setDeviceIndex(Integer deviceIndex)
The index of the device on the instance for the network interface attachment.void
setGroups(Collection<String> groups)
The IDs of the security groups for the network interface.void
setNetworkInterfaceId(String networkInterfaceId)
The ID of the network interface.void
setPrivateIpAddress(String privateIpAddress)
The private IP address of the network interface.void
setPrivateIpAddresses(Collection<PrivateIpAddressSpecification> privateIpAddresses)
One or more private IP addresses to assign to the network interface.void
setSecondaryPrivateIpAddressCount(Integer secondaryPrivateIpAddressCount)
The number of secondary private IP addresses.void
setSubnetId(String subnetId)
The ID of the subnet associated with the network string.String
toString()
Returns a string representation of this object; useful for testing and debugging.InstanceNetworkInterfaceSpecification
withAssociatePublicIpAddress(Boolean associatePublicIpAddress)
Indicates whether to assign a public IP address to an instance you launch in a VPC.InstanceNetworkInterfaceSpecification
withDeleteOnTermination(Boolean deleteOnTermination)
If set totrue
, the interface is deleted when the instance is terminated.InstanceNetworkInterfaceSpecification
withDescription(String description)
The description of the network interface.InstanceNetworkInterfaceSpecification
withDeviceIndex(Integer deviceIndex)
The index of the device on the instance for the network interface attachment.InstanceNetworkInterfaceSpecification
withGroups(String... groups)
The IDs of the security groups for the network interface.InstanceNetworkInterfaceSpecification
withGroups(Collection<String> groups)
The IDs of the security groups for the network interface.InstanceNetworkInterfaceSpecification
withNetworkInterfaceId(String networkInterfaceId)
The ID of the network interface.InstanceNetworkInterfaceSpecification
withPrivateIpAddress(String privateIpAddress)
The private IP address of the network interface.InstanceNetworkInterfaceSpecification
withPrivateIpAddresses(PrivateIpAddressSpecification... privateIpAddresses)
One or more private IP addresses to assign to the network interface.InstanceNetworkInterfaceSpecification
withPrivateIpAddresses(Collection<PrivateIpAddressSpecification> privateIpAddresses)
One or more private IP addresses to assign to the network interface.InstanceNetworkInterfaceSpecification
withSecondaryPrivateIpAddressCount(Integer secondaryPrivateIpAddressCount)
The number of secondary private IP addresses.InstanceNetworkInterfaceSpecification
withSubnetId(String subnetId)
The ID of the subnet associated with the network string.
-
-
-
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 InstanceNetworkInterfaceSpecification 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.
-
setDeviceIndex
public void setDeviceIndex(Integer deviceIndex)
The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a RunInstances request, you must provide the device index.
- Parameters:
deviceIndex
- The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a RunInstances request, you must provide the device index.
-
getDeviceIndex
public Integer getDeviceIndex()
The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a RunInstances request, you must provide the device index.
- Returns:
- The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a RunInstances request, you must provide the device index.
-
withDeviceIndex
public InstanceNetworkInterfaceSpecification withDeviceIndex(Integer deviceIndex)
The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a RunInstances request, you must provide the device index.
- Parameters:
deviceIndex
- The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a RunInstances request, you must provide the device index.- 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 associated with the network string. Applies only if creating a network interface when launching an instance.
- Parameters:
subnetId
- The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.
-
getSubnetId
public String getSubnetId()
The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.
- Returns:
- The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.
-
withSubnetId
public InstanceNetworkInterfaceSpecification withSubnetId(String subnetId)
The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.
- Parameters:
subnetId
- The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDescription
public void setDescription(String description)
The description of the network interface. Applies only if creating a network interface when launching an instance.
- Parameters:
description
- The description of the network interface. Applies only if creating a network interface when launching an instance.
-
getDescription
public String getDescription()
The description of the network interface. Applies only if creating a network interface when launching an instance.
- Returns:
- The description of the network interface. Applies only if creating a network interface when launching an instance.
-
withDescription
public InstanceNetworkInterfaceSpecification withDescription(String description)
The description of the network interface. Applies only if creating a network interface when launching an instance.
- Parameters:
description
- The description of the network interface. Applies only if creating a network interface when launching an instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPrivateIpAddress
public void setPrivateIpAddress(String privateIpAddress)
The private IP address of the network interface. Applies only if creating a network interface when launching an instance.
- Parameters:
privateIpAddress
- The private IP address of the network interface. Applies only if creating a network interface when launching an instance.
-
getPrivateIpAddress
public String getPrivateIpAddress()
The private IP address of the network interface. Applies only if creating a network interface when launching an instance.
- Returns:
- The private IP address of the network interface. Applies only if creating a network interface when launching an instance.
-
withPrivateIpAddress
public InstanceNetworkInterfaceSpecification withPrivateIpAddress(String privateIpAddress)
The private IP address of the network interface. Applies only if creating a network interface when launching an instance.
- Parameters:
privateIpAddress
- The private IP address of the network interface. Applies only if creating a network interface when launching an instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getGroups
public List<String> getGroups()
The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
- Returns:
- The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
-
setGroups
public void setGroups(Collection<String> groups)
The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
- Parameters:
groups
- The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
-
withGroups
public InstanceNetworkInterfaceSpecification withGroups(String... groups)
The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
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
- The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withGroups
public InstanceNetworkInterfaceSpecification withGroups(Collection<String> groups)
The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
- Parameters:
groups
- The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDeleteOnTermination
public void setDeleteOnTermination(Boolean deleteOnTermination)
If set to
true
, the interface is deleted when the instance is terminated. You can specifytrue
only if creating a new network interface when launching an instance.- Parameters:
deleteOnTermination
- If set totrue
, the interface is deleted when the instance is terminated. You can specifytrue
only if creating a new network interface when launching an instance.
-
getDeleteOnTermination
public Boolean getDeleteOnTermination()
If set to
true
, the interface is deleted when the instance is terminated. You can specifytrue
only if creating a new network interface when launching an instance.- Returns:
- If set to
true
, the interface is deleted when the instance is terminated. You can specifytrue
only if creating a new network interface when launching an instance.
-
withDeleteOnTermination
public InstanceNetworkInterfaceSpecification withDeleteOnTermination(Boolean deleteOnTermination)
If set to
true
, the interface is deleted when the instance is terminated. You can specifytrue
only if creating a new network interface when launching an instance.- Parameters:
deleteOnTermination
- If set totrue
, the interface is deleted when the instance is terminated. You can specifytrue
only if creating a new network interface when launching an instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isDeleteOnTermination
public Boolean isDeleteOnTermination()
If set to
true
, the interface is deleted when the instance is terminated. You can specifytrue
only if creating a new network interface when launching an instance.- Returns:
- If set to
true
, the interface is deleted when the instance is terminated. You can specifytrue
only if creating a new network interface when launching an instance.
-
getPrivateIpAddresses
public List<PrivateIpAddressSpecification> getPrivateIpAddresses()
One or more private IP addresses to assign to the network interface. Only one private IP address can be designated as primary.
- Returns:
- One or more private IP addresses to assign to the network interface. Only one private IP address can be designated as primary.
-
setPrivateIpAddresses
public void setPrivateIpAddresses(Collection<PrivateIpAddressSpecification> privateIpAddresses)
One or more private IP addresses to assign to the network interface. Only one private IP address can be designated as primary.
- Parameters:
privateIpAddresses
- One or more private IP addresses to assign to the network interface. Only one private IP address can be designated as primary.
-
withPrivateIpAddresses
public InstanceNetworkInterfaceSpecification withPrivateIpAddresses(PrivateIpAddressSpecification... privateIpAddresses)
One or more private IP addresses to assign to the network interface. Only one private IP address can be designated as primary.
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
- One or more private IP addresses to assign to the network interface. Only one private IP address can be designated as primary.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withPrivateIpAddresses
public InstanceNetworkInterfaceSpecification withPrivateIpAddresses(Collection<PrivateIpAddressSpecification> privateIpAddresses)
One or more private IP addresses to assign to the network interface. Only one private IP address can be designated as primary.
- Parameters:
privateIpAddresses
- One or more private IP addresses to assign to the network interface. Only one private IP address can be designated as primary.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSecondaryPrivateIpAddressCount
public void setSecondaryPrivateIpAddressCount(Integer secondaryPrivateIpAddressCount)
The number of secondary private IP addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option.
- Parameters:
secondaryPrivateIpAddressCount
- The number of secondary private IP addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option.
-
getSecondaryPrivateIpAddressCount
public Integer getSecondaryPrivateIpAddressCount()
The number of secondary private IP addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option.
- Returns:
- The number of secondary private IP addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option.
-
withSecondaryPrivateIpAddressCount
public InstanceNetworkInterfaceSpecification withSecondaryPrivateIpAddressCount(Integer secondaryPrivateIpAddressCount)
The number of secondary private IP addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option.
- Parameters:
secondaryPrivateIpAddressCount
- The number of secondary private IP addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAssociatePublicIpAddress
public void setAssociatePublicIpAddress(Boolean associatePublicIpAddress)
Indicates whether to assign a public IP address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is
true
.- Parameters:
associatePublicIpAddress
- Indicates whether to assign a public IP address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value istrue
.
-
getAssociatePublicIpAddress
public Boolean getAssociatePublicIpAddress()
Indicates whether to assign a public IP address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is
true
.- Returns:
- Indicates whether to assign a public IP address to an instance
you launch in a VPC. The public IP address can only be assigned
to a network interface for eth0, and can only be assigned to a
new network interface, not an existing one. You cannot specify
more than one network interface in the request. If launching into
a default subnet, the default value is
true
.
-
withAssociatePublicIpAddress
public InstanceNetworkInterfaceSpecification withAssociatePublicIpAddress(Boolean associatePublicIpAddress)
Indicates whether to assign a public IP address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is
true
.- Parameters:
associatePublicIpAddress
- Indicates whether to assign a public IP address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value istrue
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isAssociatePublicIpAddress
public Boolean isAssociatePublicIpAddress()
Indicates whether to assign a public IP address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is
true
.- Returns:
- Indicates whether to assign a public IP address to an instance
you launch in a VPC. The public IP address can only be assigned
to a network interface for eth0, and can only be assigned to a
new network interface, not an existing one. You cannot specify
more than one network interface in the request. If launching into
a default subnet, the default value is
true
.
-
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 InstanceNetworkInterfaceSpecification clone()
-
-