@Generated(value="software.amazon.awssdk:codegen") public final class InstanceNetworkInterfaceSpecification extends Object implements SdkPojo, Serializable, ToCopyableBuilder<InstanceNetworkInterfaceSpecification.Builder,InstanceNetworkInterfaceSpecification>
Describes a network interface.
Modifier and Type | Class and Description |
---|---|
static interface |
InstanceNetworkInterfaceSpecification.Builder |
Modifier and Type | Method and 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() |
Boolean |
deleteOnTermination()
If set to
true , 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.
|
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()
One or more 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()
One or more 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()
One or more 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.
|
String |
privateIpAddress()
The private IPv4 address of the network interface.
|
List<PrivateIpAddressSpecification> |
privateIpAddresses()
One or more 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.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
copy
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
.
true
.public final 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.
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 final String description()
The description of the network interface. Applies only if creating a network interface when launching an instance.
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.
If you specify a network interface when launching an instance, you must specify the device index.
public final boolean hasGroups()
isEmpty()
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.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.
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.
public final boolean hasIpv6Addresses()
isEmpty()
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.public final List<InstanceIpv6Address> ipv6Addresses()
One or more 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.
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.
If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.
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.
public final boolean hasPrivateIpAddresses()
isEmpty()
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.public final List<PrivateIpAddressSpecification> privateIpAddresses()
One or more 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.
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.
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.
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 addresses in the Amazon Web Services Wavelength Developer Guide.
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 addresses in the Amazon Web Services Wavelength Developer Guide.
public final String interfaceType()
The type of network interface.
Valid values: interface
| efa
Valid values: interface
| efa
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.
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.
public final boolean hasIpv4Prefixes()
isEmpty()
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.public final List<Ipv4PrefixSpecificationRequest> ipv4Prefixes()
One or more 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.
Ipv4PrefixCount
option.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.
Ipv4Prefix
option.public final boolean hasIpv6Prefixes()
isEmpty()
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.public final List<Ipv6PrefixSpecificationRequest> ipv6Prefixes()
One or more 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.
Ipv6PrefixCount
option.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.
Ipv6Prefix
option.public InstanceNetworkInterfaceSpecification.Builder toBuilder()
toBuilder
in interface ToCopyableBuilder<InstanceNetworkInterfaceSpecification.Builder,InstanceNetworkInterfaceSpecification>
public static InstanceNetworkInterfaceSpecification.Builder builder()
public static Class<? extends InstanceNetworkInterfaceSpecification.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields
in interface SdkPojo
public final String toString()
Copyright © 2022. All rights reserved.