Class KeyVaultSecret
java.lang.Object
com.azure.security.keyvault.secrets.models.KeyVaultSecret
- All Implemented Interfaces:
com.azure.json.JsonSerializable<KeyVaultSecret>
- Direct Known Subclasses:
DeletedSecret
public class KeyVaultSecret
extends Object
implements com.azure.json.JsonSerializable<KeyVaultSecret>
Secret is the resource consisting of name, value and its attributes specified in
SecretProperties.
It is managed by Secret Service.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionKeyVaultSecret(String name, String value) Creates a Secret withnameandvalue. -
Method Summary
Modifier and TypeMethodDescriptionstatic KeyVaultSecretfromJson(com.azure.json.JsonReader jsonReader) Reads an instance ofKeyVaultSecretfrom the JsonReader.getId()Get the secret identifier.getName()Get the secret name.Get the secret propertiesgetValue()Get the value of the secret.setProperties(SecretProperties properties) Set the secret propertiescom.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
-
KeyVaultSecret
-
-
Method Details
-
getValue
-
getId
-
getName
-
getProperties
-
setProperties
Set the secret properties- Parameters:
properties- The Secret properties- Returns:
- the updated secret object
- Throws:
NullPointerException- ifpropertiesis null.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<KeyVaultSecret>- Throws:
IOException
-
fromJson
Reads an instance ofKeyVaultSecretfrom the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of
KeyVaultSecretif 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 theKeyVaultSecret.
-