# AzureKeyVaultResource Constructors

- Package: [Aspire.Hosting.Azure.KeyVault](/reference/api/csharp/aspire.hosting.azure.keyvault.md)
- Type: [AzureKeyVaultResource](/reference/api/csharp/aspire.hosting.azure.keyvault/azurekeyvaultresource.md)
- Kind: `Constructors`
- Members: `1`

A resource that represents an Azure Key Vault.

## AzureKeyVaultResource(string, Action<AzureResourceInfrastructure>)

- Name: `Constructor(string, Action<AzureResourceInfrastructure>)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Azure.KeyVault/AzureKeyVaultResource.cs#L18-L23)

A resource that represents an Azure Key Vault.

```csharp
public class AzureKeyVaultResource
{
    public AzureKeyVaultResource(
        string name,
        Action<AzureResourceInfrastructure> configureInfrastructure)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The name of the resource.
- `configureInfrastructure` (`Action<AzureResourceInfrastructure>`)
  Callback to configure the Azure resources.
