# DatabaseInstanceProps

Construction properties for a DatabaseInstanceNew.

Extends: DatabaseInstanceProps
Used as props by: DatabaseInstance

- Source: [`aws-docdb/lib/instance.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-docdb/lib/instance.ts#L129)
- Type last changed: v2.235.0 · 15 Jan 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_docdb as docdb } from 'aws-cdk-lib';
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
import { aws_rds as rds } from 'aws-cdk-lib';
import { aws_docdb as interfaces_docdb } from 'aws-cdk-lib/interfaces';

declare const caCertificate: rds.CaCertificate;
declare const dBClusterRef: interfaces_docdb.IDBClusterRef;
declare const instanceType: ec2.InstanceType;
const databaseInstanceProps: docdb.DatabaseInstanceProps = {
  cluster: dBClusterRef,
  instanceType: instanceType,

  // the properties below are optional
  autoMinorVersionUpgrade: false,
  availabilityZone: 'availabilityZone',
  caCertificate: caCertificate,
  dbInstanceName: 'dbInstanceName',
  enablePerformanceInsights: false,
  preferredMaintenanceWindow: 'preferredMaintenanceWindow',
  removalPolicy: cdk.RemovalPolicy.DESTROY,
};
```

## Properties

- `autoMinorVersionUpgrade`: boolean = true — Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.

- `availabilityZone`: string — The name of the Availability Zone where the DB instance will be located.

  **Default:** no preference

- `caCertificate`: [CaCertificate](/cdk/api/v2/docs/aws-cdk-lib.aws_rds.CaCertificate.html) — The identifier of the CA certificate for this DB instance.

  **Default:** DocumentDB will choose a certificate authority

  Specifying or updating this property triggers a reboot.

- `cluster`: [IDBClusterRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_docdb.IDBClusterRef.html) (required) — The DocumentDB database cluster the instance should launch into.

- `dbInstanceName`: string — A name for the DB instance.

  **Default:** a CloudFormation generated name

  If you specify a name, AWS CloudFormation
  converts it to lowercase.

- `enablePerformanceInsights`: boolean = false — A value that indicates whether to enable Performance Insights for the DB Instance.

- `instanceType`: [InstanceType](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.InstanceType.html) (required) — The name of the compute and memory capacity classes.

- `preferredMaintenanceWindow`: string — The weekly time range (in UTC) during which system maintenance can occur.

  **Default:** a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week. To see the time blocks available, see https://docs.aws.amazon.com/documentdb/latest/developerguide/db-instance-maintain.html#maintenance-window

  Format: `ddd:hh24:mi-ddd:hh24:mi`
  Constraint: Minimum 30-minute window

- `removalPolicy`: [RemovalPolicy](/cdk/api/v2/docs/aws-cdk-lib.RemovalPolicy.html) = RemovalPolicy.Retain — The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update.
