AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the DetachNetworkInterface operation. Detaches a network interface from an instance.
Namespace: Amazon.EC2.Model
Assembly: AWSSDK.EC2.dll
Version: 3.x.y.z
public class DetachNetworkInterfaceRequest : AmazonEC2Request IAmazonWebServiceRequest
The DetachNetworkInterfaceRequest type exposes the following members
Name | Description | |
---|---|---|
DetachNetworkInterfaceRequest() |
Name | Type | Description | |
---|---|---|---|
AttachmentId | System.String |
Gets and sets the property AttachmentId. The ID of the attachment. |
|
Force | System.Boolean |
Gets and sets the property Force. Specifies whether to force a detachment.
|
This example detaches the specified network interface from its attached instance.
var client = new AmazonEC2Client(); var response = client.DetachNetworkInterface(new DetachNetworkInterfaceRequest { AttachmentId = "eni-attach-66c4350a" });
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5