DatabaseClusterProps

class aws_cdk.aws_docdb.DatabaseClusterProps(*, instance_props, master_user, backup=None, db_cluster_name=None, engine_version=None, instance_identifier_base=None, instances=None, kms_key=None, parameter_group=None, port=None, preferred_maintenance_window=None, removal_policy=None, storage_encrypted=None)

Bases: object

__init__(*, instance_props, master_user, backup=None, db_cluster_name=None, engine_version=None, instance_identifier_base=None, instances=None, kms_key=None, parameter_group=None, port=None, preferred_maintenance_window=None, removal_policy=None, storage_encrypted=None)

Properties for a new database cluster.

Parameters
  • instance_props (InstanceProps) – Settings for the individual instances that are launched.

  • master_user (Login) – Username and password for the administrative user.

  • backup (Optional[BackupProps]) – Backup settings. Default: - Backup retention period for automated backups is 1 day. Backup preferred window is set to 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.

  • db_cluster_name (Optional[str]) – An optional identifier for the cluster. Default: - A name is automatically generated.

  • engine_version (Optional[str]) – What version of the database to start. Default: - The default engine version.

  • instance_identifier_base (Optional[str]) – Base identifier for instances. Every replica is named by appending the replica number to this string, 1-based. Default: - dbClusterName is used with the word “Instance” appended. If dbClusterName is not provided, the identifier is automatically generated.

  • instances (Union[int, float, None]) – Number of DocDB compute instances. Default: 1

  • kms_key (Optional[IKey]) – The KMS key for storage encryption. Default: - default master key.

  • parameter_group (Optional[IClusterParameterGroup]) – Additional parameters to pass to the database engine. Default: - No parameter group.

  • port (Union[int, float, None]) – The port the DocumentDB cluster will listen on. Default: DatabaseCluster.DEFAULT_PORT

  • preferred_maintenance_window (Optional[str]) – A weekly time range in which maintenance should preferably execute. Must be at least 30 minutes long. Example: ‘tue:04:17-tue:04:47’ Default: - 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.

  • removal_policy (Optional[RemovalPolicy]) – The removal policy to apply when the cluster and its instances are removed or replaced during a stack update, or when the stack is deleted. This removal policy also applies to the implicit security group created for the cluster if one is not supplied as a parameter. Default: - Retain cluster.

  • storage_encrypted (Optional[bool]) – Whether to enable storage encryption. Default: true

stability :stability: experimental

Return type

None

Attributes

backup

Backup settings.

default :default:

  • Backup retention period for automated backups is 1 day. Backup preferred window is set to 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.

see :see: https://docs.aws.amazon.com/documentdb/latest/developerguide/backup-restore.db-cluster-snapshots.html#backup-restore.backup-window stability :stability: experimental

Return type

Optional[BackupProps]

db_cluster_name

An optional identifier for the cluster.

default :default: - A name is automatically generated.

stability :stability: experimental

Return type

Optional[str]

engine_version

What version of the database to start.

default :default: - The default engine version.

stability :stability: experimental

Return type

Optional[str]

instance_identifier_base

Base identifier for instances.

Every replica is named by appending the replica number to this string, 1-based.

default :default:

  • dbClusterName is used with the word “Instance” appended. If dbClusterName is not provided, the identifier is automatically generated.

stability :stability: experimental

Return type

Optional[str]

instance_props

Settings for the individual instances that are launched.

stability :stability: experimental

Return type

InstanceProps

instances

Number of DocDB compute instances.

default :default: 1

stability :stability: experimental

Return type

Union[int, float, None]

kms_key

The KMS key for storage encryption.

default :default: - default master key.

stability :stability: experimental

Return type

Optional[IKey]

master_user

Username and password for the administrative user.

stability :stability: experimental

Return type

Login

parameter_group

Additional parameters to pass to the database engine.

default :default: - No parameter group.

stability :stability: experimental

Return type

Optional[IClusterParameterGroup]

port

The port the DocumentDB cluster will listen on.

default :default: DatabaseCluster.DEFAULT_PORT

stability :stability: experimental

Return type

Union[int, float, None]

preferred_maintenance_window

A weekly time range in which maintenance should preferably execute.

Must be at least 30 minutes long.

Example: ‘tue:04:17-tue:04:47’

default :default:

  • 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.

see :see: https://docs.aws.amazon.com/documentdb/latest/developerguide/db-instance-maintain.html#maintenance-window stability :stability: experimental

Return type

Optional[str]

removal_policy

The removal policy to apply when the cluster and its instances are removed or replaced during a stack update, or when the stack is deleted.

This removal policy also applies to the implicit security group created for the cluster if one is not supplied as a parameter.

default :default: - Retain cluster.

stability :stability: experimental

Return type

Optional[RemovalPolicy]

storage_encrypted

Whether to enable storage encryption.

default :default: true

stability :stability: experimental

Return type

Optional[bool]