# AzureCosmosDBEmulatorResource

- Module: [Aspire.Hosting.Azure.CosmosDB](/reference/api/typescript/aspire.hosting.azure.cosmosdb.md)
- Version: `13.2.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire)

## Definition

```typescript
interface AzureCosmosDBEmulatorResource
  extends IComputeResource,
    IResource,
    IResourceWithArgs,
    IResourceWithEndpoints,
    IResourceWithEnvironment,
    IResourceWithProbes,
    IResourceWithWaitSupport {
  withDataExplorer(port?: number): AzureCosmosDBEmulatorResource;
  withDataVolume(name?: string): AzureCosmosDBEmulatorResource;
  withGatewayPort(port: number): AzureCosmosDBEmulatorResource;
  withPartitionCount(count: number): AzureCosmosDBEmulatorResource;
}
```

## Methods

- [withDataExplorer](/reference/api/typescript/aspire.hosting.azure.cosmosdb/azurecosmosdbemulatorresource/withdataexplorer.md) -- `method` -- Exposes the Data Explorer endpoint for the preview emulator
    ```typescript
  withDataExplorer(port?: number): AzureCosmosDBEmulatorResource
  ```
- [withDataVolume](/reference/api/typescript/aspire.hosting.azure.cosmosdb/azurecosmosdbemulatorresource/withdatavolume.md) -- `method` -- Adds a named volume for the data folder to an Azure Cosmos DB emulator resource
    ```typescript
  withDataVolume(name?: string): AzureCosmosDBEmulatorResource
  ```
- [withGatewayPort](/reference/api/typescript/aspire.hosting.azure.cosmosdb/azurecosmosdbemulatorresource/withgatewayport.md) -- `method` -- Sets the host port for the Cosmos DB emulator gateway endpoint
    ```typescript
  withGatewayPort(port: number): AzureCosmosDBEmulatorResource
  ```
- [withPartitionCount](/reference/api/typescript/aspire.hosting.azure.cosmosdb/azurecosmosdbemulatorresource/withpartitioncount.md) -- `method` -- Sets the partition count for the Azure Cosmos DB emulator
    ```typescript
  withPartitionCount(count: number): AzureCosmosDBEmulatorResource
  ```
