EC2 / Client / delete_network_interface

delete_network_interface#

EC2.Client.delete_network_interface(**kwargs)#

Deletes the specified network interface. You must detach the network interface before you can delete it.

See also: AWS API Documentation

Request Syntax

response = client.delete_network_interface(
    DryRun=True|False,
    NetworkInterfaceId='string'
)
Parameters:
  • DryRun (boolean) – 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 DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • NetworkInterfaceId (string) –

    [REQUIRED]

    The ID of the network interface.

Returns:

None

Examples

This example deletes the specified network interface.

response = client.delete_network_interface(
    NetworkInterfaceId='eni-e5aa89a3',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}