Managed Service for MySQL API, gRPC: ClusterService.ListHosts
Retrieves a list of hosts for a cluster.
gRPC request
rpc ListHosts (ListClusterHostsRequest) returns (ListClusterHostsResponse)
ListClusterHostsRequest
{
"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_token |
string Page token that can be used to iterate through multiple pages of results. To get the next page of results, set |
ListClusterHostsResponse
{
"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[] |
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 Each of the subsequent ClusterService.ListHosts requests should use the |
Host
Field |
Description |
name |
string Name of the host. This name is assigned by the platform at the time of creation. |
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 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.
|
health |
enum Health Aggregated health of the host. If the field has default value, it is not returned in the response.
|
services[] |
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. |
Resources
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:
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.
|
health |
enum Health Aggregated health of the service. If the field has default value, it is not returned in the response.
|