SecretClient Constructors
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.
Overloads
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. |
SecretClient()
- Source:
- SecretClient.cs
- Source:
- SecretClient.cs
Initializes a new instance of the SecretClient class for mocking.
protected SecretClient ();
Protected Sub New ()
Applies to
SecretClient(Uri, TokenCredential)
- Source:
- SecretClient.cs
- Source:
- SecretClient.cs
Initializes a new instance of the SecretClient class for the specified vault.
public SecretClient (Uri vaultUri, Azure.Core.TokenCredential credential);
new Azure.Security.KeyVault.Secrets.SecretClient : Uri * Azure.Core.TokenCredential -> Azure.Security.KeyVault.Secrets.SecretClient
Public Sub New (vaultUri As Uri, credential As TokenCredential)
Parameters
- vaultUri
- Uri
A Uri to the vault on which the client operates. Appears as "DNS Name" in the Azure portal. If you have a secret Uri, use KeyVaultSecretIdentifier to parse the VaultUri and other information. You should validate that this URI references a valid Key Vault resource. See https://aka.ms/azsdk/blog/vault-uri for details.
- credential
- TokenCredential
A TokenCredential used to authenticate requests to the vault, such as DefaultAzureCredential.
Exceptions
vaultUri
or credential
is null.
Applies to
SecretClient(Uri, TokenCredential, SecretClientOptions)
- Source:
- SecretClient.cs
- Source:
- SecretClient.cs
Initializes a new instance of the SecretClient class for the specified vault.
public SecretClient (Uri vaultUri, Azure.Core.TokenCredential credential, Azure.Security.KeyVault.Secrets.SecretClientOptions options);
new Azure.Security.KeyVault.Secrets.SecretClient : Uri * Azure.Core.TokenCredential * Azure.Security.KeyVault.Secrets.SecretClientOptions -> Azure.Security.KeyVault.Secrets.SecretClient
Public Sub New (vaultUri As Uri, credential As TokenCredential, options As SecretClientOptions)
Parameters
- vaultUri
- Uri
A Uri to the vault on which the client operates. Appears as "DNS Name" in the Azure portal. If you have a secret Uri, use KeyVaultSecretIdentifier to parse the VaultUri and other information. You should validate that this URI references a valid Key Vault resource. See https://aka.ms/azsdk/blog/vault-uri for details.
- credential
- TokenCredential
A TokenCredential used to authenticate requests to the vault, such as DefaultAzureCredential.
- options
- SecretClientOptions
SecretClientOptions that allow to configure the management of the request sent to Key Vault.
Exceptions
vaultUri
or credential
is null.
Applies to
Azure SDK for .NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기