Delen via


MetricsClient.QueryResourcesAsync Method

Definition

Returns all the Azure Monitor metrics requested for the batch of resources.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Monitor.Query.Models.MetricsQueryResourcesResult>> QueryResourcesAsync (System.Collections.Generic.IEnumerable<Azure.Core.ResourceIdentifier> resourceIds, System.Collections.Generic.IEnumerable<string> metricNames, string metricNamespace, Azure.Monitor.Query.MetricsQueryResourcesOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member QueryResourcesAsync : seq<Azure.Core.ResourceIdentifier> * seq<string> * string * Azure.Monitor.Query.MetricsQueryResourcesOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Monitor.Query.Models.MetricsQueryResourcesResult>>
override this.QueryResourcesAsync : seq<Azure.Core.ResourceIdentifier> * seq<string> * string * Azure.Monitor.Query.MetricsQueryResourcesOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Monitor.Query.Models.MetricsQueryResourcesResult>>
Public Overridable Function QueryResourcesAsync (resourceIds As IEnumerable(Of ResourceIdentifier), metricNames As IEnumerable(Of String), metricNamespace As String, Optional options As MetricsQueryResourcesOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of MetricsQueryResourcesResult))

Parameters

resourceIds
IEnumerable<ResourceIdentifier>

The resource URIs for which the metrics are requested.

metricNames
IEnumerable<String>

The names of the metrics to query.

metricNamespace
String

The namespace of the metrics to query.

options
MetricsQueryResourcesOptions

The MetricsQueryResourcesOptions to configure the query.

cancellationToken
CancellationToken

The CancellationToken to use.

Returns

A time series metrics result for the requested metric names.

Applies to