SecretClient Class

Definition

The SecretClient provides synchronous and asynchronous methods to manage KeyVaultSecret in the Azure Key Vault. The client supports creating, retrieving, updating, deleting, purging, backing up, restoring, and listing KeyVaultSecret. The client also supports listing DeletedSecret for a soft-delete enabled Azure Key Vault.

public class SecretClient
type SecretClient = class
Public Class SecretClient
Inheritance
SecretClient

Constructors

SecretClient()

Initializes a new instance of the SecretClient class for mocking.

SecretClient(Uri, TokenCredential)

Initializes a new instance of the SecretClient class for the specified vault.

SecretClient(Uri, TokenCredential, SecretClientOptions)

Initializes a new instance of the SecretClient class for the specified vault.

Properties

VaultUri

Gets the Uri of the vault used to create this instance of the SecretClient.

Methods

BackupSecret(String, CancellationToken)

Backs up the specified secret.

BackupSecretAsync(String, CancellationToken)

Backs up the specified secret.

GetDeletedSecret(String, CancellationToken)

Gets the specified deleted secret.

GetDeletedSecretAsync(String, CancellationToken)

Gets the specified deleted secret.

GetDeletedSecrets(CancellationToken)

Lists deleted secrets for the specified vault.

GetDeletedSecretsAsync(CancellationToken)

Lists deleted secrets for the specified vault.

GetPropertiesOfSecrets(CancellationToken)

Lists the properties of all enabled and disabled secrets in the specified vault. You can use the returned Name in subsequent calls to GetSecret(String, String, CancellationToken).

GetPropertiesOfSecretsAsync(CancellationToken)

Lists the properties of all enabled and disabled secrets in the specified vault. You can use the returned Name in subsequent calls to GetSecretAsync(String, String, CancellationToken).

GetPropertiesOfSecretVersions(String, CancellationToken)

Lists the properties of all enabled and disabled versions of the specified secret. You can use the returned Name and Version in subsequent calls to GetSecret(String, String, CancellationToken).

GetPropertiesOfSecretVersionsAsync(String, CancellationToken)

Lists the properties of all enabled and disabled versions of the specified secret. You can use the returned Name and Version in subsequent calls to GetSecretAsync(String, String, CancellationToken).

GetSecret(String, String, CancellationToken)

Get a specified secret from a given key vault.

GetSecretAsync(String, String, CancellationToken)

Get a specified secret from a given key vault.

PurgeDeletedSecret(String, CancellationToken)

Permanently deletes the specified secret.

PurgeDeletedSecretAsync(String, CancellationToken)

Permanently deletes the specified secret.

RestoreSecretBackup(Byte[], CancellationToken)

Restores a backed up secret to a vault.

RestoreSecretBackupAsync(Byte[], CancellationToken)

Restores a backed up secret to a vault.

SetSecret(KeyVaultSecret, CancellationToken)

Sets a secret in a specified key vault.

SetSecret(String, String, CancellationToken)

Sets a secret in a specified key vault.

SetSecretAsync(KeyVaultSecret, CancellationToken)

Sets a secret in a specified key vault.

SetSecretAsync(String, String, CancellationToken)

Sets a secret in a specified key vault.

StartDeleteSecret(String, CancellationToken)

Deletes a secret from a specified key vault.

StartDeleteSecretAsync(String, CancellationToken)

Deletes a secret from a specified key vault.

StartRecoverDeletedSecret(String, CancellationToken)

Recovers the deleted secret to the latest version.

StartRecoverDeletedSecretAsync(String, CancellationToken)

Recovers the deleted secret to the latest version.

UpdateSecretProperties(SecretProperties, CancellationToken)

Updates the attributes associated with a specified secret.

UpdateSecretPropertiesAsync(SecretProperties, CancellationToken)

Updates the attributes associated with a specified secret.

Applies to