aws-cdk-lib.aws_docdb.DatabaseInstanceProps

interface DatabaseInstanceProps

LanguageType name
.NETAmazon.CDK.AWS.DocDB.DatabaseInstanceProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsdocdb#DatabaseInstanceProps
Javasoftware.amazon.awscdk.services.docdb.DatabaseInstanceProps
Pythonaws_cdk.aws_docdb.DatabaseInstanceProps
TypeScript (source)aws-cdk-lib » aws_docdb » DatabaseInstanceProps

Construction properties for a DatabaseInstanceNew.

Example

// 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';

declare const databaseCluster: docdb.DatabaseCluster;
declare const instanceType: ec2.InstanceType;
const databaseInstanceProps: docdb.DatabaseInstanceProps = {
  cluster: databaseCluster,
  instanceType: instanceType,

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

Properties

NameTypeDescription
clusterIDatabaseClusterThe DocumentDB database cluster the instance should launch into.
instanceTypeInstanceTypeThe name of the compute and memory capacity classes.
autoMinorVersionUpgrade?booleanIndicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.
availabilityZone?stringThe name of the Availability Zone where the DB instance will be located.
dbInstanceName?stringA name for the DB instance.
enablePerformanceInsights?booleanA value that indicates whether to enable Performance Insights for the DB Instance.
preferredMaintenanceWindow?stringThe weekly time range (in UTC) during which system maintenance can occur.
removalPolicy?RemovalPolicyThe CloudFormation policy to apply when the instance is removed from the stack or replaced during an update.

cluster

Type: IDatabaseCluster

The DocumentDB database cluster the instance should launch into.


instanceType

Type: InstanceType

The name of the compute and memory capacity classes.


autoMinorVersionUpgrade?

Type: boolean (optional, default: true)

Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.


availabilityZone?

Type: string (optional, default: no preference)

The name of the Availability Zone where the DB instance will be located.


dbInstanceName?

Type: string (optional, default: a CloudFormation generated name)

A name for the DB instance.

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


enablePerformanceInsights?

Type: boolean (optional, default: false)

A value that indicates whether to enable Performance Insights for the DB Instance.


preferredMaintenanceWindow?

Type: string (optional, 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)

The weekly time range (in UTC) during which system maintenance can occur.

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


removalPolicy?

Type: RemovalPolicy (optional, default: RemovalPolicy.Retain)

The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update.