# CapacityConfig

Configures the capacity of the cluster such as the instance type and the number of instances.

- Source: [`aws-elasticsearch/lib/domain.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-elasticsearch/lib/domain.ts#L146)
- Type last changed: v2.17.0 · 17 Mar 2022

## Example

```ts
const domain = new es.Domain(this, 'Domain', {
  version: es.ElasticsearchVersion.V7_10,
  capacity: {
    masterNodes: 2,
    warmNodes: 2,
    warmInstanceType: 'ultrawarm1.medium.elasticsearch',
  },
});
```

## Properties

- `dataNodeInstanceType`: string = r5.large.elasticsearch — use opensearchservice module instead

- `dataNodes`: number = 1 — use opensearchservice module instead

- `masterNodeInstanceType`: string = r5.large.elasticsearch — use opensearchservice module instead

- `masterNodes`: number — use opensearchservice module instead

  **Default:** no dedicated master nodes

- `warmInstanceType`: string = ultrawarm1.medium.elasticsearch — use opensearchservice module instead

- `warmNodes`: number — use opensearchservice module instead

  **Default:** no UltraWarm nodes
