Compartilhar via


MetricsQueryClient.GetMetricDefinitions Método

Definição

Obtém definições de métrica para um namespace de recurso e métrica específico.

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)

Parâmetros

resourceId
String

O nome do recurso. Por exemplo: /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

O namespace da métrica. Por exemplo: Microsoft.OperationalInsights/workspaces.

cancellationToken
CancellationToken

O CancellationToken a ser usado.

Retornos

Uma coleção paginável de definições de métrica.

Aplica-se a