MetricsQueryResult interface

Metrics, including additional information like cost, the resourceRegion, etc...

Properties

cost

The integer value representing the cost of the query, for data case.

granularity

The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made.

metrics

the value of the collection.

namespace

The namespace of the metrics been queried

resourceId

The resource that has been queried for metrics.

resourceRegion

The region of the resource been queried for metrics.

timespan

The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested.

Methods

getMetricByName(string)

convenience method to get metric by metric name

Property Details

cost

The integer value representing the cost of the query, for data case.

cost?: number

Property Value

number

granularity

The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made.

granularity?: string

Property Value

string

metrics

the value of the collection.

metrics: Metric[]

Property Value

Metric[]

namespace

The namespace of the metrics been queried

namespace?: string

Property Value

string

resourceId

The resource that has been queried for metrics.

resourceId?: string

Property Value

string

resourceRegion

The region of the resource been queried for metrics.

resourceRegion?: string

Property Value

string

timespan

The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested.

timespan: QueryTimeInterval

Property Value

Method Details

getMetricByName(string)

convenience method to get metric by metric name

function getMetricByName(metricName: string): undefined | Metric

Parameters

metricName

string

Returns

undefined | Metric