Interface MetricDefinition.MetricsQueryDefinitionStages.WithMetricsQueryExecute

    • Method Detail

      • withOdataFilter

        MetricDefinition.MetricsQueryDefinitionStages.WithMetricsQueryExecute withOdataFilter​(String odataFilter)
        Sets the **$filter** that is used to reduce the set of metric data returned. <br>Example:<br> Metric contains metadata A, B and C.<br>

        - Return all time series of C where A = a1 and B = b1 or b2<br> **$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>

        - Invalid variant:<br> **$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**<br> This is invalid because the logical or operator cannot separate two different metadata names.<br>

        - Return all time series where A = a1, B = b1 and C = c1:<br> **$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>

        - Return all time series where A = a1<br> **$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.

        Parameters:
        odataFilter - the **$filter** to reduce the set of the returned metric data.
        Returns:
        the stage of optional query parameter definition and query execution.
      • withResultType

        MetricDefinition.MetricsQueryDefinitionStages.WithMetricsQueryExecute withResultType​(ResultType resultType)
        Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Possible values include: 'Data', 'Metadata'
        Parameters:
        resultType - the type of metric to retrieve.
        Returns:
        the stage of optional query parameter definition and query execution.
      • selectTop

        MetricDefinition.MetricsQueryDefinitionStages.WithMetricsQueryExecute selectTop​(int top)
        Sets the maximum number of records to retrieve. Valid only if $filter is specified. Defaults to 10.
        Parameters:
        top - the maximum number of records to retrieve.
        Returns:
        the stage of optional query parameter definition and query execution.
      • orderBy

        MetricDefinition.MetricsQueryDefinitionStages.WithMetricsQueryExecute orderBy​(String orderBy)
        Sets the aggregation to use for sorting results and the direction of the sort. Only one order can be specified. Examples: sum asc.
        Parameters:
        orderBy - the aggregation to use for sorting results and the direction of the sort.
        Returns:
        the stage of optional query parameter definition and query execution.
      • execute

        MetricCollection execute()
        Executes the query.
        Returns:
        Metric collection received after query execution.
      • executeAsync

        Mono<MetricCollection> executeAsync()
        Executes the query.
        Returns:
        a representation of the deferred computation of Metric collection query call