Database Usages - List By Database

Returns database usages.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages?api-version=2014-04-01

URI Parameters

Name In Required Type Description
databaseName
path True

string

The name of the database.

resourceGroupName
path True

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.

serverName
path True

string

The name of the server.

subscriptionId
path True

string

The subscription ID that identifies an Azure subscription.

api-version
query True

string

The API version to use for the request.

Responses

Name Type Description
200 OK

DatabaseUsageListResult

OK

Examples

List database usage metrics

Sample request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-9007/databases/3481/usages?api-version=2014-04-01

Sample response

{
  "value": [
    {
      "name": "database_size",
      "resourceName": "3481",
      "displayName": "Database Size",
      "currentValue": 4194304,
      "limit": 268435456000,
      "unit": "Bytes",
      "nextResetTime": null
    }
  ]
}

Definitions

Name Description
DatabaseUsage

The database usages.

DatabaseUsageListResult

The response to a list database metrics request.

DatabaseUsage

The database usages.

Name Type Description
currentValue

number

The current value of the usage metric.

displayName

string

The usage metric display name.

limit

number

The current limit of the usage metric.

name

string

The name of the usage metric.

nextResetTime

string

The next reset time for the usage metric (ISO8601 format).

resourceName

string

The name of the resource.

unit

string

The units of the usage metric.

DatabaseUsageListResult

The response to a list database metrics request.

Name Type Description
value

DatabaseUsage[]

The list of database usages for the database.