你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Subscription Usages - List By Location

获取给定位置中的所有订阅使用情况指标。

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

URI 参数

名称 必需 类型 说明
locationName
path True

string

资源所在的区域的名称。

subscriptionId
path True

string

用于标识 Azure 订阅的订阅 ID。

api-version
query True

string

要用于请求的 API 版本。

响应

名称 类型 说明
200 OK

SubscriptionUsageListResult

已成功检索订阅位置使用情况。

Other Status Codes

错误响应:***

  • 400 InvalidLocation - 指定了无效的位置。

  • 404 SubscriptionNotFound - 找不到请求的订阅。

示例

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

定义

名称 说明
SubscriptionUsage

位置中订阅的使用情况指标。

SubscriptionUsageListResult

某个位置中的订阅使用情况指标列表。

SubscriptionUsage

位置中订阅的使用情况指标。

名称 类型 说明
id

string

资源 ID。

name

string

资源名称。

properties.currentValue

number

指标的当前值。

properties.displayName

string

指标的用户可读名称。

properties.limit

number

指标的边界值。

properties.unit

string

指标的单位。

type

string

资源类型。

SubscriptionUsageListResult

某个位置中的订阅使用情况指标列表。

名称 类型 说明
nextLink

string

用于检索下一页结果的链接。

value

SubscriptionUsage[]

结果数组。