# AzureCosmosDBEmulatorResource.withGatewayPort

- Module: [Aspire.Hosting.Azure.CosmosDB](/reference/api/typescript/aspire.hosting.azure.cosmosdb.md)
- Defined on: [AzureCosmosDBEmulatorResource](/reference/api/typescript/aspire.hosting.azure.cosmosdb/azurecosmosdbemulatorresource.md)
- Version: `13.4.0`
- Kind: `method`

Configures the gateway port for the Azure Cosmos DB emulator.

## Definition

```typescript
interface AzureCosmosDBEmulatorResource {
  // ... omitted for brevity
  withGatewayPort(port: number): AzureCosmosDBEmulatorResource;
}
```

## Signature

```typescript
withGatewayPort(port: number): AzureCosmosDBEmulatorResource
```

## Parameters

- `port` (`number`)

## Returns

[AzureCosmosDBEmulatorResource](/reference/api/typescript/aspire.hosting.azure.cosmosdb/azurecosmosdbemulatorresource.md) `builder`

## Defined on

- [AzureCosmosDBEmulatorResource](/reference/api/typescript/aspire.hosting.azure.cosmosdb/azurecosmosdbemulatorresource.md) -- `handle`
