Package com.azure.monitor.query.models
Class MetricsQueryOptions
java.lang.Object
com.azure.monitor.query.models.MetricsQueryOptions
The model class to configure the metrics query options.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the list of aggregations that should be applied to the metrics data.Returns the filter to be applied to the query.Returns the interval (window size) for which the metric data was returned in.Returns the namespace of the metrics been queriedReturns the order in which the query results should be ordered.Returns the time span for which the metrics data is queried.getTop()
Returns the number of top metrics values to query.setAggregations
(AggregationType... aggregations) Sets the list of aggregations that should be applied to the metrics data.setAggregations
(List<AggregationType> aggregations) Sets the list of aggregations that should be applied to the metrics data.Sets the filter to be applied to the query.setGranularity
(Duration granularity) Sets the interval (window size) for which the metric data was returned in.setMetricNamespace
(String metricNamespace) Sets the namespace of the metrics been queriedsetOrderBy
(String orderBy) Sets the order in which the query results should be ordered.setTimeInterval
(QueryTimeInterval timeInterval) Sets the time span for which the metrics data is queried.Sets the number of top metrics values to query.
-
Constructor Details
-
MetricsQueryOptions
public MetricsQueryOptions()
-
-
Method Details
-
getTimeInterval
Returns the time span for which the metrics data is queried.- Returns:
- the time span for which the metrics data is queried.
-
setTimeInterval
Sets the time span for which the metrics data is queried.- Parameters:
timeInterval
- the time span for which the metrics data is queried.- Returns:
- The updated options instance
-
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.
-
setGranularity
Sets the interval (window size) for which the metric data was returned in.- Parameters:
granularity
- The interval (window size) for which the metric data was returned in.- Returns:
- The updated options instance
-
getAggregations
Returns the list of aggregations that should be applied to the metrics data.- Returns:
- the list of aggregations that should be applied to the metrics data.
-
setAggregations
Sets the list of aggregations that should be applied to the metrics data.- Parameters:
aggregations
- the list of aggregations that should be applied to the metrics data.- Returns:
- The updated options instance
-
setAggregations
Sets the list of aggregations that should be applied to the metrics data.- Parameters:
aggregations
- the list of aggregations that should be applied to the metrics data.- Returns:
- The updated options instance
-
getTop
Returns the number of top metrics values to query.- Returns:
- the number of top metrics values to query.
-
setTop
Sets the number of top metrics values to query.- Parameters:
top
- the number of top metrics values to query.- Returns:
- The updated options instance
-
getOrderBy
Returns the order in which the query results should be ordered.- Returns:
- the order in which the query results should be ordered.
-
setOrderBy
Sets the order in which the query results should be ordered.- Parameters:
orderBy
- the order in which the query results should be ordered.- Returns:
- The updated options instance
-
getFilter
Returns the filter to be applied to the query. The filter users OData format.- Returns:
- the filter to be applied to the query. The filter users OData format.
-
setFilter
Sets the filter to be applied to the query. The filter users OData format.- Parameters:
filter
- the filter to be applied to the query. The filter users OData format.- Returns:
- The updated options instance
-
getMetricNamespace
Returns the namespace of the metrics been queried- Returns:
- the namespace of the metrics been queried
-
setMetricNamespace
Sets the namespace of the metrics been queried- Parameters:
metricNamespace
- the namespace of the metrics been queried- Returns:
- The updated options instance
-