Class CfnDBCluster
The AWS::DocDB::DBCluster
Amazon DocumentDB (with MongoDB compatibility) resource describes a DBCluster.
Inherited Members
Namespace: Amazon.CDK.AWS.DocDB
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnDBCluster : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnDBCluster
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
Amazon DocumentDB is a fully managed, MongoDB-compatible document database engine. For more information, see DBCluster in the Amazon DocumentDB Developer Guide .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html
CloudformationResource: AWS::DocDB::DBCluster
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.DocDB;
var cfnDBCluster = new CfnDBCluster(this, "MyCfnDBCluster", new CfnDBClusterProps {
AvailabilityZones = new [] { "availabilityZones" },
BackupRetentionPeriod = 123,
CopyTagsToSnapshot = false,
DbClusterIdentifier = "dbClusterIdentifier",
DbClusterParameterGroupName = "dbClusterParameterGroupName",
DbSubnetGroupName = "dbSubnetGroupName",
DeletionProtection = false,
EnableCloudwatchLogsExports = new [] { "enableCloudwatchLogsExports" },
EngineVersion = "engineVersion",
KmsKeyId = "kmsKeyId",
MasterUsername = "masterUsername",
MasterUserPassword = "masterUserPassword",
Port = 123,
PreferredBackupWindow = "preferredBackupWindow",
PreferredMaintenanceWindow = "preferredMaintenanceWindow",
RestoreToTime = "restoreToTime",
RestoreType = "restoreType",
SnapshotIdentifier = "snapshotIdentifier",
SourceDbClusterIdentifier = "sourceDbClusterIdentifier",
StorageEncrypted = false,
StorageType = "storageType",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
UseLatestRestorableTime = false,
VpcSecurityGroupIds = new [] { "vpcSecurityGroupIds" }
});
Synopsis
Constructors
CfnDBCluster(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnDBCluster(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnDBCluster(Construct, String, ICfnDBClusterProps) |
Properties
AttrClusterResourceId | The resource id for the cluster; |
AttrEndpoint | The connection endpoint for the cluster, such as |
AttrId | |
AttrPort | The port number on which the cluster accepts connections. |
AttrReadEndpoint | The reader endpoint for the cluster. |
AvailabilityZones | A list of Amazon EC2 Availability Zones that instances in the cluster can be created in. |
BackupRetentionPeriod | The number of days for which automated backups are retained. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
CopyTagsToSnapshot | |
DbClusterIdentifier | The cluster identifier. |
DbClusterParameterGroupName | The name of the cluster parameter group to associate with this cluster. |
DbSubnetGroupName | A subnet group to associate with this cluster. |
DeletionProtection | Protects clusters from being accidentally deleted. |
EnableCloudwatchLogsExports | The list of log types that need to be enabled for exporting to Amazon CloudWatch Logs. |
EngineVersion | The version number of the database engine to use. |
KmsKeyId | The AWS KMS key identifier for an encrypted cluster. |
MasterUsername | The name of the master user for the cluster. |
MasterUserPassword | The password for the master database user. |
Port | Specifies the port that the database engine is listening on. |
PreferredBackupWindow | The daily time range during which automated backups are created if automated backups are enabled using the |
PreferredMaintenanceWindow | The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). |
RestoreToTime | The date and time to restore the cluster to. |
RestoreType | The type of restore to be performed. |
SnapshotIdentifier | The identifier for the snapshot or cluster snapshot to restore from. |
SourceDbClusterIdentifier | The identifier of the source cluster from which to restore. |
StorageEncrypted | Specifies whether the cluster is encrypted. |
StorageType | The storage type to associate with the DB cluster. |
Tags | Tag Manager which manages the tags for this resource. |
TagsRaw | The tags to be assigned to the cluster. |
UseLatestRestorableTime | A value that is set to |
VpcSecurityGroupIds | A list of EC2 VPC security groups to associate with this cluster. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnDBCluster(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnDBCluster(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnDBCluster(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnDBCluster(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnDBCluster(Construct, String, ICfnDBClusterProps)
public CfnDBCluster(Construct scope, string id, ICfnDBClusterProps props = null)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnDBClusterProps
Resource properties.
Properties
AttrClusterResourceId
The resource id for the cluster;
public virtual string AttrClusterResourceId { get; }
Property Value
System.String
Remarks
for example: cluster-ABCD1234EFGH5678IJKL90MNOP
. The cluster ID uniquely identifies the cluster and is used in things like IAM authentication policies.
CloudformationAttribute: ClusterResourceId
AttrEndpoint
The connection endpoint for the cluster, such as sample-cluster.cluster-cozrlsfrcjoc.us-east-1.docdb.amazonaws.com
.
public virtual string AttrEndpoint { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Endpoint
AttrId
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
AttrPort
The port number on which the cluster accepts connections.
public virtual string AttrPort { get; }
Property Value
System.String
Remarks
For example: 27017
.
CloudformationAttribute: Port
AttrReadEndpoint
The reader endpoint for the cluster.
public virtual string AttrReadEndpoint { get; }
Property Value
System.String
Remarks
For example: sample-cluster.cluster-ro-cozrlsfrcjoc.us-east-1.docdb.amazonaws.com
.
CloudformationAttribute: ReadEndpoint
AvailabilityZones
A list of Amazon EC2 Availability Zones that instances in the cluster can be created in.
public virtual string[] AvailabilityZones { get; set; }
Property Value
System.String[]
BackupRetentionPeriod
The number of days for which automated backups are retained.
public virtual Nullable<double> BackupRetentionPeriod { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
You must specify a minimum value of 1.
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
CopyTagsToSnapshot
public virtual object CopyTagsToSnapshot { get; set; }
Property Value
System.Object
DbClusterIdentifier
The cluster identifier.
public virtual string DbClusterIdentifier { get; set; }
Property Value
System.String
Remarks
This parameter is stored as a lowercase string.
DbClusterParameterGroupName
The name of the cluster parameter group to associate with this cluster.
public virtual string DbClusterParameterGroupName { get; set; }
Property Value
System.String
DbSubnetGroupName
A subnet group to associate with this cluster.
public virtual string DbSubnetGroupName { get; set; }
Property Value
System.String
DeletionProtection
Protects clusters from being accidentally deleted.
public virtual object DeletionProtection { get; set; }
Property Value
System.Object
EnableCloudwatchLogsExports
The list of log types that need to be enabled for exporting to Amazon CloudWatch Logs.
public virtual string[] EnableCloudwatchLogsExports { get; set; }
Property Value
System.String[]
EngineVersion
The version number of the database engine to use.
public virtual string EngineVersion { get; set; }
Property Value
System.String
KmsKeyId
The AWS KMS key identifier for an encrypted cluster.
public virtual string KmsKeyId { get; set; }
Property Value
System.String
MasterUsername
The name of the master user for the cluster.
public virtual string MasterUsername { get; set; }
Property Value
System.String
MasterUserPassword
The password for the master database user.
public virtual string MasterUserPassword { get; set; }
Property Value
System.String
Port
Specifies the port that the database engine is listening on.
public virtual Nullable<double> Port { get; set; }
Property Value
System.Nullable<System.Double>
PreferredBackupWindow
The daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod
parameter.
public virtual string PreferredBackupWindow { get; set; }
Property Value
System.String
PreferredMaintenanceWindow
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
RestoreToTime
The date and time to restore the cluster to.
public virtual string RestoreToTime { get; set; }
Property Value
System.String
RestoreType
The type of restore to be performed.
public virtual string RestoreType { get; set; }
Property Value
System.String
Remarks
You can specify one of the following values:.
SnapshotIdentifier
The identifier for the snapshot or cluster snapshot to restore from.
public virtual string SnapshotIdentifier { get; set; }
Property Value
System.String
SourceDbClusterIdentifier
The identifier of the source cluster from which to restore.
public virtual string SourceDbClusterIdentifier { get; set; }
Property Value
System.String
StorageEncrypted
Specifies whether the cluster is encrypted.
public virtual object StorageEncrypted { get; set; }
Property Value
System.Object
StorageType
The storage type to associate with the DB cluster.
public virtual string StorageType { get; set; }
Property Value
System.String
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
The tags to be assigned to the cluster.
public virtual ICfnTag[] TagsRaw { get; set; }
Property Value
ICfnTag[]
UseLatestRestorableTime
A value that is set to true
to restore the cluster to the latest restorable backup time, and false
otherwise.
public virtual object UseLatestRestorableTime { get; set; }
Property Value
System.Object
VpcSecurityGroupIds
A list of EC2 VPC security groups to associate with this cluster.
public virtual string[] VpcSecurityGroupIds { get; set; }
Property Value
System.String[]
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>