Managed Service for SPQR API, gRPC: ClusterService.Restore
- gRPC request
- RestoreClusterRequest
- ConfigSpec
- SpqrSpec
- Router
- RouterSettings
- Resources
- Coordinator
- CoordinatorSettings
- PostgreSQL
- PostgreSQLSettings
- Infra
- BalancerSettings
- Access
- HostSpec
- MDBPostgreSQL
- operation.Operation
- RestoreClusterMetadata
- Cluster
- Monitoring
- ClusterConfig
- SPQRConfig
- RouterConfig
- RouterSettings
- Resources
- CoordinatorConfig
- CoordinatorSettings
- PostgreSQLConfig
- PostgreSQLSettings
- InfraConfig
- BalancerSettings
- Access
- MaintenanceWindow
- AnytimeMaintenanceWindow
- WeeklyMaintenanceWindow
- MaintenanceOperation
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"
},
"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"
},
"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. |
|
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.
|
|
config_spec |
Required field. Configuration for the SPQR cluster to be created. |
|
host_specs[] |
Configurations for SPQR hosts that should be created for |
|
network_id |
string Required field. ID of the network to create the SPQR cluster in. |
|
folder_id |
string Required. ID of the folder to create the SPQR cluster in. |
|
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 Possible values:
|
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 |
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. |
|
subnet_id |
string ID of the subnet that the host should belong to. This subnet should be a part |
|
assign_public_ip |
bool 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.
|
|
shard_name |
string Name of the shard that the host belongs to. |
|
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": {
"cluster_id": "string",
"backup_id": "string"
},
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": {
"id": "string",
"folder_id": "string",
"created_at": "google.protobuf.Timestamp",
"name": "string",
"description": "string",
"labels": "map<string, string>",
"environment": "Environment",
"monitoring": [
{
"name": "string",
"description": "string",
"link": "string"
}
],
"config": {
"spqr_config": {
"router": {
"config": {
"show_notice_messages": "google.protobuf.BoolValue",
"time_quantiles": [
"double"
],
"default_route_behavior": "DefaultRouteBehavior",
"prefer_same_availability_zone": "google.protobuf.BoolValue"
},
"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"
},
"coordinator": "CoordinatorSettings"
},
"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"
},
"network_id": "string",
"health": "Health",
"status": "Status",
"maintenance_window": {
// Includes only one of the fields `anytime`, `weekly_maintenance_window`
"anytime": "AnytimeMaintenanceWindow",
"weekly_maintenance_window": {
"day": "WeekDay",
"hour": "int64"
}
// end of the list of possible fields
},
"planned_operation": {
"info": "string",
"delayed_until": "google.protobuf.Timestamp",
"latest_maintenance_time": "google.protobuf.Timestamp",
"next_maintenance_window_time": "google.protobuf.Timestamp"
},
"security_group_ids": [
"string"
],
"deletion_protection": "bool"
}
// 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. |
RestoreClusterMetadata
|
Field |
Description |
|
cluster_id |
string ID of the new SPQR cluster that is being created from a backup. |
|
backup_id |
string ID of the backup that is being used for creating a cluster. |
Cluster
A managed SPQR cluster. For more information, see the documentation.
|
Field |
Description |
|
id |
string ID of the SPQR cluster. |
|
folder_id |
string ID of the folder that the SPQR cluster belongs to. |
|
created_at |
Creation timestamp in RFC3339 |
|
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. |
|
network_id |
string ID of the network that the cluster belongs to. |
|
health |
enum Health Aggregated cluster health.
|
|
status |
enum Status Current state of the cluster.
|
|
maintenance_window |
Maintenance window for the cluster. |
|
planned_operation |
Planned maintenance operation to be started for the cluster within the nearest |
|
security_group_ids[] |
string User security groups |
|
deletion_protection |
bool 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 |
|
spqr_config |
Configuration for SPQR servers in the 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 |
SPQRConfig
|
Field |
Description |
|
router |
SPQR router settings. |
|
coordinator |
SPQR coordinator settings. |
|
postgresql |
PostgreSQL settings. |
|
infra |
SPQR Infra (router+coordinator) settings. |
|
log_level |
enum LogLevel SPQR default log level
|
|
balancer |
SPQR Balancer settings. |
RouterConfig
|
Field |
Description |
|
config |
|
|
resources |
RouterSettings
Configuration of a SPQR router.
|
Field |
Description |
|
show_notice_messages |
|
|
time_quantiles[] |
double |
|
default_route_behavior |
enum DefaultRouteBehavior
|
|
prefer_same_availability_zone |
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.
|
CoordinatorConfig
|
Field |
Description |
|
config |
|
|
resources |
CoordinatorSettings
Configuration of a SPQR coordinator.
|
Field |
Description |
|
Empty |
|
PostgreSQLConfig
|
Field |
Description |
|
config |
|
|
resources |
PostgreSQLSettings
Configuration of a PostgreSQL.
|
Field |
Description |
|
Empty |
|
InfraConfig
|
Field |
Description |
|
resources |
|
|
router |
|
|
coordinator |
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. |
MaintenanceWindow
A maintenance window settings.
|
Field |
Description |
|
anytime |
Maintenance operation can be scheduled anytime. Includes only one of the fields The maintenance policy in effect. |
|
weekly_maintenance_window |
Maintenance operation can be scheduled on a weekly basis. Includes only one of the fields The maintenance policy in effect. |
AnytimeMaintenanceWindow
|
Field |
Description |
|
Empty |
|
WeeklyMaintenanceWindow
Weelky maintenance window settings.
|
Field |
Description |
|
day |
enum WeekDay Day of the week (in
|
|
hour |
int64 Hour of the day in UTC (in |
MaintenanceOperation
A planned maintenance operation.
|
Field |
Description |
|
info |
string Information about this maintenance operation. |
|
delayed_until |
Time until which this maintenance operation is delayed. |
|
latest_maintenance_time |
|
|
next_maintenance_window_time |