EC2 / Client / delete_network_interface_permission

delete_network_interface_permission#

EC2.Client.delete_network_interface_permission(**kwargs)#

Deletes a permission for a network interface. By default, you cannot delete the permission if the account for which you’re removing the permission has attached the network interface to an instance. However, you can force delete the permission, regardless of any attachment.

See also: AWS API Documentation

Request Syntax

response = client.delete_network_interface_permission(
    NetworkInterfacePermissionId='string',
    Force=True|False,
    DryRun=True|False
)
Parameters:
  • NetworkInterfacePermissionId (string) –

    [REQUIRED]

    The ID of the network interface permission.

  • Force (boolean) – Specify true to remove the permission even if the network interface is attached to an instance.

  • 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.

Return type:

dict

Returns:

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) –

    Contains the output for DeleteNetworkInterfacePermission.

    • Return (boolean) –

      Returns true if the request succeeds, otherwise returns an error.