<PackageReference Include="Azure.Core" Version="1.42.0" />

AzureKeyCredential

public class AzureKeyCredential
Key credential used to authenticate to an Azure Service. It provides the ability to update the key without creating a new client.
public string Key { get; }

Key used to authenticate to an Azure service.

public AzureKeyCredential(string key)

Initializes a new instance of the AzureKeyCredential class.

public void Update(string key)

Updates the service key. This is intended to be used when you've regenerated your service key and want to update long lived clients.