Managed Service for MySQL API, REST: Cluster.listHosts
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
Parameter | Description |
---|---|
clusterId | Required. ID of the cluster to list hosts for. To get this ID, make a list request. The maximum string length in characters is 50. |
Query parameters
Parameter | Description |
---|---|
pageSize | The maximum number of results per page to return. If the number of available results is larger than pageSize, the API returns a nextPageToken that can be used to get the next page of results in the subsequent listHosts requests. Acceptable values are 0 to 1000, inclusive. |
pageToken | Page token that can be used to iterate through multiple pages of results. To get the next page of results, set pageToken to the nextPageToken returned by the previous listHosts request. The maximum string length in characters is 100. |
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": true,
"replicationSource": "string",
"backupPriority": "string",
"priority": "string"
}
],
"nextPageToken": "string"
}
Field | Description |
---|---|
hosts[] | object List of hosts in the cluster. |
hosts[]. 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. |
hosts[]. clusterId |
string ID of the cluster the host belongs to. |
hosts[]. zoneId |
string ID of the availability zone where the host resides. |
hosts[]. resources |
object Resources allocated to the host. Cluster resource preset. |
hosts[]. resources. 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. |
hosts[]. resources. diskSize |
string (int64) Volume of the storage (for each cluster host, in bytes). |
hosts[]. resources. diskTypeId |
string Type of the storage. Possible values:
See the documentation for details. |
hosts[]. role |
string Role of the host in the cluster.
|
hosts[]. health |
string Aggregated health of the host.
|
hosts[]. services[] |
object List of services provided by the host. |
hosts[]. services[]. type |
string Type of the service provided by the host.
|
hosts[]. services[]. health |
string Aggregated health of the service.
|
hosts[]. subnetId |
string ID of the subnet that the host belongs to. |
hosts[]. assignPublicIp |
boolean (boolean) Flag that shows if public IP address is assigned to the host so that the host can be accessed from the internet. |
hosts[]. replicationSource |
string Name of the host to be used as the replication source for cascading replication. |
hosts[]. backupPriority |
string (int64) Host backup priority. Acceptable values are 0 to 100, inclusive. |
hosts[]. priority |
string (int64) Host master promotion priority. Acceptable values are 0 to 100, inclusive. |
nextPageToken | string The token that can be used to get the next page of results. If the number of results is larger than pageSize, use the nextPageToken as the value for the pageToken in the subsequent listHosts request to iterate through multiple pages of results. Each of the subsequent listHosts requests should use the nextPageToken value returned by the previous request to continue paging through the results. |