Class CreateEncryptedCollectionParams

java.lang.Object
com.mongodb.client.model.CreateEncryptedCollectionParams

public final class CreateEncryptedCollectionParams extends Object
Auxiliary parameters for creating an encrypted collection.
Since:
4.9
  • Constructor Details

    • CreateEncryptedCollectionParams

      public CreateEncryptedCollectionParams(String kmsProvider)
      Parameters:
      kmsProvider - The name of the KMS provider.
  • Method Details

    • getKmsProvider

      public String getKmsProvider()
      The name of the KMS provider.
      Returns:
      The name of the KMS provider.
    • masterKey

      public CreateEncryptedCollectionParams masterKey(@Nullable org.bson.BsonDocument masterKey)
      Sets the master key for creating a data key.
      Parameters:
      masterKey - The master key for creating a data key.
      Returns:
      this.
    • getMasterKey

      @Nullable public org.bson.BsonDocument getMasterKey()
      The master key for creating a data key. The default is null.
      Returns:
      The master key for creating a data key.
    • toString

      public String toString()
      Overrides:
      toString in class Object