Skip to main content

Get

Returns the specified SKU.

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

const GetSkuRequest = cloudApi.billing.sku_service.GetSkuRequest;

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

const result = await client.get(
GetSkuRequest.fromPartial({
id: "id",
currency: "currency",
// billingAccountId: "billingAccountId"
})
);
console.log(result);
})();

GetSkuRequest

id : string

ID of the SKU to return. To get the SKU ID, use SkuService.List request.

currency : string

Currency of the SKU. Can be one of the following:

  • RUB
  • USD
  • KZT
billingAccountId : string

Optional ID of the billing account. If specified, contract prices for a particular billing account are included in the response. To get the billing account ID, use BillingAccountService.List request.

Sku

A Stock keeping unit resource.

id : string

ID of the SKU.

name : string

Name of the SKU.

description : string

Description of the sku.

serviceId : string

ID of the service that sku belongs to.

pricingUnit : string

Pricing unit of the SKU, e.g. core*hour, gbyte*hour.

pricingVersions : PricingVersion

List of pricing versions.

PricingVersion

Pricing version of the SKU. Defines current and past prices for the sku.

type : PricingVersionType

Type of the pricing version.

effectiveTime : google.protobuf.Timestamp

Timestamp pricing version is active since inclusive. The pricing version is active until next pricing version effective time exclusive.

pricingExpressions : PricingExpression

List of pricing expressions.

PricingExpression

Pricing expression of the pricing version. Defines price for the sku.

rates : Rate

List of rates.

Rate

Rate of the pricing expression. Define unit price for pricing quantity interval.

startPricingQuantity : string

Start of the pricing quantity interval. The end of the interval is the start pricing quantity of the next rate.

unitPrice : string

Unit price for the pricing quantity interval.

currency : string

Currency of the unit price. Can be one of the following:

  • RUB
  • USD
  • KZT