Interface ICfnDBClusterProps
Properties for defining a CfnDBCluster
.
Namespace: Amazon.CDK.AWS.DocDB
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICfnDBClusterProps
Syntax (vb)
Public Interface ICfnDBClusterProps
Remarks
See: 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 cfnDBClusterProps = 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
Properties
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. |
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 | The date and time to restore the cluster to. |
RestoreType | The type of restore to be performed. You can specify one of the following values:. |
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 | 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. |
Properties
AvailabilityZones
A list of Amazon EC2 Availability Zones that instances in the cluster can be created in.
virtual string[] AvailabilityZones { get; }
Property Value
System.String[]
Remarks
BackupRetentionPeriod
The number of days for which automated backups are retained. You must specify a minimum value of 1.
virtual Nullable<double> BackupRetentionPeriod { get; }
Property Value
System.Nullable<System.Double>
Remarks
CopyTagsToSnapshot
virtual object CopyTagsToSnapshot { get; }
Property Value
System.Object
Remarks
DbClusterIdentifier
The cluster identifier. This parameter is stored as a lowercase string.
virtual string DbClusterIdentifier { get; }
Property Value
System.String
Remarks
Constraints:
Example: my-cluster
DbClusterParameterGroupName
The name of the cluster parameter group to associate with this cluster.
virtual string DbClusterParameterGroupName { get; }
Property Value
System.String
Remarks
DbSubnetGroupName
A subnet group to associate with this cluster.
virtual string DbSubnetGroupName { get; }
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.
virtual object DeletionProtection { get; }
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.
virtual string[] EnableCloudwatchLogsExports { get; }
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.
virtual string EngineVersion { get; }
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.
virtual string KmsKeyId { get; }
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.
virtual string MasterUsername { get; }
Property Value
System.String
Remarks
MasterUserPassword
The password for the master database user.
virtual string MasterUserPassword { get; }
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.
virtual Nullable<double> Port { get; }
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.
virtual string PreferredBackupWindow { get; }
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).
virtual string PreferredMaintenanceWindow { get; }
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
The date and time to restore the cluster to.
virtual string RestoreToTime { get; }
Property Value
System.String
Remarks
Valid values: A time in Universal Coordinated Time (UTC) format.
Constraints:
Example: 2015-03-07T23:45:00Z
RestoreType
The type of restore to be performed. You can specify one of the following values:.
virtual string RestoreType { get; }
Property Value
System.String
Remarks
Constraints: You can't specify copy-on-write
if the engine version of the source DB cluster is earlier than 1.11.
If you don't specify a RestoreType
value, then the new DB cluster is restored as a full copy of the source DB cluster.
SnapshotIdentifier
The identifier for the snapshot or cluster snapshot to restore from.
virtual string SnapshotIdentifier { get; }
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
The identifier of the source cluster from which to restore.
virtual string SourceDbClusterIdentifier { get; }
Property Value
System.String
Remarks
StorageEncrypted
Specifies whether the cluster is encrypted.
virtual object StorageEncrypted { get; }
Property Value
System.Object
Remarks
StorageType
The storage type to associate with the DB cluster.
virtual string StorageType { get; }
Property Value
System.String
Remarks
For information on storage types for Amazon DocumentDB clusters, see Cluster storage configurations in the Amazon DocumentDB Developer Guide .
Valid values for storage type - standard | iopt1
Default value is standard
When you create a DocumentDB DB cluster with the storage type set to iopt1
, the storage type is returned in the response. The storage type isn't returned when you set it to standard
.
Tags
The tags to be assigned to the cluster.
virtual ICfnTag[] Tags { get; }
Property Value
ICfnTag[]
Remarks
UseLatestRestorableTime
A value that is set to true
to restore the cluster to the latest restorable backup time, and false
otherwise.
virtual object UseLatestRestorableTime { get; }
Property Value
System.Object
Remarks
Default: false
Constraints: Cannot be specified if the RestoreToTime
parameter is provided.
VpcSecurityGroupIds
A list of EC2 VPC security groups to associate with this cluster.
virtual string[] VpcSecurityGroupIds { get; }
Property Value
System.String[]