Skip to content
v2.277.0

Experimental

@aws-cdk/aws-neptune-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

DatabaseClusterProps Struct ​

Properties for a new database cluster.

Example ​

ts
const cluster = new neptune.DatabaseCluster(this, 'ServerlessDatabase', {
  vpc,
  instanceType: neptune.InstanceType.SERVERLESS,
  serverlessScalingConfiguration: {
    minCapacity: 1,
    maxCapacity: 5,
  },
});
python
cluster = neptune.DatabaseCluster(self, "ServerlessDatabase",
    vpc=vpc,
    instance_type=neptune.InstanceType.SERVERLESS,
    serverless_scaling_configuration=neptune.ServerlessScalingConfiguration(
        min_capacity=1,
        max_capacity=5
    )
)
java
DatabaseCluster cluster = DatabaseCluster.Builder.create(this, "ServerlessDatabase")
        .vpc(vpc)
        .instanceType(InstanceType.SERVERLESS)
        .serverlessScalingConfiguration(ServerlessScalingConfiguration.builder()
                .minCapacity(1)
                .maxCapacity(5)
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Neptune.Alpha
var cluster = new DatabaseCluster(this, "ServerlessDatabase", new DatabaseClusterProps {
    Vpc = vpc,
    InstanceType = InstanceType.SERVERLESS,
    ServerlessScalingConfiguration = new ServerlessScalingConfiguration {
        MinCapacity = 1,
        MaxCapacity = 5
    }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdkneptunealpha/v2
cluster := neptune.NewDatabaseCluster(this, jsii.String("ServerlessDatabase"), &DatabaseClusterProps{
	Vpc: Vpc,
	InstanceType: neptune.InstanceType_SERVERLESS(),
	ServerlessScalingConfiguration: &ServerlessScalingConfiguration{
		MinCapacity: jsii.Number(1),
		MaxCapacity: jsii.Number(5),
	},
})

Properties ​

associatedRolesoptionalIRole[]associated_rolesoptionaltyping.List[IRole]associatedRolesoptionalList<IRole>AssociatedRolesoptionalIRole[]AssociatedRolesoptional*[]IRole #
A list of AWS Identity and Access Management (IAM) role that can be used by the cluster to access other AWS services.

Default: No role is attached to the cluster.

autoMinorVersionUpgradeoptionalbooleanauto_minor_version_upgradeoptionalboolautoMinorVersionUpgradeoptionalBooleanAutoMinorVersionUpgradeoptionalboolAutoMinorVersionUpgradeoptional*bool = false #
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.
backupRetentionoptionalDurationbackup_retentionoptionalDurationbackupRetentionoptionalDurationBackupRetentionoptionalDurationBackupRetentionoptionalDuration = cdk.Duration.days(1) #
How many days to retain the backup.
cloudwatchLogsExportsoptionalLogType[]cloudwatch_logs_exportsoptionaltyping.List[LogType]cloudwatchLogsExportsoptionalList<LogType>CloudwatchLogsExportsoptionalLogType[]CloudwatchLogsExportsoptional*[]LogType #
The list of log types that need to be enabled for exporting to CloudWatch Logs.

Default: no log exports

cloudwatchLogsRetentionoptionalRetentionDayscloudwatch_logs_retentionoptionalRetentionDayscloudwatchLogsRetentionoptionalRetentionDaysCloudwatchLogsRetentionoptionalRetentionDaysCloudwatchLogsRetentionoptionalRetentionDays #
The number of days log events are kept in CloudWatch Logs.

Default: logs never expire

When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to Infinity.

cloudwatchLogsRetentionRoleoptionalIRolecloudwatch_logs_retention_roleoptionalIRolecloudwatchLogsRetentionRoleoptionalIRoleCloudwatchLogsRetentionRoleoptionalIRoleCloudwatchLogsRetentionRoleoptionalIRole #
The IAM role for the Lambda function associated with the custom resource that sets the retention policy.

Default: a new role is created.

clusterParameterGroupoptionalIClusterParameterGroupcluster_parameter_groupoptionalIClusterParameterGroupclusterParameterGroupoptionalIClusterParameterGroupClusterParameterGroupoptionalIClusterParameterGroupClusterParameterGroupoptionalIClusterParameterGroup #
Additional parameters to pass to the database engine.

Default: No parameter group.

copyTagsToSnapshotoptionalbooleancopy_tags_to_snapshotoptionalboolcopyTagsToSnapshotoptionalBooleanCopyTagsToSnapshotoptionalboolCopyTagsToSnapshotoptional*bool = false #
Whether to copy tags to the snapshot when a snapshot is created.
dbClusterNameoptionalstringdb_cluster_nameoptionalstrdbClusterNameoptionalStringDbClusterNameoptionalstringDbClusterNameoptional*string #
An optional identifier for the cluster.

Default: A name is automatically generated.

deletionProtectionoptionalbooleandeletion_protectionoptionalbooldeletionProtectionoptionalBooleanDeletionProtectionoptionalboolDeletionProtectionoptional*bool #
Indicates whether the DB cluster should have deletion protection enabled.

Default: true if removalPolicy is RETAIN, false otherwise

engineVersionoptionalEngineVersionengine_versionoptionalEngineVersionengineVersionoptionalEngineVersionEngineVersionoptionalEngineVersionEngineVersionoptionalEngineVersion #
What version of the database to start.

Default: The default engine version.

iamAuthenticationoptionalbooleaniam_authenticationoptionalbooliamAuthenticationoptionalBooleanIamAuthenticationoptionalboolIamAuthenticationoptional*bool = `false` #
Map AWS Identity and Access Management (IAM) accounts to database accounts.
instanceIdentifierBaseoptionalstringinstance_identifier_baseoptionalstrinstanceIdentifierBaseoptionalStringInstanceIdentifierBaseoptionalstringInstanceIdentifierBaseoptional*string #
Base identifier for instances.

Default: dbClusterName is used with the word "Instance" appended. If dbClusterName is not provided, the identifier is automatically generated.

Every replica is named by appending the replica number to this string, 1-based.

instancesoptionalnumberinstancesoptionalint | floatinstancesoptionalNumberInstancesoptionaldoubleInstancesoptional*float64 = 1 #
Number of Neptune compute instances.
instanceTypeInstanceTypeinstance_typeInstanceTypeinstanceTypeInstanceTypeInstanceTypeInstanceTypeInstanceTypeInstanceType required #
What type of instance to start for the replicas.
kmsKeyoptionalIKeyRefkms_keyoptionalIKeyRefkmsKeyoptionalIKeyRefKmsKeyoptionalIKeyRefKmsKeyoptionalIKeyRef #
The KMS key for storage encryption.

Default: default master key.

parameterGroupoptionalIParameterGroupparameter_groupoptionalIParameterGroupparameterGroupoptionalIParameterGroupParameterGroupoptionalIParameterGroupParameterGroupoptionalIParameterGroup #
The DB parameter group to associate with the instance.

Default: no parameter group

portoptionalnumberportoptionalint | floatportoptionalNumberPortoptionaldoublePortoptional*float64 = 8182 #
The port number on which the DB instances in the DB cluster accept connections.
preferredBackupWindowoptionalstringpreferred_backup_windowoptionalstrpreferredBackupWindowoptionalStringPreferredBackupWindowoptionalstringPreferredBackupWindowoptional*string #
A daily time range in 24-hours UTC format in which backups preferably execute.

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

Must be at least 30 minutes long.

Example: '01:00-02:00'

preferredMaintenanceWindowoptionalstringpreferred_maintenance_windowoptionalstrpreferredMaintenanceWindowoptionalStringPreferredMaintenanceWindowoptionalstringPreferredMaintenanceWindowoptional*string #
A weekly time range in which maintenance should preferably execute.

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.

Must be at least 30 minutes long.

Example: 'tue:04:17-tue:04:47'

removalPolicyoptionalRemovalPolicyremoval_policyoptionalRemovalPolicyremovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicy #
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.

Default: Retain cluster.

This removal policy also applies to the implicit security group created for the cluster if one is not supplied as a parameter.

securityGroupsoptionalISecurityGroup[]security_groupsoptionaltyping.List[ISecurityGroup]securityGroupsoptionalList<ISecurityGroup>SecurityGroupsoptionalISecurityGroup[]SecurityGroupsoptional*[]ISecurityGroup #
Security group.

Default: a new security group is created.

serverlessScalingConfigurationoptionalServerlessScalingConfigurationserverless_scaling_configurationoptionalServerlessScalingConfigurationserverlessScalingConfigurationoptionalServerlessScalingConfigurationServerlessScalingConfigurationoptionalServerlessScalingConfigurationServerlessScalingConfigurationoptionalServerlessScalingConfiguration #
Specify minimum and maximum NCUs capacity for a serverless cluster.
storageEncryptedoptionalbooleanstorage_encryptedoptionalboolstorageEncryptedoptionalBooleanStorageEncryptedoptionalboolStorageEncryptedoptional*bool = true #
Whether to enable storage encryption.
subnetGroupoptionalISubnetGroupsubnet_groupoptionalISubnetGroupsubnetGroupoptionalISubnetGroupSubnetGroupoptionalISubnetGroupSubnetGroupoptionalISubnetGroup #
Existing subnet group for the cluster.

Default: a new subnet group will be created.

vpcIVpcvpcIVpcvpcIVpcVpcIVpcVpcIVpc required #
What subnets to run the Neptune instances in.

Must be at least 2 subnets in two different AZs.

vpcSubnetsoptionalSubnetSelectionvpc_subnetsoptionalSubnetSelectionvpcSubnetsoptionalSubnetSelectionVpcSubnetsoptionalSubnetSelectionVpcSubnetsoptionalSubnetSelection #
Where to place the instances within the VPC.

Default: private subnets