# FoundryResource Constructors

- Package: [Aspire.Hosting.Foundry](/reference/api/csharp/aspire.hosting.foundry.md)
- Type: [FoundryResource](/reference/api/csharp/aspire.hosting.foundry/foundryresource.md)
- Kind: `Constructors`
- Members: `1`

Represents a Microsoft Foundry resource. This corresponds to the Azure Cognitive Services account with Microsoft Foundry capabilities enabled.

## FoundryResource(string, Action<AzureResourceInfrastructure>)

- Name: `Constructor(string, Action<AzureResourceInfrastructure>)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/FoundryResource.cs#L20-L24)

Represents a Microsoft Foundry resource. This corresponds to the Azure Cognitive Services account with Microsoft Foundry capabilities enabled.

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

## Parameters

- `name` (`string`)
  The name of the resource.
- `configureInfrastructure` (`Action<AzureResourceInfrastructure>`)
  Configures the underlying Azure resource using Azure.Provisioning.
