MetricsQueryResult Class
- java.
lang. Object - com.
azure. monitor. query. models. MetricsQueryResult
- com.
public final class MetricsQueryResult
The response to a metrics query.
Constructor Summary
Constructor | Description |
---|---|
MetricsQueryResult(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 Type | Method and Description |
---|---|
Integer |
getCost()
Returns the integer value representing the cost of the query, for data case. |
Duration |
getGranularity()
Returns the interval (window size) for which the metric data was returned in. |
Metric |
getMetricByName(String metricName)
Returns the metric result for the |
List<Metric |
getMetrics()
Returns the value of the collection. |
String |
getNamespace()
Returns the namespace of the metrics been queried |
String |
getResourceId()
Returns the resource id of the resource this metrics result belongs to. |
String |
getResourceRegion()
Returns the region of the resource been queried for metrics. |
Query |
getTimeInterval()
Returns the time interval for which the data was retrieved. |
Methods inherited from java.lang.Object
Constructor Details
MetricsQueryResult
public MetricsQueryResult(Integer cost, QueryTimeInterval timeInterval, Duration granularity, String namespace, String resourceRegion, List
Creates an instance of the response to a metrics query.
Parameters:
Method Details
getCost
public Integer getCost()
Returns the integer value representing the cost of the query, for data case.
Returns:
getGranularity
public Duration getGranularity()
Returns the interval (window size) for which the metric data was returned in.
Returns:
getMetricByName
public MetricResult getMetricByName(String metricName)
Returns the metric result for the metricName
.
Parameters:
Returns:
getMetrics
public List
Returns the value of the collection.
Returns:
getNamespace
public String getNamespace()
Returns the namespace of the metrics been queried
Returns:
getResourceId
public String getResourceId()
Returns the resource id of the resource this metrics result belongs to.
Returns:
getResourceRegion
public String getResourceRegion()
Returns the region of the resource been queried for metrics.
Returns:
getTimeInterval
public QueryTimeInterval getTimeInterval()
Returns the time interval for which the data was retrieved.
Returns:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for