Managed Service for SPQR API, gRPC: ClusterService.Create
- gRPC request
- CreateClusterRequest
- ConfigSpec
- SpqrSpec
- Router
- RouterSettings
- Resources
- Coordinator
- CoordinatorSettings
- PostgreSQL
- PostgreSQLSettings
- Infra
- BalancerSettings
- Access
- DatabaseSpec
- UserSpec
- Permission
- UserSettings
- HostSpec
- MDBPostgreSQL
- MaintenanceWindow
- AnytimeMaintenanceWindow
- WeeklyMaintenanceWindow
- ShardSpec
- operation.Operation
- CreateClusterMetadata
- Cluster
- Monitoring
- ClusterConfig
- SPQRConfig
- RouterConfig
- RouterSettings
- Resources
- CoordinatorConfig
- CoordinatorSettings
- PostgreSQLConfig
- PostgreSQLSettings
- InfraConfig
- BalancerSettings
- Access
- MaintenanceWindow
- AnytimeMaintenanceWindow
- WeeklyMaintenanceWindow
- MaintenanceOperation
Creates a SPQR cluster in the specified folder.
gRPC request
rpc Create (CreateClusterRequest) returns (operation.Operation)
CreateClusterRequest
{
"folder_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"
},
"database_specs": [
{
"name": "string",
"deletion_protection": "google.protobuf.BoolValue"
}
],
"user_specs": [
{
"name": "string",
"password": "string",
"permissions": [
{
"database_name": "string"
}
],
"settings": {
"connection_limit": "google.protobuf.Int64Value",
"connection_retries": "google.protobuf.Int64Value"
},
"grants": [
"string"
],
"deletion_protection": "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",
"security_group_ids": [
"string"
],
"deletion_protection": "bool",
"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
},
"shard_specs": [
{
"shard_name": "string",
// Includes only one of the fields `mdb_postgresql`
"mdb_postgresql": {
"cluster_id": "string"
}
// end of the list of possible fields
}
]
}
|
Field |
Description |
|
folder_id |
string Required field. ID of the folder to create SPQR cluster in. The maximum string length in characters is 50. |
|
name |
string Required field. Name of the 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 SPQR cluster. The maximum string length in characters is 256. |
|
labels |
object (map<string, string>) Custom labels for the SPQR cluster as No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression |
|
environment |
enum Environment Required field. Deployment environment of the SPQR cluster.
|
|
config_spec |
Required field. Configuration and resources for hosts that should be created for the SPQR cluster. |
|
database_specs[] |
Descriptions of databases to be created in the SPQR cluster. |
|
user_specs[] |
Descriptions of database users to be created in the SPQR cluster. |
|
host_specs[] |
Individual configurations for hosts that should be created for the SPQR cluster. The number of elements must be greater than 0. |
|
network_id |
string Required field. ID of the network to create the cluster in. The maximum string length in characters is 150. |
|
security_group_ids[] |
string User security groups |
|
deletion_protection |
bool Deletion Protection inhibits deletion of the cluster |
|
maintenance_window |
New maintenance window settings for the cluster. |
|
shard_specs[] |
Descriptions of shards to be created in the SPQR cluster. |
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. |
DatabaseSpec
|
Field |
Description |
|
name |
string Required field. Name of the SPQR database. 1-63 characters long. The maximum string length in characters is 63. Value must match the regular expression |
|
deletion_protection |
Deletion Protection inhibits deletion of the database |
UserSpec
|
Field |
Description |
|
name |
string Required field. Name of the SPQR user. The maximum string length in characters is 63. Value must match the regular expression |
|
password |
string Required field. Password of the SPQR user. The string length in characters must be 8-128. |
|
permissions[] |
Set of permissions to grant to the user. |
|
settings |
SPQR Settings for this user |
|
grants[] |
string User grants The maximum string length in characters for each value is 63. Each value must match the regular expression |
|
deletion_protection |
Deletion Protection inhibits deletion of the user |
Permission
|
Field |
Description |
|
database_name |
string Name of the database that the permission grants access to. |
UserSettings
|
Field |
Description |
|
connection_limit |
|
|
connection_retries |
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. 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. 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. |
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 Acceptable values are 1 to 24, inclusive. |
ShardSpec
|
Field |
Description |
|
shard_name |
string Required field. Name of the SPQR shard to create. The maximum string length in characters is 63. Value must match the regular expression |
|
mdb_postgresql |
Properties of the MDB PostgreSQL cluster Includes only one of the fields |
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"
},
// 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",
"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"
},
"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. |
CreateClusterMetadata
|
Field |
Description |
|
cluster_id |
string ID of the SPQR cluster that is being created. |
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 |
|
|
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.
|
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 Acceptable values are 1 to 24, inclusive. |
MaintenanceOperation
A planned maintenance operation.
|
Field |
Description |
|
info |
string Information about this maintenance operation. The maximum string length in characters is 256. |
|
delayed_until |
Time until which this maintenance operation is delayed. |
|
latest_maintenance_time |
|
|
next_maintenance_window_time |