Partager via


MetricsQueryClient.GetMetricDefinitionsAsync Méthode

Définition

Obtient des définitions de métriques pour une ressource et un espace de noms de métriques particuliers.

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

Paramètres

resourceId
String

Nom de la ressource.

         For example:
         <code data-dev-comment-type="c">/subscriptions/&lt;subscription_id&gt;/resourceGroups/&lt;resource_group_name&gt;/providers/&lt;resource_provider&gt;/&lt;resource&gt;</code>,<br /><code data-dev-comment-type="c">/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/resource-group/providers/Microsoft.Storage/storageAccounts/mystorage</code>,<br /><code data-dev-comment-type="c">/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/resource-group/providers/Microsoft.Compute/virtualMachines/myvm</code><br />
metricsNamespace
String

Espace de noms de métrique. Par exemple : Microsoft.OperationalInsights/workspaces.

cancellationToken
CancellationToken

CancellationToken à utiliser.

Retours

Collection paginable de définitions de métriques.

S’applique à