@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.272Z") @Stability(value=Stable) public class CfnNetworkInterfaceAttachment extends CfnResource implements IInspectable
Attaches an elastic network interface (ENI) to an Amazon EC2 instance. You can use this resource type to attach additional network interfaces to an instance without interruption.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
CfnNetworkInterfaceAttachment cfnNetworkInterfaceAttachment = CfnNetworkInterfaceAttachment.Builder.create(this, "MyCfnNetworkInterfaceAttachment")
.deviceIndex("deviceIndex")
.instanceId("instanceId")
.networkInterfaceId("networkInterfaceId")
// the properties below are optional
.deleteOnTermination(false)
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnNetworkInterfaceAttachment.Builder
A fluent builder for
CfnNetworkInterfaceAttachment. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnNetworkInterfaceAttachment(software.constructs.Construct scope,
String id,
CfnNetworkInterfaceAttachmentProps props)
Create a new `AWS::EC2::NetworkInterfaceAttachment`.
|
protected |
CfnNetworkInterfaceAttachment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnNetworkInterfaceAttachment(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Object> |
getCfnProperties() |
Object |
getDeleteOnTermination()
Whether to delete the network interface when the instance terminates.
|
String |
getDeviceIndex()
The network interface's position in the attachment order.
|
String |
getInstanceId()
The ID of the instance to which you will attach the ENI.
|
String |
getNetworkInterfaceId()
The ID of the ENI that you want to attach.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setDeleteOnTermination(Boolean value)
Whether to delete the network interface when the instance terminates.
|
void |
setDeleteOnTermination(IResolvable value)
Whether to delete the network interface when the instance terminates.
|
void |
setDeviceIndex(String value)
The network interface's position in the attachment order.
|
void |
setInstanceId(String value)
The ID of the instance to which you will attach the ENI.
|
void |
setNetworkInterfaceId(String value)
The ID of the ENI that you want to attach.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnNetworkInterfaceAttachment(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnNetworkInterfaceAttachment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnNetworkInterfaceAttachment(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnNetworkInterfaceAttachmentProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public String getDeviceIndex()
For example, the first attached network interface has a DeviceIndex of 0.
@Stability(value=Stable)
public void setDeviceIndex(@NotNull
String value)
For example, the first attached network interface has a DeviceIndex of 0.
@Stability(value=Stable) @NotNull public String getInstanceId()
@Stability(value=Stable)
public void setInstanceId(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getNetworkInterfaceId()
@Stability(value=Stable)
public void setNetworkInterfaceId(@NotNull
String value)
@Stability(value=Stable) @Nullable public Object getDeleteOnTermination()
By default, this value is set to true .
@Stability(value=Stable)
public void setDeleteOnTermination(@Nullable
Boolean value)
By default, this value is set to true .
@Stability(value=Stable)
public void setDeleteOnTermination(@Nullable
IResolvable value)
By default, this value is set to true .
Copyright © 2022. All rights reserved.