# 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/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/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.
