MetricsOperations.ListAsync Method

Definition

Lists the metric values for a resource.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Insights.Models.Response>> ListAsync (string resourceUri, string timespan = default, TimeSpan? interval = default, string metricnames = default, string aggregation = default, int? top = default, string orderby = default, string filter = default, Azure.ResourceManager.Insights.Models.ResultType? resultType = default, string metricnamespace = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ListAsync : string * string * Nullable<TimeSpan> * string * string * Nullable<int> * string * string * Nullable<Azure.ResourceManager.Insights.Models.ResultType> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Insights.Models.Response>>
override this.ListAsync : string * string * Nullable<TimeSpan> * string * string * Nullable<int> * string * string * Nullable<Azure.ResourceManager.Insights.Models.ResultType> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Insights.Models.Response>>
Public Overridable Function ListAsync (resourceUri As String, Optional timespan As String = Nothing, Optional interval As Nullable(Of TimeSpan) = Nothing, Optional metricnames As String = Nothing, Optional aggregation As String = Nothing, Optional top As Nullable(Of Integer) = Nothing, Optional orderby As String = Nothing, Optional filter As String = Nothing, Optional resultType As Nullable(Of ResultType) = Nothing, Optional metricnamespace As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of Response))

Parameters

resourceUri
System.String

The identifier of the resource.

timespan
System.String

The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.

interval
System.Nullable<System.TimeSpan>

The interval (i.e. timegrain) of the query.

metricnames
System.String

The names of the metrics (comma separated) to retrieve.

aggregation
System.String

The list of aggregation types (comma separated) to retrieve.

top
System.Nullable<System.Int32>

The maximum number of records to retrieve. Valid only if $filter is specified. Defaults to 10.

orderby
System.String

The aggregation to use for sorting results and the direction of the sort. Only one order can be specified. Examples: sum asc.

filter
System.String

The $filter 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 ‘.

resultType
System.Nullable<ResultType>

Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details.

metricnamespace
System.String

Metric namespace to query metric definitions for.

cancellationToken
System.Threading.CancellationToken

The cancellation token to use.

Returns

System.Threading.Tasks.Task<Response<Response>>

Applies to