Skip to main content

GetShard

Returns the specified shard.

import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";

const GetClusterShardRequest =
cloudApi.mdb.clickhouse_cluster_service.GetClusterShardRequest;

(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ClusterServiceClient);

const result = await client.getShard(
GetClusterShardRequest.fromPartial({
clusterId: "clusterId",
shardName: "shardName",
})
);
console.log(result);
})();

GetClusterShardRequest

clusterId : string

ID of the MongoDB cluster that the shard belongs to. To get the cluster ID use a ClusterService.List request.

shardName : string

Name of the MongoDB shard to return. To get the name of the shard use a ClusterService.ListShards request.

Shard

name : string

Name of the shard.

clusterId : string

ID of the cluster that the shard belongs to.