DatabaseInstanceProps Struct
Construction properties for a DatabaseInstanceNew.
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
autoMinorVersionUpgradeoptionalbooleanauto_minor_version_upgradeoptionalboolautoMinorVersionUpgradeoptionalBooleanAutoMinorVersionUpgradeoptionalboolAutoMinorVersionUpgradeoptional*bool= true#Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.
availabilityZoneoptionalstringavailability_zoneoptionalstravailabilityZoneoptionalStringAvailabilityZoneoptionalstringAvailabilityZoneoptional*string#The name of the Availability Zone where the DB instance will be located.
Default: no preference
caCertificateoptionalCaCertificateca_certificateoptionalCaCertificatecaCertificateoptionalCaCertificateCaCertificateoptionalCaCertificateCaCertificateoptionalCaCertificate#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.
clusterIDBClusterRefclusterIDBClusterRefclusterIDBClusterRefClusterIDBClusterRefClusterIDBClusterRefrequired#The DocumentDB database cluster the instance should launch into.
dbInstanceNameoptionalstringdb_instance_nameoptionalstrdbInstanceNameoptionalStringDbInstanceNameoptionalstringDbInstanceNameoptional*string#A name for the DB instance.
Default: a CloudFormation generated name
If you specify a name, AWS CloudFormation converts it to lowercase.
enablePerformanceInsightsoptionalbooleanenable_performance_insightsoptionalboolenablePerformanceInsightsoptionalBooleanEnablePerformanceInsightsoptionalboolEnablePerformanceInsightsoptional*bool= false#A value that indicates whether to enable Performance Insights for the DB Instance.
instanceTypeInstanceTypeinstance_typeInstanceTypeinstanceTypeInstanceTypeInstanceTypeInstanceTypeInstanceTypeInstanceTyperequired#The name of the compute and memory capacity classes.
preferredMaintenanceWindowoptionalstringpreferred_maintenance_windowoptionalstrpreferredMaintenanceWindowoptionalStringPreferredMaintenanceWindowoptionalstringPreferredMaintenanceWindowoptional*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
removalPolicyoptionalRemovalPolicyremoval_policyoptionalRemovalPolicyremovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicy= RemovalPolicy.Retain#The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update.