Formula are used to modify the units obtained from the raw usage data of resources before computing the price for the resource. There are two types of formula ‘Unit Formula’ and ‘Custom Formula’.
i. Unit Formula
It multiplies the units obtained from raw usage with the
formula specified.
- It supports math expressions and operators such as ‘*’ and ‘/’.
- Operators should have space between them.
- Operations are executed from Left to Right.
- Brackets are not supported.
Example:
Raw Usage -Units |
Unit Formula
|
Billable Units (Raw Usage Units * Unit Formula) |
RAM – 1024 MB |
1 / 1024 |
1 MB |
RAM – 1024 MB |
1 |
1024 MB |
ii. Custom Formula
It computes the units based on the formula specified.
- It supports math expressions and operators such as ‘*’, ‘/’, ‘+’ and ‘-’.
- Operators should have a space around them.
- Operations are executed as per Mathematical precedence.
- Brackets are supported, but spaces are to be given around them.
Example:
Raw Usage - Units |
Custom Formula
|
Billable Units
|
RAM – 1024 MB |
RAM / 1024 |
1 MB |
RAM – 1024 MB |
RAM - 24 |
1000 MB |
RAM – 1024 MB |
(RAM - 24) / 10 |
100 MB |
RAM – 1024 MB |
1 |
1 MB |