# AzureCosmosDBDatabaseResource

- Kind: `class`
- Package: [Aspire.Hosting.Azure.CosmosDB](/reference/api/csharp/aspire.hosting.azure.cosmosdb.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.Azure`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBDatabaseResource.cs)
- Inherits: `Resource`
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, `IResource`, `IResourceWithConnectionString`, `IResourceWithParent`, `IResourceWithParent<AzureCosmosDBResource>`, `IValueProvider`, `IValueWithReferences`, `IResourceWithAzureFunctionsConfig`

Represents an Azure Cosmos DB Database. Initializes a new instance of the [AzureCosmosDBDatabaseResource](/reference/api/csharp/aspire.hosting.azure.cosmosdb/azurecosmosdbdatabaseresource.md) class.

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public class AzureCosmosDBDatabaseResource
    : Aspire.Hosting.ApplicationModel.Resource,
      Aspire.Hosting.ApplicationModel.IExpressionValue,
      Aspire.Hosting.ApplicationModel.IManifestExpressionProvider,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.ApplicationModel.IResourceWithConnectionString,
      Aspire.Hosting.ApplicationModel.IResourceWithParent,
      Aspire.Hosting.ApplicationModel.IResourceWithParent<Aspire.Hosting.AzureCosmosDBResource>,
      Aspire.Hosting.ApplicationModel.IValueProvider,
      Aspire.Hosting.ApplicationModel.IValueWithReferences,
      Aspire.Hosting.Azure.IResourceWithAzureFunctionsConfig
{
    // ...
}
```

## Remarks

Use `AzureProvisioningResourceExtensions.ConfigureInfrastructure` to configure specific `Azure.Provisioning` properties.

## Constructors

- [AzureCosmosDBDatabaseResource(string, string, AzureCosmosDBResource)](/reference/api/csharp/aspire.hosting.azure.cosmosdb/azurecosmosdbdatabaseresource/constructors.md#constructor-string-string-azurecosmosdbresource) -- Represents an Azure Cosmos DB Database. Initializes a new instance of the [AzureCosmosDBDatabaseResource](/reference/api/csharp/aspire.hosting.azure.cosmosdb/azurecosmosdbdatabaseresource.md) class.

## Properties

- [ConnectionStringExpression](/reference/api/csharp/aspire.hosting.azure.cosmosdb/azurecosmosdbdatabaseresource/properties.md#connectionstringexpression) : `ReferenceExpression` `get` -- Gets the connection string expression for the Azure Cosmos DB database.
- [DatabaseName](/reference/api/csharp/aspire.hosting.azure.cosmosdb/azurecosmosdbdatabaseresource/properties.md#databasename) : `string` `get; set` -- Gets or sets the database name.
- [Parent](/reference/api/csharp/aspire.hosting.azure.cosmosdb/azurecosmosdbdatabaseresource/properties.md#parent) : [AzureCosmosDBResource](/reference/api/csharp/aspire.hosting.azure.cosmosdb/azurecosmosdbresource.md) `get` -- Gets the parent Azure Cosmos DB account resource.
