Yandex Cloud
Документация
ПрезентацияСвязаться с намиНачать бесплатно
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Проект Яндекса
© 2026 ТОО «Облачные Сервисы Казахстан»
Yandex Managed Service for Sharded PostgreSQL
RU
  • Начало работы
  • Управление доступом
  • Инспекции и рекомендации
  • Правила тарификации
  • Справочник Terraform
    • Аутентификация в API
      • Overview
        • Overview
        • Get
        • List
        • Create
        • Update
        • Delete
        • AddSubcluster
        • Start
        • Stop
        • Move
        • Backup
        • Restore
        • RescheduleMaintenance
        • ListLogs
        • StreamLogs
        • ListOperations
        • ListBackups
        • ListHosts
        • AddHosts
        • UpdateHosts
        • DeleteHosts
        • ResetupHosts
        • GetShard
        • ListShards
        • AddShard
        • UpdateShard
        • DeleteShard
        • ListAccessBindings
        • SetAccessBindings
        • UpdateAccessBindings
  • Справочник метрик
  • Аудитные логи Audit Trails
  • Публичные материалы
  • История изменений

В этой статье:

  • gRPC request
  • GetClusterRequest
  • Cluster
  • Monitoring
  • ClusterConfig
  • SPQRConfig
  • RouterConfig
  • RouterSettings
  • Resources
  • CoordinatorConfig
  • CoordinatorSettings
  • PostgreSQLConfig
  • PostgreSQLSettings
  • InfraConfig
  • BalancerSettings
  • Access
  • MaintenanceWindow
  • AnytimeMaintenanceWindow
  • WeeklyMaintenanceWindow
  • MaintenanceOperation
  • MaintenanceWindows
  • AnytimeMaintenanceWindow
  • WeeklyMaintenanceSchedule
  • MaintenanceWindowSlot
  1. Справочник API
  2. gRPC (англ.)
  3. Cluster
  4. Get

Managed Service for SPQR API, gRPC: ClusterService.Get

Статья создана
Yandex Cloud
Обновлена 20 ноября 2026 г.
Открыть в Markdown
  • gRPC request
  • GetClusterRequest
  • Cluster
  • Monitoring
  • ClusterConfig
  • SPQRConfig
  • RouterConfig
  • RouterSettings
  • Resources
  • CoordinatorConfig
  • CoordinatorSettings
  • PostgreSQLConfig
  • PostgreSQLSettings
  • InfraConfig
  • BalancerSettings
  • Access
  • MaintenanceWindow
  • AnytimeMaintenanceWindow
  • WeeklyMaintenanceWindow
  • MaintenanceOperation
  • MaintenanceWindows
  • AnytimeMaintenanceWindow
  • WeeklyMaintenanceSchedule
  • MaintenanceWindowSlot

Returns the specified SPQR Cluster resource.
To get the list of available SPQR Cluster resources, make a List request.

gRPC requestgRPC request

rpc Get (GetClusterRequest) returns (Cluster)

GetClusterRequestGetClusterRequest

{
  "cluster_id": "string"
}

Field

Description

cluster_id

string

Required field. ID of the SPQR Cluster resource to return.
To get the cluster ID, use a ClusterService.List request.

The maximum string length in characters is 50.

ClusterCluster

{
  "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",
          "allow_postprocessing": "google.protobuf.BoolValue",
          "auto_route_ro_on_standby": "google.protobuf.BoolValue",
          "allow_two_phase_commit": "google.protobuf.BoolValue",
          "allow_autoprotect_two_phase": "google.protobuf.BoolValue"
        },
        "resources": {
          "resource_preset_id": "string",
          "disk_size": "int64",
          "disk_type_id": "string"
        }
      },
      "coordinator": {
        "config": {
          "iteration_timeout": "google.protobuf.Duration",
          "lock_iteration_timeout": "google.protobuf.Duration",
          "router_keepalive_time": "google.protobuf.Duration",
          "router_keepalive_timeout": "google.protobuf.Duration",
          "etcd_max_send_bytes": "google.protobuf.Int64Value",
          "etcd_max_txn_ops": "google.protobuf.Int64Value"
        },
        "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",
          "allow_postprocessing": "google.protobuf.BoolValue",
          "auto_route_ro_on_standby": "google.protobuf.BoolValue",
          "allow_two_phase_commit": "google.protobuf.BoolValue",
          "allow_autoprotect_two_phase": "google.protobuf.BoolValue"
        },
        "coordinator": {
          "iteration_timeout": "google.protobuf.Duration",
          "lock_iteration_timeout": "google.protobuf.Duration",
          "router_keepalive_time": "google.protobuf.Duration",
          "router_keepalive_timeout": "google.protobuf.Duration",
          "etcd_max_send_bytes": "google.protobuf.Int64Value",
          "etcd_max_txn_ops": "google.protobuf.Int64Value"
        }
      },
      "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"
      },
      "log_level": "LogLevel",
      "use_spqrguard": "google.protobuf.BoolValue",
      "forbid_direct_shard_queries": "google.protobuf.BoolValue"
    },
    "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",
  "host_group_ids": [
    "string"
  ],
  "maintenance_windows": {
    // Includes only one of the fields `anytime`, `weekly_maintenance_schedule`
    "anytime": "AnytimeMaintenanceWindow",
    "weekly_maintenance_schedule": {
      "slots": [
        {
          "day": "DayOfWeek",
          "start_time": "google.type.TimeOfDay",
          "duration": "google.protobuf.Duration",
          "allow_temporary_unavailability": "bool"
        }
      ]
    }
    // end of the list of possible fields
  },
  "is_ha": "bool"
}

A managed SPQR cluster. For more information, see the documentation.

Field

Description

id

string

ID of the SPQR cluster.
This ID is assigned by MDB at creation time.

folder_id

string

ID of the folder that the SPQR cluster belongs to.

created_at

google.protobuf.Timestamp

Creation timestamp in RFC3339 text format.

name

string

Name of the SPQR cluster.
The name is unique within the folder. 1-63 characters long.

description

string

Description of the SPQR cluster. 0-256 characters long.

labels

object (map<string, string>)

Custom labels for the SPQR cluster as key:value pairs. Maximum 64 per resource.

environment

enum Environment

Deployment environment of the SPQR cluster.

  • PRODUCTION: Stable environment with a conservative update policy: only hotfixes
    are applied during regular maintenance.
  • PRESTABLE: Environment with a more aggressive update policy: new versions
    are rolled out irrespective of backward compatibility.

monitoring[]

Monitoring

Description of monitoring systems relevant to the SPQR cluster.

config

ClusterConfig

Configuration of the SPQR cluster.

network_id

string

ID of the network that the cluster belongs to.

health

enum Health

Aggregated cluster health.

  • HEALTH_UNKNOWN: State of the cluster is unknown (Host.health for every host in the cluster is UNKNOWN).
  • ALIVE: Cluster is alive and well (Host.health for every host in the cluster is ALIVE).
  • DEAD: Cluster is inoperable (Host.health for every host in the cluster is DEAD).
  • DEGRADED: Cluster is working below capacity (Host.health for at least one host in the cluster is not ALIVE).

status

enum Status

Current state of the cluster.

  • STATUS_UNKNOWN: Cluster state is unknown.
  • CREATING: Cluster is being created.
  • RUNNING: Cluster is running normally.
  • ERROR: Cluster encountered a problem and cannot operate.
  • UPDATING: Cluster is being updated.
  • STOPPING: Cluster is stopping.
  • STOPPED: Cluster stopped.
  • STARTING: Cluster is starting.

maintenance_window

MaintenanceWindow

Deprecated. Use maintenance_windows instead.
Maintenance window for the cluster.

planned_operation

MaintenanceOperation

Planned maintenance operation to be started for the cluster within the nearest maintenance_window.

security_group_ids[]

string

User security groups

deletion_protection

bool

Deletion Protection inhibits deletion of the cluster

host_group_ids[]

string

Host groups hosting VMs of the cluster.

maintenance_windows

MaintenanceWindows

Maintenance windows for the cluster.

is_ha

bool

Indicates whether the cluster topology is highly available as defined by the Yandex Cloud SLA for managed databases.

MonitoringMonitoring

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.

ClusterConfigClusterConfig

Field

Description

spqr_config

SPQRConfig

Configuration for SPQR servers in the cluster.

backup_window_start

google.type.TimeOfDay

Time to start the daily backup, in the UTC timezone.

backup_retain_period_days

google.protobuf.Int64Value

Retain period of automatically created backup in days

access

Access

Access policy to DB

sox_audit

google.protobuf.BoolValue

Configuration setting which enables/disables SOX audit.

SPQRConfigSPQRConfig

Field

Description

router

RouterConfig

SPQR router settings.

coordinator

CoordinatorConfig

SPQR coordinator settings.

postgresql

PostgreSQLConfig

PostgreSQL settings.

infra

InfraConfig

SPQR Infra (router+coordinator) settings.

balancer

BalancerSettings

SPQR Balancer settings.

log_level

enum LogLevel

SPQR default log level

  • DEBUG: Provides diagnostic information for developers.
  • INFO: Reports information implicitly requested by the user.
  • WARNING: Reports a warning about a likely problem.
  • ERROR: Reports an error that aborts the current command.
  • FATAL: Reports an error that aborts the current session.

use_spqrguard

google.protobuf.BoolValue

Tells SPQR to use spqrguard extension. Extension must be enabled on shards.

For details, see documentation

forbid_direct_shard_queries

google.protobuf.BoolValue

RouterConfigRouterConfig

Field

Description

config

RouterSettings

Configuration for router hosts.

resources

Resources

Resources allocated to router hosts.

RouterSettingsRouterSettings

Configuration of a SPQR router.

Field

Description

show_notice_messages

google.protobuf.BoolValue

Enables notice messages.

time_quantiles[]

double

Time quantiles for query execution statistics.

default_route_behavior

enum DefaultRouteBehavior

Sets mode for multishard queries.

  • BLOCK
  • ALLOW

prefer_same_availability_zone

google.protobuf.BoolValue

Prefers hosts in the same availability zone.

enhanced_multishard_processing

google.protobuf.BoolValue

Enables engine V2 with enhanced multishard query processing,

default_target_session_attrs

enum TargetSessionAttrs

Default target_session_attrs for connections.

  • READ_WRITE
  • SMART_READ_WRITE
  • READ_ONLY
  • PREFER_STANDBY
  • ANY

default_commit_strategy

enum CommitStrategy

Default commit strategy for distributed transactions

  • BEST_EFFORT
  • ONE_PC
  • TWO_PC

allow_postprocessing

google.protobuf.BoolValue

Enables postprocessing for multishard queries.

auto_route_ro_on_standby

google.protobuf.BoolValue

Whether to automatically route read-only queries to standby hosts.

allow_two_phase_commit

google.protobuf.BoolValue

Enables two-phase commit for modifying reference relations.

allow_autoprotect_two_phase

google.protobuf.BoolValue

ResourcesResources

Field

Description

resource_preset_id

string

ID of the preset for computational resources available to a host (CPU, memory etc.).
All available presets are listed in the documentation.

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.
Possible values:

  • network-hdd - network HDD drive,
  • network-ssd - network SSD drive,
  • local-ssd - local SSD storage.

CoordinatorConfigCoordinatorConfig

Field

Description

config

CoordinatorSettings

Configuration for coordinator hosts.

resources

Resources

Resources allocated to coordinator hosts.

CoordinatorSettingsCoordinatorSettings

Configuration of a SPQR coordinator.

Field

Description

iteration_timeout

google.protobuf.Duration

Sleep duration between routers sync iterations.

lock_iteration_timeout

google.protobuf.Duration

Sleep duration between attempts to acquire the coordinator lock when starting up.

router_keepalive_time

google.protobuf.Duration

Interval for sending gRPC keepalive pings to routers.

router_keepalive_timeout

google.protobuf.Duration

Time to wait for keepalive ping response before considering connection dead.

etcd_max_send_bytes

google.protobuf.Int64Value

Maximum request size in bytes that the etcd client (QDB implementation) is allowed to send.

etcd_max_txn_ops

google.protobuf.Int64Value

Maximum number of subcommands allowed in a single etcd transaction.

PostgreSQLConfigPostgreSQLConfig

Field

Description

config

PostgreSQLSettings

Configuration for PostgreSQL hosts.

resources

Resources

Resources allocated to PostgreSQL hosts.

PostgreSQLSettingsPostgreSQLSettings

Configuration of a PostgreSQL.

Field

Description

Empty

InfraConfigInfraConfig

Field

Description

resources

Resources

Resources allocated to infra hosts.

router

RouterSettings

Configuration for router.

coordinator

CoordinatorSettings

Configuration for coordinator.

BalancerSettingsBalancerSettings

Field

Description

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

AccessAccess

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.

MaintenanceWindowMaintenanceWindow

A maintenance window settings.

Field

Description

anytime

AnytimeMaintenanceWindow

Maintenance operation can be scheduled anytime.

Includes only one of the fields anytime, weekly_maintenance_window.

The maintenance policy in effect.

weekly_maintenance_window

WeeklyMaintenanceWindow

Maintenance operation can be scheduled on a weekly basis.

Includes only one of the fields anytime, weekly_maintenance_window.

The maintenance policy in effect.

AnytimeMaintenanceWindowAnytimeMaintenanceWindow

Field

Description

Empty

WeeklyMaintenanceWindowWeeklyMaintenanceWindow

Weelky maintenance window settings.

Field

Description

day

enum WeekDay

Day of the week (in DDD format).

  • MON
  • TUE
  • WED
  • THU
  • FRI
  • SAT
  • SUN

hour

int64

Hour of the day in UTC (in HH format).

Acceptable values are 1 to 24, inclusive.

MaintenanceOperationMaintenanceOperation

A planned maintenance operation.

Field

Description

info

string

Information about this maintenance operation.

The maximum string length in characters is 256.

delayed_until

google.protobuf.Timestamp

Time until which this maintenance operation is delayed.

latest_maintenance_time

google.protobuf.Timestamp

next_maintenance_window_time

google.protobuf.Timestamp

MaintenanceWindowsMaintenanceWindows

Maintenance windows shared by all managed database services.

Field

Description

anytime

AnytimeMaintenanceWindow

Maintenance operations can be scheduled anytime.

Includes only one of the fields anytime, weekly_maintenance_schedule.

weekly_maintenance_schedule

WeeklyMaintenanceSchedule

Maintenance operations can be scheduled during the specified weekly slots.

Includes only one of the fields anytime, weekly_maintenance_schedule.

AnytimeMaintenanceWindowAnytimeMaintenanceWindow

Field

Description

Empty

WeeklyMaintenanceScheduleWeeklyMaintenanceSchedule

Field

Description

slots[]

MaintenanceWindowSlot

Weekly time slots during which maintenance operations can be scheduled.
At least one slot is required.

The number of elements must be greater than 0.

MaintenanceWindowSlotMaintenanceWindowSlot

Field

Description

day

enum DayOfWeek

Day of the week.

  • MONDAY: The day-of-week of Monday.
  • TUESDAY: The day-of-week of Tuesday.
  • WEDNESDAY: The day-of-week of Wednesday.
  • THURSDAY: The day-of-week of Thursday.
  • FRIDAY: The day-of-week of Friday.
  • SATURDAY: The day-of-week of Saturday.
  • SUNDAY: The day-of-week of Sunday.

start_time

google.type.TimeOfDay

Required field. Start time in UTC.

duration

google.protobuf.Duration

Required field. Slot duration.

allow_temporary_unavailability

bool

Allows maintenance operations that may cause temporary write unavailability.

Была ли статья полезна?

Предыдущая
Overview
Следующая
List
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Проект Яндекса
© 2026 ТОО «Облачные Сервисы Казахстан»