Class CfnDBInstance
A CloudFormation AWS::Neptune::DBInstance
.
Inherited Members
Namespace: Amazon.CDK.AWS.Neptune
Assembly: Amazon.CDK.AWS.Neptune.dll
Syntax (csharp)
public class CfnDBInstance : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnDBInstance
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
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 AWS 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 AWS CloudFormation behavior depends on the DBClusterIdentifier
property:
Deleting DB Instances
If a DB instance is deleted or replaced during an update, AWS 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, AWS 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 AWS CloudFormation replaces your DB instance. To preserve your data, perform the following procedure:
CloudformationResource: AWS::Neptune::DBInstance
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-neptune-dbinstance.html
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.AWS.Neptune;
var cfnDBInstance = new CfnDBInstance(this, "MyCfnDBInstance", new CfnDBInstanceProps {
DbInstanceClass = "dbInstanceClass",
// the properties below are optional
AllowMajorVersionUpgrade = false,
AutoMinorVersionUpgrade = false,
AvailabilityZone = "availabilityZone",
DbClusterIdentifier = "dbClusterIdentifier",
DbInstanceIdentifier = "dbInstanceIdentifier",
DbParameterGroupName = "dbParameterGroupName",
DbSnapshotIdentifier = "dbSnapshotIdentifier",
DbSubnetGroupName = "dbSubnetGroupName",
PreferredMaintenanceWindow = "preferredMaintenanceWindow",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnDBInstance(Construct, String, ICfnDBInstanceProps) | Create a new |
CfnDBInstance(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnDBInstance(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AllowMajorVersionUpgrade | Indicates that major version upgrades are allowed. |
AttrEndpoint | The connection endpoint for the database. |
AttrPort | The port number on which the database accepts connections. |
AutoMinorVersionUpgrade | Indicates that minor version patches are applied automatically. |
AvailabilityZone | Specifies the name of the Availability Zone the DB instance is located in. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
DbClusterIdentifier | If the DB instance is a member of a DB cluster, contains the name of the DB cluster that the DB instance is a member of. |
DbInstanceClass | Contains the name of the compute and memory capacity class of the DB instance. |
DbInstanceIdentifier | Contains a user-supplied database identifier. |
DbParameterGroupName | The name of an existing DB parameter group or a reference to an AWS::Neptune::DBParameterGroup resource created in the template. |
DbSnapshotIdentifier | This parameter is not supported. |
DbSubnetGroupName | A DB subnet group to associate with the DB instance. |
PreferredMaintenanceWindow | Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). |
Tags | An arbitrary set of tags (key-value pairs) for this DB instance. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnDBInstance(Construct, String, ICfnDBInstanceProps)
Create a new AWS::Neptune::DBInstance
.
public CfnDBInstance(Construct scope, string id, ICfnDBInstanceProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnDBInstanceProps
- resource properties.
CfnDBInstance(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnDBInstance(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnDBInstance(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnDBInstance(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AllowMajorVersionUpgrade
Indicates that major version upgrades are allowed.
public virtual object AllowMajorVersionUpgrade { get; set; }
Property Value
System.Object
Remarks
Changing this parameter doesn't result in an outage and the change is asynchronously applied as soon as possible. This parameter must be set to true when specifying a value for the EngineVersion parameter that is a different major version than the DB instance's current version.
When you change this parameter for an existing DB cluster, CloudFormation will replace your existing DB cluster with a new, empty one that uses the engine version you specified.
AttrEndpoint
The connection endpoint for the database.
public virtual string AttrEndpoint { get; }
Property Value
System.String
Remarks
For example: mystack-mydb-1apw1j4phylrk.cg034hpkmmjt.us-east-2.rds.amazonaws.com
.
CloudformationAttribute: Endpoint
AttrPort
The port number on which the database accepts connections.
public virtual string AttrPort { get; }
Property Value
System.String
Remarks
For example: 8182
.
CloudformationAttribute: Port
AutoMinorVersionUpgrade
Indicates that minor version patches are applied automatically.
public virtual object AutoMinorVersionUpgrade { get; set; }
Property Value
System.Object
Remarks
When updating this property, some interruptions may occur.
AvailabilityZone
Specifies the name of the Availability Zone the DB instance is located in.
public virtual string AvailabilityZone { get; set; }
Property Value
System.String
Remarks
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
DbClusterIdentifier
If the DB instance is a member of a DB cluster, contains the name of the DB cluster that the DB instance is a member of.
public virtual string DbClusterIdentifier { get; set; }
Property Value
System.String
Remarks
DbInstanceClass
Contains the name of the compute and memory capacity class of the DB instance.
public virtual string DbInstanceClass { get; set; }
Property Value
System.String
Remarks
If you update this property, some interruptions may occur.
DbInstanceIdentifier
Contains a user-supplied database identifier.
public virtual string DbInstanceIdentifier { get; set; }
Property Value
System.String
Remarks
This identifier is the unique key that identifies a DB instance.
DbParameterGroupName
The name of an existing DB parameter group or a reference to an AWS::Neptune::DBParameterGroup resource created in the template.
public virtual string DbParameterGroupName { get; set; }
Property Value
System.String
Remarks
If any of the data members of the referenced parameter group are changed during an update, the DB instance might need to be restarted, which causes some interruption. If the parameter group contains static parameters, whether they were changed or not, an update triggers a reboot.
DbSnapshotIdentifier
This parameter is not supported.
public virtual string DbSnapshotIdentifier { get; set; }
Property Value
System.String
Remarks
AWS::Neptune::DBInstance
does not support restoring from snapshots.
AWS::Neptune::DBCluster
does support restoring from snapshots.
DbSubnetGroupName
A DB subnet group to associate with the DB instance.
public virtual string DbSubnetGroupName { get; set; }
Property Value
System.String
Remarks
If you update this value, the new subnet group must be a subnet group in a new virtual private cloud (VPC).
PreferredMaintenanceWindow
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
public virtual string PreferredMaintenanceWindow { get; set; }
Property Value
System.String
Remarks
Tags
An arbitrary set of tags (key-value pairs) for this DB instance.
public virtual TagManager Tags { get; }
Property Value
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>