Class DatabaseInstanceProps
Construction properties for a DatabaseInstanceNew.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.DocDB
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DatabaseInstanceProps : Object, IDatabaseInstanceProps
Syntax (vb)
Public Class DatabaseInstanceProps
Inherits Object
Implements IDatabaseInstanceProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.DocDB;
using Amazon.CDK.AWS.EC2;
DatabaseCluster databaseCluster;
InstanceType instanceType;
var databaseInstanceProps = new DatabaseInstanceProps {
Cluster = databaseCluster,
InstanceType = instanceType,
// the properties below are optional
AutoMinorVersionUpgrade = false,
AvailabilityZone = "availabilityZone",
DbInstanceName = "dbInstanceName",
EnablePerformanceInsights = false,
PreferredMaintenanceWindow = "preferredMaintenanceWindow",
RemovalPolicy = RemovalPolicy.DESTROY
};
Synopsis
Constructors
DatabaseInstanceProps() |
Properties
AutoMinorVersionUpgrade | Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window. |
AvailabilityZone | The name of the Availability Zone where the DB instance will be located. |
Cluster | The DocumentDB database cluster the instance should launch into. |
DbInstanceName | A name for the DB instance. |
EnablePerformanceInsights | A value that indicates whether to enable Performance Insights for the DB Instance. |
InstanceType | The name of the compute and memory capacity classes. |
PreferredMaintenanceWindow | The weekly time range (in UTC) during which system maintenance can occur. |
RemovalPolicy | The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update. |
Constructors
DatabaseInstanceProps()
public DatabaseInstanceProps()
Properties
AutoMinorVersionUpgrade
Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.
public Nullable<bool> AutoMinorVersionUpgrade { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true
AvailabilityZone
The name of the Availability Zone where the DB instance will be located.
public string AvailabilityZone { get; set; }
Property Value
System.String
Remarks
Default: - no preference
Cluster
The DocumentDB database cluster the instance should launch into.
public IDatabaseCluster Cluster { get; set; }
Property Value
DbInstanceName
A name for the DB instance.
public string DbInstanceName { get; set; }
Property Value
System.String
Remarks
If you specify a name, AWS CloudFormation converts it to lowercase.
Default: - a CloudFormation generated name
EnablePerformanceInsights
A value that indicates whether to enable Performance Insights for the DB Instance.
public Nullable<bool> EnablePerformanceInsights { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - false
InstanceType
The name of the compute and memory capacity classes.
public InstanceType InstanceType { get; set; }
Property Value
PreferredMaintenanceWindow
The weekly time range (in UTC) during which system maintenance can occur.
public string PreferredMaintenanceWindow { get; set; }
Property Value
System.String
Remarks
Format: ddd:hh24:mi-ddd:hh24:mi
Constraint: Minimum 30-minute window
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
RemovalPolicy
The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update.
public Nullable<RemovalPolicy> RemovalPolicy { get; set; }
Property Value
System.Nullable<RemovalPolicy>
Remarks
Default: RemovalPolicy.Retain