SecretClientHostExtensions.AddKeyedSecretClient Method

Definition

Overloads

AddKeyedSecretClient(IHostApplicationBuilder, String, String)

Source:
SecretClientHostExtensions.cs

Adds a keyed singleton SecretClient to the IHostApplicationBuilder's service collection.

public static System.ClientModel.Primitives.IClientBuilder AddKeyedSecretClient(this Microsoft.Extensions.Hosting.IHostApplicationBuilder host, string key, string sectionName);
static member AddKeyedSecretClient : Microsoft.Extensions.Hosting.IHostApplicationBuilder * string * string -> System.ClientModel.Primitives.IClientBuilder
<Extension()>
Public Function AddKeyedSecretClient (host As IHostApplicationBuilder, key As String, sectionName As String) As IClientBuilder

Parameters

key
String

The unique key to register as.

sectionName
String

The section of IConfiguration to use.

Returns

An IClientBuilder that can be used to further configure the client.

Applies to

AddKeyedSecretClient(IHostApplicationBuilder, String, String, Action<SecretClientSettings>)

Source:
SecretClientHostExtensions.cs

Adds a keyed singleton SecretClient to the IHostApplicationBuilder's service collection.

public static System.ClientModel.Primitives.IClientBuilder AddKeyedSecretClient(this Microsoft.Extensions.Hosting.IHostApplicationBuilder host, string key, string sectionName, Action<Azure.Security.KeyVault.Secrets.SecretClientSettings> configureSettings);
static member AddKeyedSecretClient : Microsoft.Extensions.Hosting.IHostApplicationBuilder * string * string * Action<Azure.Security.KeyVault.Secrets.SecretClientSettings> -> System.ClientModel.Primitives.IClientBuilder
<Extension()>
Public Function AddKeyedSecretClient (host As IHostApplicationBuilder, key As String, sectionName As String, configureSettings As Action(Of SecretClientSettings)) As IClientBuilder

Parameters

key
String

The unique key to register as.

sectionName
String

The section of IConfiguration to use.

configureSettings
Action<SecretClientSettings>

Factory method to modify the SecretClientSettings after they are created.

Returns

An IClientBuilder that can be used to further configure the client.

Applies to