Share via


ManagedInstanceResource.GetTopQueries Method

Definition

Overloads

GetTopQueries(ManagedInstanceResourceGetTopQueriesOptions, CancellationToken)

Get top resource consuming queries of a managed instance.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/topqueries
  • Operation Id: ManagedInstances_ListByManagedInstance
  • Default Api Version: 2022-08-01-preview
  • Resource: ManagedInstanceResource
GetTopQueries(Nullable<Int32>, String, String, String, Nullable<QueryTimeGrainType>, Nullable<AggregationFunctionType>, Nullable<SqlMetricType>, CancellationToken)

Get top resource consuming queries of a managed instance.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/topqueries
  • Operation Id: ManagedInstances_ListByManagedInstance

GetTopQueries(ManagedInstanceResourceGetTopQueriesOptions, CancellationToken)

Source:
ManagedInstanceResource.cs
Source:
ManagedInstanceResource.cs

Get top resource consuming queries of a managed instance.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/topqueries
  • Operation Id: ManagedInstances_ListByManagedInstance
  • Default Api Version: 2022-08-01-preview
  • Resource: ManagedInstanceResource
public virtual Azure.Pageable<Azure.ResourceManager.Sql.Models.TopQueries> GetTopQueries (Azure.ResourceManager.Sql.Models.ManagedInstanceResourceGetTopQueriesOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member GetTopQueries : Azure.ResourceManager.Sql.Models.ManagedInstanceResourceGetTopQueriesOptions * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Sql.Models.TopQueries>
override this.GetTopQueries : Azure.ResourceManager.Sql.Models.ManagedInstanceResourceGetTopQueriesOptions * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Sql.Models.TopQueries>
Public Overridable Function GetTopQueries (options As ManagedInstanceResourceGetTopQueriesOptions, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of TopQueries)

Parameters

options
ManagedInstanceResourceGetTopQueriesOptions

A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

A collection of TopQueries that may take multiple service requests to iterate over.

Applies to

GetTopQueries(Nullable<Int32>, String, String, String, Nullable<QueryTimeGrainType>, Nullable<AggregationFunctionType>, Nullable<SqlMetricType>, CancellationToken)

Source:
ManagedInstanceResource.cs
Source:
ManagedInstanceResource.cs

Get top resource consuming queries of a managed instance.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/topqueries
  • Operation Id: ManagedInstances_ListByManagedInstance
public virtual Azure.Pageable<Azure.ResourceManager.Sql.Models.TopQueries> GetTopQueries (int? numberOfQueries = default, string databases = default, string startTime = default, string endTime = default, Azure.ResourceManager.Sql.Models.QueryTimeGrainType? interval = default, Azure.ResourceManager.Sql.Models.AggregationFunctionType? aggregationFunction = default, Azure.ResourceManager.Sql.Models.SqlMetricType? observationMetric = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetTopQueries : Nullable<int> * string * string * string * Nullable<Azure.ResourceManager.Sql.Models.QueryTimeGrainType> * Nullable<Azure.ResourceManager.Sql.Models.AggregationFunctionType> * Nullable<Azure.ResourceManager.Sql.Models.SqlMetricType> * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Sql.Models.TopQueries>
override this.GetTopQueries : Nullable<int> * string * string * string * Nullable<Azure.ResourceManager.Sql.Models.QueryTimeGrainType> * Nullable<Azure.ResourceManager.Sql.Models.AggregationFunctionType> * Nullable<Azure.ResourceManager.Sql.Models.SqlMetricType> * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Sql.Models.TopQueries>
Public Overridable Function GetTopQueries (Optional numberOfQueries As Nullable(Of Integer) = Nothing, Optional databases As String = Nothing, Optional startTime As String = Nothing, Optional endTime As String = Nothing, Optional interval As Nullable(Of QueryTimeGrainType) = Nothing, Optional aggregationFunction As Nullable(Of AggregationFunctionType) = Nothing, Optional observationMetric As Nullable(Of SqlMetricType) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of TopQueries)

Parameters

numberOfQueries
Nullable<Int32>

How many 'top queries' to return. Default is 5.

databases
String

Comma separated list of databases to be included into search. All DB's are included if this parameter is not specified.

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. Default value is PT1H.

aggregationFunction
Nullable<AggregationFunctionType>

Aggregation function to be used, default value is 'sum'.

observationMetric
Nullable<SqlMetricType>

Metric to be used for ranking top queries. Default is 'cpu'.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

A collection of TopQueries that may take multiple service requests to iterate over.

Applies to