Compartir a través de


IMetricOperations.GetMetricsAsync Method (String, String, CancellationToken)

 

The List Metric operation lists the metric value sets for the resource metrics.

Namespace:   Microsoft.Azure.Insights
Assembly:  Microsoft.Azure.Insights (in Microsoft.Azure.Insights.dll)

Syntax

Task<MetricListResponse> GetMetricsAsync(
    string resourceUri,
    string filterString,
    CancellationToken cancellationToken
)
Task<MetricListResponse^>^ GetMetricsAsync(
    String^ resourceUri,
    String^ filterString,
    CancellationToken cancellationToken
)
abstract GetMetricsAsync : 
        resourceUri:string *
        filterString:string *
        cancellationToken:CancellationToken -> Task<MetricListResponse>
Function GetMetricsAsync (
    resourceUri As String,
    filterString As String,
    cancellationToken As CancellationToken
) As Task(Of MetricListResponse)

Parameters

  • resourceUri
    Type: System.String

    The resource identifier of the target resource to get metrics for.

  • filterString
    Type: System.String

    An OData $filter expression that supports querying by the name, startTime, endTime and timeGrain of the metric value sets. For example, "(name.value eq 'Percentage CPU') and startTime eq 2014-07-02T01:00Z and endTime eq 2014-08-21T01:00:00Z and timeGrain eq duration'PT1H'". In the expression, startTime, endTime and timeGrain are required. Name is optional.

Return Value

Type: System.Threading.Tasks.Task<MetricListResponse>

The List Metric values operation response.

See Also

GetMetricsAsync Overload
IMetricOperations Interface
Microsoft.Azure.Insights Namespace

Return to top