Class DataKeyOptions

  • public class DataKeyOptions
    extends Object
    The options for creating a data key.
    • Constructor Detail

      • DataKeyOptions

        public DataKeyOptions()
    • Method Detail

      • keyAltNames

        public DataKeyOptions keyAltNames​(List<String> keyAltNames)
        Set the alternate key names.
        keyAltNames - a list of alternate key names
        See Also:
      • getKeyAltNames

        public List<String> getKeyAltNames()
        Gets the alternate key names.

        An optional list of alternate names used to reference a key. If a key is created with alternate names, then encryption may refer to the key by the unique alternate name instead of by _id.

        the list of alternate key names
      • getMasterKey

        public BsonDocument getMasterKey()
        Gets the master key document

        The masterKey identifies a KMS-specific key used to encrypt the new data key. If the kmsProvider is "aws" it is required and must have the following fields:

        • region: a String containing the AWS region in which to locate the master key
        • key: a String containing the Amazon Resource Name (ARN) to the AWS customer master key

        If the kmsProvider is "local" the masterKey is not applicable.

        the master key document