RestoreClusterFromSnapshot - Amazon DocumentDB


Restores an elastic cluster from a snapshot.

Request Syntax

POST /cluster-snapshot/snapshotArn/restore HTTP/1.1 Content-type: application/json { "clusterName": "string", "kmsKeyId": "string", "shardCapacity": number, "shardInstanceCount": number, "subnetIds": [ "string" ], "tags": { "string" : "string" }, "vpcSecurityGroupIds": [ "string" ] }

URI Request Parameters

The request uses the following URI parameters.


The ARN identifier of the elastic cluster snapshot.

Required: Yes

Request Body

The request accepts the following data in JSON format.


The name of the elastic cluster.

Type: String

Required: Yes


The KMS key identifier to use to encrypt the new Amazon DocumentDB elastic clusters cluster.

The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of the ARN as the KMS encryption key.

If an encryption key is not specified here, Amazon DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different default encryption key for each Amazon Region.

Type: String

Required: No


The capacity of each shard in the new restored elastic cluster.

Type: Integer

Required: No


The number of replica instances applying to all shards in the elastic cluster. A shardInstanceCount value of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.

Type: Integer

Required: No


The Amazon EC2 subnet IDs for the elastic cluster.

Type: Array of strings

Required: No


A list of the tag names to be assigned to the restored elastic cluster, in the form of an array of key-value pairs in which the key is the tag name and the value is the key value.

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^(?!aws:)[a-zA-Z+-=._:/]+$

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Required: No


A list of EC2 VPC security groups to associate with the elastic cluster.

Type: Array of strings

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "cluster": { "adminUserName": "string", "authType": "string", "backupRetentionPeriod": number, "clusterArn": "string", "clusterEndpoint": "string", "clusterName": "string", "createTime": "string", "kmsKeyId": "string", "preferredBackupWindow": "string", "preferredMaintenanceWindow": "string", "shardCapacity": number, "shardCount": number, "shardInstanceCount": number, "shards": [ { "createTime": "string", "shardId": "string", "status": "string" } ], "status": "string", "subnetIds": [ "string" ], "vpcSecurityGroupIds": [ "string" ] } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


Returns information about a the restored elastic cluster.

Type: Cluster object


For information about the errors that are common to all actions, see Common Errors.


An exception that occurs when there are not sufficient permissions to perform an action.

HTTP Status Code: 403


There was an access conflict.

HTTP Status Code: 409


There was an internal server error.

HTTP Status Code: 500


The specified resource could not be located.

HTTP Status Code: 404


The service quota for the action was exceeded.

HTTP Status Code: 402


ThrottlingException will be thrown when request was denied due to request throttling.

HTTP Status Code: 429


A structure defining a validation exception.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: