detach_network_interface
(**kwargs)¶Detaches a network interface from an instance.
See also: AWS API Documentation
Request Syntax
response = client.detach_network_interface(
AttachmentId='string',
DryRun=True|False,
Force=True|False
)
[REQUIRED]
The ID of the attachment.
DryRunOperation
. Otherwise, it is UnauthorizedOperation
.Specifies whether to force a detachment.
Note
Force
parameter only as a last resort to detach a network interface from a failed instance.Force
parameter to detach a network interface, you might not be able to attach a different network interface to the same index on the instance without first stopping and starting the instance.None
Examples
This example detaches the specified network interface from its attached instance.
response = client.detach_network_interface(
AttachmentId='eni-attach-66c4350a',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}