Modifying an Amazon DocumentDB Cluster
Use the following procedure to modify a specific Amazon DocumentDB cluster using the console.
To modify an Amazon DocumentDB cluster
Sign in to the AWS Management Console, and open the Amazon DocumentDB console at https://console.aws.amazon.com/docdb.
In the navigation pane, choose Clusters.
Tip
If you don’t see the navigation pane on the left side of your screen, choose the menu icon () in the upper-left corner of the page.
Specify the cluster that you want to modify by choosing the button to the left of the cluster’s name.
Choose Actions, and then choose Modify.
In the Modify Cluster: <cluster-name> pane, make the changes that you want. You can make changes in the following areas:
Cluster specifications—The cluster’s name, security groups, and password.
Cluster options—The cluster’s port and parameter group.
Backup—The cluster’s backup retention period and backup window.
Log exports—Enable or disable exporting audit or profiler logs.
Deletion protection—Enable or disable deletion protection on the cluster. Deletion protection is enabled by default.
If you are satisfied with your changes, you can choose Modify cluster to modify your cluster. Alternatively, you can choose Back or Cancel to edit or cancel your changes, respectively.
It takes a few minutes for your changes to be applied. You can use the cluster only when its status is available. You can monitor the cluster’s status using the console or AWS CLI. For more information, see .
Using the AWS CLI
Use the operation to modify the specified cluster using the AWS CLI. For more information, see in the Amazon DocumentDB API Reference.
Parameters
--db-cluster-identifier
—Required. The identifier of the Amazon DocumentDB cluster that you are going to modify.--backup-retention-period
—Optional. The number of days for which automated backups are retained. Valid values are 1–35.--db-cluster-parameter-group-name
—Optional. The name of the cluster parameter group to use for the cluster.--master-user-password
—Optional. The new password for the master database user.Password constraints:
Length is [8—100] printable ASCII characters.
Can use any printable ASCII characters except for the following:
/
(forward slash)"
(double quotation mark)
—Optional. The new cluster identifier for the cluster when renaming a cluster. This value is stored as a lowercase string.
Length is [1—63] letters, numbers, or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Must be unique for all clusters across Amazon RDS, Amazon Neptune, and Amazon DocumentDB per AWS account, per Region.
--preferred-backup-window
—Optional. The daily time range during which automated backups are created, in Universal Coordinated Time (UTC).- Format:
hh24:mm-hh24:mm
- Format:
--preferred-maintenance-window
—Optional. The weekly time range during which system maintenance can occur, in UTC.Format:
ddd:hh24:mm-ddd:hh24:mm
Valid days:
Sun
,Mon
,Tue
,Wed
, ,Fri
, andSat
.
--deletion-protection
or--no-deletion-protection
—Optional. Whether deletion protection should be enabled on this cluster. Deletion protection prevents a cluster from being accidentally deleted until the cluster is modified to disable deletion protection. For more information, see Deleting an Amazon DocumentDB Cluster.
The following code changes the backup retention period for the cluster .
For Linux, macOS, or Unix:
For Windows:
Output from this operation looks something like the following.
It takes a few minutes for your changes to be applied. You can use the cluster only when its status is available. You can monitor the cluster’s status using the console or AWS CLI. For more information, see .