Class ImportKeyOptions
java.lang.Object
com.azure.security.keyvault.keys.models.KeyProperties
com.azure.security.keyvault.keys.models.ImportKeyOptions
- All Implemented Interfaces:
com.azure.json.JsonSerializable<KeyProperties>
Represents the configurable options to import a key.
-
Constructor Summary
ConstructorsConstructorDescriptionImportKeyOptions(String name, JsonWebKey key) Creates instance ofImportKeyOptions. -
Method Summary
Modifier and TypeMethodDescriptiongetKey()Get the key material of the key being imported.Get the HSM value of the key being imported.setEnabled(Boolean enabled) Set a value that indicates if the key is enabled.setExpiresOn(OffsetDateTime expiresOn) Set thekey expiration timein UTC.setHardwareProtected(Boolean hardwareProtected) Set whether the key being imported is of HSM type or not.setNotBefore(OffsetDateTime notBefore) Set thekey's notBefore timein UTC.Methods inherited from class KeyProperties
fromJson, getCreatedOn, getExpiresOn, getHsmPlatform, getId, getKeyAttestation, getName, getNotBefore, getRecoverableDays, getRecoveryLevel, getReleasePolicy, getTags, getUpdatedOn, getVersion, isEnabled, isExportable, isManaged, setExportable, setReleasePolicy, setTags, toJsonMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ImportKeyOptions
Creates instance ofImportKeyOptions.- Parameters:
name- The name of the key.key- The key material to import.
-
-
Method Details
-
setHardwareProtected
Set whether the key being imported is of HSM type or not.- Parameters:
hardwareProtected- The HSM value to set.- Returns:
- The
ImportKeyOptionsobject itself.
-
isHardwareProtected
Get the HSM value of the key being imported.- Returns:
- The HSM value.
-
setEnabled
Set a value that indicates if the key is enabled.- Overrides:
setEnabledin classKeyProperties- Parameters:
enabled- The enabled value to set.- Returns:
- The updated
ImportKeyOptionsobject.
-
getKey
Get the key material of the key being imported.- Returns:
- The key material.
-
setExpiresOn
Set thekey expiration timein UTC.- Overrides:
setExpiresOnin classKeyProperties- Parameters:
expiresOn- Thekey expiration timein UTC.- Returns:
- The updated
ImportKeyOptionsobject.
-
setNotBefore
Set thekey's notBefore timein UTC.- Overrides:
setNotBeforein classKeyProperties- Parameters:
notBefore- Thekey's notBefore timein UTC.- Returns:
- The updated
ImportKeyOptionsobject.
-