Interface InstanceNetworkInterfaceSpecification.Builder

All Superinterfaces:
Buildable, CopyableBuilder<InstanceNetworkInterfaceSpecification.Builder,InstanceNetworkInterfaceSpecification>, SdkBuilder<InstanceNetworkInterfaceSpecification.Builder,InstanceNetworkInterfaceSpecification>, SdkPojo
Enclosing class:
InstanceNetworkInterfaceSpecification

public static interface InstanceNetworkInterfaceSpecification.Builder extends SdkPojo, CopyableBuilder<InstanceNetworkInterfaceSpecification.Builder,InstanceNetworkInterfaceSpecification>
  • Method Details

    • associatePublicIpAddress

      InstanceNetworkInterfaceSpecification.Builder associatePublicIpAddress(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.

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.
    • deleteOnTermination

      InstanceNetworkInterfaceSpecification.Builder deleteOnTermination(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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • 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.
    • 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.

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.
    • 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.
    • 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.
    • ipv6AddressCount

      InstanceNetworkInterfaceSpecification.Builder ipv6AddressCount(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.

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.
    • 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • 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.

      This is a convenience method that creates an instance of the InstanceIpv6Address.Builder avoiding the need to create one manually via InstanceIpv6Address.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to ipv6Addresses(List<InstanceIpv6Address>).

      Parameters:
      ipv6Addresses - a consumer that will call methods on InstanceIpv6Address.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • networkInterfaceId

      InstanceNetworkInterfaceSpecification.Builder networkInterfaceId(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.

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.
    • privateIpAddress

      InstanceNetworkInterfaceSpecification.Builder privateIpAddress(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.

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.
    • 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • 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.

      This is a convenience method that creates an instance of the PrivateIpAddressSpecification.Builder avoiding the need to create one manually via PrivateIpAddressSpecification.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to privateIpAddresses(List<PrivateIpAddressSpecification>).

      Parameters:
      privateIpAddresses - a consumer that will call methods on PrivateIpAddressSpecification.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • secondaryPrivateIpAddressCount

      InstanceNetworkInterfaceSpecification.Builder secondaryPrivateIpAddressCount(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.

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.
    • subnetId

      The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.

      Parameters:
      subnetId - The ID of the subnet associated with 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.
    • associateCarrierIpAddress

      InstanceNetworkInterfaceSpecification.Builder associateCarrierIpAddress(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.

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.
    • interfaceType

      The type of network interface.

      Valid values: interface | efa

      Parameters:
      interfaceType - The type of network interface.

      Valid values: interface | efa

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • networkCardIndex

      InstanceNetworkInterfaceSpecification.Builder networkCardIndex(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.

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.
    • ipv4Prefixes

      The IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

      Parameters:
      ipv4Prefixes - The IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • ipv4Prefixes

      The IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

      Parameters:
      ipv4Prefixes - The IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • ipv4Prefixes

      The IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

      This is a convenience method that creates an instance of the Ipv4PrefixSpecificationRequest.Builder avoiding the need to create one manually via Ipv4PrefixSpecificationRequest.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to ipv4Prefixes(List<Ipv4PrefixSpecificationRequest>).

      Parameters:
      ipv4Prefixes - a consumer that will call methods on Ipv4PrefixSpecificationRequest.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • ipv4PrefixCount

      InstanceNetworkInterfaceSpecification.Builder ipv4PrefixCount(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.

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.
    • ipv6Prefixes

      The IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

      Parameters:
      ipv6Prefixes - The IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • ipv6Prefixes

      The IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

      Parameters:
      ipv6Prefixes - The IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • ipv6Prefixes

      The IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

      This is a convenience method that creates an instance of the Ipv6PrefixSpecificationRequest.Builder avoiding the need to create one manually via Ipv6PrefixSpecificationRequest.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to ipv6Prefixes(List<Ipv6PrefixSpecificationRequest>).

      Parameters:
      ipv6Prefixes - a consumer that will call methods on Ipv6PrefixSpecificationRequest.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • ipv6PrefixCount

      InstanceNetworkInterfaceSpecification.Builder ipv6PrefixCount(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.

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.
    • 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.

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.
    • enaSrdSpecification

      Specifies the ENA Express settings for the network interface that's attached to the instance.

      Parameters:
      enaSrdSpecification - Specifies the ENA Express settings for the network interface that's attached to the instance.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • enaSrdSpecification

      Specifies the ENA Express settings for the network interface that's attached to the instance.

      This is a convenience method that creates an instance of the EnaSrdSpecificationRequest.Builder avoiding the need to create one manually via EnaSrdSpecificationRequest.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to enaSrdSpecification(EnaSrdSpecificationRequest).

      Parameters:
      enaSrdSpecification - a consumer that will call methods on EnaSrdSpecificationRequest.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • connectionTrackingSpecification

      InstanceNetworkInterfaceSpecification.Builder connectionTrackingSpecification(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 Elastic Compute Cloud User Guide.

      Parameters:
      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 Elastic Compute Cloud User Guide.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • connectionTrackingSpecification

      default InstanceNetworkInterfaceSpecification.Builder connectionTrackingSpecification(Consumer<ConnectionTrackingSpecificationRequest.Builder> 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 Elastic Compute Cloud User Guide.

      This is a convenience method that creates an instance of the ConnectionTrackingSpecificationRequest.Builder avoiding the need to create one manually via ConnectionTrackingSpecificationRequest.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to connectionTrackingSpecification(ConnectionTrackingSpecificationRequest).

      Parameters:
      connectionTrackingSpecification - a consumer that will call methods on ConnectionTrackingSpecificationRequest.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: