KeyVaultSecret Class

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

Implements

public class KeyVaultSecret
implements JsonSerializable<KeyVaultSecret>

Secret is the resource consisting of name, value and its attributes specified in SecretProperties. It is managed by Secret Service.

Constructor Summary

Constructor Description
KeyVaultSecret(String name, String value)

Creates a Secret with name and value.

Method Summary

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

Reads an instance of KeyVaultSecret from the JsonReader.

String getId()

Get the secret identifier.

String getName()

Get the secret name.

SecretProperties getProperties()

Get the secret properties

String getValue()

Get the value of the secret.

KeyVaultSecret setProperties(SecretProperties properties)

Set the secret properties

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

KeyVaultSecret

public KeyVaultSecret(String name, String value)

Creates a Secret with name and value.

Parameters:

name - The name of the secret.
value - the value of the secret.

Method Details

fromJson

public static KeyVaultSecret fromJson(JsonReader jsonReader)

Reads an instance of KeyVaultSecret from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of KeyVaultSecret if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the KeyVaultSecret.

getId

public String getId()

Get the secret identifier.

Returns:

the secret identifier.

getName

public String getName()

Get the secret name.

Returns:

the secret name.

getProperties

public SecretProperties getProperties()

Get the secret properties

Returns:

the Secret properties

getValue

public String getValue()

Get the value of the secret.

Returns:

the secret value

setProperties

public KeyVaultSecret setProperties(SecretProperties properties)

Set the secret properties

Parameters:

properties - The Secret properties

Returns:

the updated secret object

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to