SecretProperties Class

  • java.lang.Object
    • com.azure.security.keyvault.secrets.models.SecretProperties

Implements

public class SecretProperties
implements JsonSerializable<SecretProperties>

SecretProperties is the resource containing all the properties of the secret except its value. It is managed by the Secret Service.

Constructor Summary

Constructor Description
SecretProperties()

Creates empty instance of SecretProperties.

Method Summary

Modifier and Type Method and Description
static SecretProperties fromJson(JsonReader jsonReader)

Reads a JSON stream into a SecretProperties.

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 the expires UTC time.

SecretProperties setNotBefore(OffsetDateTime notBefore)

Set the notBefore UTC time.

SecretProperties setTags(Map<String,String> tags)

Set the tags to be associated with the secret.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

SecretProperties

public SecretProperties()

Creates empty instance of SecretProperties.

Method Details

fromJson

public static SecretProperties fromJson(JsonReader jsonReader)

Reads a JSON stream into a SecretProperties.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of SecretProperties that the JSON stream represented, may return null.

Throws:

IOException

- If a SecretProperties fails to be read from the jsonReader.

getContentType

public String getContentType()

Get the content type.

Returns:

the content type.

getCreatedOn

public OffsetDateTime getCreatedOn()

Get the the UTC time at which secret was created.

Returns:

the created UTC time.

getExpiresOn

public OffsetDateTime getExpiresOn()

Get the Secret Expiry time in UTC.

Returns:

the expires UTC time.

getId

public String getId()

Get the secret identifier.

Returns:

the secret identifier.

getKeyId

public String getKeyId()

Get the keyId identifier.

Returns:

the keyId identifier.

getName

public String getName()

Get the secret name.

Returns:

the name of the secret.

getNotBefore

public OffsetDateTime getNotBefore()

Get the notBefore UTC time.

Returns:

the notBefore UTC time.

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.

getRecoveryLevel

public String getRecoveryLevel()

Get the recovery level of the secret.

Returns:

the recoveryLevel of the secret.

getTags

public Map getTags()

Get the tags associated with the secret.

Returns:

the value of the tags.

getUpdatedOn

public OffsetDateTime getUpdatedOn()

Get the UTC time at which secret was last updated.

Returns:

the last updated UTC time.

getVersion

public String getVersion()

Get the version of the secret.

Returns:

the version of the secret.

isEnabled

public Boolean isEnabled()

Get the enabled value.

Returns:

the enabled value

isManaged

public Boolean isManaged()

Get the managed value.

Returns:

the managed value

setContentType

public SecretProperties setContentType(String contentType)

Set the contentType.

Parameters:

contentType - The contentType to set

Returns:

the updated SecretProperties object itself.

setEnabled

public SecretProperties setEnabled(Boolean enabled)

Set the enabled value.

Parameters:

enabled - The enabled value to set

Returns:

the SecretProperties object itself.

setExpiresOn

public SecretProperties setExpiresOn(OffsetDateTime expiresOn)

Set the expires UTC time.

Parameters:

expiresOn - The expiry time to set for the secret.

Returns:

the SecretProperties object itself.

setNotBefore

public SecretProperties setNotBefore(OffsetDateTime notBefore)

Set the notBefore UTC time.

Parameters:

notBefore - The notBefore UTC time to set

Returns:

the SecretProperties object itself.

setTags

public SecretProperties setTags(Map tags)

Set the tags to be associated with the secret.

Parameters:

tags - The tags to set

Returns:

the updated SecretProperties object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to