GetShardGroup
Returns the specified shard group.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetClusterShardGroupRequest =
cloudApi.mdb.clickhouse_cluster_service.GetClusterShardGroupRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ClusterServiceClient);
const result = await client.getShardGroup(
GetClusterShardGroupRequest.fromPartial({
clusterId: "clusterId",
shardGroupName: "shardGroupName",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.dataproc.v1.cluster_service_pb2_grpc import ClusterServiceStub
from yandex.cloud.mdb.clickhouse.v1.cluster_service_pb2 import GetClusterShardGroupRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(ClusterServiceStub)
response = service.GetShardGroup(
GetClusterShardGroupRequest(cluster_id="clusterId", shard_group_name="shardGroupName")
)
print(response)
GetClusterShardGroupRequest
clusterId
: string
ID of the cluster that the shard group belongs to.
To get the cluster ID, make a ClusterService.List request.
shardGroupName
: string
Name of the shard group to request information about.
To get the name of a shard group, make a ClusterService.ListShardGroups request.
ShardGroup
name
: string
Name of the shard group.
clusterId
: string
ID of the ClickHouse cluster that the shard group belongs to.
description
: string
Description of the shard group. 0-256 characters long.
shardNames
: string
List of shard names contained in the shard group.