Managed Service for SPQR API, REST: Cluster.Restore
Creates a new SPQR cluster using the specified backup.
HTTP request
POST https://mdb.api.cloud.yandex.net/managed-spqr/v1/clusters:restore
Body parameters
{
"backupId": "string",
"name": "string",
"description": "string",
"labels": "object",
"environment": "string",
"configSpec": {
"spqrSpec": {
"router": {
"config": {
"showNoticeMessages": "boolean",
"timeQuantiles": [
"string"
],
"defaultRouteBehavior": "string",
"preferSameAvailabilityZone": "boolean",
"enhancedMultishardProcessing": "boolean",
"defaultTargetSessionAttrs": "string",
"defaultCommitStrategy": "string"
},
"resources": {
"resourcePresetId": "string",
"diskSize": "string",
"diskTypeId": "string"
}
},
"coordinator": {
"config": "object",
"resources": {
"resourcePresetId": "string",
"diskSize": "string",
"diskTypeId": "string"
}
},
"postgresql": {
"config": "object",
"resources": {
"resourcePresetId": "string",
"diskSize": "string",
"diskTypeId": "string"
}
},
"infra": {
"resources": {
"resourcePresetId": "string",
"diskSize": "string",
"diskTypeId": "string"
},
"router": {
"showNoticeMessages": "boolean",
"timeQuantiles": [
"string"
],
"defaultRouteBehavior": "string",
"preferSameAvailabilityZone": "boolean",
"enhancedMultishardProcessing": "boolean",
"defaultTargetSessionAttrs": "string",
"defaultCommitStrategy": "string"
},
"coordinator": "object"
},
"consolePassword": "string",
"logLevel": "string",
"balancer": {
"cpuThreshold": "number",
"spaceThreshold": "number",
"statIntervalSec": "string",
"maxMoveCount": "string",
"keysPerMove": "string",
"timeout": "string"
}
},
"backupWindowStart": {
"hours": "integer",
"minutes": "integer",
"seconds": "integer",
"nanos": "integer"
},
"backupRetainPeriodDays": "string",
"access": {
"dataLens": "boolean",
"webSql": "boolean",
"dataTransfer": "boolean",
"serverless": "boolean"
},
"soxAudit": "boolean"
},
"hostSpecs": [
{
"zoneId": "string",
"subnetId": "string",
"assignPublicIp": "boolean",
"type": "string",
"shardName": "string",
"mdbPostgresql": {
"clusterId": "string"
}
}
],
"networkId": "string",
"folderId": "string",
"securityGroupIds": [
"string"
],
"deletionProtection": "boolean",
"time": "string",
"timeInclusive": "boolean"
}
|
Field |
Description |
|
backupId |
string Required field. ID of the backup to create a cluster from. |
|
name |
string Required field. Name of the new SPQR cluster. The name must be unique within the folder. The maximum string length in characters is 63. Value must match the regular expression |
|
description |
string Description of the new SPQR cluster. The maximum string length in characters is 256. |
|
labels |
object (map<string, string>) Custom labels for the SPQR cluster as The maximum string length in characters for each value is 63. The string length in characters for each key must be 1-63. Each key must match the regular expression |
|
environment |
enum (Environment) Required field. Deployment environment of the new SPQR cluster.
|
|
configSpec |
Required field. Configuration for the SPQR cluster to be created. |
|
hostSpecs[] |
Configurations for SPQR hosts that should be created for The number of elements must be greater than 0. |
|
networkId |
string Required field. ID of the network to create the SPQR cluster in. The maximum string length in characters is 150. |
|
folderId |
string Required. ID of the folder to create the SPQR cluster in. The maximum string length in characters is 50. |
|
securityGroupIds[] |
string User security groups |
|
deletionProtection |
boolean Deletion Protection inhibits deletion of the cluster |
|
time |
string (date-time) Timestamp of the moment to which the SPQR cluster should be restored. String in RFC3339 To work with values in this field, use the APIs described in the |
|
timeInclusive |
boolean Flag that indicates whether a database should be restored to the first backup point
|
ConfigSpec
|
Field |
Description |
|
spqrSpec |
Configuration and resource allocation for a SPQR Beta cluster. |
|
backupWindowStart |
Time to start the daily backup, in the UTC timezone. |
|
backupRetainPeriodDays |
string (int64) Retain period of automatically created backup in days |
|
access |
Access policy to DB |
|
soxAudit |
boolean |
SpqrSpec
|
Field |
Description |
|
router |
Configuration and resource allocation for SPQR Router hosts. |
|
coordinator |
Configuration and resource allocation for SPQR Coordinator hosts. |
|
postgresql |
Configuration and resource allocation for PostgreSQL hosts. |
|
infra |
Configuration and resource allocation for SPQR Infra (router+coordinator) hosts. |
|
consolePassword |
string Password of the SPQR console. |
|
logLevel |
enum (LogLevel)
|
|
balancer |
Configuration for SPQR Balancer. |
Router
|
Field |
Description |
|
config |
Configuration for router hosts. |
|
resources |
Resources allocated to each host. |
RouterSettings
Configuration of a SPQR router.
|
Field |
Description |
|
showNoticeMessages |
boolean |
|
timeQuantiles[] |
string |
|
defaultRouteBehavior |
enum (DefaultRouteBehavior)
|
|
preferSameAvailabilityZone |
boolean |
|
enhancedMultishardProcessing |
boolean |
|
defaultTargetSessionAttrs |
enum (TargetSessionAttrs)
|
|
defaultCommitStrategy |
enum (CommitStrategy)
|
Resources
|
Field |
Description |
|
resourcePresetId |
string ID of the preset for computational resources available to a host (CPU, memory etc.). |
|
diskSize |
string (int64) Volume of the storage available to a host, in bytes. |
|
diskTypeId |
string Type of the storage environment for the host.
|
Coordinator
|
Field |
Description |
|
config |
object Configuration for coordinator hosts. |
|
resources |
Resources allocated to each host. |
PostgreSQL
|
Field |
Description |
|
config |
object Configuration for PostgreSQL hosts. |
|
resources |
Resources allocated to each host. |
Infra
|
Field |
Description |
|
resources |
Resources allocated to each host |
|
router |
Router related configuration |
|
coordinator |
object Coordinator related configuration |
BalancerSettings
|
Field |
Description |
|
cpuThreshold |
number (double) |
|
spaceThreshold |
number (double) |
|
statIntervalSec |
string (int64) |
|
maxMoveCount |
string (int64) |
|
keysPerMove |
string (int64) |
|
timeout |
string (int64) |
TimeOfDay
Represents a time of day. The date and time zone are either not significant
or are specified elsewhere. An API may choose to allow leap seconds. Related
types are google.type.Date
|
Field |
Description |
|
hours |
integer (int32) Hours of day in 24 hour format. Should be from 0 to 23. An API may choose |
|
minutes |
integer (int32) Minutes of hour of day. Must be from 0 to 59. |
|
seconds |
integer (int32) Seconds of minutes of the time. Must normally be from 0 to 59. An API may |
|
nanos |
integer (int32) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. |
Access
|
Field |
Description |
|
dataLens |
boolean Allow access for DataLens. |
|
webSql |
boolean Allow access for Web SQL. |
|
dataTransfer |
boolean Allow access for DataTransfer. |
|
serverless |
boolean Allow access for Serverless. |
HostSpec
|
Field |
Description |
|
zoneId |
string ID of the availability zone where the host resides. The maximum string length in characters is 50. |
|
subnetId |
string ID of the subnet that the host should belong to. This subnet should be a part The maximum string length in characters is 50. |
|
assignPublicIp |
boolean Whether the host should get a public IP address on creation.
|
|
type |
enum (Type) Required field. Type of the host to be deployed.
|
|
shardName |
string Name of the shard that the host belongs to. The maximum string length in characters is 63. Value must match the regular expression |
|
mdbPostgresql |
MDBPostgreSQL
TODO move to hosts.proto when it's created
Configuration for MDB PostgreSQL host
|
Field |
Description |
|
clusterId |
string Required field. |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": "boolean",
"metadata": "object",
// Includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": "object"
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
|
Field |
Description |
|
id |
string ID of the operation. |
|
description |
string Description of the operation. 0-256 characters long. |
|
createdAt |
string (date-time) Creation timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
|
createdBy |
string ID of the user or service account who initiated the operation. |
|
modifiedAt |
string (date-time) The time when the Operation resource was last modified. String in RFC3339 To work with values in this field, use the APIs described in the |
|
done |
boolean If the value is |
|
metadata |
object Service-specific metadata associated with the operation. |
|
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
|
response |
object The normal response of the operation in case of success. Includes only one of the fields The operation result. |
Status
The error result of the operation in case of failure or cancellation.
|
Field |
Description |
|
code |
integer (int32) Error code. An enum value of google.rpc.Code |
|
message |
string An error message. |
|
details[] |
object A list of messages that carry the error details. |