Method CreateEncryptedCollectionAsync
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Driver.Encryption.dll
CreateEncryptedCollectionAsync(IMongoDatabase, string, CreateCollectionOptions, string, DataKeyOptions, CancellationToken)
Create encrypted collection.
[Obsolete("Use the overload with masterKey instead.")]
public Task<CreateEncryptedCollectionResult> CreateEncryptedCollectionAsync(IMongoDatabase database, string collectionName, CreateCollectionOptions createCollectionOptions, string kmsProvider, DataKeyOptions dataKeyOptions, CancellationToken cancellationToken = default)Parameters
database IMongoDatabase
The database.
collectionName string
The collection name.
createCollectionOptions CreateCollectionOptions
The create collection options.
kmsProvider string
The kms provider.
dataKeyOptions DataKeyOptions
The datakey options.
cancellationToken CancellationToken
The cancellation token.
Returns
Task<CreateEncryptedCollectionResult>
The operation result.
CreateEncryptedCollectionAsync(IMongoDatabase, string, CreateCollectionOptions, string, BsonDocument, CancellationToken)
Create encrypted collection.
public Task<CreateEncryptedCollectionResult> CreateEncryptedCollectionAsync(IMongoDatabase database, string collectionName, CreateCollectionOptions createCollectionOptions, string kmsProvider, BsonDocument masterKey, CancellationToken cancellationToken = default)Parameters
database IMongoDatabase
The database.
collectionName string
The collection name.
createCollectionOptions CreateCollectionOptions
The create collection options.
kmsProvider string
The kms provider.
masterKey BsonDocument
The master key.
cancellationToken CancellationToken
The cancellation token.
Returns
Task<CreateEncryptedCollectionResult>
The operation result.