VK Cloud logo

YAML file of the tariff option

Structure

A tariff option is described by the parameters and sections listed in table 1.

Table 1 — Parameters and sections for describing a tariff option

Name

Description

Required

actions

This parameter defines how the option is billed (for details, see the section Billing). Possible values:

  • For free or prepaid billing, specify one or both values:

    • create — the option will be active when the service is connected.
    • update — the option will be active when the tariff plan is updated.

    If the option is active, the user will be able to change its value.

  • For postpaid billing, specify the value resource_usages

YAML file of the tariff option

schema

This section defines:

  • The type of the tariff option.
  • The name and description of the tariff option (figure 1).
  • The settings of the tariff option value.

The section parameters are described in the section The schema section

YAML file of the tariff option

billing

This section defines:

  • The cost of the tariff option.
  • The user-defined increment for a tariff option of the integer type.

The section parameters are described in the section The billing section

YAML file of the tariff option

pic1
Figure 1 — Tariff option

Examples of describing different types of tariff options are provided in the section Filling in YAML files of tariff options.

The billing section

Paid tariff options can be options of the following types:

  • Numeric (integer, number). Both prepaid and postpaid billing are supported.
  • Boolean (boolean). Prepaid billing is supported.

For more information about billing types, see the section Billing.

Depending on the billing type and the option type, specify the parameters and child sections listed in table 2, table 3, table 4 in the billing section.

Table 2 — Parameters of the billing section for a prepaid option of the integer type with an increment

Name

Description

Format

Required

base

Defines the default value of the tariff option included in the cost of the tariff plan.

The default value is the minimum value that the user can set.

If the parameter is not specified, the default value of the tariff option will automatically be 0

integer

YAML file of the tariff option

cost

Defines the cost of the increment by which the tariff option value can be changed.

If changing the option is free, specify 0. The increment parameters are defined in the unit section

float64, >= 0

YAML file of the tariff option

unit

Defines the parameters of the option increment

YAML file of the tariff option

YAML file of the tariff option

Parameters of the unit section

unit.size

Defines the size of the increment by which the tariff option value can be changed.

The value specified in this parameter is billed according to the cost set in the billig.cost parameter

integer, > 0

YAML file of the tariff option

unit.measurement

Defines the units of measurement for the increment specified in the unit.size parameter

string, up to 255 characters

YAML file of the tariff option

Table 3 — Parameters of the billing section for a prepaid boolean switch option

Name

Description

Format

Required

cost

Defines the cost of the option

float64, >= 0

YAML file of the tariff option

Table 4 — Parameters of the billing section for a postpaid option of the integer or number type

Name

Description

Format

Required

cost

Defines the cost of a unit of the tariff option

float64, >= 0

YAML file of the tariff option

unit

Defines the units of measurement of the option

YAML file of the tariff option

YAML file of the tariff option

Parameters of the unit section

unit.size

The billing increment of the option. The value must be 1

integer

YAML file of the tariff option

unit.measurement

Defines the units of measurement of the option

string, up to 255 characters

YAML file of the tariff option

The schema section

The schema section for numeric tariff options

Free or prepaid tariff option of the integer type

Subtypes of the integer tariff option:

  • Constant (figure 2).

    pic1
    Figure 2 — Constant tariff option of the integer type
  • With selecting a value from a list (figure 3).

    pic1
    Figure 3 — Tariff option of the integer type with selecting a value from a list
  • With an increment (figure 4, figure 5).

    By default, the option increment is 1. You can change the increment size and make it paid in the The billing section section.

    pic1
    Figure 4 — Tariff option of the integer type with an increment
    pic1
    Figure 5 — Tariff option of the integer type with an increment, the value is increased by the increment

The parameters for a free or prepaid tariff option of the integer type are provided in table 5. The cost of the option is described in the The billing section section.

Table 5 — The schema section for a tariff option of the integer type

Name

Description

Format

Required

Main parameters of the tariff option, the same for all subtypes

description

The name of the tariff option

string, up to 255 characters

YAML file of the tariff option

hint

A hint describing the tariff option

string, up to 255 characters

YAML file of the tariff option

type

Defines the type of the tariff option. Specify the value integer

YAML file of the tariff option

YAML file of the tariff option

Parameters for configuring the tariff option subtype

Parameter for a constant option

const

Defines the value of the constant tariff option

integer

YAML file of the tariff option

Parameters for an option with selecting a value

enum

Defines the list of values from which the user can select one

List, within the list — integer

YAML file of the tariff option

default

Defines the default value of the tariff option

integer

YAML file of the tariff option

Parameters for an option with increment 1

default

Defines the default value of the tariff option.

If the parameter is not specified, the default value is 0

integer, >= 0 or minimum, ⇐ maximum

YAML file of the tariff option

minimum

Defines the minimum value of the tariff option

integer, >= 0 and ⇐ maximum

YAML file of the tariff option

maximum

Defines the maximum value of the tariff option

integer, > 0 and >= minimum

YAML file of the tariff option

tag

A tag. Allows linking several options together.

Used to describe a disk (for details, see the section Describing a disk using tariff option files)

string

YAML file of the tariff option

Parameters for an option with a user-defined increment. The increment is configured in the The billing section section

default

Defines the default value of the tariff option, calculated relative to the default value (the default value is set in the billing.base parameter):

  • If the value 0 is specified, the default value of the tariff option equals the default value (set in the billing.base parameter).

  • If the value n > 0 is specified, the default value of the tariff option is the sum of the default value and an increment multiple of n:

    billing.base + n * billing.unit.size

integer, >= 0 or minimum, ⇐ maximum

YAML file of the tariff option

minimum

Defines the minimum value of the tariff option, calculated relative to the default value (the default value is set in the billing.base parameter):

  • If the value 0 is specified, the minimum value of the tariff option equals the default value.

  • If the value n > 0 is specified, the minimum value of the tariff option is the sum of the default value and an increment multiple of n:

    billing.base + n * billing.unit.size

integer, >= 0 and ⇐ maximum

YAML file of the tariff option

maximum

Defines the maximum value of the tariff option, calculated relative to the default value (the default value is set in the billing.base parameter):

  • If the value 0 is specified, the maximum value of the tariff option equals the default value.

  • If the value n > 0 is specified, the maximum value of the tariff option is the sum of the default value and an increment multiple of n:

    billing.base + n * billing.unit.size

integer, > 0 and >= minimum

YAML file of the tariff option

Postpaid tariff option of the integer or number type

The parameters for a postpaid numeric tariff option are provided in table 6. The cost of the option is described in the The billing section section.

Table 6 — The schema section for a postpaid option

Name

Description

Format

Required

description

The name of the tariff option

string, up to 255 characters

YAML file of the tariff option

hint

A hint describing the tariff option

string, up to 255 characters

YAML file of the tariff option

type

Defines the type of the tariff option. Specify the value integer or number

YAML file of the tariff option

YAML file of the tariff option

The schema section for a tariff option of the string type

Subtypes of the string tariff option:

  • Constant (figure 6).

    pic1
    Figure 6 — Constant tariff option of the string type
  • With entering a value (figure 7).

    pic1
    Figure 7 — Tariff option of the string type with entering a value
  • With selecting a value from a list (figure 8).

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

The parameters for a tariff option of the string type are provided in table 7.

Table 7 — The schema section for a tariff option of the string type

Name

Description

Format

Required

Main parameters of the tariff option, the same for all subtypes

description

The name of the tariff option

string, up to 255 characters

YAML file of the tariff option

hint

A hint describing the tariff option

string, up to 255 characters

YAML file of the tariff option

type

Defines the type of the tariff option. Specify the value string

YAML file of the tariff option

YAML file of the tariff option

Parameters for configuring the tariff option subtype

Parameter for a constant option

const

Defines the value of the constant tariff option

string

YAML file of the tariff option

Parameters for an option with entering a value

default

Defines the default value

string

YAML file of the tariff option

pattern

Defines the pattern that the tariff option value must match

regex

YAML file of the tariff option

minLength

Defines the minimum number of characters for the tariff option value

integer, > 0 and ⇐ maxLength

YAML file of the tariff option

maxLength

Defines the maximum number of characters for the tariff option value

integer, > 0 and >= minLength

YAML file of the tariff option

Parameters for an option with selecting a value from a list

enum

Defines the list of values from which the user can select one

List, within the list — string

YAML file of the tariff option

default

Defines the default value

string

YAML file of the tariff option

The schema section for a tariff option of the boolean type

Subtypes of the boolean tariff option:

  • Constant (figure 9).

    pic1
    Figure 9 — Constant tariff option of the boolean type
  • Switch (figure 10).

    pic1
    Figure 10 — Boolean switch

The parameters for a tariff option of the boolean type are provided in table 8.

Table 8 — The schema section for a tariff option of the boolean type

Name

Description

Format

Required

Main parameters of the tariff option, the same for all subtypes

description

The name of the tariff option

string, up to 255 characters

YAML file of the tariff option

hint

A hint describing the tariff option

string, up to 255 characters

YAML file of the tariff option

type

Defines the type of the tariff option. Specify the value boolean

YAML file of the tariff option

YAML file of the tariff option

Parameters for configuring the tariff option subtype

Parameter for a constant option

const

Defines the value of the constant tariff option

boolean

YAML file of the tariff option

Parameter for a switch option

default

Defines the default value of the tariff option.

boolean

YAML file of the tariff option

To make a tariff option of the boolean type paid, describe its cost in the The billing section section.

The schema section for a datasource-type tariff option

Parameters for a tariff option of the datasource type are provided in table 9.

Table 9 — The schema section for a datasource-type tariff option

Name

Description

Format

Required

description

The name of the tariff option

string, up to 255 characters

YAML file of the tariff option

hint

A hint describing the tariff option

string, up to 255 characters

YAML file of the tariff option

type

Together with the datasource section, defines the tariff option as an option associated with the cloud platform entities.

Set the value to string

YAML file of the tariff option

YAML file of the tariff option

default

Defines the default value.

Can be set only for the datasource types:

  • az.
  • volume_type.

Possible values for az (Moscow region):

  • ms1.
  • gz1.

Possible values for volume_type:

  • ceph-ssd — an SSD disk.
  • ceph-hdd — an HDD disk.
  • high-iops — a High-IOPS SSD disk (SSD with enhanced performance)

YAML file of the tariff option

YAML file of the tariff option

tag

A tag. Allows linking multiple options together.

Used to describe a disk (for details, see the section Describing a disk using tariff option files)

string

YAML file of the tariff option

datasource

A section that, together with the type parameter, defines the tariff option as an option associated with the cloud platform entities.

The section describes a specific type of cloud platform entity

YAML file of the tariff option

YAML file of the tariff option

Parameters of the datasource section

datasource.type

A parameter that defines the type of cloud platform entity.

Possible values:

  • flavor — VM types available in the user's project of the cloud platform.
  • az — availability zones of the cloud platform.
  • network — networks available in the cloud platform project.
  • subnet — subnets available in the cloud platform project.
  • volume_type — disk type.

The user will be shown a list of values corresponding to the specified type, taking into account the filters (the filters are set in the datasource.filter section). The user will need to select one value from this list

YAML file of the tariff option

YAML file of the tariff option

datasource.filter

The section can be set only for the datasource types:

  • flavor
  • network
  • volume_type

Defines filters for the VM type, network, or disk

YAML file of the tariff option

YAML file of the tariff option

Filters for the VM type datasource.filter

datasource.filter.vcpus

Defines filters for the VM CPU

Provided in the table CPU and RAM limits for VMs

YAML file of the tariff option

datasource.filter.ram

Defines filters for the VM RAM

Provided in the table CPU and RAM limits for VMs

YAML file of the tariff option

Filters for the network datasource.filter

datasource.filter.kind

Defines filters by network type.

Possible values:

  • external — external networks only.
  • internal — internal networks only.
  • all — all networks

List

YAML file of the tariff option

datasource.filter.shared

Defines filters by network sharing.

Possible values:

  • true — the network is available for use by all projects.
  • false — the network is available only in the user's project.

Default value: false

List

YAML file of the tariff option

Filters for the disk type datasource.filter

datasource.filter.disk_class.enum

Defines filters by disk type.

Possible values:

  • ssd — an SSD disk.
  • hdd — an HDD disk.
  • high_iops_disk — a High-IOPS SSD disk (SSD with enhanced performance)

List

YAML file of the tariff option

datasource.filter.name.enum

Defines filters by disk name.

Possible values:

  • ceph-ssd — an SSD disk.
  • ceph-hdd — an HDD disk.
  • high-iops — a High-IOPS SSD disk (SSD with enhanced performance)

List

YAML file of the tariff option

CPU and RAM limits for VMs are set using the parameters provided in table 10.

Table 10 — CPU and RAM limits for VMs

Name

Description

Format

Required

minimum

Defines the minimum value for CPU or RAM — depending on the section in which this parameter is set.

For RAM, the value is specified in MB

integer, > 0 and ⇐ maximum

YAML file of the tariff option

maximum

Defines the maximum value for CPU or RAM — depending on the section in which this parameter is set

integer, > 0 and >= minimum

YAML file of the tariff option

Was this article helpful?