Class CfnLaunchTemplate.NetworkInterfaceProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnLaunchTemplate.NetworkInterfaceProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLaunchTemplate.NetworkInterfaceProperty>
- Enclosing interface:
CfnLaunchTemplate.NetworkInterfaceProperty
@Stability(Stable)
public static final class CfnLaunchTemplate.NetworkInterfaceProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLaunchTemplate.NetworkInterfaceProperty>
A builder for
CfnLaunchTemplate.NetworkInterfaceProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionassociateCarrierIpAddress
(Boolean associateCarrierIpAddress) associateCarrierIpAddress
(IResolvable associateCarrierIpAddress) associatePublicIpAddress
(Boolean associatePublicIpAddress) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getAssociatePublicIpAddress()
associatePublicIpAddress
(IResolvable associatePublicIpAddress) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getAssociatePublicIpAddress()
build()
Builds the configured instance.deleteOnTermination
(Boolean deleteOnTermination) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getDeleteOnTermination()
deleteOnTermination
(IResolvable deleteOnTermination) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getDeleteOnTermination()
description
(String description) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getDescription()
deviceIndex
(Number deviceIndex) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getDeviceIndex()
Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getGroups()
interfaceType
(String interfaceType) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getInterfaceType()
ipv4PrefixCount
(Number ipv4PrefixCount) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getIpv4PrefixCount()
ipv4Prefixes
(List<? extends Object> ipv4Prefixes) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getIpv4Prefixes()
ipv4Prefixes
(IResolvable ipv4Prefixes) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getIpv4Prefixes()
ipv6AddressCount
(Number ipv6AddressCount) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getIpv6AddressCount()
ipv6Addresses
(List<? extends Object> ipv6Addresses) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getIpv6Addresses()
ipv6Addresses
(IResolvable ipv6Addresses) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getIpv6Addresses()
ipv6PrefixCount
(Number ipv6PrefixCount) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getIpv6PrefixCount()
ipv6Prefixes
(List<? extends Object> ipv6Prefixes) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getIpv6Prefixes()
ipv6Prefixes
(IResolvable ipv6Prefixes) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getIpv6Prefixes()
networkCardIndex
(Number networkCardIndex) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getNetworkCardIndex()
networkInterfaceId
(String networkInterfaceId) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getNetworkInterfaceId()
privateIpAddress
(String privateIpAddress) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getPrivateIpAddress()
privateIpAddresses
(List<? extends Object> privateIpAddresses) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getPrivateIpAddresses()
privateIpAddresses
(IResolvable privateIpAddresses) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getPrivateIpAddresses()
secondaryPrivateIpAddressCount
(Number secondaryPrivateIpAddressCount) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getSubnetId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
associateCarrierIpAddress
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder associateCarrierIpAddress(Boolean associateCarrierIpAddress) - Parameters:
associateCarrierIpAddress
- Indicates whether to associate a Carrier IP address with eth0 for a new network interface. Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see Carrier IP addresses in the AWS Wavelength Developer Guide .- Returns:
this
-
associateCarrierIpAddress
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder associateCarrierIpAddress(IResolvable associateCarrierIpAddress) - Parameters:
associateCarrierIpAddress
- Indicates whether to associate a Carrier IP address with eth0 for a new network interface. Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see Carrier IP addresses in the AWS Wavelength Developer Guide .- Returns:
this
-
associatePublicIpAddress
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder associatePublicIpAddress(Boolean associatePublicIpAddress) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getAssociatePublicIpAddress()
- Parameters:
associatePublicIpAddress
- Associates a public IPv4 address with eth0 for a new network interface.- Returns:
this
-
associatePublicIpAddress
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder associatePublicIpAddress(IResolvable associatePublicIpAddress) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getAssociatePublicIpAddress()
- Parameters:
associatePublicIpAddress
- Associates a public IPv4 address with eth0 for a new network interface.- Returns:
this
-
deleteOnTermination
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder deleteOnTermination(Boolean deleteOnTermination) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getDeleteOnTermination()
- Parameters:
deleteOnTermination
- Indicates whether the network interface is deleted when the instance is terminated.- Returns:
this
-
deleteOnTermination
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder deleteOnTermination(IResolvable deleteOnTermination) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getDeleteOnTermination()
- Parameters:
deleteOnTermination
- Indicates whether the network interface is deleted when the instance is terminated.- Returns:
this
-
description
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder description(String description) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getDescription()
- Parameters:
description
- A description for the network interface.- Returns:
this
-
deviceIndex
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder deviceIndex(Number deviceIndex) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getDeviceIndex()
- Parameters:
deviceIndex
- The device index for the network interface attachment.- Returns:
this
-
groups
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder groups(List<String> groups) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getGroups()
- Parameters:
groups
- The IDs of one or more security groups.- Returns:
this
-
interfaceType
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder interfaceType(String interfaceType) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getInterfaceType()
- Parameters:
interfaceType
- The type of network interface. To create an Elastic Fabric Adapter (EFA), specifyefa
. For more information, see Elastic Fabric Adapter in the Amazon Elastic Compute Cloud User Guide .If you are not creating an EFA, specify
interface
or omit this parameter.Valid values:
interface
|efa
- Returns:
this
-
ipv4PrefixCount
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder ipv4PrefixCount(Number ipv4PrefixCount) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getIpv4PrefixCount()
- Parameters:
ipv4PrefixCount
- The number of IPv4 prefixes to be automatically assigned to the network interface. You cannot use this option if you use theIpv4Prefix
option.- Returns:
this
-
ipv4Prefixes
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder ipv4Prefixes(IResolvable ipv4Prefixes) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getIpv4Prefixes()
- Parameters:
ipv4Prefixes
- One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use theIpv4PrefixCount
option.- Returns:
this
-
ipv4Prefixes
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder ipv4Prefixes(List<? extends Object> ipv4Prefixes) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getIpv4Prefixes()
- Parameters:
ipv4Prefixes
- One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use theIpv4PrefixCount
option.- Returns:
this
-
ipv6AddressCount
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder ipv6AddressCount(Number ipv6AddressCount) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getIpv6AddressCount()
- Parameters:
ipv6AddressCount
- The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.- Returns:
this
-
ipv6Addresses
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder ipv6Addresses(IResolvable ipv6Addresses) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getIpv6Addresses()
- Parameters:
ipv6Addresses
- One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.- Returns:
this
-
ipv6Addresses
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder ipv6Addresses(List<? extends Object> ipv6Addresses) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getIpv6Addresses()
- Parameters:
ipv6Addresses
- One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.- Returns:
this
-
ipv6PrefixCount
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder ipv6PrefixCount(Number ipv6PrefixCount) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getIpv6PrefixCount()
- Parameters:
ipv6PrefixCount
- The number of IPv6 prefixes to be automatically assigned to the network interface. You cannot use this option if you use theIpv6Prefix
option.- Returns:
this
-
ipv6Prefixes
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder ipv6Prefixes(IResolvable ipv6Prefixes) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getIpv6Prefixes()
- Parameters:
ipv6Prefixes
- One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use theIpv6PrefixCount
option.- Returns:
this
-
ipv6Prefixes
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder ipv6Prefixes(List<? extends Object> ipv6Prefixes) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getIpv6Prefixes()
- Parameters:
ipv6Prefixes
- One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use theIpv6PrefixCount
option.- Returns:
this
-
networkCardIndex
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder networkCardIndex(Number networkCardIndex) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getNetworkCardIndex()
- 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.- Returns:
this
-
networkInterfaceId
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder networkInterfaceId(String networkInterfaceId) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getNetworkInterfaceId()
- Parameters:
networkInterfaceId
- The ID of the network interface.- Returns:
this
-
privateIpAddress
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder privateIpAddress(String privateIpAddress) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getPrivateIpAddress()
- Parameters:
privateIpAddress
- The primary private IPv4 address of the network interface.- Returns:
this
-
privateIpAddresses
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder privateIpAddresses(IResolvable privateIpAddresses) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getPrivateIpAddresses()
- Parameters:
privateIpAddresses
- One or more private IPv4 addresses.- Returns:
this
-
privateIpAddresses
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder privateIpAddresses(List<? extends Object> privateIpAddresses) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getPrivateIpAddresses()
- Parameters:
privateIpAddresses
- One or more private IPv4 addresses.- Returns:
this
-
secondaryPrivateIpAddressCount
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder secondaryPrivateIpAddressCount(Number secondaryPrivateIpAddressCount) - Parameters:
secondaryPrivateIpAddressCount
- The number of secondary private IPv4 addresses to assign to a network interface.- Returns:
this
-
subnetId
@Stability(Stable) public CfnLaunchTemplate.NetworkInterfaceProperty.Builder subnetId(String subnetId) Sets the value ofCfnLaunchTemplate.NetworkInterfaceProperty.getSubnetId()
- Parameters:
subnetId
- The ID of the subnet for the network interface.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnLaunchTemplate.NetworkInterfaceProperty>
- Returns:
- a new instance of
CfnLaunchTemplate.NetworkInterfaceProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-