Yandex Cloud
Поиск
Связаться с намиПодключиться
  • Документация
  • Блог
  • Все сервисы
  • Статус работы сервисов
    • Популярные
    • Инфраструктура и сеть
    • Платформа данных
    • Контейнеры
    • Инструменты разработчика
    • Бессерверные вычисления
    • Безопасность
    • Мониторинг и управление ресурсами
    • Машинное обучение
    • Бизнес-инструменты
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Облако для интеграторов
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Контент-программа
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Истории успеха
    • Тарифы Yandex Cloud
    • Промоакции и free tier
    • Правила тарификации
  • Документация
  • Блог
Проект Яндекса
© 2025 ООО «Яндекс.Облако»
Yandex Managed Service for MySQL®
  • Начало работы
  • Управление доступом
  • Справочник Terraform
    • Аутентификация в API
      • Overview
        • Overview
        • Get
        • List
        • Create
        • Update
        • Delete
        • Start
        • Stop
        • Move
        • Backup
        • Restore
        • RescheduleMaintenance
        • StartFailover
        • ListLogs
        • StreamLogs
        • ListOperations
        • ListBackups
        • ListHosts
        • AddHosts
        • UpdateHosts
        • DeleteHosts
  • Метрики Monitoring
  • Аудитные логи Audit Trails
  • Публичные материалы
  • История изменений
  • Обучающие курсы

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

  • HTTP request
  • Path parameters
  • Query parameters
  • Response
  • Host
  • Resources
  • Service
  1. Справочник API
  2. REST (англ.)
  3. Cluster
  4. ListHosts

Managed Service for MySQL API, REST: Cluster.ListHosts

Статья создана
Yandex Cloud
Улучшена
amatol
Обновлена 26 ноября 2024 г.
  • HTTP request
  • Path parameters
  • Query parameters
  • Response
  • Host
  • Resources
  • Service

Retrieves a list of hosts for a cluster.

HTTP request

GET https://mdb.api.cloud.yandex.net/managed-mysql/v1/clusters/{clusterId}/hosts

Path parameters

Field

Description

clusterId

string

Required field. ID of the cluster to list hosts for.

To get this ID, make a ClusterService.List request.

Query parameters

Field

Description

pageSize

string (int64)

The maximum number of results per page to return.

If the number of available results is larger than pageSize, the API returns a ListClusterHostsResponse.nextPageToken that can be used to get the next page of results in the subsequent ClusterService.ListHosts requests.

pageToken

string

Page token that can be used to iterate through multiple pages of results.

To get the next page of results, set pageToken to the ListClusterHostsResponse.nextPageToken returned by the previous ClusterService.ListHosts request.

Response

HTTP Code: 200 - OK

{
  "hosts": [
    {
      "name": "string",
      "clusterId": "string",
      "zoneId": "string",
      "resources": {
        "resourcePresetId": "string",
        "diskSize": "string",
        "diskTypeId": "string"
      },
      "role": "string",
      "health": "string",
      "services": [
        {
          "type": "string",
          "health": "string"
        }
      ],
      "subnetId": "string",
      "assignPublicIp": "boolean",
      "replicationSource": "string",
      "backupPriority": "string",
      "priority": "string"
    }
  ],
  "nextPageToken": "string"
}

Field

Description

hosts[]

Host

List of hosts in the cluster.

nextPageToken

string

The token that can be used to get the next page of results.

If the number of results is larger than ListClusterHostsRequest.pageSize, use the nextPageToken as the value for the ListClusterHostsRequest.pageToken in the subsequent ClusterService.ListHosts request to iterate through multiple pages of results.

Each of the subsequent ClusterService.ListHosts requests should use the nextPageToken value returned by the previous request to continue paging through the results.

Host

Field

Description

name

string

Name of the host.

This name is assigned by the platform at the time of creation.
The name is unique across all MDB hosts that exist on the platform, as it defines the FQDN of the host.

clusterId

string

ID of the cluster the host belongs to.

zoneId

string

ID of the availability zone where the host resides.

resources

Resources

Resources allocated to the host.

role

enum (Role)

Role of the host in the cluster. If the field has default value, it is not returned in the response.

  • ROLE_UNKNOWN: Role of the host is unknown. Default value.
  • MASTER: Host is the master.
  • REPLICA: Host is a replica.

health

enum (Health)

Aggregated health of the host. If the field has default value, it is not returned in the response.

  • HEALTH_UNKNOWN: Health of the host is unknown. Default value.
  • ALIVE: Host is performing all its functions normally.
  • DEAD: Host is inoperable, and cannot perform any of its essential functions.
  • DEGRADED: Host is degraded, and can perform only some of its essential functions.
  • READONLY: Host is alive, but in read-only mode.

services[]

Service

List of services provided by the host.

subnetId

string

ID of the subnet that the host belongs to.

assignPublicIp

boolean

Flag that shows if public IP address is assigned to the host so that the host can be accessed from the internet.

replicationSource

string

Name of the host to be used as the replication source for cascading replication.

backupPriority

string (int64)

Host backup priority.

priority

string (int64)

Host master promotion priority.

Resources

Cluster resource preset.

Field

Description

resourcePresetId

string

ID of the resource preset that defines available computational resources (vCPU, RAM, etc.) for a cluster host.

All available presets are listed in the documentation.

diskSize

string (int64)

Volume of the storage (for each cluster host, in bytes).

diskTypeId

string

Type of the storage.

Possible values:

  • network-hdd - standard network storage
  • network-ssd - fast network storage
  • network-ssd-nonreplicated - fast network nonreplicated storage
  • local-ssd - fast local storage.

See the documentation for details.

Service

Field

Description

type

enum (Type)

Type of the service provided by the host. If the field has default value, it is not returned in the response.

  • TYPE_UNSPECIFIED: Service type of the host is unspecified. Default value.
  • MYSQL: The host is a MySQL server.

health

enum (Health)

Aggregated health of the service. If the field has default value, it is not returned in the response.

  • HEALTH_UNKNOWN: Health of the service is unknown. Default value.
  • ALIVE: The service is working normally.
  • DEAD: The service is dead or unresponsive.
  • READONLY: The service is in read-only mode.

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

Предыдущая
ListBackups
Следующая
AddHosts
Проект Яндекса
© 2025 ООО «Яндекс.Облако»