Managed Service for SPQR API, REST: Cluster.Restore
- HTTP request
- Body parameters
- ConfigSpec
- SpqrSpec
- Router
- RouterSettings
- Resources
- Coordinator
- PostgreSQL
- Infra
- BalancerSettings
- TimeOfDay
- Access
- HostSpec
- MDBPostgreSQL
- Response
- RestoreClusterMetadata
- Status
- Cluster
- Monitoring
- ClusterConfig
- SPQRConfig
- RouterConfig
- RouterSettings
- Resources
- CoordinatorConfig
- PostgreSQLConfig
- InfraConfig
- BalancerSettings
- TimeOfDay
- Access
- MaintenanceWindow
- WeeklyMaintenanceWindow
- MaintenanceOperation
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"
},
"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"
},
"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. |
|
description |
string Description of the new SPQR cluster. |
|
labels |
object (map<string, string>) Custom labels for the SPQR cluster as |
|
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 |
|
networkId |
string Required field. ID of the network to create the SPQR cluster in. |
|
folderId |
string Required. ID of the folder to create the SPQR cluster in. |
|
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 Possible values:
|
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 |
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. |
|
subnetId |
string ID of the subnet that the host should belong to. This subnet should be a part |
|
assignPublicIp |
boolean Whether the host should get a public IP address on creation. After a host has been created, this setting cannot be changed. To remove an assigned public IP, or to assign Possible values:
|
|
type |
enum (Type) Required field. Type of the host to be deployed.
|
|
shardName |
string Name of the shard that the host belongs to. |
|
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": {
"clusterId": "string",
"backupId": "string"
},
// Includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": {
"id": "string",
"folderId": "string",
"createdAt": "string",
"name": "string",
"description": "string",
"labels": "object",
"environment": "string",
"monitoring": [
{
"name": "string",
"description": "string",
"link": "string"
}
],
"config": {
"spqrConfig": {
"router": {
"config": {
"showNoticeMessages": "boolean",
"timeQuantiles": [
"string"
],
"defaultRouteBehavior": "string",
"preferSameAvailabilityZone": "boolean"
},
"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"
},
"coordinator": "object"
},
"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"
},
"networkId": "string",
"health": "string",
"status": "string",
"maintenanceWindow": {
// Includes only one of the fields `anytime`, `weeklyMaintenanceWindow`
"anytime": "object",
"weeklyMaintenanceWindow": {
"day": "string",
"hour": "string"
}
// end of the list of possible fields
},
"plannedOperation": {
"info": "string",
"delayedUntil": "string",
"latestMaintenanceTime": "string",
"nextMaintenanceWindowTime": "string"
},
"securityGroupIds": [
"string"
],
"deletionProtection": "boolean"
}
// 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 |
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 |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
RestoreClusterMetadata
|
Field |
Description |
|
clusterId |
string ID of the new SPQR cluster that is being created from a backup. |
|
backupId |
string ID of the backup that is being used for creating a cluster. |
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. |
Cluster
A managed SPQR cluster. For more information, see the documentation.
|
Field |
Description |
|
id |
string ID of the SPQR cluster. |
|
folderId |
string ID of the folder that the SPQR cluster belongs to. |
|
createdAt |
string (date-time) Creation timestamp in RFC3339 String in RFC3339 To work with values in this field, use the APIs described in the |
|
name |
string Name of the SPQR cluster. |
|
description |
string Description of the SPQR cluster. 0-256 characters long. |
|
labels |
object (map<string, string>) Custom labels for the SPQR cluster as |
|
environment |
enum (Environment) Deployment environment of the SPQR cluster.
|
|
monitoring[] |
Description of monitoring systems relevant to the SPQR cluster. |
|
config |
Configuration of the SPQR cluster. |
|
networkId |
string ID of the network that the cluster belongs to. |
|
health |
enum (Health) Aggregated cluster health.
|
|
status |
enum (Status) Current state of the cluster.
|
|
maintenanceWindow |
Maintenance window for the cluster. |
|
plannedOperation |
Planned maintenance operation to be started for the cluster within the nearest |
|
securityGroupIds[] |
string User security groups |
|
deletionProtection |
boolean Deletion Protection inhibits deletion of the cluster |
Monitoring
Monitoring system.
|
Field |
Description |
|
name |
string Name of the monitoring system. |
|
description |
string Description of the monitoring system. |
|
link |
string Link to the monitoring system charts for the SPQR cluster. |
ClusterConfig
|
Field |
Description |
|
spqrConfig |
Configuration for SPQR servers in the 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 |
SPQRConfig
|
Field |
Description |
|
router |
SPQR router settings. |
|
coordinator |
SPQR coordinator settings. |
|
postgresql |
PostgreSQL settings. |
|
infra |
SPQR Infra (router+coordinator) settings. |
|
logLevel |
enum (LogLevel) SPQR default log level
|
|
balancer |
SPQR Balancer settings. |
RouterConfig
|
Field |
Description |
|
config |
|
|
resources |
RouterSettings
Configuration of a SPQR router.
|
Field |
Description |
|
showNoticeMessages |
boolean |
|
timeQuantiles[] |
string |
|
defaultRouteBehavior |
enum (DefaultRouteBehavior)
|
|
preferSameAvailabilityZone |
boolean |
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.
|
CoordinatorConfig
|
Field |
Description |
|
config |
object |
|
resources |
PostgreSQLConfig
|
Field |
Description |
|
config |
object |
|
resources |
InfraConfig
|
Field |
Description |
|
resources |
|
|
router |
|
|
coordinator |
object |
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. |
MaintenanceWindow
A maintenance window settings.
|
Field |
Description |
|
anytime |
object Maintenance operation can be scheduled anytime. Includes only one of the fields The maintenance policy in effect. |
|
weeklyMaintenanceWindow |
Maintenance operation can be scheduled on a weekly basis. Includes only one of the fields The maintenance policy in effect. |
WeeklyMaintenanceWindow
Weelky maintenance window settings.
|
Field |
Description |
|
day |
enum (WeekDay) Day of the week (in
|
|
hour |
string (int64) Hour of the day in UTC (in |
MaintenanceOperation
A planned maintenance operation.
|
Field |
Description |
|
info |
string Information about this maintenance operation. |
|
delayedUntil |
string (date-time) Time until which this maintenance operation is delayed. String in RFC3339 To work with values in this field, use the APIs described in the |
|
latestMaintenanceTime |
string (date-time) String in RFC3339 To work with values in this field, use the APIs described in the |
|
nextMaintenanceWindowTime |
string (date-time) String in RFC3339 To work with values in this field, use the APIs described in the |