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

Usage - List

Gets, for the specified location, the current compute resource usage information as well as the limits for compute resources under the subscription.

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages?api-version=2024-07-01

URI Parameters

Name In Required Type Description
location
path True

string

The location for which resource usage is queried.

Regex pattern: ^[-\w\._]+$

subscriptionId
path True

string

Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True

string

Client Api Version.

Responses

Name Type Description
200 OK

ListUsagesResult

OK

Other Status Codes

CloudError

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Usage_List_MaximumSet_Gen
Usage_List_MinimumSet_Gen

Usage_List_MaximumSet_Gen

Sample request

GET https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/4_./usages?api-version=2024-07-01

Sample response

{
  "value": [
    {
      "unit": "Count",
      "currentValue": 17,
      "limit": 19,
      "name": {
        "value": "aaaaaaaaaaaaaaaaaa",
        "localizedValue": "aaaaaaaaaaaaaa"
      }
    }
  ],
  "nextLink": "aaaaaaaaaaaaaaaaaaaaaaaaaaa"
}

Usage_List_MinimumSet_Gen

Sample request

GET https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/_--/usages?api-version=2024-07-01

Sample response

{
  "value": [
    {
      "unit": "Count",
      "currentValue": 17,
      "limit": 19,
      "name": {}
    }
  ]
}

Definitions

Name Description
ApiError

Api error.

ApiErrorBase

Api error base.

CloudError

An error response from the Compute service.

InnerError

Inner error details.

ListUsagesResult

The List Usages operation response.

Usage

Describes Compute Resource Usage.

UsageName

The Usage Names.

UsageUnit

An enum describing the unit of usage measurement.

ApiError

Api error.

Name Type Description
code

string

The error code.

details

ApiErrorBase[]

The Api error details

innererror

InnerError

The Api inner error

message

string

The error message.

target

string

The target of the particular error.

ApiErrorBase

Api error base.

Name Type Description
code

string

The error code.

message

string

The error message.

target

string

The target of the particular error.

CloudError

An error response from the Compute service.

Name Type Description
error

ApiError

Api error.

InnerError

Inner error details.

Name Type Description
errordetail

string

The internal error message or exception dump.

exceptiontype

string

The exception type.

ListUsagesResult

The List Usages operation response.

Name Type Description
nextLink

string

The URI to fetch the next page of compute resource usage information. Call ListNext() with this to fetch the next page of compute resource usage information.

value

Usage[]

The list of compute resource usages.

Usage

Describes Compute Resource Usage.

Name Type Description
currentValue

integer

The current usage of the resource.

limit

integer

The maximum permitted usage of the resource.

name

UsageName

The name of the type of usage.

unit

UsageUnit

An enum describing the unit of usage measurement.

UsageName

The Usage Names.

Name Type Description
localizedValue

string

The localized name of the resource.

value

string

The name of the resource.

UsageUnit

An enum describing the unit of usage measurement.

Name Type Description
Count

string