Package com.azure.monitor.query.models
Class MetricsQueryResult
java.lang.Object
com.azure.monitor.query.models.MetricsQueryResult
The response to a metrics query.
-
Constructor Summary
ConstructorDescriptionMetricsQueryResult
(Integer cost, QueryTimeInterval timeInterval, Duration granularity, String namespace, String resourceRegion, List<MetricResult> metrics) Creates an instance of the response to a metrics query. -
Method Summary
Modifier and TypeMethodDescriptiongetCost()
Returns the integer value representing the cost of the query, for data case.Returns the interval (window size) for which the metric data was returned in.getMetricByName
(String metricName) Returns the metric result for themetricName
.Returns the value of the collection.Returns the namespace of the metrics been queriedReturns the region of the resource been queried for metrics.Returns the time interval for which the data was retrieved.
-
Constructor Details
-
MetricsQueryResult
public MetricsQueryResult(Integer cost, QueryTimeInterval timeInterval, Duration granularity, String namespace, String resourceRegion, List<MetricResult> metrics) Creates an instance of the response to a metrics query.- Parameters:
cost
- the integer value representing the cost of the query, for data case.timeInterval
- the time interval for which the data was retrieved.granularity
- the interval (window size) for which the metric data was returned in.namespace
- the namespace of the metrics been queried.resourceRegion
- the region of the resource been queried for metrics.metrics
- the value of the collection.
-
-
Method Details
-
getCost
Returns the integer value representing the cost of the query, for data case.- Returns:
- the integer value representing the cost of the query, for data case.
-
getTimeInterval
Returns the time interval for which the data was retrieved.- Returns:
- the time interval for which the data was retrieved.
-
getGranularity
Returns the interval (window size) for which the metric data was returned in.- Returns:
- the interval (window size) for which the metric data was returned in.
-
getNamespace
Returns the namespace of the metrics been queried- Returns:
- the namespace of the metrics been queried
-
getResourceRegion
Returns the region of the resource been queried for metrics.- Returns:
- the region of the resource been queried for metrics.
-
getMetrics
Returns the value of the collection.- Returns:
- the value of the collection.
-
getMetricByName
Returns the metric result for themetricName
.- Parameters:
metricName
- The name of the metric to look up the result for.- Returns:
- The
MetricResult
formetricName
if found,null
otherwise.
-