Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Managed Service for MySQL®
  • Getting started
  • Access management
  • Terraform reference
    • Authentication with the API
      • Overview
        • Overview
        • Get
        • List
        • Create
        • Update
        • Delete
        • Start
        • Stop
        • Move
        • Backup
        • Restore
        • RescheduleMaintenance
        • StartFailover
        • ListLogs
        • StreamLogs
        • ListOperations
        • ListBackups
        • ListHosts
        • AddHosts
        • UpdateHosts
        • DeleteHosts
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes

In this article:

  • HTTP request
  • Path parameters
  • Query parameters
  • Response
  • Host
  • Resources
  • Service
  1. API reference
  2. REST
  3. Cluster
  4. ListHosts

Managed Service for MySQL API, REST: Cluster.ListHosts

Written by
Yandex Cloud
Improved by
amatol
Updated at November 26, 2024
  • HTTP request
  • Path parameters
  • Query parameters
  • Response
  • Host
  • Resources
  • Service

Retrieves a list of hosts for a cluster.

HTTP requestHTTP request

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

Path parametersPath 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 parametersQuery 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.

ResponseResponse

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.

HostHost

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.

ResourcesResources

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.

ServiceService

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.

Was the article helpful?

Previous
ListBackups
Next
AddHosts
Yandex project
© 2025 Yandex.Cloud LLC