Class CfnNetworkInterfaceAttachmentProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnNetworkInterfaceAttachmentProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnNetworkInterfaceAttachmentProps>
- Enclosing interface:
CfnNetworkInterfaceAttachmentProps
@Stability(Stable)
public static final class CfnNetworkInterfaceAttachmentProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnNetworkInterfaceAttachmentProps>
A builder for
CfnNetworkInterfaceAttachmentProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.deleteOnTermination
(Boolean deleteOnTermination) Sets the value ofCfnNetworkInterfaceAttachmentProps.getDeleteOnTermination()
deleteOnTermination
(IResolvable deleteOnTermination) Sets the value ofCfnNetworkInterfaceAttachmentProps.getDeleteOnTermination()
deviceIndex
(String deviceIndex) Sets the value ofCfnNetworkInterfaceAttachmentProps.getDeviceIndex()
instanceId
(String instanceId) Sets the value ofCfnNetworkInterfaceAttachmentProps.getInstanceId()
networkInterfaceId
(String networkInterfaceId) Sets the value ofCfnNetworkInterfaceAttachmentProps.getNetworkInterfaceId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
deviceIndex
@Stability(Stable) public CfnNetworkInterfaceAttachmentProps.Builder deviceIndex(String deviceIndex) Sets the value ofCfnNetworkInterfaceAttachmentProps.getDeviceIndex()
- Parameters:
deviceIndex
- The network interface's position in the attachment order. This parameter is required. For example, the first attached network interface has aDeviceIndex
of 0.- Returns:
this
-
instanceId
Sets the value ofCfnNetworkInterfaceAttachmentProps.getInstanceId()
- Parameters:
instanceId
- The ID of the instance to which you will attach the ENI. This parameter is required.- Returns:
this
-
networkInterfaceId
@Stability(Stable) public CfnNetworkInterfaceAttachmentProps.Builder networkInterfaceId(String networkInterfaceId) Sets the value ofCfnNetworkInterfaceAttachmentProps.getNetworkInterfaceId()
- Parameters:
networkInterfaceId
- The ID of the ENI that you want to attach. This parameter is required.- Returns:
this
-
deleteOnTermination
@Stability(Stable) public CfnNetworkInterfaceAttachmentProps.Builder deleteOnTermination(Boolean deleteOnTermination) Sets the value ofCfnNetworkInterfaceAttachmentProps.getDeleteOnTermination()
- Parameters:
deleteOnTermination
- Whether to delete the network interface when the instance terminates. By default, this value is set totrue
.- Returns:
this
-
deleteOnTermination
@Stability(Stable) public CfnNetworkInterfaceAttachmentProps.Builder deleteOnTermination(IResolvable deleteOnTermination) Sets the value ofCfnNetworkInterfaceAttachmentProps.getDeleteOnTermination()
- Parameters:
deleteOnTermination
- Whether to delete the network interface when the instance terminates. By default, this value is set totrue
.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnNetworkInterfaceAttachmentProps>
- Returns:
- a new instance of
CfnNetworkInterfaceAttachmentProps
- Throws:
NullPointerException
- if any required attribute was not provided
-