Skip to main content

Get

Returns the specified Elasticsearch user.

To get the list of available Elasticsearch users, make a List request.

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

const GetUserRequest = cloudApi.mdb.clickhouse_user_service.GetUserRequest;

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

const result = await client.get(
GetUserRequest.fromPartial({
clusterId: "clusterId",
userName: "userName",
})
);
console.log(result);
})();

GetUserRequest

clusterId : string

ID of the Elasticsearch cluster the user belongs to.

To get the cluster ID, make a ClusterService.List request.

userName : string

Name of the Elasticsearch user to return.

To get the name of the user, make a UserService.List request.

User

An Elasticsearch user.

name : string

Name of the Elasticsearch user.

clusterId : string

ID of the Elasticsearch cluster the user belongs to.