Udostępnij za pośrednictwem


MetricsQueryClient.GetMetricDefinitions Method

Definition

Gets metric definitions for a particular resource and metric namespace.

public virtual Azure.Pageable<Azure.Monitor.Query.Models.MetricDefinition> GetMetricDefinitions (string resourceId, string metricsNamespace, System.Threading.CancellationToken cancellationToken = default);
abstract member GetMetricDefinitions : string * string * System.Threading.CancellationToken -> Azure.Pageable<Azure.Monitor.Query.Models.MetricDefinition>
override this.GetMetricDefinitions : string * string * System.Threading.CancellationToken -> Azure.Pageable<Azure.Monitor.Query.Models.MetricDefinition>
Public Overridable Function GetMetricDefinitions (resourceId As String, metricsNamespace As String, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of MetricDefinition)

Parameters

resourceId
String

The resource name. For example: /subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/<resource_provider>/<resource>,
/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/resource-group/providers/Microsoft.Storage/storageAccounts/mystorage,
/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/resource-group/providers/Microsoft.Compute/virtualMachines/myvm

metricsNamespace
String

The metric namespace. For example: Microsoft.OperationalInsights/workspaces.

cancellationToken
CancellationToken

The CancellationToken to use.

Returns

A pageable collection of metric definitions.

Applies to