MetricsClient.QueryResources Method

Definition

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

public virtual Azure.Response<Azure.Monitor.Query.Models.MetricsQueryResourcesResult> QueryResources (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 QueryResources : seq<Azure.Core.ResourceIdentifier> * seq<string> * string * Azure.Monitor.Query.MetricsQueryResourcesOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Monitor.Query.Models.MetricsQueryResourcesResult>
override this.QueryResources : seq<Azure.Core.ResourceIdentifier> * seq<string> * string * Azure.Monitor.Query.MetricsQueryResourcesOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Monitor.Query.Models.MetricsQueryResourcesResult>
Public Overridable Function QueryResources (resourceIds As IEnumerable(Of ResourceIdentifier), metricNames As IEnumerable(Of String), metricNamespace As String, Optional options As MetricsQueryResourcesOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As 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