Yandex Cloud
Поиск
Связаться с намиПодключиться
  • Истории успеха
  • Документация
  • Блог
  • Все сервисы
  • Статус работы сервисов
    • Доступны в регионе
    • Инфраструктура и сеть
    • Платформа данных
    • Контейнеры
    • Инструменты разработчика
    • Бессерверные вычисления
    • Безопасность
    • Мониторинг и управление ресурсами
    • ИИ для бизнеса
    • Бизнес-инструменты
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Партнёрская программа
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Тарифы Yandex Cloud
    • Промоакции и free tier
    • Правила тарификации
  • Истории успеха
  • Документация
  • Блог
Проект Яндекса
© 2025 ТОО «Облачные Сервисы Казахстан»
Yandex Managed Service for Sharded PostgreSQL
  • Начало работы
  • Управление доступом
  • Правила тарификации
  • Справочник 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
        • DeleteShard
        • ListAccessBindings
        • SetAccessBindings
        • UpdateAccessBindings
  • История изменений

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

  • gRPC request
  • UpdateClusterRequest
  • ConfigSpec
  • SpqrSpec
  • Router
  • RouterSettings
  • Resources
  • Coordinator
  • CoordinatorSettings
  • PostgreSQL
  • PostgreSQLSettings
  • Infra
  • BalancerSettings
  • Access
  • MaintenanceWindow
  • AnytimeMaintenanceWindow
  • WeeklyMaintenanceWindow
  • operation.Operation
  • UpdateClusterMetadata
  • Cluster
  • Monitoring
  • ClusterConfig
  • SPQRConfig
  • RouterConfig
  • RouterSettings
  • Resources
  • CoordinatorConfig
  • CoordinatorSettings
  • PostgreSQLConfig
  • PostgreSQLSettings
  • InfraConfig
  • BalancerSettings
  • Access
  • MaintenanceWindow
  • AnytimeMaintenanceWindow
  • WeeklyMaintenanceWindow
  • MaintenanceOperation
  1. Справочник API
  2. gRPC (англ.)
  3. Cluster
  4. Update

Managed Service for SPQR API, gRPC: ClusterService.Update

Статья создана
Yandex Cloud
Обновлена 8 августа 2025 г.
  • gRPC request
  • UpdateClusterRequest
  • ConfigSpec
  • SpqrSpec
  • Router
  • RouterSettings
  • Resources
  • Coordinator
  • CoordinatorSettings
  • PostgreSQL
  • PostgreSQLSettings
  • Infra
  • BalancerSettings
  • Access
  • MaintenanceWindow
  • AnytimeMaintenanceWindow
  • WeeklyMaintenanceWindow
  • operation.Operation
  • UpdateClusterMetadata
  • Cluster
  • Monitoring
  • ClusterConfig
  • SPQRConfig
  • RouterConfig
  • RouterSettings
  • Resources
  • CoordinatorConfig
  • CoordinatorSettings
  • PostgreSQLConfig
  • PostgreSQLSettings
  • InfraConfig
  • BalancerSettings
  • Access
  • MaintenanceWindow
  • AnytimeMaintenanceWindow
  • WeeklyMaintenanceWindow
  • MaintenanceOperation

Updates the specified SPQR cluster.

gRPC requestgRPC request

rpc Update (UpdateClusterRequest) returns (operation.Operation)

UpdateClusterRequestUpdateClusterRequest

{
  "cluster_id": "string",
  "update_mask": "google.protobuf.FieldMask",
  "name": "string",
  "description": "string",
  "labels": "map<string, string>",
  "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"
  },
  "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
  },
  "security_group_ids": [
    "string"
  ],
  "deletion_protection": "bool",
  "network_id": "string"
}

Field

Description

cluster_id

string

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

update_mask

google.protobuf.FieldMask

Field mask that specifies which fields of the SPQR Cluster resource should be updated.

name

string

New name for the cluster.

description

string

New description of the SPQR cluster.

labels

object (map<string, string>)

Custom labels for the SPQR cluster as key:value pairs. Maximum 64 per resource.
For example, "project": "mvp" or "source": "dictionary".

The new set of labels will completely replace the old ones. To add a label, request the current
set with the ClusterService.Get method, then send an ClusterService.Update request with the new label added to the set.

config_spec

ConfigSpec

New configuration and resources for hosts in the cluster.

maintenance_window

MaintenanceWindow

New maintenance window settings for the cluster.

security_group_ids[]

string

User security groups

deletion_protection

bool

Deletion Protection inhibits deletion of the cluster

network_id

string

ID of the network to move the cluster to.

ConfigSpecConfigSpec

Field

Description

spqr_spec

SpqrSpec

Configuration and resource allocation for a SPQR Beta 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

SpqrSpecSpqrSpec

Field

Description

router

Router

Configuration and resource allocation for SPQR Router hosts.

coordinator

Coordinator

Configuration and resource allocation for SPQR Coordinator hosts.

postgresql

PostgreSQL

Configuration and resource allocation for PostgreSQL hosts.

infra

Infra

Configuration and resource allocation for SPQR Infra (router+coordinator) hosts.

console_password

string

Password of the SPQR console.

log_level

enum LogLevel

  • LOG_LEVEL_UNSPECIFIED
  • DEBUG
  • INFO
  • WARNING
  • ERROR
  • FATAL
  • PANIC

balancer

BalancerSettings

Configuration for SPQR Balancer.

RouterRouter

Field

Description

config

RouterSettings

Configuration for router hosts.

resources

Resources

Resources allocated to each host.

RouterSettingsRouterSettings

Configuration of a SPQR router.

Field

Description

show_notice_messages

google.protobuf.BoolValue

time_quantiles[]

double

default_route_behavior

enum DefaultRouteBehavior

  • DEFAULT_ROUTE_BEHAVIOR_UNSPECIFIED
  • BLOCK
  • ALLOW

prefer_same_availability_zone

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.

CoordinatorCoordinator

Field

Description

config

CoordinatorSettings

Configuration for coordinator hosts.

resources

Resources

Resources allocated to each host.

CoordinatorSettingsCoordinatorSettings

Configuration of a SPQR coordinator.

Field

Description

Empty

PostgreSQLPostgreSQL

Field

Description

config

PostgreSQLSettings

Configuration for PostgreSQL hosts.

resources

Resources

Resources allocated to each host.

PostgreSQLSettingsPostgreSQLSettings

Configuration of a PostgreSQL.

Field

Description

Empty

InfraInfra

Field

Description

resources

Resources

Resources allocated to each host

router

RouterSettings

Router related configuration

coordinator

CoordinatorSettings

Coordinator related configuration

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.
NOTE: Do not propagate to public API until Serverless integration is required.

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).

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

hour

int64

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

operation.Operationoperation.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"
          },
          "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

google.protobuf.Timestamp

Creation timestamp.

created_by

string

ID of the user or service account who initiated the operation.

modified_at

google.protobuf.Timestamp

The time when the Operation resource was last modified.

done

bool

If the value is false, it means the operation is still in progress.
If true, the operation is completed, and either error or response is available.

metadata

UpdateClusterMetadata

Service-specific metadata associated with the operation.
It typically contains the ID of the target resource that the operation is performed on.
Any method that returns a long-running operation should document the metadata type, if any.

error

google.rpc.Status

The error result of the operation in case of failure or cancellation.

Includes only one of the fields error, response.

The operation result.
If done == false and there was no failure detected, neither error nor response is set.
If done == false and there was a failure detected, error is set.
If done == true, exactly one of error or response is set.

response

Cluster

The normal response of the operation in case of success.
If the original method returns no data on success, such as Delete,
the response is google.protobuf.Empty.
If the original method is the standard Create/Update,
the response should be the target resource of the operation.
Any method that returns a long-running operation should document the response type, if any.

Includes only one of the fields error, response.

The operation result.
If done == false and there was no failure detected, neither error nor response is set.
If done == false and there was a failure detected, error is set.
If done == true, exactly one of error or response is set.

UpdateClusterMetadataUpdateClusterMetadata

Field

Description

cluster_id

string

ID of the SPQR Cluster resource that is being updated.

ClusterCluster

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.

  • ENVIRONMENT_UNSPECIFIED
  • PRODUCTION: Stable environment with a conservative update policy: only hotfixes
    are applied during regular maintenance.
  • PRESTABLE: Environment with 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

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

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

SPQRConfigSPQRConfig

Field

Description

router

RouterConfig

SPQR router settings.

coordinator

CoordinatorConfig

SPQR coordinator settings.

postgresql

PostgreSQLConfig

PostgreSQL settings.

infra

InfraConfig

SPQR Infra (router+coordinator) settings.

log_level

enum LogLevel

SPQR default log level

  • LOG_LEVEL_UNSPECIFIED
  • DEBUG
  • INFO
  • WARNING
  • ERROR
  • FATAL
  • PANIC

balancer

BalancerSettings

SPQR Balancer settings.

RouterConfigRouterConfig

Field

Description

config

RouterSettings

resources

Resources

RouterSettingsRouterSettings

Configuration of a SPQR router.

Field

Description

show_notice_messages

google.protobuf.BoolValue

time_quantiles[]

double

default_route_behavior

enum DefaultRouteBehavior

  • DEFAULT_ROUTE_BEHAVIOR_UNSPECIFIED
  • BLOCK
  • ALLOW

prefer_same_availability_zone

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

resources

Resources

CoordinatorSettingsCoordinatorSettings

Configuration of a SPQR coordinator.

Field

Description

Empty

PostgreSQLConfigPostgreSQLConfig

Field

Description

config

PostgreSQLSettings

resources

Resources

PostgreSQLSettingsPostgreSQLSettings

Configuration of a PostgreSQL.

Field

Description

Empty

InfraConfigInfraConfig

Field

Description

resources

Resources

router

RouterSettings

coordinator

CoordinatorSettings

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.
NOTE: Do not propagate to public API until Serverless integration is required.

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).

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

hour

int64

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

MaintenanceOperationMaintenanceOperation

A planned maintenance operation.

Field

Description

info

string

Information about this maintenance operation.

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

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

Предыдущая
Create
Следующая
Delete
Проект Яндекса
© 2025 ТОО «Облачные Сервисы Казахстан»