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 JsonWebKeygetKey()Get the key material of the key being imported.BooleanisHardwareProtected()Get the HSM value of the key being imported.ImportKeyOptionssetEnabled(Boolean enabled)Set a value that indicates if the key is enabled.ImportKeyOptionssetExpiresOn(OffsetDateTime expiresOn)Set thekey expiration timein UTC.ImportKeyOptionssetHardwareProtected(Boolean hardwareProtected)Set whether the key being imported is of HSM type or not.ImportKeyOptionssetNotBefore(OffsetDateTime notBefore)Set thekey's notBefore timein UTC.-
Methods inherited from class com.azure.security.keyvault.keys.models.KeyProperties
getCreatedOn, getExpiresOn, getId, getName, getNotBefore, getRecoverableDays, getRecoveryLevel, getTags, getUpdatedOn, getVersion, isEnabled, isManaged, 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
ImportKeyOptionsobject 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:
setEnabledin classKeyProperties- Parameters:
enabled- The enabled value to set.- Returns:
- The updated
ImportKeyOptionsobject.
-
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 timein UTC.- Overrides:
setExpiresOnin classKeyProperties- Parameters:
expiresOn- Thekey expiration timein UTC.- Returns:
- The updated
ImportKeyOptionsobject.
-
setNotBefore
public ImportKeyOptions setNotBefore(OffsetDateTime notBefore)
Set thekey's notBefore timein UTC.- Overrides:
setNotBeforein classKeyProperties- Parameters:
notBefore- Thekey's notBefore timein UTC.- Returns:
- The updated
ImportKeyOptionsobject.
-
-