public class InstanceNetworkInterfaceSpecification
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Describes a network interface.
Modifier and Type | Field and Description |
---|---|
private java.lang.Boolean |
associatePublicIpAddress
Indicates whether to assign a public IP address to an instance you launch
in a VPC.
|
private java.lang.Boolean |
deleteOnTermination
If set to
true , the interface is deleted when the instance
is terminated. |
private java.lang.String |
description
The description of the network interface.
|
private java.lang.Integer |
deviceIndex
The index of the device on the instance for the network interface
attachment.
|
private SdkInternalList<java.lang.String> |
groups
The IDs of the security groups for the network interface.
|
private java.lang.String |
networkInterfaceId
The ID of the network interface.
|
private java.lang.String |
privateIpAddress
The private IP address of the network interface.
|
private SdkInternalList<PrivateIpAddressSpecification> |
privateIpAddresses
One or more private IP addresses to assign to the network interface.
|
private java.lang.Integer |
secondaryPrivateIpAddressCount
The number of secondary private IP addresses.
|
private java.lang.String |
subnetId
The ID of the subnet associated with the network string.
|
Constructor and Description |
---|
InstanceNetworkInterfaceSpecification() |
Modifier and Type | Method and Description |
---|---|
InstanceNetworkInterfaceSpecification |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.Boolean |
getAssociatePublicIpAddress()
Indicates whether to assign a public IP address to an instance you launch
in a VPC.
|
java.lang.Boolean |
getDeleteOnTermination()
If set to
true , the interface is deleted when the instance
is terminated. |
java.lang.String |
getDescription()
The description of the network interface.
|
java.lang.Integer |
getDeviceIndex()
The index of the device on the instance for the network interface
attachment.
|
java.util.List<java.lang.String> |
getGroups()
The IDs of the security groups for the network interface.
|
java.lang.String |
getNetworkInterfaceId()
The ID of the network interface.
|
java.lang.String |
getPrivateIpAddress()
The private IP address of the network interface.
|
java.util.List<PrivateIpAddressSpecification> |
getPrivateIpAddresses()
One or more private IP addresses to assign to the network interface.
|
java.lang.Integer |
getSecondaryPrivateIpAddressCount()
The number of secondary private IP addresses.
|
java.lang.String |
getSubnetId()
The ID of the subnet associated with the network string.
|
int |
hashCode() |
java.lang.Boolean |
isAssociatePublicIpAddress()
Indicates whether to assign a public IP address to an instance you launch
in a VPC.
|
java.lang.Boolean |
isDeleteOnTermination()
If set to
true , the interface is deleted when the instance
is terminated. |
void |
setAssociatePublicIpAddress(java.lang.Boolean associatePublicIpAddress)
Indicates whether to assign a public IP address to an instance you launch
in a VPC.
|
void |
setDeleteOnTermination(java.lang.Boolean deleteOnTermination)
If set to
true , the interface is deleted when the instance
is terminated. |
void |
setDescription(java.lang.String description)
The description of the network interface.
|
void |
setDeviceIndex(java.lang.Integer deviceIndex)
The index of the device on the instance for the network interface
attachment.
|
void |
setGroups(java.util.Collection<java.lang.String> groups)
The IDs of the security groups for the network interface.
|
void |
setNetworkInterfaceId(java.lang.String networkInterfaceId)
The ID of the network interface.
|
void |
setPrivateIpAddress(java.lang.String privateIpAddress)
The private IP address of the network interface.
|
void |
setPrivateIpAddresses(java.util.Collection<PrivateIpAddressSpecification> privateIpAddresses)
One or more private IP addresses to assign to the network interface.
|
void |
setSecondaryPrivateIpAddressCount(java.lang.Integer secondaryPrivateIpAddressCount)
The number of secondary private IP addresses.
|
void |
setSubnetId(java.lang.String subnetId)
The ID of the subnet associated with the network string.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
InstanceNetworkInterfaceSpecification |
withAssociatePublicIpAddress(java.lang.Boolean associatePublicIpAddress)
Indicates whether to assign a public IP address to an instance you launch
in a VPC.
|
InstanceNetworkInterfaceSpecification |
withDeleteOnTermination(java.lang.Boolean deleteOnTermination)
If set to
true , the interface is deleted when the instance
is terminated. |
InstanceNetworkInterfaceSpecification |
withDescription(java.lang.String description)
The description of the network interface.
|
InstanceNetworkInterfaceSpecification |
withDeviceIndex(java.lang.Integer deviceIndex)
The index of the device on the instance for the network interface
attachment.
|
InstanceNetworkInterfaceSpecification |
withGroups(java.util.Collection<java.lang.String> groups)
The IDs of the security groups for the network interface.
|
InstanceNetworkInterfaceSpecification |
withGroups(java.lang.String... groups)
The IDs of the security groups for the network interface.
|
InstanceNetworkInterfaceSpecification |
withNetworkInterfaceId(java.lang.String networkInterfaceId)
The ID of the network interface.
|
InstanceNetworkInterfaceSpecification |
withPrivateIpAddress(java.lang.String privateIpAddress)
The private IP address of the network interface.
|
InstanceNetworkInterfaceSpecification |
withPrivateIpAddresses(java.util.Collection<PrivateIpAddressSpecification> privateIpAddresses)
One or more private IP addresses to assign to the network interface.
|
InstanceNetworkInterfaceSpecification |
withPrivateIpAddresses(PrivateIpAddressSpecification... privateIpAddresses)
One or more private IP addresses to assign to the network interface.
|
InstanceNetworkInterfaceSpecification |
withSecondaryPrivateIpAddressCount(java.lang.Integer secondaryPrivateIpAddressCount)
The number of secondary private IP addresses.
|
InstanceNetworkInterfaceSpecification |
withSubnetId(java.lang.String subnetId)
The ID of the subnet associated with the network string.
|
private java.lang.String networkInterfaceId
The ID of the network interface.
private java.lang.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.
private java.lang.String subnetId
The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.
private java.lang.String description
The description of the network interface. Applies only if creating a network interface when launching an instance.
private java.lang.String privateIpAddress
The private IP address of the network interface. Applies only if creating a network interface when launching an instance.
private SdkInternalList<java.lang.String> groups
The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
private java.lang.Boolean deleteOnTermination
If set to true
, the interface is deleted when the instance
is terminated. You can specify true
only if creating a new
network interface when launching an instance.
private SdkInternalList<PrivateIpAddressSpecification> privateIpAddresses
One or more private IP addresses to assign to the network interface. Only one private IP address can be designated as primary.
private java.lang.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.
private java.lang.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
.
public InstanceNetworkInterfaceSpecification()
public void setNetworkInterfaceId(java.lang.String networkInterfaceId)
The ID of the network interface.
networkInterfaceId
- The ID of the network interface.public java.lang.String getNetworkInterfaceId()
The ID of the network interface.
public InstanceNetworkInterfaceSpecification withNetworkInterfaceId(java.lang.String networkInterfaceId)
The ID of the network interface.
networkInterfaceId
- The ID of the network interface.public void setDeviceIndex(java.lang.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.
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.public java.lang.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.
public InstanceNetworkInterfaceSpecification withDeviceIndex(java.lang.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.
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.public void setSubnetId(java.lang.String subnetId)
The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.
subnetId
- The ID of the subnet associated with the network string. Applies
only if creating a network interface when launching an instance.public java.lang.String getSubnetId()
The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.
public InstanceNetworkInterfaceSpecification withSubnetId(java.lang.String subnetId)
The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.
subnetId
- The ID of the subnet associated with the network string. Applies
only if creating a network interface when launching an instance.public void setDescription(java.lang.String description)
The description of the network interface. Applies only if creating a network interface when launching an instance.
description
- The description of the network interface. Applies only if creating
a network interface when launching an instance.public java.lang.String getDescription()
The description of the network interface. Applies only if creating a network interface when launching an instance.
public InstanceNetworkInterfaceSpecification withDescription(java.lang.String description)
The description of the network interface. Applies only if creating a network interface when launching an instance.
description
- The description of the network interface. Applies only if creating
a network interface when launching an instance.public void setPrivateIpAddress(java.lang.String privateIpAddress)
The private IP address of the network interface. Applies only if creating a network interface when launching an instance.
privateIpAddress
- The private IP address of the network interface. Applies only if
creating a network interface when launching an instance.public java.lang.String getPrivateIpAddress()
The private IP address of the network interface. Applies only if creating a network interface when launching an instance.
public InstanceNetworkInterfaceSpecification withPrivateIpAddress(java.lang.String privateIpAddress)
The private IP address of the network interface. Applies only if creating a network interface when launching an instance.
privateIpAddress
- The private IP address of the network interface. Applies only if
creating a network interface when launching an instance.public java.util.List<java.lang.String> getGroups()
The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
public void setGroups(java.util.Collection<java.lang.String> groups)
The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
groups
- The IDs of the security groups for the network interface. Applies
only if creating a network interface when launching an instance.public InstanceNetworkInterfaceSpecification withGroups(java.lang.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)
or
withGroups(java.util.Collection)
if you want to override the
existing values.
groups
- The IDs of the security groups for the network interface. Applies
only if creating a network interface when launching an instance.public InstanceNetworkInterfaceSpecification withGroups(java.util.Collection<java.lang.String> groups)
The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
groups
- The IDs of the security groups for the network interface. Applies
only if creating a network interface when launching an instance.public void setDeleteOnTermination(java.lang.Boolean deleteOnTermination)
If set to true
, the interface is deleted when the instance
is terminated. You can specify true
only if creating a new
network interface when launching an instance.
deleteOnTermination
- If set to true
, the interface is deleted when the
instance is terminated. You can specify true
only if
creating a new network interface when launching an instance.public java.lang.Boolean getDeleteOnTermination()
If set to true
, the interface is deleted when the instance
is terminated. You can specify true
only if creating a new
network interface when launching an instance.
true
, the interface is deleted when the
instance is terminated. You can specify true
only if
creating a new network interface when launching an instance.public InstanceNetworkInterfaceSpecification withDeleteOnTermination(java.lang.Boolean deleteOnTermination)
If set to true
, the interface is deleted when the instance
is terminated. You can specify true
only if creating a new
network interface when launching an instance.
deleteOnTermination
- If set to true
, the interface is deleted when the
instance is terminated. You can specify true
only if
creating a new network interface when launching an instance.public java.lang.Boolean isDeleteOnTermination()
If set to true
, the interface is deleted when the instance
is terminated. You can specify true
only if creating a new
network interface when launching an instance.
true
, the interface is deleted when the
instance is terminated. You can specify true
only if
creating a new network interface when launching an instance.public java.util.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.
public void setPrivateIpAddresses(java.util.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.
privateIpAddresses
- One or more private IP addresses to assign to the network
interface. Only one private IP address can be designated as
primary.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)
or
withPrivateIpAddresses(java.util.Collection)
if you want to
override the existing values.
privateIpAddresses
- One or more private IP addresses to assign to the network
interface. Only one private IP address can be designated as
primary.public InstanceNetworkInterfaceSpecification withPrivateIpAddresses(java.util.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.
privateIpAddresses
- One or more private IP addresses to assign to the network
interface. Only one private IP address can be designated as
primary.public void setSecondaryPrivateIpAddressCount(java.lang.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.
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.public java.lang.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.
public InstanceNetworkInterfaceSpecification withSecondaryPrivateIpAddressCount(java.lang.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.
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.public void setAssociatePublicIpAddress(java.lang.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
.
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
.public java.lang.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
.
true
.public InstanceNetworkInterfaceSpecification withAssociatePublicIpAddress(java.lang.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
.
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
.public java.lang.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
.
true
.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public InstanceNetworkInterfaceSpecification clone()
clone
in class java.lang.Object