VK Cloud logo

plan.yaml fileBeta

The configuration file plans/<PLAN_NAME>/plan.yaml contains the following information:

General parameters of the tariff plan

Name

Description

Format

Required

id

UUID4 tariff plan identifier (ID), generated using a UUID4 generator

string (UUID4)

plan.yaml file

revision

Tariff plan revision. The combination of the revision and the tariff plan ID determines its uniqueness within the service. The remaining parameters describe the characteristics of a specific tariff plan revision.

string, up to 255 characters

plan.yaml file

name

Technical name of the tariff plan, which is not displayed in the Marketplace interface. Can contain only Latin letters and the _ character

string, up to 255 characters

plan.yaml file

description

Name of the tariff plan, which is displayed in the Marketplace interface

string, up to 255 characters

plan.yaml file

free

Determines whether the tariff plan is free

boolean

plan.yaml file

billing

The billing section of the tariff plan, determines the cost of the tariff plan excluding paid tariff options

plan.yaml file

plan.yaml file

parameters_patch

The parameters_patch section, selectively overrides tariff option parameters for a specific plan

plan.yaml file

plan.yaml file

resource_usages

List of postpaid tariff options.

Array

Yes — for a plan with postpaid options

The billing section of the tariff plan

Section parameters:

Name

Description

Format

Required

Default value

cost

Cost of the tariff plan for the billing period, excluding paid tariff options. Specified in the currency of the country where Marketplace is deployed.

For a free tariff plan — 0

float

plan.yaml file

—

refundable

Determines whether funds are refunded to the project's bonus account for the remaining days of the billing period if the user changed the tariff plan or deleted the service instance.

The parameter affects the date the payment for the service is charged when the user changes the tariff plan (edits the tariff options or switches to a new one):

  • If true, the date does not change.
  • If false, the date is updated to the date the tariff plan was changed

boolean

plan.yaml file

true

billing_cycle_flat

Duration of the billing period for the billing.

Record format: <NUMBER_OF_MONTHS> mons <NUMBER_OF_DAYS> days. For example, 1 mons 15 days, 30 days.

string

plan.yaml file

1 mons 0 days

Example of filling in the billing section:

billing:  cost: 2000  refundable: true  billing_cycle_flat: 1 mons 0 days

The following shows how the cost of the tariff plan from this example is displayed in the tariff plan configuration wizard.

pic1

The parameters_patch section

This section selectively overrides tariff option parameters for the tariff plan: individual parameters or entire sections of the tariff option description.

For each parameter being overridden, its name is specified with the path to the root section. The parameter name and the names of its parent sections are separated by dots.

Example of overriding tariff option parameters:

parameters_patch:  users:    schema.const: 5000  volume_data_size:    schema.default: 550    schema.minimum: 550

In this example, new values are assigned to:

  • the cost parameter in the schema section of the users tariff option;
  • the default and minimum parameters in the schema section of the volume_data_size tariff option.

The possible parameters, depending on the type of tariff option, are provided in the Tariff option YAML file section.

The parameter values specified in the parameters_patch section take precedence over the values from the tariff option YAML files.

If the tariff plans use options that differ significantly from each other:

  • It is recommended to describe each option in a separate YAML file in the parameters directory.
  • It is not recommended to describe a single tariff option for all tariff plans and override most of its parameters in different tariff plans.

Examples of plan.yaml files

Example of a tariff plan with overridden tariff option parameters:

id: b2b42648-XXXX-b4cddbf010b2revision: v. 1.0name: basicdescription: Basicfree: falsebilling:  cost: 2000  refundable: true  billing_cycle_flat: 1 monsparameters_patch:  users:    schema.const: 5000  volume_data_size:    schema.default: 550    schema.minimum: 550

Example of a free tariff plan with a postpaid tariff option:

id: 3aa541d8-XXXX-6dbf542b3f90revision: v. 1.1name: postpaiddescription: Postpaidfree: truebilling:  cost: 0resource_usages:  - storage
Was this article helpful?