Skip to main content

GetShardGroup

Returns the specified shard group.

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);
})();

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.