Subscription Usages - List By Location

Gets all subscription usage metrics in a given location.

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages?api-version=2021-11-01

URI Parameters

Name In Required Type Description
locationName
path True

string

The name of the region where the resource is located.

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

SubscriptionUsageListResult

Successfully retrieved the subscription location usages.

Other Status Codes

*** Error Responses: ***

  • 400 InvalidLocation - An invalid location was specified.

  • 404 SubscriptionNotFound - The requested subscription was not found.

Examples

List subscription usages in the given location.

Sample Request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/WestUS/usages?api-version=2021-11-01

Sample Response

{
  "value": [
    {
      "properties": {
        "displayName": "Regional Server Quota for West US",
        "currentValue": 1,
        "limit": 20,
        "unit": "Count"
      },
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/Onebox/usages/ServerQuota",
      "name": "ServerQuota",
      "type": "Microsoft.Sql/locations/usages"
    },
    {
      "properties": {
        "displayName": "Free Database Count per Subscription for West US",
        "currentValue": 0,
        "limit": 1,
        "unit": "Count"
      },
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/Onebox/usages/SubscriptionFreeDatabaseCount",
      "name": "SubscriptionFreeDatabaseCount",
      "type": "Microsoft.Sql/locations/usages"
    },
    {
      "properties": {
        "displayName": "Free to Basic Database Upgrade count-down in West US",
        "currentValue": 365,
        "limit": 365,
        "unit": "Count"
      },
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/Onebox/usages/SubscriptionFreeDatabaseDaysLeft",
      "name": "SubscriptionFreeDatabaseDaysLeft",
      "type": "Microsoft.Sql/locations/usages"
    }
  ]
}

Definitions

Name Description
SubscriptionUsage

Usage Metric of a Subscription in a Location.

SubscriptionUsageListResult

A list of subscription usage metrics in a location.

SubscriptionUsage

Usage Metric of a Subscription in a Location.

Name Type Description
id

string

Resource ID.

name

string

Resource name.

properties.currentValue

number

Current value of the metric.

properties.displayName

string

User-readable name of the metric.

properties.limit

number

Boundary value of the metric.

properties.unit

string

Unit of the metric.

type

string

Resource type.

SubscriptionUsageListResult

A list of subscription usage metrics in a location.

Name Type Description
nextLink

string

Link to retrieve next page of results.

value

SubscriptionUsage[]

Array of results.