Class KeyVaultSecret
- java.lang.Object
-
- com.azure.security.keyvault.secrets.models.KeyVaultSecret
-
- Direct Known Subclasses:
DeletedSecret
public class KeyVaultSecret extends Object
Secret is the resource consisting of name, value and its attributes specified inSecretProperties. It is managed by Secret Service.- See Also:
SecretClient,SecretAsyncClient
-
-
Constructor Summary
Constructors Constructor Description KeyVaultSecret(String name, String value)Creates a Secret withnameandvalue.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetId()Get the secret identifier.StringgetName()Get the secret name.SecretPropertiesgetProperties()Get the secret propertiesStringgetValue()Get the value of the secret.KeyVaultSecretsetProperties(SecretProperties properties)Set the secret properties
-
-
-
Method Detail
-
getValue
public String getValue()
Get the value of the secret.- Returns:
- the secret value
-
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
-
setProperties
public KeyVaultSecret setProperties(SecretProperties properties)
Set the secret properties- Parameters:
properties- The Secret properties- Returns:
- the updated secret object
- Throws:
NullPointerException- ifpropertiesis null.
-
-