Class ImportKeyOptions
- java.lang.Object
-
- com.azure.security.keyvault.keys.models.KeyProperties
-
- com.azure.security.keyvault.keys.models.ImportKeyOptions
-
public class ImportKeyOptions extends KeyProperties
Represents the configurable options to import a key.
-
-
Constructor Summary
Constructors Constructor Description ImportKeyOptions(String name, JsonWebKey key)
Creates instance ofImportKeyOptions
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonWebKey
getKey()
Get the key material of the key being imported.Boolean
isHardwareProtected()
Get the HSM value of the key being imported.ImportKeyOptions
setEnabled(Boolean enabled)
Set a value that indicates if the key is enabled.ImportKeyOptions
setExpiresOn(OffsetDateTime expiresOn)
Set thekey expiration time
in UTC.ImportKeyOptions
setHardwareProtected(Boolean hardwareProtected)
Set whether the key being imported is of HSM type or not.ImportKeyOptions
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 Detail
-
ImportKeyOptions
public ImportKeyOptions(String name, JsonWebKey key)
Creates instance ofImportKeyOptions
.- Parameters:
name
- The name of the key.key
- The key material to import.
-
-
Method Detail
-
setHardwareProtected
public ImportKeyOptions setHardwareProtected(Boolean hardwareProtected)
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
public Boolean isHardwareProtected()
Get the HSM value of the key being imported.- Returns:
- The HSM value.
-
setEnabled
public ImportKeyOptions setEnabled(Boolean enabled)
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
public JsonWebKey getKey()
Get the key material of the key being imported.- Returns:
- The key material.
-
setExpiresOn
public ImportKeyOptions setExpiresOn(OffsetDateTime expiresOn)
Set thekey expiration time
in UTC.- Overrides:
setExpiresOn
in classKeyProperties
- Parameters:
expiresOn
- Thekey expiration time
in UTC.- Returns:
- The updated
ImportKeyOptions
object.
-
setNotBefore
public ImportKeyOptions setNotBefore(OffsetDateTime notBefore)
Set thekey's notBefore time
in UTC.- Overrides:
setNotBefore
in classKeyProperties
- Parameters:
notBefore
- Thekey's notBefore time
in UTC.- Returns:
- The updated
ImportKeyOptions
object.
-
-