Class CfnInstancePropsMixin.NetworkInterfaceProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.ec2.CfnInstancePropsMixin.NetworkInterfaceProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInstancePropsMixin.NetworkInterfaceProperty>
- Enclosing interface:
CfnInstancePropsMixin.NetworkInterfaceProperty
@Stability(Stable)
public static final class CfnInstancePropsMixin.NetworkInterfaceProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnInstancePropsMixin.NetworkInterfaceProperty>
A builder for
CfnInstancePropsMixin.NetworkInterfaceProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassociateCarrierIpAddress(Boolean associateCarrierIpAddress) associateCarrierIpAddress(IResolvable associateCarrierIpAddress) associatePublicIpAddress(Boolean associatePublicIpAddress) associatePublicIpAddress(IResolvable associatePublicIpAddress) build()Builds the configured instance.deleteOnTermination(Boolean deleteOnTermination) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getDeleteOnTermination()deleteOnTermination(IResolvable deleteOnTermination) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getDeleteOnTermination()description(String description) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getDescription()deviceIndex(String deviceIndex) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getDeviceIndex()enaSrdSpecification(CfnInstancePropsMixin.EnaSrdSpecificationProperty enaSrdSpecification) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getEnaSrdSpecification()enaSrdSpecification(IResolvable enaSrdSpecification) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getEnaSrdSpecification()Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getGroupSet()ipv6AddressCount(Number ipv6AddressCount) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getIpv6AddressCount()ipv6Addresses(List<? extends Object> ipv6Addresses) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getIpv6Addresses()ipv6Addresses(IResolvable ipv6Addresses) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getIpv6Addresses()networkInterfaceId(String networkInterfaceId) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getNetworkInterfaceId()networkInterfaceId(INetworkInterfaceRef networkInterfaceId) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getNetworkInterfaceId()privateIpAddress(String privateIpAddress) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getPrivateIpAddress()privateIpAddresses(List<? extends Object> privateIpAddresses) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getPrivateIpAddresses()privateIpAddresses(IResolvable privateIpAddresses) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getPrivateIpAddresses()secondaryPrivateIpAddressCount(Number secondaryPrivateIpAddressCount) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getSubnetId()subnetId(ISubnetRef subnetId) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getSubnetId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
associateCarrierIpAddress
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder associateCarrierIpAddress(Boolean associateCarrierIpAddress) - 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 AWS Wavelength Developer Guide .- Returns:
this
-
associateCarrierIpAddress
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder associateCarrierIpAddress(IResolvable associateCarrierIpAddress) - 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 AWS Wavelength Developer Guide .- Returns:
this
-
associatePublicIpAddress
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder associatePublicIpAddress(Boolean associatePublicIpAddress) - Parameters:
associatePublicIpAddress- Indicates whether to assign a public IPv4 address to an instance. Applies only if creating a network interface when launching an instance. The network interface must be the primary network interface. If launching into a default subnet, the default value istrue.AWS 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 VPC pricing page .
- Returns:
this
-
associatePublicIpAddress
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder associatePublicIpAddress(IResolvable associatePublicIpAddress) - Parameters:
associatePublicIpAddress- Indicates whether to assign a public IPv4 address to an instance. Applies only if creating a network interface when launching an instance. The network interface must be the primary network interface. If launching into a default subnet, the default value istrue.AWS 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 VPC pricing page .
- Returns:
this
-
deleteOnTermination
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder deleteOnTermination(Boolean deleteOnTermination) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getDeleteOnTermination()- Parameters:
deleteOnTermination- Indicates whether the network interface is deleted when the instance is terminated. Applies only if creating a network interface when launching an instance.- Returns:
this
-
deleteOnTermination
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder deleteOnTermination(IResolvable deleteOnTermination) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getDeleteOnTermination()- Parameters:
deleteOnTermination- Indicates whether the network interface is deleted when the instance is terminated. Applies only if creating a network interface when launching an instance.- Returns:
this
-
description
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder description(String description) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getDescription()- Parameters:
description- The description of the network interface. Applies only if creating a network interface when launching an instance.- Returns:
this
-
deviceIndex
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder deviceIndex(String deviceIndex) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getDeviceIndex()- Parameters:
deviceIndex- The position of the network interface in the attachment order. A primary network interface has a device index of 0.If you create a network interface when launching an instance, you must specify the device index.
- Returns:
this
-
enaSrdSpecification
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder enaSrdSpecification(IResolvable enaSrdSpecification) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getEnaSrdSpecification()- Parameters:
enaSrdSpecification- Configures ENA Express for UDP network traffic.- Returns:
this
-
enaSrdSpecification
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder enaSrdSpecification(CfnInstancePropsMixin.EnaSrdSpecificationProperty enaSrdSpecification) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getEnaSrdSpecification()- Parameters:
enaSrdSpecification- Configures ENA Express for UDP network traffic.- Returns:
this
-
groupSet
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder groupSet(List<? extends Object> groupSet) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getGroupSet()- Parameters:
groupSet- The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.- Returns:
this
-
ipv6AddressCount
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder ipv6AddressCount(Number ipv6AddressCount) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getIpv6AddressCount()- 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:
this
-
ipv6Addresses
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder ipv6Addresses(IResolvable ipv6Addresses) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getIpv6Addresses()- 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:
this
-
ipv6Addresses
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder ipv6Addresses(List<? extends Object> ipv6Addresses) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getIpv6Addresses()- 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:
this
-
networkInterfaceId
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder networkInterfaceId(String networkInterfaceId) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getNetworkInterfaceId()- Parameters:
networkInterfaceId- The ID of the network interface, when attaching an existing network interface.- Returns:
this
-
networkInterfaceId
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder networkInterfaceId(INetworkInterfaceRef networkInterfaceId) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getNetworkInterfaceId()- Parameters:
networkInterfaceId- The ID of the network interface, when attaching an existing network interface.- Returns:
this
-
privateIpAddress
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder privateIpAddress(String privateIpAddress) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getPrivateIpAddress()- Parameters:
privateIpAddress- The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance.- Returns:
this
-
privateIpAddresses
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder privateIpAddresses(IResolvable privateIpAddresses) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getPrivateIpAddresses()- Parameters:
privateIpAddresses- One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary.- Returns:
this
-
privateIpAddresses
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder privateIpAddresses(List<? extends Object> privateIpAddresses) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getPrivateIpAddresses()- Parameters:
privateIpAddresses- One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary.- Returns:
this
-
secondaryPrivateIpAddressCount
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder secondaryPrivateIpAddressCount(Number secondaryPrivateIpAddressCount) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getSecondaryPrivateIpAddressCount()- 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.- Returns:
this
-
subnetId
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder subnetId(String subnetId) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getSubnetId()- Parameters:
subnetId- The ID of the subnet associated with the network interface.- Returns:
this
-
subnetId
@Stability(Stable) public CfnInstancePropsMixin.NetworkInterfaceProperty.Builder subnetId(ISubnetRef subnetId) Sets the value ofCfnInstancePropsMixin.NetworkInterfaceProperty.getSubnetId()- Parameters:
subnetId- The ID of the subnet associated with the network interface.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnInstancePropsMixin.NetworkInterfaceProperty>- Returns:
- a new instance of
CfnInstancePropsMixin.NetworkInterfaceProperty - Throws:
NullPointerException- if any required attribute was not provided
-