Class ImportKeyOptions
java.lang.Object
com.azure.security.keyvault.keys.models.KeyProperties
com.azure.security.keyvault.keys.models.ImportKeyOptions
Represents the configurable options to import a key.
-
Constructor Summary
ConstructorDescriptionImportKeyOptions
(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 time
in UTC.setHardwareProtected
(Boolean hardwareProtected) Set whether the key being imported is of HSM type or not.setNotBefore
(OffsetDateTime notBefore) Set thekey's notBefore time
in UTC.Methods inherited from class com.azure.security.keyvault.keys.models.KeyProperties
getCreatedOn, getExpiresOn, getId, getName, getNotBefore, getRecoverableDays, getRecoveryLevel, getReleasePolicy, getTags, getUpdatedOn, getVersion, isEnabled, isExportable, isManaged, setExportable, setReleasePolicy, setTags
-
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
ImportKeyOptions
object 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:
setEnabled
in classKeyProperties
- Parameters:
enabled
- The enabled value to set.- Returns:
- The updated
ImportKeyOptions
object.
-
getKey
Get the key material of the key being imported.- Returns:
- The key material.
-
setExpiresOn
Set thekey expiration time
in UTC.- Overrides:
setExpiresOn
in classKeyProperties
- Parameters:
expiresOn
- Thekey expiration time
in UTC.- Returns:
- The updated
ImportKeyOptions
object.
-
setNotBefore
Set thekey's notBefore time
in UTC.- Overrides:
setNotBefore
in classKeyProperties
- Parameters:
notBefore
- Thekey's notBefore time
in UTC.- Returns:
- The updated
ImportKeyOptions
object.
-