Yandex Cloud
  • Сервисы
  • Решения
  • Почему Yandex Cloud
  • Сообщество
  • Тарифы
  • Документация
  • Связаться с нами
Подключиться
Language / Region
© 2022 ООО «Яндекс.Облако»
Yandex Managed Service for MySQL®
  • Начало работы
  • Пошаговые инструкции
    • Все инструкции
    • Информация об имеющихся кластерах
    • Создание кластера
    • Подключение к базе данных
    • Остановка и запуск кластера
    • SQL-запросы в консоли управления
    • Изменение кластера
    • Подключение к DataLens
    • Управление хостами MySQL
    • Управление базами данных
    • Управление пользователями
    • Управление правами пользователей
    • Управление резервными копиями
    • Просмотр логов кластера
    • Удаление кластера
    • Диагностика производительности
    • Мониторинг состояния кластера и хостов
  • Концепции
    • Взаимосвязь ресурсов сервиса
    • Классы хостов
      • Действующие классы хостов
      • Архив
        • До 1 июня 2020 года
      • Использование устаревших классов хостов
    • Сеть в Managed Service for MySQL
    • Квоты и лимиты
    • Типы хранилища
    • Резервные копии
    • Репликация
    • Техническое обслуживание
    • Права пользователей
    • Настройки MySQL
  • Практические руководства
    • Все сценарии
    • Анализ производительности и оптимизация
    • Выгрузка базы данных в Yandex Data Proc
    • Миграция базы данных в Managed Service for MySQL
    • Миграция базы данных из Managed Service for MySQL в MySQL
  • Управление доступом
  • Правила тарификации
    • Действующие правила
    • Архив
      • До 1 февраля 2020 года
  • Справочник API
    • Аутентификация в API
    • gRPC (англ.)
      • Overview
      • BackupService
      • ClusterService
      • DatabaseService
      • ResourcePresetService
      • UserService
      • OperationService
    • REST (англ.)
      • Overview
      • Backup
        • Overview
        • get
        • list
      • Cluster
        • Overview
        • addHosts
        • backup
        • create
        • delete
        • deleteHosts
        • get
        • list
        • listBackups
        • listHosts
        • listLogs
        • listOperations
        • move
        • rescheduleMaintenance
        • restore
        • start
        • startFailover
        • stop
        • streamLogs
        • update
        • updateHosts
      • Database
        • Overview
        • create
        • delete
        • get
        • list
      • ResourcePreset
        • Overview
        • get
        • list
      • User
        • Overview
        • create
        • delete
        • get
        • grantPermission
        • list
        • revokePermission
        • update
      • Operation
        • Overview
        • get
  • История изменений
  • Вопросы и ответы
    • Общие вопросы
    • Вопросы о MySQL
    • Подключение
    • Проблемы с чтением/записью в кластер
    • Проблемы с производительностью
    • Изменение кластера
    • Мониторинг и логи
    • Миграция/перенос
    • Настройки параметров MySQL
    • Все вопросы на одной странице
  1. Справочник API
  2. gRPC (англ.)
  3. DatabaseService

DatabaseService

Статья создана
Yandex Cloud
  • Calls DatabaseService
  • Get
    • GetDatabaseRequest
    • Database
  • List
    • ListDatabasesRequest
    • ListDatabasesResponse
    • Database
  • Create
    • CreateDatabaseRequest
    • DatabaseSpec
    • Operation
    • CreateDatabaseMetadata
    • Database
  • Delete
    • DeleteDatabaseRequest
    • Operation
    • DeleteDatabaseMetadata

A set of methods for managing MySQL databases in a cluster.

See the documentation for details.

Call Description
Get Retrieves information about the specified database.
List Retrieves the list of databases in a cluster.
Create Creates a new database in a cluster.
Delete Deletes a database from a cluster.

Calls DatabaseService

Get

Retrieves information about the specified database.

rpc Get (GetDatabaseRequest) returns (Database)

GetDatabaseRequest

Field Description
cluster_id string
Required. ID of the cluster that the database belongs to.
To get this ID, make a ClusterService.List request. The maximum string length in characters is 50.
database_name string
Required. Name of the database to return information about.
To get this name, make a DatabaseService.List request. The maximum string length in characters is 63. Value must match the regular expression [a-zA-Z0-9_-]*.

Database

Field Description
name string
Name of the database.
cluster_id string
ID of the cluster that the database belongs to.

List

Retrieves the list of databases in a cluster.

rpc List (ListDatabasesRequest) returns (ListDatabasesResponse)

ListDatabasesRequest

Field Description
cluster_id string
Required. ID of the cluster to list databases in.
To get this ID, make a ClusterService.List request. The maximum string length in characters is 50.
page_size int64
The maximum number of results per page to return.
If the number of available results is larger than page_size, the API returns a ListDatabasesResponse.next_page_token that can be used to get the next page of results in the subsequent DatabaseService.List requests. Acceptable values are 0 to 1000, inclusive.
page_token string
Page token that can be used to iterate through multiple pages of results.
To get the next page of results, set page_token to the ListDatabasesResponse.next_page_token returned by the previous DatabaseService.List request. The maximum string length in characters is 100.

ListDatabasesResponse

Field Description
databases[] Database
List of databases.
next_page_token string
The token that can be used to get the next page of results.
If the number of results is larger than ListDatabasesRequest.page_size, use the next_page_token as the value for the ListDatabasesRequest.page_token in the subsequent DatabaseService.List(#List) request to iterate through multiple pages of results.
Each of the subsequent [DatabaseService.List] requests should use the next_page_token value returned by the previous request to continue paging through the results.

Database

Field Description
name string
Name of the database.
cluster_id string
ID of the cluster that the database belongs to.

Create

Creates a new database in a cluster.

rpc Create (CreateDatabaseRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:CreateDatabaseMetadata

    Operation.response:Database

CreateDatabaseRequest

Field Description
cluster_id string
Required. ID of the cluster to create the database in.
To get this ID, make a ClusterService.List request. The maximum string length in characters is 50.
database_spec DatabaseSpec
Required. Configuration of the database.

DatabaseSpec

Field Description
name string
Required. Name of the database. The maximum string length in characters is 63. Value must match the regular expression [a-zA-Z0-9_-]*.

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 google.protobuf.Any<CreateDatabaseMetadata>
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.
result oneof: error or 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.
  error google.rpc.Status
The error result of the operation in case of failure or cancellation.
  response google.protobuf.Any<Database>
if operation finished successfully.

CreateDatabaseMetadata

Field Description
cluster_id string
ID of the cluster the database is being created in.
database_name string
Name of the database that is being created.

Database

Field Description
name string
Name of the database.
cluster_id string
ID of the cluster that the database belongs to.

Delete

Deletes a database from a cluster.

rpc Delete (DeleteDatabaseRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:DeleteDatabaseMetadata

    Operation.response:google.protobuf.Empty

DeleteDatabaseRequest

Field Description
cluster_id string
Required. ID of the cluster to delete the database from.
To get this ID, make a ClusterService.List request. The maximum string length in characters is 50.
database_name string
Required. Name of the database to delete.
To get this name, make a DatabaseService.List request. The maximum string length in characters is 63. Value must match the regular expression [a-zA-Z0-9_-]*.

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 google.protobuf.Any<DeleteDatabaseMetadata>
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.
result oneof: error or 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.
  error google.rpc.Status
The error result of the operation in case of failure or cancellation.
  response google.protobuf.Any<google.protobuf.Empty>
if operation finished successfully.

DeleteDatabaseMetadata

Field Description
cluster_id string
ID of the cluster the database is being deleted from.
database_name string
Name of the database that is being deleted.

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

Language / Region
© 2022 ООО «Яндекс.Облако»
В этой статье:
  • Calls DatabaseService
  • Get
  • GetDatabaseRequest
  • Database
  • List
  • ListDatabasesRequest
  • ListDatabasesResponse
  • Database
  • Create
  • CreateDatabaseRequest
  • DatabaseSpec
  • Operation
  • CreateDatabaseMetadata
  • Database
  • Delete
  • DeleteDatabaseRequest
  • Operation
  • DeleteDatabaseMetadata