RestoreClusterFromSnapshot
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.
- snapshotArn
-
The ARN identifier of the elastic cluster snapshot.
Required: Yes
Request Body
The request accepts the following data in JSON format.
- clusterName
-
The name of the elastic cluster.
Type: String
Required: Yes
- kmsKeyId
-
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
- shardCapacity
-
The capacity of each shard in the new restored elastic cluster.
Type: Integer
Required: No
- shardInstanceCount
-
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
- subnetIds
-
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
- vpcSecurityGroupIds
-
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.
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
An exception that occurs when there are not sufficient permissions to perform an action.
HTTP Status Code: 403
- ConflictException
-
There was an access conflict.
HTTP Status Code: 409
- InternalServerException
-
There was an internal server error.
HTTP Status Code: 500
- ResourceNotFoundException
-
The specified resource could not be located.
HTTP Status Code: 404
- ServiceQuotaExceededException
-
The service quota for the action was exceeded.
HTTP Status Code: 402
- ThrottlingException
-
ThrottlingException will be thrown when request was denied due to request throttling.
HTTP Status Code: 429
- ValidationException
-
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: