KeyProperties Class
- java.
lang. Object - com.
azure. security. keyvault. keys. models. KeyProperties
- com.
Implements
public class KeyProperties
implements JsonSerializable<KeyProperties>
KeyProperties is the resource containing all the properties of the key except its JsonWebKey material. It is managed by the Key Service.
Constructor Summary
Constructor | Description |
---|---|
KeyProperties() |
Creates a new instance of KeyProperties. |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Key |
fromJson(JsonReader jsonReader)
Reads a JSON stream into a KeyProperties. |
Offset |
getCreatedOn()
Get the time at which key was created in UTC. |
Offset |
getExpiresOn()
Get the key expiration time in UTC. |
String |
getHsmPlatform()
Get the underlying HSM Platform the key was generated with. |
String |
getId()
Get the key identifier. |
String |
getName()
Get the key name. |
Offset |
getNotBefore()
Get the key'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. |
Key |
getReleasePolicy()
Get the policy rules under which the key can be exported. |
Map<String,String> |
getTags()
Get the tags associated with the key. |
Offset |
getUpdatedOn()
Get the time 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. |
Key |
setEnabled(Boolean enabled)
Set a value that indicates if the key is enabled. |
Key |
setExpiresOn(OffsetDateTime expiresOn)
Set the key expiration time in UTC. |
Key |
setExportable(Boolean exportable)
Set a flag that indicates if the private key can be exported. |
Key |
setNotBefore(OffsetDateTime notBefore)
Set the key's notBefore time in UTC. |
Key |
setReleasePolicy(KeyReleasePolicy releasePolicy)
Set the policy rules under which the key can be exported. |
Key |
setTags(Map<String,String> tags)
Set the tags to be associated with the key. |
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
KeyProperties
public KeyProperties()
Creates a new instance of KeyProperties.
Method Details
fromJson
public static KeyProperties fromJson(JsonReader jsonReader)
Reads a JSON stream into a KeyProperties.
Parameters:
Returns:
Throws:
getCreatedOn
public OffsetDateTime getCreatedOn()
Get the time at which key was created in UTC.
Returns:
getExpiresOn
public OffsetDateTime getExpiresOn()
Get the key expiration time in UTC.
Returns:
getHsmPlatform
public String getHsmPlatform()
Get the underlying HSM Platform the key was generated with.
Returns:
getId
public String getId()
Get the key identifier.
Returns:
getName
public String getName()
Get the key name.
Returns:
getNotBefore
public OffsetDateTime getNotBefore()
Get the key's notBefore time in UTC.
Returns:
getRecoverableDays
public Integer getRecoverableDays()
Gets the number of days a key is retained before being deleted for a soft delete-enabled Key Vault.
Returns:
getRecoveryLevel
public String getRecoveryLevel()
Get the key recovery level.
Returns:
getReleasePolicy
public KeyReleasePolicy getReleasePolicy()
Get the policy rules under which the key can be exported.
Returns:
getTags
public Map
Get the tags associated with the key.
Returns:
getUpdatedOn
public OffsetDateTime getUpdatedOn()
Get the time at which key was last updated in UTC.
Returns:
getVersion
public String getVersion()
Get the version of the key.
Returns:
isEnabled
public Boolean isEnabled()
Get the enabled value.
Returns:
isExportable
public Boolean isExportable()
Get a flag that indicates if the private key can be exported.
Returns:
isManaged
public Boolean isManaged()
Get the managed value.
Returns:
setEnabled
public KeyProperties setEnabled(Boolean enabled)
Set a value that indicates if the key is enabled.
Parameters:
Returns:
setExpiresOn
public KeyProperties setExpiresOn(OffsetDateTime expiresOn)
Set the key expiration time in UTC.
Parameters:
Returns:
setExportable
public KeyProperties setExportable(Boolean exportable)
Set a flag that indicates if the private key can be exported.
Parameters:
Returns:
setNotBefore
public KeyProperties setNotBefore(OffsetDateTime notBefore)
Set the key's notBefore time in UTC.
Parameters:
Returns:
setReleasePolicy
public KeyProperties setReleasePolicy(KeyReleasePolicy releasePolicy)
Set the policy rules under which the key can be exported.
Parameters:
Returns:
setTags
public KeyProperties setTags(Map
Set the tags to be associated with the key.
Parameters:
Returns:
toJson
Applies to
Azure SDK for Java