Class DataKeyOptions
- java.lang.Object
-
- io.vertx.mongo.client.model.vault.DataKeyOptions
-
public class DataKeyOptions extends java.lang.Object
The options for creating a data key.- Since:
- 3.11
-
-
Constructor Summary
Constructors Constructor Description DataKeyOptions()
DataKeyOptions(JsonObject json)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getKeyAltNames()
Gets the alternate key names.JsonObject
getMasterKey()
Gets the master key documentDataKeyOptions
setKeyAltNames(java.util.List<java.lang.String> keyAltNames)
Set the alternate key names.DataKeyOptions
setMasterKey(JsonObject masterKey)
Sets the master key document.JsonObject
toJson()
-
-
-
Constructor Detail
-
DataKeyOptions
public DataKeyOptions()
-
DataKeyOptions
public DataKeyOptions(JsonObject json)
-
-
Method Detail
-
toJson
public JsonObject toJson()
-
setKeyAltNames
public DataKeyOptions setKeyAltNames(java.util.List<java.lang.String> keyAltNames)
Set the alternate key names.- Parameters:
keyAltNames
- a list of alternate key names- Returns:
- this
- See Also:
getKeyAltNames()
-
getKeyAltNames
public java.util.List<java.lang.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.
- Returns:
- the list of alternate key names
-
setMasterKey
public DataKeyOptions setMasterKey(JsonObject masterKey)
Sets the master key document.- Parameters:
masterKey
- the master key document- Returns:
- this
- See Also:
getMasterKey()
-
getMasterKey
public JsonObject getMasterKey()
Gets the master key documentThe 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.
- Returns:
- the master key document
-
-