Class KeyProperties
java.lang.Object
com.azure.security.keyvault.keys.models.KeyProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic KeyPropertiesfromJson(com.azure.json.JsonReader jsonReader) Reads a JSON stream into aKeyProperties.Get thetime at which key was createdin UTC.Get thekey expiration timein UTC.Get the underlying HSM Platform the key was generated with.getId()Get the key identifier.Get the key attestation information.getName()Get the key name.Get thekey's notBefore timein 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 updatedin 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 timein UTC.setExportable(Boolean exportable) Set a flag that indicates if the private key can be exported.setNotBefore(OffsetDateTime notBefore) Set thekey's notBefore timein UTC.setReleasePolicy(KeyReleasePolicy releasePolicy) Set the policy rules under which the key can be exported.Set the tags to be associated with the key.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
KeyProperties
public KeyProperties()Creates a new instance ofKeyProperties.
-
-
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
KeyPropertiesobject.
-
getRecoveryLevel
-
getName
-
isEnabled
-
setEnabled
Set a value that indicates if the key is enabled.- Parameters:
enabled- The enabled value to set.- Returns:
- The updated
KeyPropertiesobject.
-
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
KeyPropertiesobject.
-
getNotBefore
Get thekey's notBefore timein UTC.- Returns:
- The
key's notBefore timein UTC.
-
setNotBefore
Set thekey's notBefore timein UTC.- Parameters:
notBefore- Thekey's notBefore timein UTC.- Returns:
- The updated
KeyPropertiesobject.
-
getExpiresOn
Get thekey expiration timein UTC.- Returns:
- The
key expiration timein UTC.
-
setExpiresOn
Set thekey expiration timein UTC.- Parameters:
expiresOn- Thekey expiration timein UTC.- Returns:
- The updated
KeyPropertiesobject.
-
getCreatedOn
Get thetime at which key was createdin UTC.- Returns:
- The
time at which key was createdin UTC.
-
getUpdatedOn
Get thetime at which key was last updatedin UTC.- Returns:
- The
time at which key was last updatedin UTC.
-
getId
-
getTags
-
setTags
Set the tags to be associated with the key.- Parameters:
tags- The tags to set.- Returns:
- The updated
KeyPropertiesobject.
-
isManaged
-
getVersion
-
getHsmPlatform
Get the underlying HSM Platform the key was generated with.- Returns:
- The key's underlying HSM Platform.
-
getKeyAttestation
Get the key attestation information.- Returns:
- The key attestation information.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<KeyProperties>- Throws:
IOException
-
fromJson
Reads a JSON stream into aKeyProperties.- Parameters:
jsonReader- TheJsonReaderbeing read.- Returns:
- An instance of
KeyPropertiesthat the JSON stream represented, may return null. - Throws:
IOException- If aKeyPropertiesfails to be read from thejsonReader.
-