# AzureCosmosDBResource Constructors

- Package: [Aspire.Hosting.Azure.CosmosDB](/reference/api/csharp/aspire.hosting.azure.cosmosdb.md)
- Type: [AzureCosmosDBResource](/reference/api/csharp/aspire.hosting.azure.cosmosdb/azurecosmosdbresource.md)
- Kind: `Constructors`
- Members: `1`

A resource that represents an Azure Cosmos DB.

## AzureCosmosDBResource(string, Action<AzureResourceInfrastructure>)

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

A resource that represents an Azure Cosmos DB.

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

## Parameters

- `name` (`string`)
- `configureInfrastructure` (`Action<AzureResourceInfrastructure>`)
