VK Cloud logo

Filling in YAML files for tariff options

In the parameters/<OPTION_NAME>.yaml files, describe all tariff options (for details, see the section Tariff option types) that will be used in at least one tariff plan.

Each separate YAML file corresponds to one tariff option. It describes the tariff option settings, and for paid options — the cost.

A detailed description of the parameters used to describe tariff options is provided in the section YAML file of a tariff option.

Free constant tariff option of the integer type

Fill in the parameters/<OPTION_NAME>.yaml file as follows:

  1. Specify the actions parameter.

  2. In the schema section, set the following parameters:

    • description — the name of the tariff option.
    • hint — the description of the tariff option (optional).
    • type — the type of the tariff option. Specify integer.
    • const — the value of the tariff option.
Example of describing a constant option of the `integer` type, `YAML` format
actions:- create- updateschema:  description: System disk size  hint: In GB  type: integer  const: 20

Figure 1 shows how the option described above will be displayed in the tariff plan configuration wizard.

pic1
Figure 1 — Constant tariff option of the integer type

Free tariff option of the integer type with selecting a value from a list

Fill in the parameters/<OPTION_NAME>.yaml file as follows:

  1. Specify the actions parameter.

  2. In the schema section, set the following parameters:

    • description — the name of the tariff option.
    • hint — the description of the tariff option (optional).
    • type — the type of the tariff option. Specify integer.
    • enum — the possible values of the tariff option.
    • default — the default value.
Example of describing an option of the `integer` type with selecting a value from a list, `YAML` format
actions:- create- updateschema:  description: Number of servers in the cluster  type: integer  enum: [3, 5, 7]  default: 5

Figure 2 shows how the option described above will be displayed in the tariff plan configuration wizard.

pic1
Figure 2 — Tariff option of the integer type with selecting a value from a list

Free tariff option of the integer type with a change step of 1

Fill in the parameters/<OPTION_NAME>.yaml file as follows:

  1. Specify the actions parameter.

  2. In the schema section, set the following parameters:

    • description — the name of the tariff option.

    • hint — the description of the tariff option (optional).

    • type — the type of the tariff option. Specify integer.

    • default — the default value (optional).

      If the parameter is not set, the default value will be 0.

    • minimum and maximum — the maximum and minimum values of the tariff option (optional).

Example of describing a free option of the `integer` type with a change step of 1, `YAML` format
actions:- create- updateschema:  description: Number of participants  hint: The number of the customer's employees who can use the testing infrastructure and process reports from VK Testers testers.  type: integer  default: 20  minimum: 20

Figures 3 and 4 show how the option described above will be displayed in the tariff plan configuration wizard.

pic1

Figure 3 — Free tariff option of the integer type with a change step of 1

pic1

Figure 4 — Free tariff option of the integer type with a change step of 1, the value increased by 1 step

Free tariff option of the integer type with a custom change step

Fill in the parameters/<OPTION_NAME>.yaml file as follows:

  1. Specify the actions parameter.

  2. In the billing section, set the following parameters:

    • base — the standard value.
    • cost — the cost of the change step. Specify 0.
    • unit.size — the size of the change step.
    • unit.measurement — the units of measurement of the tariff option (optional).
    Example of filling in the `billing` section
    billing:  base: 25  cost: 0  unit:     size: 100
  3. In the schema section, set the following parameters:

    • description — the name of the tariff option.

    • hint — the description of the tariff option (optional).

    • type — the type of the tariff option. Specify integer.

    • default — the default value (optional). It is set relative to the standard value of the option:

      • Do not specify the default parameter or specify 0 so that the default value equals the standard value (figure 5).

        pic1

        Figure 5 — Free tariff option of the integer type with a custom change step (billing.base = 25, schema.default = 0, billing.unit.size = 100)
      • Specify n so that the default value is calculated using the formula based on the standard value and the value of n (figure 6, figure 7):

        billing.base + n * billing.unit.size

        pic1

        Figure 6 — Free tariff option of the integer type with a custom change step (billing.base = 25, schema.default = 1, billing.unit.size = 100)

        pic1

        Figure 7 — Free tariff option of the integer type with a custom change step (billing.base = 25, schema.default = 2, billing.unit.size = 100)
    • minimum and maximum — the maximum and minimum values of the tariff option (optional). They are set in the same way as the default value.

Example of describing a free option of the `integer` type with a custom change step, `YAML` format
actions:- create- updatebilling:  base: 25  cost: 0  unit:     size: 100schema:  description: Volume of uploaded builds  hint: Test builds of applications can be uploaded to the platform for distribution to the customer's employees and VK Testers testers. The larger the storage, the more versions of your products can be stored on the testing platform. Supported platforms: iOS, Android, Windows, MacOS, Linux.  type: integer  default: 0

Prepaid tariff option of the integer type with a change step

Fill in the parameters/<OPTION_NAME>.yaml file as follows:

  1. Specify the actions parameter.

  2. In the billing section, set the following parameters (figure 8, figure 9, figure 10):

    • base — the standard value. The standard value is included in the cost of the tariff plan.

    • cost — the cost of the change step.

    • unit.size — the size of the change step.

    • unit.measurement — the units of measurement of the tariff option (optional).

      Example of filling in the `billing` section
      billing:  base: 25  cost: 150  unit:     size: 100

      In the example above, every 100 units of the option in addition to the standard value cost 150 monetary units.

    pic1

    Figure 8 — Paid tariff option of the integer type with a change step (billing.base = 25, billing.cost = 150, billing.unit.size = 100)

    pic1

    Figure 9 — Paid tariff option of the integer type with a change step, the value increased by 1 step (billing.base = 25, billing.cost = 150, billing.unit.size = 100)

    pic1

    Figure 10 — Paid tariff option of the integer type with a change step, the value increased by 2 steps (billing.base = 25, billing.cost = 150, billing.unit.size = 100)
  3. Fill in the schema section in the same way as for a free tariff option with a custom change step (for details, see the section Free tariff option of the integer type with a custom change step).

    If the default value of a tariff option is not equal to the standard value (schema.default ≠ 0), then when the user opens the tariff plan configuration wizard, the cost of such a tariff option will be displayed (figure 11). The user can reduce the option value to the standard one, which is included in the cost of the tariff plan.

    pic1

    Figure 11 — Paid tariff option of the integer type with a change step (billing.base = 25, billing.cost = 150, billing.unit.size = 100, schema.default = 1)

Postpaid tariff option of the integer or number type

Fill in the parameters/<OPTION_NAME>.yaml file as follows:

  1. Set the actions parameter value — resource_usages.

  2. In the billing section, set the following parameters:

    • cost — the cost of one unit of the tariff option.
    • unit.size — the billing step. Specify 1.
    • unit.measurement — the units of measurement of the tariff option (optional).
  3. In the schema section, set the following parameters:

    • description — the name of the tariff option.
    • hint — the description of the tariff option (optional).
    • type — the type of the tariff option. Specify integer or number.
Example of describing a postpaid numeric tariff option
actions:- resource_usagesbilling:  cost: 7  unit:    size: 1    measurement: GBschema:  description: Storage in the Cyberprotect data center for Cloud Backup products  type: number

Figure 12 shows how the option described above will be displayed in the tariff plan configuration wizard. One unit of the tariff option costs 7 monetary units.

pic1
Figure 12 — Postpaid tariff option

Free constant tariff option of the string type

Fill in the parameters/<OPTION_NAME>.yaml file as follows:

  1. Specify the actions parameter.

  2. In the schema section, set the following parameters:

    • description — the name of the tariff option.
    • hint — the description of the tariff option (optional).
    • type — the type of the tariff option. Specify string.
    • const — the value of the tariff option.
Example of describing a constant option of the `string` type, `YAML` format
actions:- create- updateschema:  description: Administrator login  type: string  const: admin@example.ru

Figure 13 shows how the option described above will be displayed in the tariff plan configuration wizard.

pic1
Figure 13 — Constant tariff option of the string type

Free tariff option of the string type with value input

Fill in the parameters/<OPTION_NAME>.yaml file as follows:

  1. Specify the actions parameter.

  2. In the schema section, set the following parameters:

    • description — the name of the tariff option.
    • hint — the description of the tariff option (optional).
    • type — the type of the tariff option. Specify string.
    • default — the default value.
    • Additional parameters provided in the section The schema section for a tariff option of the string type (optional).
Example of describing an option of the `string` type with value input, `YAML` format
actions:- create- updateschema:  description: Administrator email  hint: Email for issuing an SSL certificate  type: string

Figure 14 shows how the option described above will be displayed in the tariff plan configuration wizard.

pic1
Figure 14 — Tariff option of the string type with value input

Free tariff option of the string type with selecting a value from a list

Fill in the parameters/<OPTION_NAME>.yaml file as follows:

  1. Specify the actions parameter.

  2. In the schema section, set the following parameters:

    • description — the name of the tariff option.
    • hint — the description of the tariff option (optional).
    • type — the type of the tariff option. Specify string.
    • enum — the possible values of the tariff option.
    • default — the default value.
Example of describing an option of the `string` type with selecting a value from a list, `YAML` format
actions:- create- updateschema:  description: OS type  hint: Operating system  type: string  enum: ["Ubuntu 20.4", "Windows 8.1", "Windows 10"]  default: Windows 8.1

Figure 15 shows how the option described above will be displayed in the tariff plan configuration wizard.

pic1
Figure 15 — Tariff option of the string type with selecting a value from a list

Free constant tariff option of the boolean type

Fill in the parameters/<OPTION_NAME>.yaml file as follows:

  1. Specify the actions parameter.

  2. In the schema section, set the following parameters:

    • description — the name of the tariff option.
    • hint — the description of the tariff option (optional).
    • type — the type of the tariff option. Specify boolean.
    • const — the value of the tariff option.
Example of describing a constant option of the `boolean` type, `YAML` format
actions:- create- updateschema:  description: Premium support  hint: 24/7 technical support  type: boolean  const: false

Figure 16 shows how the option described above will be displayed in the tariff plan configuration wizard.

pic1
Figure 16 — Constant tariff option of the boolean type (const = false)

Free boolean toggle tariff option

Fill in the parameters/<OPTION_NAME>.yaml file as follows:

  1. Specify the actions parameter.

  2. In the schema section, set the following parameters:

    • description — the name of the tariff option.

    • hint — the description of the tariff option (optional).

    • type — the type of the tariff option. Specify boolean.

    • default — the default value (optional).

      If the default parameter is not set, the default value will be false.

Example description of a free `boolean` toggle option, `YAML` format
actions:- create- updateschema:  description: Update notifications  hint: Whether to receive email notifications about new service versions.  type: boolean  default: true

Figure 17 shows how the option described above will be displayed in the tariff plan configuration wizard.

pic1
Figure 17 — Boolean toggle tariff option

Prepaid boolean toggle tariff option

Fill in the parameters/<OPTION_NAME>.yaml file as follows:

  1. Specify the actions parameter.

  2. In the schema section, set the following parameters:

    • description — the name of the tariff option.

    • hint — the description of the tariff option (optional).

    • type — the type of the tariff option. Specify boolean.

    • default — the default value (optional).

      If the default parameter is not set, the default value will be false.

  3. In the billing section, set the cost parameter — the cost of the option when the toggle is in the active position.

Example description of a paid `boolean` toggle option, `YAML` format
actions:- create- updateschema:  description: New report notifications  hint: Whether to receive email notifications about new reports  type: boolean  default: truebilling:  cost: 50

Figure 18 shows how the option described above will be displayed in the tariff plan configuration wizard.

pic1
Figure 18 — Paid boolean toggle tariff option

Datasource tariff option (VM type)

Fill in the parameters/<OPTION_NAME>.yaml file as follows:

  1. Specify the actions parameter.

  2. In the schema section, set the following parameters:

    • description — the name of the tariff option.
    • hint — the description of the tariff option (optional).
    • type — the type of the tariff option. Specify string.
    • datasource.type — the type of the cloud platform entity. Specify flavor.
    • datasource.filter — filters (optional). The available filters are described in the section The schema section for a datasource-type tariff option.
Example description of a `datasource` option for the VM type, `YAML` format
actions:- create- updateschema:  description: Virtual machine type  type: string  datasource:    type: flavor

Figure 19 shows how the option described above will be displayed in the tariff plan configuration wizard.

pic1
Figure 19 — Datasource tariff option (VM type)

Datasource tariff option (availability zone)

Fill in the parameters/<OPTION_NAME>.yaml file as follows:

  1. Specify the actions parameter.

  2. In the schema section, set the following parameters:

    • description — the name of the tariff option.
    • hint — the description of the tariff option (optional).
    • type — the type of the tariff option. Specify string.
    • default — the default value (optional). The available values are described in the section The schema section for a datasource-type tariff option.
    • datasource.type — the type of the cloud platform entity. Specify az.
Example description of a `datasource` option for the availability zone, `YAML` format
actions:- create- updateschema:  description: Availability zone  type: string  default: gz1  datasource:    type: az

Figure 20 shows how the option described above will be displayed in the tariff plan configuration wizard.

pic1
Figure 20 — Datasource tariff option (availability zone)

Datasource tariff option (subnet)

Fill in the parameters/<OPTION_NAME>.yaml file as follows:

  1. Specify the actions parameter.

  2. In the schema section, set the following parameters:

    • description — the name of the tariff option.
    • hint — the description of the tariff option (optional).
    • type — the type of the tariff option. Specify string.
    • datasource.type — the type of the cloud platform entity. Specify subnet.
Example description of a `datasource` option for the subnet, `YAML` format
actions:- create- updateschema:  description: Network  type: string  datasource:    type: subnet

Figure 21 shows how the option described above will be displayed in the tariff plan configuration wizard.

pic1
Figure 21 — Datasource tariff option (subnet)

Datasource tariff option (network)

Fill in the parameters/<OPTION_NAME>.yaml file as follows:

  1. Specify the actions parameter.

  2. In the schema section, set the following parameters:

    • description — the name of the tariff option.
    • hint — the description of the tariff option (optional).
    • type — the type of the tariff option. Specify string.
    • datasource.type — the type of the cloud platform entity. Specify network.
    • datasource.value_is — the type of information output. The available values are:
      • uuid — display the network UUID.
      • name — display the network name.
    • datasource.filter — filters (optional). The available filters are described in the section The schema section for a datasource-type tariff option.
Example description of a `datasource` option for the network, `YAML` format
actions:- create- updateschema:  description: Internal network  hint: Internal network  type: string  datasource:    type: network    value_is: name    filter:      kind: private      shared: false

Figure 22 shows how the option described above will be displayed in the tariff plan configuration wizard.

pic1
Figure 22 — Datasource tariff option (network)

Describing a disk using tariff option files

A disk is described by two tariff options (two separate YAML files):

  • Disk type — using a datasource type tariff option.
  • Disk size — using an integer type tariff option with a change step of 1.

To describe a disk:

  1. Describe a datasource type tariff option that retrieves data about disk types from the cloud platform, in the parameters/<OPTION_NAME>.yaml file:

    1. Specify the actions parameter.

    2. In the schema section, set the following parameters:

      • description — the name of the tariff option.

      • hint — the description of the tariff option (optional).

      • type — the type of the tariff option. Specify string.

      • default — the default value (optional). The available values are described in the section The schema section for a datasource-type tariff option.

      • tag — a tag. The tag links the option describing the disk type with the option describing the disk size.

      • datasource.type — the type of the cloud platform entity. Specify volume_type.

      • datasource.filter — filters (optional). The available filters are described in the section The schema section for a datasource-type tariff option.

        If no filters are specified, all disk types supported by the cloud platform will be displayed.

    Example description of a `datasource` option for the disk type, `YAML` format
    actions:- create- updateschema:  description: Disk type  type: string  default: ceph-ssd  tag: disk1  datasource:    type: volume_type    filter:      disk_class:        enum: ["ssd", "hdd"]
  2. In a separate parameters/<OPTION_NAME>.yaml file, describe the disk size using an integer type tariff option with a change step of 1:

    1. Specify the actions parameter.

    2. In the schema section, set the following parameters:

      • description — the name of the tariff option.
      • hint — the description of the tariff option (optional).
      • type — the type of the tariff option. Specify integer.
      • default — the default value (optional).
      • maximum and minimum — the maximum and minimum values (optional).
      • tag — a tag. The value must be the same as in the file describing the disk type.
    Example description of the disk size using an `integer` type tariff option with a change step of 1, `YAML` format
    actions:- create- updateschema:  description: Disk size  type: integer  default: 100  minimum: 100  tag: disk1

Figure 23 shows how the options described above (disk type and size) will be displayed in the tariff plan configuration wizard.

pic1
Figure 23 — Integer and datasource type tariff options that allow configuring the disk size and type
Was this article helpful?