AWS Fundamentals Logo
AWS Fundamentals
aws docdb

AWS Amazon DocumentDB CLI Commands

55 CLI commands available for Amazon DocumentDB.

CommandSample
add-source-identifier-to-subscription

Adds a source identifier to an existing event notification subscription.

add-tags-to-resource

Adds metadata tags to an Amazon DocumentDB resource. You can use these tags with cost allocation reporting to track costs that are associated with Amazon DocumentDB resources or in a Condition statement in an Identity and Access Management (IAM) policy for Amazon DocumentDB.

apply-pending-maintenance-action

Applies a pending maintenance action to a resource (for example, to an Amazon DocumentDB instance).

copy-db-cluster-parameter-group

Copies the specified cluster parameter group.

copy-db-cluster-snapshot

Copies a snapshot of a cluster. To copy a cluster snapshot from a shared manual cluster snapshot, SourceDBClusterSnapshotIdentifier must be the Amazon Resource Name (ARN) of the shared cluster snapshot. You can only copy a shared DB cluster snapshot, whether encrypted or not, in the same Amazon Web

create-db-cluster

Creates a new Amazon DocumentDB cluster.

create-db-cluster-parameter-group

Creates a new cluster parameter group. Parameters in a cluster parameter group apply to all of the instances in a cluster. A cluster parameter group is initially created with the default parameters for the database engine used by instances in the cluster. In Amazon DocumentDB, you cannot make modifi

create-db-cluster-snapshot

Creates a snapshot of a cluster.

create-db-instance

Creates a new instance.

create-db-subnet-group

Creates a new subnet group. subnet groups must contain at least one subnet in at least two Availability Zones in the Amazon Web Services Region.

create-event-subscription

Creates an Amazon DocumentDB event notification subscription. This action requires a topic Amazon Resource Name (ARN) created by using the Amazon DocumentDB console, the Amazon SNS console, or the Amazon SNS API. To obtain an ARN with Amazon SNS, you must create a topic in Amazon SNS and subscribe t

create-global-cluster

Creates an Amazon DocumentDB global cluster that can span multiple multiple Amazon Web Services Regions. The global cluster contains one primary cluster with read-write capability, and up-to 10 read-only secondary clusters. Global clusters uses storage-based fast replication across regions with late

delete-db-cluster

Deletes a previously provisioned cluster. When you delete a cluster, all automated backups for that cluster are deleted and can't be recovered. Manual DB cluster snapshots of the specified cluster are not deleted.

delete-db-cluster-parameter-group

Deletes a specified cluster parameter group. The cluster parameter group to be deleted can't be associated with any clusters.

delete-db-cluster-snapshot

Deletes a cluster snapshot. If the snapshot is being copied, the copy operation is terminated. The cluster snapshot must be in the available state to be deleted.

delete-db-instance

Deletes a previously provisioned instance.

delete-db-subnet-group

Deletes a subnet group. The specified database subnet group must not be associated with any DB instances.

delete-event-subscription

Deletes an Amazon DocumentDB event notification subscription.

delete-global-cluster

Deletes a global cluster. The primary and secondary clusters must already be detached or deleted before attempting to delete a global cluster. This action only applies to Amazon DocumentDB clusters.

describe-certificates

Returns a list of certificate authority (CA) certificates provided by Amazon DocumentDB for this Amazon Web Services account.

describe-db-cluster-parameter-groups

Returns a list of DBClusterParameterGroup descriptions. If a DBClusterParameterGroupName parameter is specified, the list contains only the description of the specified cluster parameter group.

describe-db-cluster-parameters

Returns the detailed parameter list for a particular cluster parameter group.

describe-db-cluster-snapshot-attributes

Returns a list of cluster snapshot attribute names and values for a manual DB cluster snapshot. When you share snapshots with other Amazon Web Services accounts, DescribeDBClusterSnapshotAttributes returns the restore attribute and a list of IDs for the Amazon Web Services accounts that are authoriz

describe-db-cluster-snapshots

Returns information about cluster snapshots. This API operation supports pagination.

describe-db-clusters

Returns information about provisioned Amazon DocumentDB clusters. This API operation supports pagination. For certain management features such as cluster and instance lifecycle management, Amazon DocumentDB leverages operational technology that is shared with Amazon RDS and Amazon Neptune. Use the f

describe-db-engine-versions

Returns a list of the available engines.

describe-db-instances

Returns information about provisioned Amazon DocumentDB instances. This API supports pagination.

describe-db-subnet-groups

Returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName is specified, the list will contain only the descriptions of the specified DBSubnetGroup.

describe-engine-default-cluster-parameters

Returns the default engine and system parameter information for the cluster database engine.

describe-event-categories

Displays a list of categories for all event source types, or, if specified, for a specified source type.

describe-event-subscriptions

Lists all the subscription descriptions for a customer account. The description for a subscription includes SubscriptionName, SNSTopicARN, CustomerID, SourceType, SourceID, CreationTime, and Status. If you specify a SubscriptionName, lists the description for that subscription.

describe-events

Returns events related to instances, security groups, snapshots, and DB parameter groups for the past 14 days. You can obtain events specific to a particular DB instance, security group, snapshot, or parameter group by providing the name as a parameter. By default, the events of the past hour are re

describe-global-clusters

Returns information about Amazon DocumentDB global clusters. This API supports pagination. This action only applies to Amazon DocumentDB clusters.

describe-orderable-db-instance-options

Returns a list of orderable instance options for the specified engine.

describe-pending-maintenance-actions

Returns a list of resources (for example, instances) that have at least one pending maintenance action.

failover-db-cluster

Forces a failover for a cluster. A failover for a cluster promotes one of the Amazon DocumentDB replicas (read-only instances) in the cluster to be the primary instance (the cluster writer). If the primary instance fails, Amazon DocumentDB automatically fails over to an Amazon DocumentDB replica, if

failover-global-cluster

Promotes the specified secondary DB cluster to be the primary DB cluster in the global cluster when failing over a global cluster occurs. Use this operation to respond to an unplanned event, such as a regional disaster in the primary region. Failing over can result in a loss of write transaction dat

list-tags-for-resource

Lists all tags on an Amazon DocumentDB resource.

modify-db-cluster

Modifies a setting for an Amazon DocumentDB cluster. You can change one or more database configuration parameters by specifying these parameters and the new values in the request.

modify-db-cluster-parameter-group

Modifies the parameters of a cluster parameter group. To modify more than one parameter, submit a list of the following: ParameterName, ParameterValue, and ApplyMethod. A maximum of 20 parameters can be modified in a single request. Changes to dynamic parameters are applied immediately. Changes t

modify-db-cluster-snapshot-attribute

Adds an attribute and values to, or removes an attribute and values from, a manual cluster snapshot. To share a manual cluster snapshot with other Amazon Web Services accounts, specify restore as the AttributeName, and use the ValuesToAdd parameter to add a list of IDs of the Amazon Web Services acc

modify-db-instance

Modifies settings for an instance. You can change one or more database configuration parameters by specifying these parameters and the new values in the request.

modify-db-subnet-group

Modifies an existing subnet group. subnet groups must contain at least one subnet in at least two Availability Zones in the Amazon Web Services Region.

modify-event-subscription

Modifies an existing Amazon DocumentDB event notification subscription.

modify-global-cluster

Modify a setting for an Amazon DocumentDB global cluster. You can change one or more configuration parameters (for example: deletion protection), or the global cluster identifier by specifying these parameters and the new values in the request. This action only applies to Amazon DocumentDB clusters

reboot-db-instance

You might need to reboot your instance, usually for maintenance reasons. For example, if you make certain changes, or if you change the cluster parameter group that is associated with the instance, you must reboot the instance for the changes to take effect. Rebooting an instance restarts the datab

remove-from-global-cluster

Detaches an Amazon DocumentDB secondary cluster from a global cluster. The cluster becomes a standalone cluster with read-write capability instead of being read-only and receiving data from a primary in a different region. This action only applies to Amazon DocumentDB clusters.

remove-source-identifier-from-subscription

Removes a source identifier from an existing Amazon DocumentDB event notification subscription.

remove-tags-from-resource

Removes metadata tags from an Amazon DocumentDB resource.

reset-db-cluster-parameter-group

Modifies the parameters of a cluster parameter group to the default value. To reset specific parameters, submit a list of the following: ParameterName and ApplyMethod. To reset the entire cluster parameter group, specify the DBClusterParameterGroupName and ResetAllParameters parameters. When you

restore-db-cluster-from-snapshot

Creates a new cluster from a snapshot or cluster snapshot. If a snapshot is specified, the target cluster is created from the source DB snapshot with a default configuration and default security group. If a cluster snapshot is specified, the target cluster is created from the source cluster restore

restore-db-cluster-to-point-in-time

Restores a cluster to an arbitrary point in time. Users can restore to any point in time before LatestRestorableTime for up to BackupRetentionPeriod days. The target cluster is created from the source cluster with the same configuration as the original cluster, except that the new cluster is created

start-db-cluster

Restarts the stopped cluster that is specified by DBClusterIdentifier. For more information, see Stopping and Starting an Amazon DocumentDB Cluster.

stop-db-cluster

Stops the running cluster that is specified by DBClusterIdentifier. The cluster must be in the available state. For more information, see Stopping and Starting an Amazon DocumentDB Cluster.

switchover-global-cluster

Switches over the specified secondary Amazon DocumentDB cluster to be the new primary Amazon DocumentDB cluster in the global database cluster.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Stats

Total Commands55
ServiceDocDB