Share via


ManagedDatabaseResource.GetQueryStatisticsAsync Method

Definition

Get query execution statistics by query id.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/queries/{queryId}/statistics
  • Operation Id: ManagedDatabaseQueries_ListByQuery
  • Default Api Version: 2020-11-01-preview
public virtual Azure.AsyncPageable<Azure.ResourceManager.Sql.Models.QueryStatistics> GetQueryStatisticsAsync (string queryId, string startTime = default, string endTime = default, Azure.ResourceManager.Sql.Models.QueryTimeGrainType? interval = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetQueryStatisticsAsync : string * string * string * Nullable<Azure.ResourceManager.Sql.Models.QueryTimeGrainType> * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Sql.Models.QueryStatistics>
override this.GetQueryStatisticsAsync : string * string * string * Nullable<Azure.ResourceManager.Sql.Models.QueryTimeGrainType> * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Sql.Models.QueryStatistics>
Public Overridable Function GetQueryStatisticsAsync (queryId As String, Optional startTime As String = Nothing, Optional endTime As String = Nothing, Optional interval As Nullable(Of QueryTimeGrainType) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of QueryStatistics)

Parameters

queryId
String

The String to use.

startTime
String

Start time for observed period.

endTime
String

End time for observed period.

interval
Nullable<QueryTimeGrainType>

The time step to be used to summarize the metric values.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

An async collection of QueryStatistics that may take multiple service requests to iterate over.

Exceptions

queryId is an empty string, and was expected to be non-empty.

queryId is null.

Applies to