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