Compartir a través de


Usages - List

Get usages for the requested subscription

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/usages?api-version=2024-10-01
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/usages?api-version=2024-10-01&$filter={$filter}

URI Parameters

Name In Required Type Description
location
path True

string

Resource location.

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

$filter
query

string

An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names).

Responses

Name Type Description
200 OK

UsageListResult

OK.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Examples

Get Usages

Sample request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CognitiveServices/locations/WestUS/usages?api-version=2024-10-01

Sample response

{
  "value": [
    {
      "name": {
        "value": "AccountCount",
        "localizedValue": "Cognitive Services total account limit"
      },
      "currentValue": 3,
      "limit": 200,
      "unit": "Count"
    }
  ]
}

Definitions

Name Description
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

MetricName

A metric name.

QuotaUsageStatus

Cognitive Services account quota usage status.

UnitType

The unit of the metric.

Usage

The usage data for a usage request.

UsageListResult

The response to a list usage request.

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.

MetricName

A metric name.

Name Type Description
localizedValue

string

The friendly name of the metric.

value

string

The name of the metric.

QuotaUsageStatus

Cognitive Services account quota usage status.

Name Type Description
Blocked

string

InOverage

string

Included

string

Unknown

string

UnitType

The unit of the metric.

Name Type Description
Bytes

string

BytesPerSecond

string

Count

string

CountPerSecond

string

Milliseconds

string

Percent

string

Seconds

string

Usage

The usage data for a usage request.

Name Type Description
currentValue

number

Current value for this metric.

limit

number

Maximum value for this metric.

name

MetricName

The name information for the metric.

nextResetTime

string

Next reset time for current quota.

quotaPeriod

string

The quota period used to summarize the usage values.

status

QuotaUsageStatus

Cognitive Services account quota usage status.

unit

UnitType

The unit of the metric.

UsageListResult

The response to a list usage request.

Name Type Description
nextLink

string

The link used to get the next page of Usages.

value

Usage[]

The list of usages for Cognitive Service account.