Skip to main content

Get

Returns the Service information in the specified resource container.

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

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.ServiceControlServiceClient);

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

GetServiceRequest

serviceId : string

ID of the Service.

resource : Resource

Resource container to get a service information in.

It is supported only resource-manager.cloud resource container now.

Resource

A Resource. For more information, see Resource.

id : string

ID of the resource.

type : string

The type of the resource, e.g. resource-manager.folder, billing.account, compute.snapshot, etc.

Service

A Service.

Status

  • STATUS_UNSPECIFIED

  • ENABLED

    The service is enabled.

  • PAUSED

    The service is paused.

  • DISABLED

    The service is disabled.

  • ENABLING

    The service is being enabled.

  • RESUMING

    The service is being resumed.

  • PAUSING

    The service is being paused.

  • DISABLING

    The service is being disabled.

  • ERROR

    The service is in error state.

  • DEFAULT

    The service could be auto enabled.

serviceId : string

ID of the service.

resource : Resource

Resource that the service belongs to.

updatedAt : google.protobuf.Timestamp

Time of the last status update of the service.

status : Status

Current status of the service.

Resource

A Resource. For more information, see Resource.

id : string

ID of the resource.

type : string

The type of the resource, e.g. resource-manager.folder, billing.account, compute.snapshot, etc.