CostMetric class
A line item in the cost estimate, including the resource usage metric measured and its pricing.
Signature:
export declare class CostMetric
Remarks
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the CostMetric
class.
Properties
Property |
Modifiers |
Type |
Description |
---|---|---|---|
|
string |
(Optional) An optional comment, usually providing a link to the provider's pricing page and other data. | |
|
boolean |
(Optional) True if this cost metric is only for informational purposes (e.g. AWS's | |
|
number |
The measured value of the cost metric, in units. | |
|
string |
The name of the cost metric, e.g. | |
|
number |
The price in USD per unit measured. | |
|
string |
The name of the units that pricing is measured in for this metric. | |
|
string |
(Optional) The plural form of the unit name. By default the plural form will be the name of the unit with "s" appended at the end, unless the last letter is capitalized, in which case there is no plural form (e.g. "GB"). |
Methods
Method |
Modifiers |
Description |
---|---|---|
The cost contribution of this cost metric. Equal to CostMetric.pricing * CostMetric.measured. | ||
Return a string with the cost estimate for this metric, omitting comments. | ||
Describe this cost metric, including comments. |