Class CfnDBCluster
A CloudFormation AWS::DocDB::DBCluster
.
Inherited Members
Namespace: Amazon.CDK.AWS.DocDB
Assembly: Amazon.CDK.AWS.DocDB.dll
Syntax (csharp)
public class CfnDBCluster : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnDBCluster
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
The AWS::DocDB::DBCluster
Amazon DocumentDB (with MongoDB compatibility) resource describes a DBCluster. Amazon DocumentDB is a fully managed, MongoDB-compatible document database engine. For more information, see DBCluster in the Amazon DocumentDB Developer Guide .
CloudformationResource: AWS::DocDB::DBCluster
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.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.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,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
UseLatestRestorableTime = false,
VpcSecurityGroupIds = new [] { "vpcSecurityGroupIds" }
});
Synopsis
Constructors
CfnDBCluster(Construct, String, ICfnDBClusterProps) | Create a new |
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 |
Properties
AttrClusterResourceId | The resource id for the cluster; |
AttrEndpoint | The connection endpoint for the cluster, such as |
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. You must specify a minimum value of 1. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
CopyTagsToSnapshot |
|
DbClusterIdentifier | The cluster identifier. This parameter is stored as a lowercase string. |
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 |
|
RestoreType |
|
SnapshotIdentifier | The identifier for the snapshot or cluster snapshot to restore from. |
SourceDbClusterIdentifier |
|
StorageEncrypted | Specifies whether the cluster is encrypted. |
Tags | The tags to be assigned to the cluster. |
UseLatestRestorableTime |
|
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(Construct, String, ICfnDBClusterProps)
Create a new AWS::DocDB::DBCluster
.
public CfnDBCluster(Construct scope, string id, ICfnDBClusterProps props = null)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnDBClusterProps
- resource properties.
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
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
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[]
Remarks
BackupRetentionPeriod
The number of days for which automated backups are retained. You must specify a minimum value of 1.
public virtual Nullable<double> BackupRetentionPeriod { get; set; }
Property Value
System.Nullable<System.Double>
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
CopyTagsToSnapshot
AWS::DocDB::DBCluster.CopyTagsToSnapshot
.
public virtual object CopyTagsToSnapshot { get; set; }
Property Value
System.Object
Remarks
DbClusterIdentifier
The cluster identifier. This parameter is stored as a lowercase string.
public virtual string DbClusterIdentifier { get; set; }
Property Value
System.String
Remarks
Constraints:
Example: my-cluster
DbClusterParameterGroupName
The name of the cluster parameter group to associate with this cluster.
public virtual string DbClusterParameterGroupName { get; set; }
Property Value
System.String
Remarks
DbSubnetGroupName
A subnet group to associate with this cluster.
public virtual string DbSubnetGroupName { get; set; }
Property Value
System.String
Remarks
Constraints: Must match the name of an existing DBSubnetGroup
. Must not be default.
Example: mySubnetgroup
DeletionProtection
Protects clusters from being accidentally deleted.
public virtual object DeletionProtection { get; set; }
Property Value
System.Object
Remarks
If enabled, the cluster cannot be deleted unless it is modified and DeletionProtection
is disabled.
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[]
Remarks
You can enable audit logs or profiler logs. For more information, see Auditing Amazon DocumentDB Events and Profiling Amazon DocumentDB Operations .
EngineVersion
The version number of the database engine to use.
public virtual string EngineVersion { get; set; }
Property Value
System.String
Remarks
The --engine-version
will default to the latest major engine version. For production workloads, we recommend explicitly declaring this parameter with the intended major engine version.
KmsKeyId
The AWS KMS key identifier for an encrypted cluster.
public virtual string KmsKeyId { get; set; }
Property Value
System.String
Remarks
The AWS KMS key identifier is the Amazon Resource Name (ARN) for the AWS KMS encryption key. If you are creating a cluster using the same AWS account that owns the AWS KMS encryption key that is used to encrypt the new cluster, you can use the AWS KMS key alias instead of the ARN for the AWS KMS encryption key.
If an encryption key is not specified in KmsKeyId
:
AWS KMS creates the default encryption key for your AWS account . Your AWS account has a different default encryption key for each AWS Regions .
MasterUsername
The name of the master user for the cluster.
public virtual string MasterUsername { get; set; }
Property Value
System.String
Remarks
MasterUserPassword
The password for the master database user.
public virtual string MasterUserPassword { get; set; }
Property Value
System.String
Remarks
This password can contain any printable ASCII character except forward slash (/), double quote ("), or the "at" symbol (@).
Constraints: Must contain from 8 to 100 characters.
Port
Specifies the port that the database engine is listening on.
public virtual Nullable<double> Port { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
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
Remarks
The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region .
Constraints:
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
Remarks
Format: ddd:hh24:mi-ddd:hh24:mi
The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region , occurring on a random day of the week.
Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
Constraints: Minimum 30-minute window.
RestoreToTime
AWS::DocDB::DBCluster.RestoreToTime
.
public virtual string RestoreToTime { get; set; }
Property Value
System.String
Remarks
RestoreType
AWS::DocDB::DBCluster.RestoreType
.
public virtual string RestoreType { get; set; }
Property Value
System.String
Remarks
SnapshotIdentifier
The identifier for the snapshot or cluster snapshot to restore from.
public virtual string SnapshotIdentifier { get; set; }
Property Value
System.String
Remarks
You can use either the name or the Amazon Resource Name (ARN) to specify a cluster snapshot. However, you can use only the ARN to specify a snapshot.
Constraints:
SourceDbClusterIdentifier
AWS::DocDB::DBCluster.SourceDBClusterIdentifier
.
public virtual string SourceDbClusterIdentifier { get; set; }
Property Value
System.String
Remarks
StorageEncrypted
Specifies whether the cluster is encrypted.
public virtual object StorageEncrypted { get; set; }
Property Value
System.Object
Remarks
Tags
The tags to be assigned to the cluster.
public virtual TagManager Tags { get; }
Property Value
Remarks
UseLatestRestorableTime
AWS::DocDB::DBCluster.UseLatestRestorableTime
.
public virtual object UseLatestRestorableTime { get; set; }
Property Value
System.Object
Remarks
VpcSecurityGroupIds
A list of EC2 VPC security groups to associate with this cluster.
public virtual string[] VpcSecurityGroupIds { get; set; }
Property Value
System.String[]
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>