Class MetricsQueryResult
java.lang.Object
com.azure.monitor.query.metrics.models.MetricsQueryResult
The response to a metrics query.
-
Constructor Summary
ConstructorsConstructorDescriptionMetricsQueryResult
(Integer cost, MetricsQueryTimeInterval 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 being queriedReturns the resource id of the resource this metrics result belongs to.Returns the region of the resource being queried for metrics.Returns the time interval for which the data was retrieved.
-
Constructor Details
-
MetricsQueryResult
public MetricsQueryResult(Integer cost, MetricsQueryTimeInterval 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 being queried- Returns:
- the namespace of the metrics being queried
-
getResourceRegion
Returns the region of the resource being queried for metrics.- Returns:
- the region of the resource being queried for metrics.
-
getMetrics
Returns the value of the collection.- Returns:
- the value of the collection.
-
getResourceId
Returns the resource id of the resource this metrics result belongs to.- Returns:
- the resource id of the resource this metrics result belongs to.
-
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.
-