Class InstanceNetworkInterfaceSpecification
- All Implemented Interfaces:
Serializable
,Cloneable
Describes a network interface.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
Indicates whether to assign a public IP address to an instance you launch in a VPC.If set totrue
, the interface is deleted when the instance is terminated.The description of the network interface.The index of the device on the instance for the network interface attachment.The IDs of the security groups for the network interface.The ID of the network interface.The private IP address of the network interface.One or more private IP addresses to assign to the network interface.The number of secondary private IP addresses.The ID of the subnet associated with the network string.int
hashCode()
Indicates whether to assign a public IP address to an instance you launch in a VPC.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.toString()
Returns a string representation of this object; useful for testing and debugging.withAssociatePublicIpAddress
(Boolean associatePublicIpAddress) Indicates whether to assign a public IP address to an instance you launch in a VPC.withDeleteOnTermination
(Boolean deleteOnTermination) If set totrue
, the interface is deleted when the instance is terminated.withDescription
(String description) The description of the network interface.withDeviceIndex
(Integer deviceIndex) The index of the device on the instance for the network interface attachment.withGroups
(String... groups) The IDs of the security groups for the network interface.withGroups
(Collection<String> groups) The IDs of the security groups for the network interface.withNetworkInterfaceId
(String networkInterfaceId) The ID of the network interface.withPrivateIpAddress
(String privateIpAddress) The private IP address of the network interface.withPrivateIpAddresses
(PrivateIpAddressSpecification... privateIpAddresses) One or more private IP addresses to assign to the network interface.withPrivateIpAddresses
(Collection<PrivateIpAddressSpecification> privateIpAddresses) One or more private IP addresses to assign to the network interface.withSecondaryPrivateIpAddressCount
(Integer secondaryPrivateIpAddressCount) The number of secondary private IP addresses.withSubnetId
(String subnetId) The ID of the subnet associated with the network string.
-
Constructor Details
-
InstanceNetworkInterfaceSpecification
public InstanceNetworkInterfaceSpecification()
-
-
Method Details
-
setNetworkInterfaceId
The ID of the network interface.
- Parameters:
networkInterfaceId
- The ID of the network interface.
-
getNetworkInterfaceId
The ID of the network interface.
- Returns:
- The ID of the network interface.
-
withNetworkInterfaceId
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-