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:

  • gRPC request
  • ListClusterHostsRequest
  • ListClusterHostsResponse
  • Host
  • Resources
  • Service
  1. API reference
  2. gRPC
  3. Cluster
  4. ListHosts

Managed Service for MySQL API, gRPC: ClusterService.ListHosts

Written by
Yandex Cloud
Updated at November 26, 2024
  • gRPC request
  • ListClusterHostsRequest
  • ListClusterHostsResponse
  • Host
  • Resources
  • Service

Retrieves a list of hosts for a cluster.

gRPC requestgRPC request

rpc ListHosts (ListClusterHostsRequest) returns (ListClusterHostsResponse)

ListClusterHostsRequestListClusterHostsRequest

{
  "cluster_id": "string",
  "page_size": "int64",
  "page_token": "string"
}

Field

Description

cluster_id

string

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

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

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 ListClusterHostsResponse.next_page_token that can be used to get the next page of results in the subsequent ClusterService.ListHosts requests.

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 ListClusterHostsResponse.next_page_token returned by the previous ClusterService.ListHosts request.

ListClusterHostsResponseListClusterHostsResponse

{
  "hosts": [
    {
      "name": "string",
      "cluster_id": "string",
      "zone_id": "string",
      "resources": {
        "resource_preset_id": "string",
        "disk_size": "int64",
        "disk_type_id": "string"
      },
      "role": "Role",
      "health": "Health",
      "services": [
        {
          "type": "Type",
          "health": "Health"
        }
      ],
      "subnet_id": "string",
      "assign_public_ip": "bool",
      "replication_source": "string",
      "backup_priority": "int64",
      "priority": "int64"
    }
  ],
  "next_page_token": "string"
}

Field

Description

hosts[]

Host

List of hosts in the cluster.

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 ListClusterHostsRequest.page_size, use the next_page_token as the value for the ListClusterHostsRequest.page_token in the subsequent ClusterService.ListHosts request to iterate through multiple pages of results.

Each of the subsequent ClusterService.ListHosts requests should use the next_page_token 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.

cluster_id

string

ID of the cluster the host belongs to.

zone_id

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.

subnet_id

string

ID of the subnet that the host belongs to.

assign_public_ip

bool

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

replication_source

string

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

backup_priority

int64

Host backup priority.

priority

int64

Host master promotion priority.

ResourcesResources

Cluster resource preset.

Field

Description

resource_preset_id

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.

disk_size

int64

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

disk_type_id

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