Class MetricsQueryResourcesOptions

java.lang.Object
com.azure.monitor.query.metrics.models.MetricsQueryResourcesOptions

public final class MetricsQueryResourcesOptions extends Object
The model class to configure the metrics query options.
  • Constructor Details

    • MetricsQueryResourcesOptions

      public MetricsQueryResourcesOptions()
      Creates an instance of MetricsQueryResourcesOptions.
  • Method Details

    • getTimeInterval

      public MetricsQueryTimeInterval getTimeInterval()
      Returns the time span for which the metrics data is queried.
      Returns:
      the time span for which the metrics data is queried.
    • setTimeInterval

      public MetricsQueryResourcesOptions setTimeInterval(MetricsQueryTimeInterval timeInterval)
      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

      public Duration 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

      public MetricsQueryResourcesOptions setGranularity(Duration granularity)
      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

      public List<AggregationType> 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

      public MetricsQueryResourcesOptions setAggregations(List<AggregationType> aggregations)
      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

      public Integer 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

      public String getOrderBy()
      Returns the order in which the query results should be ordered.
      Returns:
      the order in which the query results should be ordered.
    • setOrderBy

      public MetricsQueryResourcesOptions setOrderBy(String orderBy)
      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

      public String getFilter()
      Returns the filter to be applied to the query. The filter uses OData format.
      Returns:
      the filter to be applied to the query. The filter uses OData format.
    • setFilter

      public MetricsQueryResourcesOptions setFilter(String filter)
      Sets the filter to be applied to the query. The filter uses OData format.
      Parameters:
      filter - the filter to be applied to the query. The filter uses OData format.
      Returns:
      The updated options instance
    • getRollupBy

      public String getRollupBy()
      Gets the dimension name(s) to rollup results by. For example if you only want to see metric values with a filter like 'City eq Seattle or City eq Tacoma' but don't want to see separate values for each city, you can specify 'RollUpBy=City' to see the results for Seattle and Tacoma rolled up into one timeseries.
      Returns:
      the dimension name(s) to rollup results by. For example if you only want to see metric values with a filter like 'City eq Seattle or City eq Tacoma' but don't want to see separate values for each city, you can specify 'RollUpBy=City' to see the results for Seattle and Tacoma rolled up into one timeseries.
    • setRollupBy

      public MetricsQueryResourcesOptions setRollupBy(String rollupBy)
      Sets the dimension name(s) to rollup results by. For example if you only want to see metric values with a filter like 'City eq Seattle or City eq Tacoma' but don't want to see separate values for each city, you can specify 'RollUpBy=City' to see the results for Seattle and Tacoma rolled up into one timeseries.
      Parameters:
      rollupBy - the dimension name(s) to rollup results by. For example if you only want to see metric values with a filter like 'City eq Seattle or City eq Tacoma' but don't want to see separate values for each city, you can specify 'RollUpBy=City' to see the results for Seattle and Tacoma rolled up into one timeseries.
      Returns:
      The updated options instance