Method DeleteKeyAsync
- Namespace
 - MongoDB.Driver.Encryption
 
- Assembly
 - MongoDB.Driver.Encryption.dll
 
DeleteKeyAsync(Guid, CancellationToken)
Removes the key document with the given UUID (BSON binary subtype 0x04) from the key vault collection.
public Task<DeleteResult> DeleteKeyAsync(Guid id, CancellationToken cancellationToken = default)
Parameters
idGuidThe id.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<DeleteResult>
 Returns the result of the internal deleteOne() operation on the key vault collection.