Get
Returns the specified billing account.
- TypeScript
- Python
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);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.billing.v1.billing_account_service_pb2_grpc import BillingAccountServiceStub
from yandex.cloud.billing.v1.billing_account_service_pb2 import GetBillingAccountRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(BillingAccountServiceStub)
response = service.Get(GetBillingAccountRequest(id="id"))
print(response)
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.