Class KeyProperties
- java.lang.Object
-
- com.azure.security.keyvault.keys.models.KeyProperties
-
- Direct Known Subclasses:
ImportKeyOptions
public class KeyProperties extends Object
KeyPropertiesis the resource containing all the properties of the key except itsJsonWebKeymaterial. 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 OffsetDateTimegetCreatedOn()Get thetime at which key was createdin UTC.OffsetDateTimegetExpiresOn()Get thekey expiration timein UTC.StringgetId()Get the key identifier.StringgetName()Get the key name.OffsetDateTimegetNotBefore()Get thekey's notBefore timein UTC.IntegergetRecoverableDays()Gets the number of days a key is retained before being deleted for a soft delete-enabled Key Vault.StringgetRecoveryLevel()Get the key recovery level.Map<String,String>getTags()Get the tags associated with the key.OffsetDateTimegetUpdatedOn()Get thetime at which key was last updatedin UTC.StringgetVersion()Get the version of the key.BooleanisEnabled()Get the enabled value.BooleanisManaged()Get the managed value.KeyPropertiessetEnabled(Boolean enabled)Set a value that indicates if the key is enabled.KeyPropertiessetExpiresOn(OffsetDateTime expiresOn)Set thekey expiration timein UTC.KeyPropertiessetNotBefore(OffsetDateTime notBefore)Set thekey's notBefore timein UTC.KeyPropertiessetTags(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.
-
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
KeyPropertiesobject.
-
getNotBefore
public OffsetDateTime getNotBefore()
Get thekey's notBefore timein UTC.- Returns:
- The
key's notBefore timein UTC.
-
setNotBefore
public KeyProperties setNotBefore(OffsetDateTime notBefore)
Set thekey's notBefore timein UTC.- Parameters:
notBefore- Thekey's notBefore timein UTC.- Returns:
- The updated
KeyPropertiesobject.
-
getExpiresOn
public OffsetDateTime getExpiresOn()
Get thekey expiration timein UTC.- Returns:
- The
key expiration timein UTC.
-
setExpiresOn
public KeyProperties setExpiresOn(OffsetDateTime expiresOn)
Set thekey expiration timein UTC.- Parameters:
expiresOn- Thekey expiration timein UTC.- Returns:
- The updated
KeyPropertiesobject.
-
getCreatedOn
public OffsetDateTime getCreatedOn()
Get thetime at which key was createdin UTC.- Returns:
- The
time at which key was createdin UTC.
-
getUpdatedOn
public OffsetDateTime getUpdatedOn()
Get thetime at which key was last updatedin UTC.- Returns:
- The
time at which key was last updatedin 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
KeyPropertiesobject.
-
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.
-
-