Share via


Subscription Usages - Get

Gets a subscription usage metric.

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages/{usageName}?api-version=2023-08-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.

usageName
path True

string

Name of usage metric to return.

api-version
query True

string

The API version to use for the request.

Responses

Name Type Description
200 OK

SubscriptionUsage

Successfully retrieved particular subscription location usage.

Other Status Codes

ErrorResponse

*** Error Responses: ***

  • 400 InvalidLocation - An invalid location was specified.

  • 404 SubscriptionNotFound - The requested subscription was not found.

  • 404 ResourceNotFound - The requested resource was not found.

Examples

Get specific subscription usage in the given location.

Sample request

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

Sample response

{
  "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"
}

Definitions

Name Description
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

SubscriptionUsage

Usage Metric of a Subscription in a Location.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

SubscriptionUsage

Usage Metric of a Subscription in a Location.

Name Type Description
id

string

Resource ID.

name

string

Resource name.

properties.currentValue

number (double)

Current value of the metric.

properties.displayName

string

User-readable name of the metric.

properties.limit

number (double)

Boundary value of the metric.

properties.unit

string

Unit of the metric.

type

string

Resource type.