SecretClient Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
public class SecretClient : IDisposable
type SecretClient = class
type SecretClient = class
interface IDisposable
Public Class SecretClient
Public Class SecretClient
Implements IDisposable
- Inheritance
-
SecretClient
- Implements
Remarks
Internally, all transport — request building, response parsing, paging, model (de)serialization, and LRO polling — is delegated to the TypeSpec-generated KeyVaultSecretsClient (internal). Public method signatures, return types, exception contracts and recorded HTTP traffic match every previously shipped version of this package. Reuse clients and call Dispose() when their lifetime ends. The legacy hand-written transport (KeyVaultPipeline, SecretBackup, JSON read/write methods on the model classes) is no longer invoked.
Constructors
| Name | Description |
|---|---|
| SecretClient() |
For mocking. |
| SecretClient(SecretClientSettings) |
Initializes a new instance of the SecretClient class from settings. |
| SecretClient(Uri, TokenCredential, SecretClientOptions) |
Initializes a new instance of the SecretClient class. |
| SecretClient(Uri, TokenCredential) |
Initializes a new instance of the SecretClient class. |
Properties
| Name | Description |
|---|---|
| VaultUri |
The vault URI used to construct this client. |