class CfnDBInstancePropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.Neptune.Mixins.CfnDBInstancePropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsneptune/mixins#CfnDBInstancePropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.neptune.mixins.CfnDBInstancePropsMixin |
Python | aws_cdk.mixins_preview.aws_neptune.mixins.CfnDBInstancePropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_neptune » mixins » CfnDBInstancePropsMixin |
Implements
IMixin
Extends
Mixin
The AWS::Neptune::DBInstance type creates an Amazon Neptune DB instance.
Updating DB Instances
You can set a deletion policy for your DB instance to control how CloudFormation handles the instance when the stack is deleted. For Neptune DB instances, you can choose to retain the instance, to delete the instance, or to create a snapshot of the instance. The default CloudFormation behavior depends on the DBClusterIdentifier property:
- For
AWS::Neptune::DBInstanceresources that don't specify theDBClusterIdentifierproperty, CloudFormation saves a snapshot of the DB instance. - For
AWS::Neptune::DBInstanceresources that do specify theDBClusterIdentifierproperty, CloudFormation deletes the DB instance.
Deleting DB Instances
If a DB instance is deleted or replaced during an update, CloudFormation deletes all automated snapshots. However, it retains manual DB snapshots. During an update that requires replacement, you can apply a stack policy to prevent DB instances from being replaced.
When properties labeled Update requires: Replacement are updated, CloudFormation first creates a replacement DB instance, changes references from other dependent resources to point to the replacement DB instance, and finally deletes the old DB instance.
We highly recommend that you take a snapshot of the database before updating the stack. If you don't, you lose the data when CloudFormation replaces your DB instance. To preserve your data, perform the following procedure:
- Deactivate any applications that are using the DB instance so that there's no activity on the DB instance.
- Create a snapshot of the DB instance.
- If you want to restore your instance using a DB snapshot, modify the updated template with your DB instance changes and add the
DBSnapshotIdentifierproperty with the ID of the DB snapshot that you want to use.- Update the stack.
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-neptune-dbinstance.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as neptune_mixins } from '@aws-cdk/mixins-preview/aws-neptune';
const cfnDBInstancePropsMixin = new neptune_mixins.CfnDBInstancePropsMixin({
allowMajorVersionUpgrade: false,
autoMinorVersionUpgrade: false,
availabilityZone: 'availabilityZone',
dbClusterIdentifier: 'dbClusterIdentifier',
dbInstanceClass: 'dbInstanceClass',
dbInstanceIdentifier: 'dbInstanceIdentifier',
dbParameterGroupName: 'dbParameterGroupName',
dbSnapshotIdentifier: 'dbSnapshotIdentifier',
dbSubnetGroupName: 'dbSubnetGroupName',
preferredMaintenanceWindow: 'preferredMaintenanceWindow',
publiclyAccessible: false,
tags: [{
key: 'key',
value: 'value',
}],
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnDBInstancePropsMixin(props: CfnDBInstanceMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.DBInstance Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::Neptune::DBInstance.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript