# AzureSearchResource Constructors

- Package: [Aspire.Hosting.Azure.Search](/reference/api/csharp/aspire.hosting.azure.search.md)
- Type: [AzureSearchResource](/reference/api/csharp/aspire.hosting.azure.search/azuresearchresource.md)
- Kind: `Constructors`
- Members: `1`

Represents an Azure AI Search resource.

## AzureSearchResource(string, Action<AzureResourceInfrastructure>)

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

Represents an Azure AI Search resource.

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

## Parameters

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