Method GetKeyByAlternateKeyNameAsync
- Namespace
- MongoDB.Driver.Encryption
- Assembly
- MongoDB.Driver.dll
GetKeyByAlternateKeyNameAsync(string, CancellationToken)
Finds a single key document with the given UUID (BSON binary subtype 0x04).
public Task<BsonDocument> GetKeyByAlternateKeyNameAsync(string alternateKeyName, CancellationToken cancellationToken = default)
Parameters
alternateKeyName
stringThe alternate key name.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<BsonDocument>
Returns a key document in the key vault collection with the given alternateKeyName.