Freigeben über


OperationalInsightsDataClientExtensions.QueryAsync Methode

Definition

Ausführen einer Analytics-Abfrage

public static System.Threading.Tasks.Task<Microsoft.Azure.OperationalInsights.Models.QueryResults> QueryAsync (this Microsoft.Azure.OperationalInsights.IOperationalInsightsDataClient operations, string query, TimeSpan? timespan = default, System.Collections.Generic.IList<string> workspaces = default, System.Threading.CancellationToken cancellationToken = default);
static member QueryAsync : Microsoft.Azure.OperationalInsights.IOperationalInsightsDataClient * string * Nullable<TimeSpan> * System.Collections.Generic.IList<string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.OperationalInsights.Models.QueryResults>
<Extension()>
Public Function QueryAsync (operations As IOperationalInsightsDataClient, query As String, Optional timespan As Nullable(Of TimeSpan) = Nothing, Optional workspaces As IList(Of String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of QueryResults)

Parameter

operations
IOperationalInsightsDataClient

Die Vorgangsgruppe für diese Erweiterungsmethode.

query
String

Die auszuführende Abfrage.

timespan
Nullable<TimeSpan>

Optional. Der Zeitraum, über den Daten abfragt werden sollen. Dies ist ein ISO8601-Zeitraumwert. Dieser Zeitbereich wird zusätzlich zu allen angewendet, die im Abfrageausdruck angegeben sind.

workspaces
IList<String>

Eine Liste der Arbeitsbereiche, die in der Abfrage enthalten sind.

cancellationToken
CancellationToken

Das Abbruchtoken.

Gibt zurück

Hinweise

Führt eine Analyseabfrage für Daten aus.

Hier sehen Sie ein Beispiel für die Verwendung von POST

mit einer Analytics-Abfrage.

Gilt für: