Skip to main content

Get

Returns the specified service.

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

const GetServiceRequest = cloudApi.billing.service_service.GetServiceRequest;

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

const result = await client.get(
GetServiceRequest.fromPartial({
id: "id",
})
);
console.log(result);
})();

GetServiceRequest

id : string

ID of the service to return. To get the service ID, use ServiceService.List request.

Service

A Service resource.

id : string

ID of the service.

name : string

Name of the service, e.g. Compute Cloud, VPC.

description : string

Description of the service.