Class KeyProperties
java.lang.Object
com.azure.security.keyvault.keys.models.KeyProperties
- Direct Known Subclasses:
ImportKeyOptions
KeyProperties
is the resource containing all the properties of the key except its JsonWebKey
material. It is managed by the Key Service.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet thetime at which key was created
in UTC.Get thekey expiration time
in UTC.getId()
Get the key identifier.getName()
Get the key name.Get thekey's notBefore time
in UTC.Gets the number of days a key is retained before being deleted for a soft delete-enabled Key Vault.Get the key recovery level.Get the policy rules under which the key can be exported.getTags()
Get the tags associated with the key.Get thetime at which key was last updated
in UTC.Get the version of the key.Get the enabled value.Get a flag that indicates if the private key can be exported.Get the managed value.setEnabled
(Boolean enabled) Set a value that indicates if the key is enabled.setExpiresOn
(OffsetDateTime expiresOn) Set thekey expiration time
in UTC.setExportable
(Boolean exportable) Set a flag that indicates if the private key can be exported.setNotBefore
(OffsetDateTime notBefore) Set thekey's notBefore time
in UTC.setReleasePolicy
(KeyReleasePolicy releasePolicy) Set the policy rules under which the key can be exported.Set the tags to be associated with the key.
-
Constructor Details
-
KeyProperties
public KeyProperties()
-
-
Method Details
-
getRecoverableDays
Gets the number of days a key is retained before being deleted for a soft delete-enabled Key Vault.- Returns:
- The recoverable days.
-
getReleasePolicy
Get the policy rules under which the key can be exported.- Returns:
- The policy rules under which the key can be exported.
-
setReleasePolicy
Set the policy rules under which the key can be exported.- Parameters:
releasePolicy
- The policy rules to set.- Returns:
- The updated
KeyProperties
object.
-
getRecoveryLevel
Get the key recovery level.- Returns:
- The key recovery level.
-
getName
Get the key name.- Returns:
- The name of the key.
-
isEnabled
Get the enabled value.- Returns:
- The enabled value.
-
setEnabled
Set a value that indicates if the key is enabled.- Parameters:
enabled
- The enabled value to set.- Returns:
- The updated
KeyProperties
object.
-
isExportable
Get a flag that indicates if the private key can be exported.- Returns:
- A flag that indicates if the private key can be exported.
-
setExportable
Set a flag that indicates if the private key can be exported.- Parameters:
exportable
- A flag that indicates if the private key can be exported.- Returns:
- The updated
KeyProperties
object.
-
getNotBefore
Get thekey's notBefore time
in UTC.- Returns:
- The
key's notBefore time
in UTC.
-
setNotBefore
Set thekey's notBefore time
in UTC.- Parameters:
notBefore
- Thekey's notBefore time
in UTC.- Returns:
- The updated
KeyProperties
object.
-
getExpiresOn
Get thekey expiration time
in UTC.- Returns:
- The
key expiration time
in UTC.
-
setExpiresOn
Set thekey expiration time
in UTC.- Parameters:
expiresOn
- Thekey expiration time
in UTC.- Returns:
- The updated
KeyProperties
object.
-
getCreatedOn
Get thetime at which key was created
in UTC.- Returns:
- The
time at which key was created
in UTC.
-
getUpdatedOn
Get thetime at which key was last updated
in UTC.- Returns:
- The
time at which key was last updated
in UTC.
-
getId
Get the key identifier.- Returns:
- The key identifier.
-
getTags
Get the tags associated with the key.- Returns:
- The tag names and values.
-
setTags
Set the tags to be associated with the key.- Parameters:
tags
- The tags to set.- Returns:
- The updated
KeyProperties
object.
-
isManaged
Get the managed value.- Returns:
- The managed value.
-
getVersion
Get the version of the key.- Returns:
- The version of the key.
-