Class SecretProperties
- java.lang.Object
-
- com.azure.security.keyvault.secrets.models.SecretProperties
-
public class SecretProperties extends Object
SecretProperties is the resource containing all the properties of the secret except its value. It is managed by the Secret Service.- See Also:
SecretClient
,SecretAsyncClient
-
-
Constructor Summary
Constructors Constructor Description SecretProperties()
Creates empty instance of SecretProperties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContentType()
Get the content type.OffsetDateTime
getCreatedOn()
Get the the UTC time at which secret was created.OffsetDateTime
getExpiresOn()
Get the Secret Expiry time in UTC.String
getId()
Get the secret identifier.String
getKeyId()
Get the keyId identifier.String
getName()
Get the secret name.OffsetDateTime
getNotBefore()
Get the notBefore UTC time.Integer
getRecoverableDays()
Gets the number of days a secret is retained before being deleted for a soft delete-enabled Key Vault.String
getRecoveryLevel()
Get the recovery level of the secret.Map<String,String>
getTags()
Get the tags associated with the secret.OffsetDateTime
getUpdatedOn()
Get the UTC time at which secret was last updated.String
getVersion()
Get the version of the secret.Boolean
isEnabled()
Get the enabled value.Boolean
isManaged()
Get the managed value.SecretProperties
setContentType(String contentType)
Set the contentType.SecretProperties
setEnabled(Boolean enabled)
Set the enabled value.SecretProperties
setExpiresOn(OffsetDateTime expiresOn)
Set theexpires
UTC time.SecretProperties
setNotBefore(OffsetDateTime notBefore)
Set thenotBefore
UTC time.SecretProperties
setTags(Map<String,String> tags)
Set the tags to be associated with the secret.
-
-
-
Method Detail
-
getName
public String getName()
Get the secret name.- Returns:
- the name of the secret.
-
getRecoveryLevel
public String getRecoveryLevel()
Get the recovery level of the secret.- Returns:
- the recoveryLevel of the secret.
-
isEnabled
public Boolean isEnabled()
Get the enabled value.- Returns:
- the enabled value
-
setEnabled
public SecretProperties setEnabled(Boolean enabled)
Set the enabled value.- Parameters:
enabled
- The enabled value to set- Returns:
- the SecretProperties object itself.
- Throws:
NullPointerException
- ifenabled
is null.
-
getNotBefore
public OffsetDateTime getNotBefore()
Get the notBefore UTC time.- Returns:
- the notBefore UTC time.
-
setNotBefore
public SecretProperties setNotBefore(OffsetDateTime notBefore)
Set thenotBefore
UTC time.- Parameters:
notBefore
- The notBefore UTC time to set- Returns:
- the SecretProperties object itself.
-
getExpiresOn
public OffsetDateTime getExpiresOn()
Get the Secret Expiry time in UTC.- Returns:
- the expires UTC time.
-
setExpiresOn
public SecretProperties setExpiresOn(OffsetDateTime expiresOn)
Set theexpires
UTC time.- Parameters:
expiresOn
- The expiry time to set for the secret.- Returns:
- the SecretProperties object itself.
-
getCreatedOn
public OffsetDateTime getCreatedOn()
Get the the UTC time at which secret was created.- Returns:
- the created UTC time.
-
getUpdatedOn
public OffsetDateTime getUpdatedOn()
Get the UTC time at which secret was last updated.- Returns:
- the last updated UTC time.
-
getId
public String getId()
Get the secret identifier.- Returns:
- the secret identifier.
-
getContentType
public String getContentType()
Get the content type.- Returns:
- the content type.
-
setContentType
public SecretProperties setContentType(String contentType)
Set the contentType.- Parameters:
contentType
- The contentType to set- Returns:
- the updated SecretProperties object itself.
-
getTags
public Map<String,String> getTags()
Get the tags associated with the secret.- Returns:
- the value of the tags.
-
setTags
public SecretProperties setTags(Map<String,String> tags)
Set the tags to be associated with the secret.- Parameters:
tags
- The tags to set- Returns:
- the updated SecretProperties object itself.
-
getKeyId
public String getKeyId()
Get the keyId identifier.- Returns:
- the keyId identifier.
-
isManaged
public Boolean isManaged()
Get the managed value.- Returns:
- the managed value
-
getVersion
public String getVersion()
Get the version of the secret.- Returns:
- the version of the secret.
-
getRecoverableDays
public Integer getRecoverableDays()
Gets the number of days a secret is retained before being deleted for a soft delete-enabled Key Vault.- Returns:
- the recoverable days.
-
-