共用方式為


KeyClient Constructors

Definition

Overloads

KeyClient()

Initializes a new instance of the KeyClient class for mocking.

KeyClient(Uri, TokenCredential)

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

KeyClient(Uri, TokenCredential, KeyClientOptions)

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

KeyClient()

Source:
KeyClient.cs
Source:
KeyClient.cs

Initializes a new instance of the KeyClient class for mocking.

protected KeyClient ();
Protected Sub New ()

Applies to

KeyClient(Uri, TokenCredential)

Source:
KeyClient.cs
Source:
KeyClient.cs

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

public KeyClient (Uri vaultUri, Azure.Core.TokenCredential credential);
new Azure.Security.KeyVault.Keys.KeyClient : Uri * Azure.Core.TokenCredential -> Azure.Security.KeyVault.Keys.KeyClient
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 key Uri, use KeyVaultKeyIdentifier to parse the VaultUri and other information. You should validate that this URI references a valid Key Vault or Managed HSM 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

KeyClient(Uri, TokenCredential, KeyClientOptions)

Source:
KeyClient.cs
Source:
KeyClient.cs

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

public KeyClient (Uri vaultUri, Azure.Core.TokenCredential credential, Azure.Security.KeyVault.Keys.KeyClientOptions options);
new Azure.Security.KeyVault.Keys.KeyClient : Uri * Azure.Core.TokenCredential * Azure.Security.KeyVault.Keys.KeyClientOptions -> Azure.Security.KeyVault.Keys.KeyClient
Public Sub New (vaultUri As Uri, credential As TokenCredential, options As KeyClientOptions)

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 key Uri, use KeyVaultKeyIdentifier to parse the VaultUri and other information. You should validate that this URI references a valid Key Vault or Managed HSM 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
KeyClientOptions

KeyClientOptions that allow to configure the management of the request sent to Key Vault.

Exceptions

vaultUri or credential is null.

Applies to