Class DatabaseClusterProps
(experimental) Properties for a new database cluster.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.Neptune.Alpha
Assembly: Amazon.CDK.AWS.Neptune.Alpha.dll
Syntax (csharp)
public class DatabaseClusterProps : Object, IDatabaseClusterProps
Syntax (vb)
Public Class DatabaseClusterProps
Inherits Object
Implements IDatabaseClusterProps
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
var cluster = new DatabaseCluster(this, "ServerlessDatabase", new DatabaseClusterProps {
Vpc = vpc,
InstanceType = InstanceType.SERVERLESS,
ServerlessScalingConfiguration = new ServerlessScalingConfiguration {
MinCapacity = 1,
MaxCapacity = 5
}
});
Synopsis
Constructors
DatabaseClusterProps() |
Properties
AssociatedRoles | (experimental) A list of AWS Identity and Access Management (IAM) role that can be used by the cluster to access other AWS services. |
AutoMinorVersionUpgrade | (experimental) If set to true, Neptune will automatically update the engine of the entire cluster to the latest minor version after a stabilization window of 2 to 3 weeks. |
BackupRetention | (experimental) How many days to retain the backup. |
CloudwatchLogsExports | (experimental) The list of log types that need to be enabled for exporting to CloudWatch Logs. |
CloudwatchLogsRetention | (experimental) The number of days log events are kept in CloudWatch Logs. |
CloudwatchLogsRetentionRole | (experimental) The IAM role for the Lambda function associated with the custom resource that sets the retention policy. |
ClusterParameterGroup | (experimental) Additional parameters to pass to the database engine. |
DbClusterName | (experimental) An optional identifier for the cluster. |
DeletionProtection | (experimental) Indicates whether the DB cluster should have deletion protection enabled. |
EngineVersion | (experimental) What version of the database to start. |
IamAuthentication | (experimental) Map AWS Identity and Access Management (IAM) accounts to database accounts. |
InstanceIdentifierBase | (experimental) Base identifier for instances. |
Instances | (experimental) Number of Neptune compute instances. |
InstanceType | (experimental) What type of instance to start for the replicas. |
KmsKey | (experimental) The KMS key for storage encryption. |
ParameterGroup | (experimental) The DB parameter group to associate with the instance. |
PreferredBackupWindow | (experimental) A daily time range in 24-hours UTC format in which backups preferably execute. |
PreferredMaintenanceWindow | (experimental) A weekly time range in which maintenance should preferably execute. |
RemovalPolicy | (experimental) The removal policy to apply when the cluster and its instances are removed or replaced during a stack update, or when the stack is deleted. |
SecurityGroups | (experimental) Security group. |
ServerlessScalingConfiguration | (experimental) Specify minimum and maximum NCUs capacity for a serverless cluster. |
StorageEncrypted | (experimental) Whether to enable storage encryption. |
SubnetGroup | (experimental) Existing subnet group for the cluster. |
Vpc | (experimental) What subnets to run the Neptune instances in. |
VpcSubnets | (experimental) Where to place the instances within the VPC. |
Constructors
DatabaseClusterProps()
public DatabaseClusterProps()
Properties
AssociatedRoles
(experimental) A list of AWS Identity and Access Management (IAM) role that can be used by the cluster to access other AWS services.
public IRole[] AssociatedRoles { get; set; }
Property Value
IRole[]
Remarks
Default: - No role is attached to the cluster.
Stability: Experimental
AutoMinorVersionUpgrade
(experimental) If set to true, Neptune will automatically update the engine of the entire cluster to the latest minor version after a stabilization window of 2 to 3 weeks.
public Nullable<bool> AutoMinorVersionUpgrade { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - false
Stability: Experimental
BackupRetention
(experimental) How many days to retain the backup.
public Duration BackupRetention { get; set; }
Property Value
Remarks
Default: - cdk.Duration.days(1)
Stability: Experimental
CloudwatchLogsExports
(experimental) The list of log types that need to be enabled for exporting to CloudWatch Logs.
public LogType[] CloudwatchLogsExports { get; set; }
Property Value
LogType[]
Remarks
Default: - no log exports
Stability: Experimental
See: https://docs.aws.amazon.com/neptune/latest/userguide/auditing.html#auditing-enable
CloudwatchLogsRetention
(experimental) The number of days log events are kept in CloudWatch Logs.
public Nullable<RetentionDays> CloudwatchLogsRetention { get; set; }
Property Value
System.Nullable<RetentionDays>
Remarks
When updating
this property, unsetting it doesn't remove the log retention policy. To
remove the retention policy, set the value to Infinity
.
Default: - logs never expire
Stability: Experimental
CloudwatchLogsRetentionRole
(experimental) The IAM role for the Lambda function associated with the custom resource that sets the retention policy.
public IRole CloudwatchLogsRetentionRole { get; set; }
Property Value
Remarks
Default: - a new role is created.
Stability: Experimental
ClusterParameterGroup
(experimental) Additional parameters to pass to the database engine.
public IClusterParameterGroup ClusterParameterGroup { get; set; }
Property Value
Remarks
Default: - No parameter group.
Stability: Experimental
DbClusterName
(experimental) An optional identifier for the cluster.
public string DbClusterName { get; set; }
Property Value
System.String
Remarks
Default: - A name is automatically generated.
Stability: Experimental
DeletionProtection
(experimental) Indicates whether the DB cluster should have deletion protection enabled.
public Nullable<bool> DeletionProtection { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - true if removalPolicy
is RETAIN, false otherwise
Stability: Experimental
EngineVersion
(experimental) What version of the database to start.
public EngineVersion EngineVersion { get; set; }
Property Value
Remarks
Default: - The default engine version.
Stability: Experimental
IamAuthentication
(experimental) Map AWS Identity and Access Management (IAM) accounts to database accounts.
public Nullable<bool> IamAuthentication { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - false
Stability: Experimental
InstanceIdentifierBase
(experimental) Base identifier for instances.
public string InstanceIdentifierBase { get; set; }
Property Value
System.String
Remarks
Every replica is named by appending the replica number to this string, 1-based.
Default: - dbClusterName
is used with the word "Instance" appended. If dbClusterName
is not provided, the
identifier is automatically generated.
Stability: Experimental
Instances
(experimental) Number of Neptune compute instances.
public Nullable<double> Instances { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Default: 1
Stability: Experimental
InstanceType
(experimental) What type of instance to start for the replicas.
public InstanceType InstanceType { get; set; }
Property Value
Remarks
Stability: Experimental
KmsKey
(experimental) The KMS key for storage encryption.
public IKey KmsKey { get; set; }
Property Value
Remarks
Default: - default master key.
Stability: Experimental
ParameterGroup
(experimental) The DB parameter group to associate with the instance.
public IParameterGroup ParameterGroup { get; set; }
Property Value
Remarks
Default: no parameter group
Stability: Experimental
PreferredBackupWindow
(experimental) A daily time range in 24-hours UTC format in which backups preferably execute.
public string PreferredBackupWindow { get; set; }
Property Value
System.String
Remarks
Must be at least 30 minutes long.
Example: '01:00-02:00'
Default: - a 30-minute window selected at random from an 8-hour block of time for each AWS Region. To see the time blocks available, see
Stability: Experimental
PreferredMaintenanceWindow
(experimental) A weekly time range in which maintenance should preferably execute.
public string PreferredMaintenanceWindow { get; set; }
Property Value
System.String
Remarks
Must be at least 30 minutes long.
Example: 'tue:04:17-tue:04:47'
Default: - 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.
Stability: Experimental
RemovalPolicy
(experimental) The removal policy to apply when the cluster and its instances are removed or replaced during a stack update, or when the stack is deleted.
public Nullable<RemovalPolicy> RemovalPolicy { get; set; }
Property Value
System.Nullable<RemovalPolicy>
Remarks
This removal policy also applies to the implicit security group created for the cluster if one is not supplied as a parameter.
Default: - Retain cluster.
Stability: Experimental
SecurityGroups
(experimental) Security group.
public ISecurityGroup[] SecurityGroups { get; set; }
Property Value
Remarks
Default: a new security group is created.
Stability: Experimental
ServerlessScalingConfiguration
(experimental) Specify minimum and maximum NCUs capacity for a serverless cluster.
public IServerlessScalingConfiguration ServerlessScalingConfiguration { get; set; }
Property Value
IServerlessScalingConfiguration
Remarks
See https://docs.aws.amazon.com/neptune/latest/userguide/neptune-serverless-capacity-scaling.html
Default: - required if instanceType is db.serverless
Stability: Experimental
StorageEncrypted
(experimental) Whether to enable storage encryption.
public Nullable<bool> StorageEncrypted { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true
Stability: Experimental
SubnetGroup
(experimental) Existing subnet group for the cluster.
public ISubnetGroup SubnetGroup { get; set; }
Property Value
Remarks
Default: - a new subnet group will be created.
Stability: Experimental
Vpc
(experimental) What subnets to run the Neptune instances in.
public IVpc Vpc { get; set; }
Property Value
Remarks
Must be at least 2 subnets in two different AZs.
Stability: Experimental
VpcSubnets
(experimental) Where to place the instances within the VPC.
public ISubnetSelection VpcSubnets { get; set; }
Property Value
Remarks
Default: private subnets
Stability: Experimental