Azure SQL Database
Provides create, read, update and delete functionality for Azure SQL Database resources including servers, databases, elastic pools, recommendations, operations, and usage metrics
COMMUNITYBEARER0 INSTALLS
OpenAPI Specificationv3.0
{
"swagger": "2.0",
"schemes": [
"https"
],
"host": "management.azure.com",
"info": {
"description": "Provides create, read, update and delete functionality for Azure SQL Database resources including servers, databases, elastic pools, recommendations, operations, and usage metrics.",
"title": "Azure SQL Database",
"version": "2014-04-01",
"x-apisguru-categories": [
"cloud"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
},
"x-origin": [
{
"format": "swagger",
"url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/metrics.json",
"version": "2.0"
}
],
"x-providerName": "azure.com",
"x-serviceName": "sql-metrics",
"x-tags": [
"Azure",
"Microsoft"
]
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"securityDefinitions": {
"azure_auth": {
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"description": "Azure Active Directory OAuth2 Flow",
"flow": "implicit",
"scopes": {
"user_impersonation": "impersonate your user account"
},
"type": "oauth2"
}
},
"parameters": {
"ServerNameParameter": {
"description": "The name of the server.",
"in": "path",
"name": "serverName",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metricDefinitions": {
"get": {
"description": "Returns database metric definitions.",
"operationId": "Databases_ListMetricDefinitions",
"parameters": [
{
"description": "The API version to use for the request.",
"in": "query",
"name": "api-version",
"required": true,
"type": "string",
"x-ms-parameter-location": "client"
},
{
"description": "The subscription ID that identifies an Azure subscription.",
"in": "path",
"name": "subscriptionId",
"required": true,
"type": "string",
"x-ms-parameter-location": "client"
},
{
"description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.",
"in": "path",
"name": "resourceGroupName",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"description": "The name of the database.",
"in": "path",
"name": "databaseName",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/MetricDefinitionListResult"
}
}
},
"tags": [
"Databases"
],
"x-ms-examples": {
"List database usage metrics": {
"parameters": {
"$filter": "name/value eq 'cpu_percent' and timeGrain eq '00:10:00' and startTime eq '2017-06-2T18:35:00Z' and endTime eq '2017-06-2T18:55:00Z'",
"api-version": "2014-04-01",
"databaseName": "3481",
"resourceGroupName": "sqlcrudtest-6730",
"serverName": "sqlcrudtest-9007",
"subscriptionId": "00000000-1111-2222-3333-444444444444"
},
"responses": {
"200": {
"body": {
"value": [
{
"metricAvailabilities": [
{
"retention": "PT1H",
"timeGrain": "PT15S"
},
{
"retention": "PT1H",
"timeGrain": "PT60S"
},
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "CPU percentage",
"value": "cpu_percent"
},
"primaryAggregationType": "Average",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Percent"
},
{
"metricAvailabilities": [
{
"retention": "PT1H",
"timeGrain": "PT15S"
},
{
"retention": "PT1H",
"timeGrain": "PT60S"
},
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Data IO percentage",
"value": "physical_data_read_percent"
},
"primaryAggregationType": "Average",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Percent"
},
{
"metricAvailabilities": [
{
"retention": "PT1H",
"timeGrain": "PT15S"
},
{
"retention": "PT1H",
"timeGrain": "PT60S"
},
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Log IO percentage",
"value": "log_write_percent"
},
"primaryAggregationType": "Average",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Percent"
},
{
"metricAvailabilities": [
{
"retention": "PT1H",
"timeGrain": "PT15S"
},
{
"retention": "PT1H",
"timeGrain": "PT60S"
},
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "DTU percentage",
"value": "dtu_consumption_percent"
},
"primaryAggregationType": "Average",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Percent"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Total database size",
"value": "storage"
},
"primaryAggregationType": "Maximum",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Bytes"
},
{
"metricAvailabilities": [
{
"retention": "PT1H",
"timeGrain": "PT15S"
},
{
"retention": "PT1H",
"timeGrain": "PT60S"
},
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "In-Memory OLTP storage percent",
"value": "xtp_storage_percent"
},
"primaryAggregationType": "Average",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Percent"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Workers percentage",
"value": "workers_percent"
},
"primaryAggregationType": "Average",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Percent"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Sessions percentage",
"value": "sessions_percent"
},
"primaryAggregationType": "Average",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Percent"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "DTU limit",
"value": "dtu_limit"
},
"primaryAggregationType": "Average",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Count"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "DTU used",
"value": "dtu_used"
},
"primaryAggregationType": "Average",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Count"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Successful Connections",
"value": "connection_successful"
},
"primaryAggregationType": "Total",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Count"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Failed Connections",
"value": "connection_failed"
},
"primaryAggregationType": "Total",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Count"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Blocked by Firewall",
"value": "blocked_by_firewall"
},
"primaryAggregationType": "Total",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Count"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Deadlocks",
"value": "deadlock"
},
"primaryAggregationType": "Total",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Count"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Database size percentage",
"value": "storage_percent"
},
"primaryAggregationType": "Maximum",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Percent"
}
]
}
}
}
}
},
"x-ms-pageable": {
"nextLinkName": null
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metrics": {
"get": {
"description": "Returns database metrics.",
"operationId": "Databases_ListMetrics",
"parameters": [
{
"description": "The API version to use for the request.",
"in": "query",
"name": "api-version",
"required": true,
"type": "string",
"x-ms-parameter-location": "client"
},
{
"description": "The subscription ID that identifies an Azure subscription.",
"in": "path",
"name": "subscriptionId",
"required": true,
"type": "string",
"x-ms-parameter-location": "client"
},
{
"description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.",
"in": "path",
"name": "resourceGroupName",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"description": "The name of the database.",
"in": "path",
"name": "databaseName",
"required": true,
"type": "string"
},
{
"description": "An OData filter expression that describes a subset of metrics to return.",
"in": "query",
"name": "$filter",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/MetricListResult"
}
}
},
"tags": [
"Databases"
],
"x-ms-examples": {
"List database usage metrics": {
"parameters": {
"$filter": "name/value eq 'cpu_percent' and timeGrain eq '00:10:00' and startTime eq '2017-06-02T18:35:00Z' and endTime eq '2017-06-02T18:55:00Z'",
"api-version": "2014-04-01",
"databaseName": "3481",
"resourceGroupName": "sqlcrudtest-6730",
"serverName": "sqlcrudtest-9007",
"subscriptionId": "00000000-1111-2222-3333-444444444444"
},
"responses": {
"200": {
"body": {
"value": [
{
"endTime": "2017-06-02T18:55:00Z",
"metricValues": [
{
"average": 0,
"count": 1,
"maximum": 0,
"minimum": 0,
"timestamp": "2017-06-02T18:30:01Z",
"total": 0
},
{
"average": 0,
"count": 1,
"maximum": 0,
"minimum": 0,
"timestamp": "2017-06-02T18:40:01Z",
"total": 0
},
{
"average": 0,
"count": 1,
"maximum": 0,
"minimum": 0,
"timestamp": "2017-06-02T18:50:01Z",
"total": 0
}
],
"name": {
"localizedValue": "CPU percentage",
"value": "cpu_percent"
},
"startTime": "2017-06-02T18:35:00Z",
"timeGrain": "00:10:00",
"unit": "percent"
}
]
}
}
}
}
},
"x-ms-pageable": {
"nextLinkName": null
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metricDefinitions": {
"get": {
"description": "Returns elastic pool metric definitions.",
"operationId": "ElasticPools_ListMetricDefinitions",
"parameters": [
{
"description": "The API version to use for the request.",
"in": "query",
"name": "api-version",
"required": true,
"type": "string",
"x-ms-parameter-location": "client"
},
{
"description": "The subscription ID that identifies an Azure subscription.",
"in": "path",
"name": "subscriptionId",
"required": true,
"type": "string",
"x-ms-parameter-location": "client"
},
{
"description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.",
"in": "path",
"name": "resourceGroupName",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"description": "The name of the elastic pool.",
"in": "path",
"name": "elasticPoolName",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/MetricDefinitionListResult"
}
}
},
"tags": [
"ElasticPools"
],
"x-ms-examples": {
"List database usage metrics": {
"parameters": {
"$filter": "name/value eq 'cpu_percent' and timeGrain eq '00:10:00' and startTime eq '2017-06-2T18:35:00Z' and endTime eq '2017-06-2T18:55:00Z'",
"api-version": "2014-04-01",
"elasticPoolName": "3481",
"resourceGroupName": "sqlcrudtest-6730",
"serverName": "sqlcrudtest-9007",
"subscriptionId": "00000000-1111-2222-3333-444444444444"
},
"responses": {
"200": {
"body": {
"value": [
{
"metricAvailabilities": [
{
"retention": "PT1H",
"timeGrain": "PT15S"
},
{
"retention": "PT1H",
"timeGrain": "PT60S"
},
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "CPU percentage",
"value": "cpu_percent"
},
"primaryAggregationType": "Average",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Percent"
},
{
"metricAvailabilities": [
{
"retention": "PT1H",
"timeGrain": "PT15S"
},
{
"retention": "PT1H",
"timeGrain": "PT60S"
},
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Data IO percentage",
"value": "physical_data_read_percent"
},
"primaryAggregationType": "Average",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Percent"
},
{
"metricAvailabilities": [
{
"retention": "PT1H",
"timeGrain": "PT15S"
},
{
"retention": "PT1H",
"timeGrain": "PT60S"
},
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Log IO percentage",
"value": "log_write_percent"
},
"primaryAggregationType": "Average",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Percent"
},
{
"metricAvailabilities": [
{
"retention": "PT1H",
"timeGrain": "PT15S"
},
{
"retention": "PT1H",
"timeGrain": "PT60S"
},
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "DTU percentage",
"value": "dtu_consumption_percent"
},
"primaryAggregationType": "Average",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Percent"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Total database size",
"value": "storage"
},
"primaryAggregationType": "Maximum",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Bytes"
},
{
"metricAvailabilities": [
{
"retention": "PT1H",
"timeGrain": "PT15S"
},
{
"retention": "PT1H",
"timeGrain": "PT60S"
},
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "In-Memory OLTP storage percent",
"value": "xtp_storage_percent"
},
"primaryAggregationType": "Average",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Percent"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Workers percentage",
"value": "workers_percent"
},
"primaryAggregationType": "Average",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Percent"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Sessions percentage",
"value": "sessions_percent"
},
"primaryAggregationType": "Average",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Percent"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "DTU limit",
"value": "dtu_limit"
},
"primaryAggregationType": "Average",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Count"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "DTU used",
"value": "dtu_used"
},
"primaryAggregationType": "Average",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Count"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Successful Connections",
"value": "connection_successful"
},
"primaryAggregationType": "Total",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Count"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Failed Connections",
"value": "connection_failed"
},
"primaryAggregationType": "Total",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Count"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Blocked by Firewall",
"value": "blocked_by_firewall"
},
"primaryAggregationType": "Total",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Count"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Deadlocks",
"value": "deadlock"
},
"primaryAggregationType": "Total",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Count"
},
{
"metricAvailabilities": [
{
"retention": "P14D",
"timeGrain": "PT5M"
},
{
"retention": "P14D",
"timeGrain": "PT1H"
},
{
"retention": "P14D",
"timeGrain": "P1D"
}
],
"name": {
"localizedValue": "Database size percentage",
"value": "storage_percent"
},
"primaryAggregationType": "Maximum",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"unit": "Percent"
}
]
}
}
}
}
},
"x-ms-pageable": {
"nextLinkName": null
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metrics": {
"get": {
"description": "Returns elastic pool metrics.",
"operationId": "ElasticPools_ListMetrics",
"parameters": [
{
"description": "The API version to use for the request.",
"in": "query",
"name": "api-version",
"required": true,
"type": "string",
"x-ms-parameter-location": "client"
},
{
"description": "The subscription ID that identifies an Azure subscription.",
"in": "path",
"name": "subscriptionId",
"required": true,
"type": "string",
"x-ms-parameter-location": "client"
},
{
"description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.",
"in": "path",
"name": "resourceGroupName",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"description": "The name of the elastic pool.",
"in": "path",
"name": "elasticPoolName",
"required": true,
"type": "string"
},
{
"description": "An OData filter expression that describes a subset of metrics to return.",
"in": "query",
"name": "$filter",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/MetricListResult"
}
}
},
"tags": [
"ElasticPools"
],
"x-ms-examples": {
"List database usage metrics": {
"parameters": {
"$filter": "name/value eq 'cpu_percent' and timeGrain eq '00:10:00' and startTime eq '2017-06-02T18:35:00Z' and endTime eq '2017-06-02T18:55:00Z'",
"api-version": "2014-04-01",
"elasticPoolName": "3481",
"resourceGroupName": "sqlcrudtest-6730",
"serverName": "sqlcrudtest-9007",
"subscriptionId": "00000000-1111-2222-3333-444444444444"
},
"responses": {
"200": {
"body": {
"value": [
{
"endTime": "2017-06-02T18:55:00Z",
"metricValues": [
{
"average": 0,
"count": 1,
"maximum": 0,
"minimum": 0,
"timestamp": "2017-06-02T18:30:01Z",
"total": 0
},
{
"average": 0,
"count": 1,
"maximum": 0,
"minimum": 0,
"timestamp": "2017-06-02T18:40:01Z",
"total": 0
},
{
"average": 0,
"count": 1,
"maximum": 0,
"minimum": 0,
"timestamp": "2017-06-02T18:50:01Z",
"total": 0
}
],
"name": {
"localizedValue": "CPU percentage",
"value": "cpu_percent"
},
"startTime": "2017-06-02T18:35:00Z",
"timeGrain": "00:10:00",
"unit": "percent"
}
]
}
}
}
}
},
"x-ms-pageable": {
"nextLinkName": null
}
}
}
},
"definitions": {
"Metric": {
"description": "Database metrics.",
"properties": {
"endTime": {
"description": "The end time for the metric (ISO-8601 format).",
"format": "date-time",
"readOnly": true,
"type": "string"
},
"metricValues": {
"description": "The metric values for the specified time window and timestep.",
"items": {
"$ref": "#/definitions/MetricValue"
},
"readOnly": true,
"type": "array"
},
"name": {
"$ref": "#/definitions/MetricName",
"description": "The name information for the metric.",
"readOnly": true
},
"startTime": {
"description": "The start time for the metric (ISO-8601 format).",
"format": "date-time",
"readOnly": true,
"type": "string"
},
"timeGrain": {
"description": "The time step to be used to summarize the metric values.",
"readOnly": true,
"type": "string"
},
"unit": {
"description": "The unit of the metric.",
"enum": [
"count",
"bytes",
"seconds",
"percent",
"countPerSecond",
"bytesPerSecond"
],
"readOnly": true,
"type": "string",
"x-ms-enum": {
"modelAsString": true,
"name": "UnitType"
}
}
}
},
"MetricAvailability": {
"description": "A metric availability value.",
"properties": {
"retention": {
"description": "The length of retention for the database metric.",
"readOnly": true,
"type": "string"
},
"timeGrain": {
"description": "The granularity of the database metric.",
"readOnly": true,
"type": "string"
}
}
},
"MetricDefinition": {
"description": "A database metric definition.",
"properties": {
"metricAvailabilities": {
"description": "The list of database metric availabilities for the metric.",
"items": {
"$ref": "#/definitions/MetricAvailability"
},
"readOnly": true,
"type": "array"
},
"name": {
"$ref": "#/definitions/MetricName",
"description": "The name information for the metric.",
"readOnly": true
},
"primaryAggregationType": {
"description": "The primary aggregation type defining how metric values are displayed.",
"enum": [
"None",
"Average",
"Count",
"Minimum",
"Maximum",
"Total"
],
"readOnly": true,
"type": "string",
"x-ms-enum": {
"modelAsString": true,
"name": "PrimaryAggregationType"
}
},
"resourceUri": {
"description": "The resource uri of the database.",
"readOnly": true,
"type": "string"
},
"unit": {
"description": "The unit of the metric.",
"enum": [
"Count",
"Bytes",
"Seconds",
"Percent",
"CountPerSecond",
"BytesPerSecond"
],
"readOnly": true,
"type": "string",
"x-ms-enum": {
"modelAsString": true,
"name": "UnitDefinitionType"
}
}
}
},
"MetricDefinitionListResult": {
"description": "The response to a list database metric definitions request.",
"properties": {
"value": {
"description": "The list of metric definitions for the database.",
"items": {
"$ref": "#/definitions/MetricDefinition"
},
"type": "array"
}
},
"required": [
"value"
]
},
"MetricListResult": {
"description": "The response to a list database metrics request.",
"properties": {
"value": {
"description": "The list of metrics for the database.",
"items": {
"$ref": "#/definitions/Metric"
},
"type": "array"
}
},
"required": [
"value"
]
},
"MetricName": {
"description": "A database metric name.",
"properties": {
"localizedValue": {
"description": "The friendly name of the database metric.",
"readOnly": true,
"type": "string"
},
"value": {
"description": "The name of the database metric.",
"readOnly": true,
"type": "string"
}
}
},
"MetricValue": {
"description": "Represents database metrics.",
"properties": {
"average": {
"description": "The average value of the metric.",
"format": "double",
"readOnly": true,
"type": "number"
},
"count": {
"description": "The number of values for the metric.",
"format": "int32",
"readOnly": true,
"type": "number"
},
"maximum": {
"description": "The max value of the metric.",
"format": "double",
"readOnly": true,
"type": "number"
},
"minimum": {
"description": "The min value of the metric.",
"format": "double",
"readOnly": true,
"type": "number"
},
"timestamp": {
"description": "The metric timestamp (ISO-8601 format).",
"format": "date-time",
"readOnly": true,
"type": "string"
},
"total": {
"description": "The total value of the metric.",
"format": "double",
"readOnly": true,
"type": "number"
}
}
}
}
}