Skip to content
Docs Try Aspire

AzureKeyVaultResource Methods

Class Methods 3 members
A resource that represents an Azure Key Vault.
AddAsExistingResource(AzureResourceInfrastructure) Section titled AddAsExistingResource(AzureResourceInfrastructure) override ProvisionableResource
public class AzureKeyVaultResource
{
public override ProvisionableResource AddAsExistingResource(
AzureResourceInfrastructure infra)
{
// ...
}
}
infra AzureResourceInfrastructure
GetConnectionStringAsync(CancellationToken) Section titled GetConnectionStringAsync(CancellationToken) ValueTask<string?>
Gets the connection string for the Azure Key Vault resource.
public class AzureKeyVaultResource
{
public ValueTask<string?> GetConnectionStringAsync(
CancellationToken cancellationToken = default(CancellationToken))
{
// ...
}
}
cancellationToken CancellationToken optional A Threading.CancellationToken to observe while waiting for the task to complete.
ValueTask<string?> The connection string for the Azure Key Vault resource.
GetSecret(string) Section titled GetSecret(string) IAzureKeyVaultSecretReference
Gets a secret reference for the specified secret name.
public class AzureKeyVaultResource
{
public IAzureKeyVaultSecretReference GetSecret(
string secretName)
{
// ...
}
}
secretName string
ArgumentException