Skip to main content

Get

Returns the specified billing account.

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

const GetBillingAccountRequest =
cloudApi.billing.billing_account_service.GetBillingAccountRequest;

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

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

GetBillingAccountRequest

id : string

ID of the billing account to return. To get the billing account ID, use BillingAccountService.List request.

BillingAccount

A BillingAccount resource. For more information, see BillingAccount.

id : string

ID of the billing account.

name : string

Name of the billing account.

createdAt : google.protobuf.Timestamp

Creation timestamp.

countryCode : string

ISO 3166-1 alpha-2 country code of the billing account.

currency : string

Currency of the billing account. Can be one of the following:

  • RUB
  • USD
  • KZT
active : bool

Represents whether corresponding billable objects can be used or not.

balance : string

Current balance of the billing account.