你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Database Accounts - List Usages
检索给定数据库帐户 (最新数据) 的使用情况。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/usages?api-version=2023-11-15
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/usages?api-version=2023-11-15&$filter={$filter}
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
account
|
path | True |
string |
Cosmos DB 数据库帐户名称。 Regex pattern: |
resource
|
path | True |
string |
资源组的名称。 此名称不区分大小写。 |
subscription
|
path | True |
string |
目标订阅的 ID。 |
api-version
|
query | True |
string |
要用于此操作的 API 版本。 |
$filter
|
query |
string |
描述要返回的一部分用法的 OData 筛选器表达式。 支持的参数为 name.value (指标的名称,可以具有) 多个名称的 或 。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
已成功检索数据库帐户的用法。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
CosmosDBDatabaseAccountGetUsages
Sample Request
GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/usages?api-version=2023-11-15&$filter=$filter=name.value eq 'Storage'
Sample Response
{
"value": [
{
"unit": "Bytes",
"quotaPeriod": "P1D",
"limit": 10737418240,
"currentValue": 0,
"name": {
"value": "Storage",
"localizedValue": "Storage"
}
}
]
}
定义
名称 | 说明 |
---|---|
Metric |
指标名称。 |
Unit |
指标的单位。 |
Usage |
使用情况请求的使用情况数据。 |
Usages |
对列表使用情况请求的响应。 |
MetricName
指标名称。
名称 | 类型 | 说明 |
---|---|---|
localizedValue |
string |
指标的友好名称。 |
value |
string |
指标的名称。 |
UnitType
指标的单位。
名称 | 类型 | 说明 |
---|---|---|
Bytes |
string |
|
BytesPerSecond |
string |
|
Count |
string |
|
CountPerSecond |
string |
|
Milliseconds |
string |
|
Percent |
string |
|
Seconds |
string |
Usage
使用情况请求的使用情况数据。
名称 | 类型 | 说明 |
---|---|---|
currentValue |
integer |
此指标的当前值 |
limit |
integer |
此指标的最大值 |
name |
指标的名称信息。 |
|
quotaPeriod |
string |
用于汇总使用值的配额期。 |
unit |
指标的单位。 |
UsagesResult
对列表使用情况请求的响应。
名称 | 类型 | 说明 |
---|---|---|
value |
Usage[] |
数据库的用法列表。 使用情况是时间点指标 |