Class SecretProperties
java.lang.Object
com.azure.security.keyvault.secrets.models.SecretProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SecretProperties>
public class SecretProperties
extends Object
implements com.azure.json.JsonSerializable<SecretProperties>
SecretProperties is the resource containing all the properties of the secret except its value.
It is managed by the Secret Service.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SecretPropertiesfromJson(com.azure.json.JsonReader jsonReader) Reads a JSON stream into aSecretProperties.Get the content type.Get the the UTC time at which secret was created.Get the Secret Expiry time in UTC.getId()Get the secret identifier.getKeyId()Get the keyId identifier.getName()Get the secret name.Get the notBefore UTC time.Gets the number of days a secret is retained before being deleted for a soft delete-enabled Key Vault.Get the recovery level of the secret.getTags()Get the tags associated with the secret.Get the UTC time at which secret was last updated.Get the version of the secret.Get the enabled value.Get the managed value.setContentType(String contentType) Set the contentType.setEnabled(Boolean enabled) Set the enabled value.setExpiresOn(OffsetDateTime expiresOn) Set theexpiresUTC time.setNotBefore(OffsetDateTime notBefore) Set thenotBeforeUTC time.Set the tags to be associated with the secret.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
-
SecretProperties
public SecretProperties()Creates empty instance of SecretProperties.
-
-
Method Details
-
getName
-
getRecoveryLevel
Get the recovery level of the secret.- Returns:
- the recoveryLevel of the secret.
-
isEnabled
-
setEnabled
Set the enabled value.- Parameters:
enabled- The enabled value to set- Returns:
- the SecretProperties object itself.
- Throws:
NullPointerException- ifenabledis null.
-
getNotBefore
-
setNotBefore
Set thenotBeforeUTC time.- Parameters:
notBefore- The notBefore UTC time to set- Returns:
- the SecretProperties object itself.
-
getExpiresOn
Get the Secret Expiry time in UTC.- Returns:
- the expires UTC time.
-
setExpiresOn
Set theexpiresUTC time.- Parameters:
expiresOn- The expiry time to set for the secret.- Returns:
- the SecretProperties object itself.
-
getCreatedOn
Get the the UTC time at which secret was created.- Returns:
- the created UTC time.
-
getUpdatedOn
Get the UTC time at which secret was last updated.- Returns:
- the last updated UTC time.
-
getId
-
getContentType
-
setContentType
Set the contentType.- Parameters:
contentType- The contentType to set- Returns:
- the updated SecretProperties object itself.
-
getTags
-
setTags
Set the tags to be associated with the secret.- Parameters:
tags- The tags to set- Returns:
- the updated SecretProperties object itself.
-
getKeyId
-
isManaged
-
getVersion
-
getRecoverableDays
Gets the number of days a secret is retained before being deleted for a soft delete-enabled Key Vault.- Returns:
- the recoverable days.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SecretProperties>- Throws:
IOException
-
fromJson
Reads a JSON stream into aSecretProperties.- Parameters:
jsonReader- TheJsonReaderbeing read.- Returns:
- An instance of
SecretPropertiesthat the JSON stream represented, may return null. - Throws:
IOException- If aSecretPropertiesfails to be read from thejsonReader.
-