Get
Returns the specified MySQL cluster.
To get the list of available MySQL clusters, make a List request.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetClusterRequest = cloudApi.dataproc.cluster_service.GetClusterRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ClusterServiceClient);
const result = await client.get(
GetClusterRequest.fromPartial({
clusterId: "clusterId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.dataproc.v1.cluster_service_pb2_grpc import ClusterServiceStub
from yandex.cloud.dataproc.v1.cluster_service_pb2 import GetClusterRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(ClusterServiceStub)
response = service.Get(GetClusterRequest(cluster_id="clusterId"))
print(response)
GetClusterRequest
clusterId : string
ID of the MySQL cluster to return. To get the cluster ID use a ClusterService.List request.
Cluster
A MySQL cluster. For more information, see the documentation.
Environment
ENVIRONMENT_UNSPECIFIEDPRODUCTIONStable environment with a conservative update policy: only hotfixes are applied during regular maintenance.
PRESTABLEEnvironment with more aggressive update policy: new versions are rolled out irrespective of backward compatibility.
Health
HEALTH_UNKNOWNState of the cluster is unknown ([Host.health][3] for every host in the cluster is UNKNOWN).
ALIVECluster is alive and well ([Host.health][4] for every host in the cluster is ALIVE).
DEADCluster is inoperable ([Host.health][5] for every host in the cluster is DEAD).
DEGRADEDCluster is working below capacity ([Host.health][6] for at least one host in the cluster is not ALIVE).
Status
STATUS_UNKNOWNCluster state is unknown.
CREATINGCluster is being created.
RUNNINGCluster is running normally.
ERRORCluster encountered a problem and cannot operate.
UPDATINGCluster is being updated.
STOPPINGCluster is stopping.
STOPPEDCluster stopped.
STARTINGCluster is starting.
id : string
ID of the MySQL cluster. This ID is assigned by Managed Service for MySQL at creation time.
folderId : string
ID of the folder that the MySQL cluster belongs to.
createdAt : google.protobuf.Timestamp
name : string
Name of the MySQL cluster. The name must be unique within the folder, comply with RFC 1035 and be 1-63 characters long.
description : string
Description of the MySQL cluster. 0-256 characters long.
labels : string
Custom labels for the MySQL cluster as key:value pairs.
Maximum 64 per resource.
environment : Environment
Deployment environment of the MySQL cluster.
monitoring : Monitoring
Description of monitoring systems relevant to the MySQL cluster.
config : ClusterConfig
Configuration of the MySQL cluster.
networkId : string
ID of the network that the cluster belongs to.
health : Health
Aggregated cluster health.
status : Status
Current state of the cluster.
Monitoring
name : string
Name of the monitoring system.
description : string
Description of the monitoring system.
link : string
Link to the monitoring system charts for the MySQL cluster.
ClusterConfig
version : string
Version of MySQL server software.
One of mysqlConfig
Configuration for MySQL servers in the cluster.
mysqlConfig_5_7: config.MysqlConfigSet5_7Configuration of a MySQL 5.7 server.
resources : Resources
Resources allocated to MySQL hosts.
backupWindowStart : google.type.TimeOfDay
Time to start the daily backup, in the UTC timezone.
MysqlConfigSet5_7
effectiveConfig : MysqlConfig5_7
Effective settings for a MySQL 5.7 cluster (a combination of settings defined in user_config and default_config).
userConfig : MysqlConfig5_7
User-defined settings for a MySQL 5.7 cluster.
defaultConfig : MysqlConfig5_7
Default configuration for a MySQL 5.7 cluster.
Resources
resourcePresetId : string
ID of the preset for computational resources available to a host (CPU, memory etc.). All available presets are listed in the documentation.
diskSize : int64
Volume of the storage available to a host.
diskTypeId : string
Type of the storage environment for the host. Possible values:
- network-ssd - network SSD drive,
- local-ssd - local SSD storage.
MysqlConfig5_7
Options and structure of MysqlConfig5_7 reflects MySQL 5.7 configuration file
innodbBufferPoolSize : google.protobuf.Int64Value
Size of the InnoDB buffer pool used for caching table and index data.
For details, see MySQL documentation for the parameter.
maxConnections : google.protobuf.Int64Value
The maximum permitted number of simultaneous client connections.
For details, see MySQL documentation for the variable.
longQueryTime : google.protobuf.DoubleValue
Time that it takes to process a query before it is considered slow.
For details, see MySQL documentation for the variable.