Class CfnDBInstance
The AWS::Neptune::DBInstance
type creates an Amazon Neptune DB instance.
Inherited Members
Namespace: Amazon.CDK.AWS.Neptune
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnDBInstance : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnDBInstance
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
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:
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-neptune-dbinstance.html
CloudformationResource: AWS::Neptune::DBInstance
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(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 |
CfnDBInstance(Construct, String, ICfnDBInstanceProps) |
Properties
AllowMajorVersionUpgrade | Indicates that major version upgrades are allowed. |
AttrEndpoint | The connection endpoint for the database. |
AttrId | |
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 | Tag Manager which manages the tags for this resource. |
TagsRaw | 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(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
CfnDBInstance(Construct, String, ICfnDBInstanceProps)
public CfnDBInstance(Construct scope, string id, ICfnDBInstanceProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnDBInstanceProps
Resource properties.
Properties
AllowMajorVersionUpgrade
Indicates that major version upgrades are allowed.
public virtual object AllowMajorVersionUpgrade { get; set; }
Property Value
System.Object
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
AttrId
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
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
AvailabilityZone
Specifies the name of the Availability Zone the DB instance is located in.
public virtual string AvailabilityZone { get; set; }
Property Value
System.String
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
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
DbInstanceIdentifier
Contains a user-supplied database identifier.
public virtual string DbInstanceIdentifier { get; set; }
Property Value
System.String
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
DbSnapshotIdentifier
This parameter is not supported.
public virtual string DbSnapshotIdentifier { get; set; }
Property Value
System.String
DbSubnetGroupName
A DB subnet group to associate with the DB instance.
public virtual string DbSubnetGroupName { get; set; }
Property Value
System.String
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
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
An arbitrary set of tags (key-value pairs) for this DB instance.
public virtual ICfnTag[] TagsRaw { get; set; }
Property Value
ICfnTag[]
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>