AzureKeyVaultResource
Class net10.0
A resource that represents an Azure Key Vault.
namespace Aspire.Hosting.Azure;
public class AzureKeyVaultResource : Aspire.Hosting.Azure.AzureProvisioningResource, Aspire.Hosting.ApplicationModel.IAzureResource, Aspire.Hosting.ApplicationModel.IManifestExpressionProvider, Aspire.Hosting.ApplicationModel.IResource, Aspire.Hosting.ApplicationModel.IResourceWithConnectionString, Aspire.Hosting.ApplicationModel.IResourceWithEndpoints, Aspire.Hosting.ApplicationModel.IValueProvider, Aspire.Hosting.ApplicationModel.IValueWithReferences, Aspire.Hosting.Azure.IAzureKeyVaultResource{ // ...} AzureProvisioningResourceIAzureResourceIManifestExpressionProviderIResourceIResourceWithConnectionStringIResourceWithEndpointsIValueProviderIValueWithReferencesIAzureKeyVaultResource
9 members
Constructors1
Section titled ConstructorsProperties5
Section titled PropertiesConnectionStringExpressiongetReferenceExpression Gets the connection string template for the manifest for the Azure Key Vault resource.
IsEmulatorgetbool Gets a value indicating whether the Azure Key Vault resource is running in the local emulator.
NameOutputReferencegetBicepOutputReference Gets the "name" output reference for the Azure Key Vault resource.
UriExpressiongetReferenceExpression Gets the endpoint URI expression for the Key Vault resource.
VaultUrigetBicepOutputReference Gets the "vaultUri" output reference for the Azure Key Vault resource.
Methods3
Section titled MethodsAddAsExistingResource(AzureResourceInfrastructure)ProvisionableResource Adds a new
Primitives.ProvisionableResource into infra. The new resource represents a reference to the current Azure.AzureProvisioningResource via https://learn.microsoft.com/azure/azure-resource-manager/bicep/existing-resource. GetConnectionStringAsync(CancellationToken)ValueTask<string?> Gets the connection string for the Azure Key Vault resource.
GetSecret(string)IAzureKeyVaultSecretReference Gets a secret reference for the specified secret name.