CfnDBInstancePropsMixin

class aws_cdk.mixins_preview.aws_neptune.mixins.CfnDBInstancePropsMixin(props, *, strategy=None)

Bases: 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::DBInstance resources that don’t specify the DBClusterIdentifier property, CloudFormation saves a snapshot of the DB instance.

  • For AWS::Neptune::DBInstance resources that do specify the DBClusterIdentifier property, CloudFormation deletes the DB instance.

Deleting DB Instances .. epigraph:

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. .. epigraph:

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 ``DBSnapshotIdentifier`` property with the ID of the DB snapshot that you want to use.
- Update the stack.
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-neptune-dbinstance.html

CloudformationResource:

AWS::Neptune::DBInstance

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_neptune import mixins as neptune_mixins

cfn_dBInstance_props_mixin = neptune_mixins.CfnDBInstancePropsMixin(neptune_mixins.CfnDBInstanceMixinProps(
    allow_major_version_upgrade=False,
    auto_minor_version_upgrade=False,
    availability_zone="availabilityZone",
    db_cluster_identifier="dbClusterIdentifier",
    db_instance_class="dbInstanceClass",
    db_instance_identifier="dbInstanceIdentifier",
    db_parameter_group_name="dbParameterGroupName",
    db_snapshot_identifier="dbSnapshotIdentifier",
    db_subnet_group_name="dbSubnetGroupName",
    preferred_maintenance_window="preferredMaintenanceWindow",
    publicly_accessible=False,
    tags=[CfnTag(
        key="key",
        value="value"
    )]
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Neptune::DBInstance.

Parameters:
  • props (Union[CfnDBInstanceMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['allowMajorVersionUpgrade', 'autoMinorVersionUpgrade', 'availabilityZone', 'dbClusterIdentifier', 'dbInstanceClass', 'dbInstanceIdentifier', 'dbParameterGroupName', 'dbSnapshotIdentifier', 'dbSubnetGroupName', 'preferredMaintenanceWindow', 'publiclyAccessible', 'tags']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental