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. |
![]() |
DryRun | System.Nullable<System.Boolean> |
Gets and sets the property DryRun.
Checks whether you have the required permissions for the action, without actually
making the request, and provides an error response. If you have the required permissions,
the error response is |
![]() |
Force | System.Nullable<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.7.2 and newer