Managed Service for SPQR API, gRPC: ClusterService.Restore
Creates a new SPQR cluster using the specified backup.
gRPC request
rpc Restore (RestoreClusterRequest) returns (operation.Operation)
RestoreClusterRequest
{
"backup_id": "string",
"name": "string",
"description": "string",
"labels": "map<string, string>",
"environment": "Environment",
"config_spec": {
"spqr_spec": {
"router": {
"config": {
"show_notice_messages": "google.protobuf.BoolValue",
"time_quantiles": [
"double"
],
"default_route_behavior": "DefaultRouteBehavior",
"prefer_same_availability_zone": "google.protobuf.BoolValue",
"enhanced_multishard_processing": "google.protobuf.BoolValue",
"default_target_session_attrs": "TargetSessionAttrs",
"default_commit_strategy": "CommitStrategy"
},
"resources": {
"resource_preset_id": "string",
"disk_size": "int64",
"disk_type_id": "string"
}
},
"coordinator": {
"config": "CoordinatorSettings",
"resources": {
"resource_preset_id": "string",
"disk_size": "int64",
"disk_type_id": "string"
}
},
"postgresql": {
"config": "PostgreSQLSettings",
"resources": {
"resource_preset_id": "string",
"disk_size": "int64",
"disk_type_id": "string"
}
},
"infra": {
"resources": {
"resource_preset_id": "string",
"disk_size": "int64",
"disk_type_id": "string"
},
"router": {
"show_notice_messages": "google.protobuf.BoolValue",
"time_quantiles": [
"double"
],
"default_route_behavior": "DefaultRouteBehavior",
"prefer_same_availability_zone": "google.protobuf.BoolValue",
"enhanced_multishard_processing": "google.protobuf.BoolValue",
"default_target_session_attrs": "TargetSessionAttrs",
"default_commit_strategy": "CommitStrategy"
},
"coordinator": "CoordinatorSettings"
},
"console_password": "string",
"log_level": "LogLevel",
"balancer": {
"cpu_threshold": "google.protobuf.DoubleValue",
"space_threshold": "google.protobuf.DoubleValue",
"stat_interval_sec": "google.protobuf.Int64Value",
"max_move_count": "google.protobuf.Int64Value",
"keys_per_move": "google.protobuf.Int64Value",
"timeout": "google.protobuf.Int64Value"
}
},
"backup_window_start": "google.type.TimeOfDay",
"backup_retain_period_days": "google.protobuf.Int64Value",
"access": {
"data_lens": "bool",
"web_sql": "bool",
"data_transfer": "bool",
"serverless": "bool"
},
"sox_audit": "google.protobuf.BoolValue"
},
"host_specs": [
{
"zone_id": "string",
"subnet_id": "string",
"assign_public_ip": "bool",
"type": "Type",
"shard_name": "string",
"mdb_postgresql": {
"cluster_id": "string"
}
}
],
"network_id": "string",
"folder_id": "string",
"security_group_ids": [
"string"
],
"deletion_protection": "bool",
"time": "google.protobuf.Timestamp",
"time_inclusive": "bool"
}
|
Field |
Description |
|
backup_id |
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.
|
|
config_spec |
Required field. Configuration for the SPQR cluster to be created. |
|
host_specs[] |
Configurations for SPQR hosts that should be created for The number of elements must be greater than 0. |
|
network_id |
string Required field. ID of the network to create the SPQR cluster in. The maximum string length in characters is 150. |
|
folder_id |
string Required. ID of the folder to create the SPQR cluster in. The maximum string length in characters is 50. |
|
security_group_ids[] |
string User security groups |
|
deletion_protection |
bool Deletion Protection inhibits deletion of the cluster |
|
time |
Timestamp of the moment to which the SPQR cluster should be restored. |
|
time_inclusive |
bool Flag that indicates whether a database should be restored to the first backup point
|
ConfigSpec
|
Field |
Description |
|
spqr_spec |
Configuration and resource allocation for a SPQR Beta cluster. |
|
backup_window_start |
Time to start the daily backup, in the UTC timezone. |
|
backup_retain_period_days |
Retain period of automatically created backup in days |
|
access |
Access policy to DB |
|
sox_audit |
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. |
|
console_password |
string Password of the SPQR console. |
|
log_level |
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 |
|
show_notice_messages |
|
|
time_quantiles[] |
double |
|
default_route_behavior |
enum DefaultRouteBehavior
|
|
prefer_same_availability_zone |
|
|
enhanced_multishard_processing |
|
|
default_target_session_attrs |
enum TargetSessionAttrs
|
|
default_commit_strategy |
enum CommitStrategy
|
Resources
|
Field |
Description |
|
resource_preset_id |
string ID of the preset for computational resources available to a host (CPU, memory etc.). |
|
disk_size |
int64 Volume of the storage available to a host, in bytes. |
|
disk_type_id |
string Type of the storage environment for the host.
|
Coordinator
|
Field |
Description |
|
config |
Configuration for coordinator hosts. |
|
resources |
Resources allocated to each host. |
CoordinatorSettings
Configuration of a SPQR coordinator.
|
Field |
Description |
|
Empty |
|
PostgreSQL
|
Field |
Description |
|
config |
Configuration for PostgreSQL hosts. |
|
resources |
Resources allocated to each host. |
PostgreSQLSettings
Configuration of a PostgreSQL.
|
Field |
Description |
|
Empty |
|
Infra
|
Field |
Description |
|
resources |
Resources allocated to each host |
|
router |
Router related configuration |
|
coordinator |
Coordinator related configuration |
BalancerSettings
|
Field |
Description |
|
cpu_threshold |
|
|
space_threshold |
|
|
stat_interval_sec |
|
|
max_move_count |
|
|
keys_per_move |
|
|
timeout |
Access
|
Field |
Description |
|
data_lens |
bool Allow access for DataLens. |
|
web_sql |
bool Allow access for Web SQL. |
|
data_transfer |
bool Allow access for DataTransfer. |
|
serverless |
bool Allow access for Serverless. |
HostSpec
|
Field |
Description |
|
zone_id |
string ID of the availability zone where the host resides. The maximum string length in characters is 50. |
|
subnet_id |
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. |
|
assign_public_ip |
bool Whether the host should get a public IP address on creation.
|
|
type |
enum Type Required field. Type of the host to be deployed.
|
|
shard_name |
string Name of the shard that the host belongs to. The maximum string length in characters is 63. Value must match the regular expression |
|
mdb_postgresql |
MDBPostgreSQL
TODO move to hosts.proto when it's created
Configuration for MDB PostgreSQL host
|
Field |
Description |
|
cluster_id |
string Required field. |
operation.Operation
{
"id": "string",
"description": "string",
"created_at": "google.protobuf.Timestamp",
"created_by": "string",
"modified_at": "google.protobuf.Timestamp",
"done": "bool",
"metadata": "google.protobuf.Any",
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": "google.protobuf.Any"
// 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. |
|
created_at |
Creation timestamp. |
|
created_by |
string ID of the user or service account who initiated the operation. |
|
modified_at |
The time when the Operation resource was last modified. |
|
done |
bool 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. |