Class InstanceNetworkInterfaceSpecification
- java.lang.Object
-
- software.amazon.awssdk.services.ec2.model.InstanceNetworkInterfaceSpecification
-
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<InstanceNetworkInterfaceSpecification.Builder,InstanceNetworkInterfaceSpecification>
@Generated("software.amazon.awssdk:codegen") public final class InstanceNetworkInterfaceSpecification extends Object implements SdkPojo, Serializable, ToCopyableBuilder<InstanceNetworkInterfaceSpecification.Builder,InstanceNetworkInterfaceSpecification>
Describes a network interface.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
InstanceNetworkInterfaceSpecification.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
associateCarrierIpAddress()
Indicates whether to assign a carrier IP address to the network interface.Boolean
associatePublicIpAddress()
Indicates whether to assign a public IPv4 address to an instance you launch in a VPC.static InstanceNetworkInterfaceSpecification.Builder
builder()
ConnectionTrackingSpecificationRequest
connectionTrackingSpecification()
A security group connection tracking specification that enables you to set the timeout for connection tracking on an Elastic network interface.Boolean
deleteOnTermination()
If set totrue
, the interface is deleted when the instance is terminated.String
description()
The description of the network interface.Integer
deviceIndex()
The position of the network interface in the attachment order.EnaSrdSpecificationRequest
enaSrdSpecification()
Specifies the ENA Express settings for the network interface that's attached to the instance.boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
List<String>
groups()
The IDs of the security groups for the network interface.boolean
hasGroups()
For responses, this returns true if the service returned a value for the Groups property.int
hashCode()
boolean
hasIpv4Prefixes()
For responses, this returns true if the service returned a value for the Ipv4Prefixes property.boolean
hasIpv6Addresses()
For responses, this returns true if the service returned a value for the Ipv6Addresses property.boolean
hasIpv6Prefixes()
For responses, this returns true if the service returned a value for the Ipv6Prefixes property.boolean
hasPrivateIpAddresses()
For responses, this returns true if the service returned a value for the PrivateIpAddresses property.String
interfaceType()
The type of network interface.Integer
ipv4PrefixCount()
The number of IPv4 delegated prefixes to be automatically assigned to the network interface.List<Ipv4PrefixSpecificationRequest>
ipv4Prefixes()
The IPv4 delegated prefixes to be assigned to the network interface.Integer
ipv6AddressCount()
A number of IPv6 addresses to assign to the network interface.List<InstanceIpv6Address>
ipv6Addresses()
The IPv6 addresses to assign to the network interface.Integer
ipv6PrefixCount()
The number of IPv6 delegated prefixes to be automatically assigned to the network interface.List<Ipv6PrefixSpecificationRequest>
ipv6Prefixes()
The IPv6 delegated prefixes to be assigned to the network interface.Integer
networkCardIndex()
The index of the network card.String
networkInterfaceId()
The ID of the network interface.Boolean
primaryIpv6()
The primary IPv6 address of the network interface.String
privateIpAddress()
The private IPv4 address of the network interface.List<PrivateIpAddressSpecification>
privateIpAddresses()
The private IPv4 addresses to assign to the network interface.List<SdkField<?>>
sdkFields()
Integer
secondaryPrivateIpAddressCount()
The number of secondary private IPv4 addresses.static Class<? extends InstanceNetworkInterfaceSpecification.Builder>
serializableBuilderClass()
String
subnetId()
The ID of the subnet associated with the network interface.InstanceNetworkInterfaceSpecification.Builder
toBuilder()
String
toString()
Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
associatePublicIpAddress
public final Boolean associatePublicIpAddress()
Indicates whether to assign a public IPv4 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
.Amazon Web Services charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the Amazon VPC pricing page.
- Returns:
- Indicates whether to assign a public IPv4 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
.Amazon Web Services charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the Amazon VPC pricing page.
-
deleteOnTermination
public final 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.- 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.
-
description
public final String description()
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.
-
deviceIndex
public final Integer deviceIndex()
The position of the network interface in the attachment order. A primary network interface has a device index of 0.
If you specify a network interface when launching an instance, you must specify the device index.
- Returns:
- The position of the network interface in the attachment order. A primary network interface has a device
index of 0.
If you specify a network interface when launching an instance, you must specify the device index.
-
hasGroups
public final boolean hasGroups()
For responses, this returns true if the service returned a value for the Groups property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
groups
public final List<String> groups()
The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasGroups()
method.- Returns:
- The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
-
ipv6AddressCount
public final Integer ipv6AddressCount()
A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.
- Returns:
- A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.
-
hasIpv6Addresses
public final boolean hasIpv6Addresses()
For responses, this returns true if the service returned a value for the Ipv6Addresses property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
ipv6Addresses
public final List<InstanceIpv6Address> ipv6Addresses()
The IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasIpv6Addresses()
method.- Returns:
- The IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
-
networkInterfaceId
public final String networkInterfaceId()
The ID of the network interface.
If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.
- Returns:
- The ID of the network interface.
If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.
-
privateIpAddress
public final String privateIpAddress()
The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.
- Returns:
- The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.
-
hasPrivateIpAddresses
public final boolean hasPrivateIpAddresses()
For responses, this returns true if the service returned a value for the PrivateIpAddresses property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
privateIpAddresses
public final List<PrivateIpAddressSpecification> privateIpAddresses()
The private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasPrivateIpAddresses()
method.- Returns:
- The private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.
-
secondaryPrivateIpAddressCount
public final Integer secondaryPrivateIpAddressCount()
The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.
- Returns:
- The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.
-
subnetId
public final String subnetId()
The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.
- Returns:
- The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.
-
associateCarrierIpAddress
public final Boolean associateCarrierIpAddress()
Indicates whether to assign a carrier IP address to the network interface.
You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP address in the Amazon Web Services Wavelength Developer Guide.
- Returns:
- Indicates whether to assign a carrier IP address to the network interface.
You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP address in the Amazon Web Services Wavelength Developer Guide.
-
interfaceType
public final String interfaceType()
The type of network interface.
Valid values:
interface
|efa
- Returns:
- The type of network interface.
Valid values:
interface
|efa
-
networkCardIndex
public final Integer networkCardIndex()
The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.
If you are using RequestSpotInstances to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use RunInstances.
- Returns:
- The index of the network card. Some instance types support multiple network cards. The primary network
interface must be assigned to network card index 0. The default is network card index 0.
If you are using RequestSpotInstances to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use RunInstances.
-
hasIpv4Prefixes
public final boolean hasIpv4Prefixes()
For responses, this returns true if the service returned a value for the Ipv4Prefixes property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
ipv4Prefixes
public final List<Ipv4PrefixSpecificationRequest> ipv4Prefixes()
The IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the
Ipv4PrefixCount
option.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasIpv4Prefixes()
method.- Returns:
- The IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you
use the
Ipv4PrefixCount
option.
-
ipv4PrefixCount
public final Integer ipv4PrefixCount()
The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the
Ipv4Prefix
option.- Returns:
- The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot
use this option if you use the
Ipv4Prefix
option.
-
hasIpv6Prefixes
public final boolean hasIpv6Prefixes()
For responses, this returns true if the service returned a value for the Ipv6Prefixes property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
ipv6Prefixes
public final List<Ipv6PrefixSpecificationRequest> ipv6Prefixes()
The IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the
Ipv6PrefixCount
option.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasIpv6Prefixes()
method.- Returns:
- The IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you
use the
Ipv6PrefixCount
option.
-
ipv6PrefixCount
public final Integer ipv6PrefixCount()
The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the
Ipv6Prefix
option.- Returns:
- The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot
use this option if you use the
Ipv6Prefix
option.
-
primaryIpv6
public final Boolean primaryIpv6()
The primary IPv6 address of the network interface. When you enable an IPv6 GUA address to be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 address until the instance is terminated or the network interface is detached. For more information about primary IPv6 addresses, see RunInstances.
- Returns:
- The primary IPv6 address of the network interface. When you enable an IPv6 GUA address to be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 address until the instance is terminated or the network interface is detached. For more information about primary IPv6 addresses, see RunInstances.
-
enaSrdSpecification
public final EnaSrdSpecificationRequest enaSrdSpecification()
Specifies the ENA Express settings for the network interface that's attached to the instance.
- Returns:
- Specifies the ENA Express settings for the network interface that's attached to the instance.
-
connectionTrackingSpecification
public final ConnectionTrackingSpecificationRequest connectionTrackingSpecification()
A security group connection tracking specification that enables you to set the timeout for connection tracking on an Elastic network interface. For more information, see Connection tracking timeouts in the Amazon EC2 User Guide.
- Returns:
- A security group connection tracking specification that enables you to set the timeout for connection tracking on an Elastic network interface. For more information, see Connection tracking timeouts in the Amazon EC2 User Guide.
-
toBuilder
public InstanceNetworkInterfaceSpecification.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<InstanceNetworkInterfaceSpecification.Builder,InstanceNetworkInterfaceSpecification>
-
builder
public static InstanceNetworkInterfaceSpecification.Builder builder()
-
serializableBuilderClass
public static Class<? extends InstanceNetworkInterfaceSpecification.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFields
in interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
-