managed_instances_by_managed_instances
Creates, updates, deletes, gets or lists a managed_instances_by_managed_instances
resource.
Overview
Name | managed_instances_by_managed_instances |
Type | Resource |
Id | azure.sql.managed_instances_by_managed_instances |
Fields
The following fields are returned by SELECT
queries:
- list
Successfully retrieved top queries for managed instance.
Name | Datatype | Description |
---|---|---|
aggregationFunction | string | Aggregation function used to calculate query metrics. |
endTime | string | The end time for the metric (ISO-8601 format). |
intervalType | string | Interval type (length). |
numberOfQueries | integer (int32) | Requested number of top queries. |
observationMetric | string | Metric used to rank queries. |
queries | array | List of top resource consuming queries with appropriate metric data |
startTime | string | The start time for the metric (ISO-8601 format). |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list | select | resourceGroupName , managedInstanceName , subscriptionId | numberOfQueries , databases , startTime , endTime , interval , aggregationFunction , observationMetric | Get top resource consuming queries of a managed instance. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
managedInstanceName | string | The name of the managed instance. |
resourceGroupName | string | The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
subscriptionId | string | The subscription ID that identifies an Azure subscription. |
aggregationFunction | string | Aggregation function to be used, default value is 'sum' |
databases | string | Comma separated list of databases to be included into search. All DB's are included if this parameter is not specified. |
endTime | string | End time for observed period. |
interval | string | The time step to be used to summarize the metric values. Default value is PT1H |
numberOfQueries | integer (int32) | How many 'top queries' to return. Default is 5. |
observationMetric | string | Metric to be used for ranking top queries. Default is 'cpu' |
startTime | string | Start time for observed period. |
SELECT
examples
- list
Get top resource consuming queries of a managed instance.
SELECT
aggregationFunction,
endTime,
intervalType,
numberOfQueries,
observationMetric,
queries,
startTime
FROM azure.sql.managed_instances_by_managed_instances
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND managedInstanceName = '{{ managedInstanceName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND numberOfQueries = '{{ numberOfQueries }}'
AND databases = '{{ databases }}'
AND startTime = '{{ startTime }}'
AND endTime = '{{ endTime }}'
AND interval = '{{ interval }}'
AND aggregationFunction = '{{ aggregationFunction }}'
AND observationMetric = '{{ observationMetric }}'
;