Metrics Batch - Batch
清單 多個資源的計量值。
POST {endpoint}/subscriptions/{subscriptionId}/metrics:getBatch?metricnamespace={metricnamespace}&metricnames={metricnames}&api-version=2023-10-01
POST {endpoint}/subscriptions/{subscriptionId}/metrics:getBatch?starttime={starttime}&endtime={endtime}&interval={interval}&metricnamespace={metricnamespace}&metricnames={metricnames}&aggregation={aggregation}&top={top}&orderby={orderby}&filter={filter}&rollupby={rollupby}&api-version=2023-10-01
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
endpoint
|
path | True |
string url |
要使用的區域端點,例如 https://eastus.metrics.monitor.azure.com。 區域應該符合所要求資源的區域。 針對全域資源,區域應該是「全域」。 |
subscription
|
path | True |
string uuid |
此批次中資源的訂用帳戶標識碼。 |
api-version
|
query | True |
string |
用戶端 API 版本。 |
metricnames
|
query | True |
string[] |
要擷取的計量名稱 (逗號分隔) 。 |
metricnamespace
|
query | True |
string |
包含所要求計量名稱的計量命名空間。 |
aggregation
|
query |
string |
要擷取的匯總類型清單 (逗號分隔) 。 範例:平均值、最小值、最大值 |
|
endtime
|
query |
string |
查詢的結束時間。 它是格式為 'yyyy-MM-ddTHH:mm:ss.fffZ' 的字串。 |
|
filter
|
query |
string |
篩選可用來減少傳回的計量數據集。 |
|
interval
|
query |
string |
間隔 (,也就是 ISO 8601 持續時間格式查詢的 timegrain) 。 預設為 PT1M。 'FULL' 值的特殊案例,會針對要求的整個時間範圍傳回單一數據點。 範例:PT15M、PT1H、P1D、FULL |
|
orderby
|
query |
string |
要用於排序結果和排序方向的匯總。 只能指定一個訂單。 範例:sum asc |
|
rollupby
|
query |
string |
要匯總結果的維度名稱 () 。 例如,如果您只想要查看具有 『City eq Seattle』 或 City eq Tacoma' 等篩選條件的計量值,但不想查看每個城市的不同值,您可以指定 'RollUpBy=City' 來查看西雅圖和 Tacoma 的結果匯總成一次。 |
|
starttime
|
query |
string |
查詢的開始時間。 它是格式為 'yyyy-MM-ddTHH:mm:ss.fffZ' 的字串。 如果您已指定 endtime 參數,則需要此參數。 如果只指定 starttime,則 endtime 預設為目前時間。 如果未指定時間間隔,則預設值為1小時。 |
|
top
|
query |
integer int32 |
要求中要擷取每個資源標識碼的記錄數目上限。 只有在指定篩選條件時才有效。 預設值為 10。 |
要求本文
名稱 | 類型 | Description |
---|---|---|
resourceids |
string[] |
要查詢計量的資源標識碼清單。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
計量查詢的回應。 |
|
Other Status Codes |
描述錯誤回應的格式。 標題 x-ms-error-code: string |
安全性
AADToken
Azure Active Directory OAuth2 驗證
類型:
oauth2
Flow:
application
權杖 URL:
https://login.microsoftonline.com/common/oauth2/v2.0/token
範圍
名稱 | Description |
---|---|
https://metrics.monitor.azure.com/.default | https://metrics.monitor.azure.com/.default |
範例
Query Redis Metrics summary |
Query Storage Metrics |
Query Redis Metrics summary
範例要求
POST {endpoint}/subscriptions/12345678-abcd-1234-abcd-123456789abc/metrics:getBatch?starttime=2023-11-07T14:00:00.000Z&endtime=2023-11-07T18:00:00.000Z&interval=FULL&metricnamespace=Microsoft.Cache/Redis&metricnames=cacheWrite&aggregation=average&top=10&orderby=average desc&filter=ShardId eq '0'&rollupby=ShardId&api-version=2023-10-01
{
"resourceids": [
"/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/test_redis/providers/Microsoft.Cache/Redis/redis5",
"/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/test_redis/providers/Microsoft.Cache/Redis/redis3",
"/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/test_redis/providers/Microsoft.Cache/Redis/redis2"
]
}
範例回覆
{
"values": [
{
"starttime": "2023-11-07T14:00:00Z",
"endtime": "2023-11-07T18:00:00Z",
"interval": "PT4H",
"value": [
{
"id": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/test_redis/providers/Microsoft.Cache/Redis/redis5/providers/Microsoft.Insights/metrics/cacheWrite",
"type": "Microsoft.Insights/metrics",
"name": {
"value": "cacheWrite",
"localizedValue": "Cache Write"
},
"displayDescription": "The amount of data written to the cache in bytes per second. For more details, see https://aka.ms/redis/metrics.",
"unit": "BytesPerSecond",
"timeseries": [
{
"metadatavalues": [],
"data": [
{
"timeStamp": "2023-11-07T14:00:00Z",
"average": 35513.760416666664
}
]
}
],
"errorCode": "Success"
}
],
"namespace": "microsoft.cache/redis",
"resourceregion": "westus2",
"resourceid": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/test_redis/providers/Microsoft.Cache/Redis/redis5"
},
{
"starttime": "2023-11-07T14:00:00Z",
"endtime": "2023-11-07T18:00:00Z",
"interval": "PT4H",
"value": [
{
"id": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/test_redis/providers/Microsoft.Cache/Redis/redis3/providers/Microsoft.Insights/metrics/cacheWrite",
"type": "Microsoft.Insights/metrics",
"name": {
"value": "cacheWrite",
"localizedValue": "Cache Write"
},
"displayDescription": "The amount of data written to the cache in bytes per second. For more details, see https://aka.ms/redis/metrics.",
"unit": "BytesPerSecond",
"timeseries": [
{
"metadatavalues": [],
"data": [
{
"timeStamp": "2023-11-07T14:00:00Z",
"average": 7135.0625
}
]
}
],
"errorCode": "Success"
}
],
"namespace": "microsoft.cache/redis",
"resourceregion": "westus2",
"resourceid": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/test_redis/providers/Microsoft.Cache/Redis/redis3"
},
{
"starttime": "2023-11-07T14:00:00Z",
"endtime": "2023-11-07T18:00:00Z",
"interval": "PT4H",
"value": [
{
"id": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/test_redis/providers/Microsoft.Cache/Redis/redis2/providers/Microsoft.Insights/metrics/cacheWrite",
"type": "Microsoft.Insights/metrics",
"name": {
"value": "cacheWrite",
"localizedValue": "Cache Write"
},
"displayDescription": "The amount of data written to the cache in bytes per second. For more details, see https://aka.ms/redis/metrics.",
"unit": "BytesPerSecond",
"timeseries": [
{
"metadatavalues": [],
"data": [
{
"timeStamp": "2023-11-07T14:00:00Z",
"average": 6723.489583333333
}
]
}
],
"errorCode": "Success"
}
],
"namespace": "microsoft.cache/redis",
"resourceregion": "westus2",
"resourceid": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/test_redis/providers/Microsoft.Cache/Redis/redis2"
}
]
}
x-ms-error-code: BadRequest
{
"error": {
"additionalInfo": [
{
"type": "string",
"info": "TraceId=dd033ebf1e260d815f4bccad149bbc15"
},
{
"type": "string",
"info": "ExceptionType=Microsoft.Online.Metrics.MetricsMP.Utilities.RPRequestFormatException"
}
],
"code": "BadRequest",
"message": "Detected invalid time range parameters for API version 2023-10-01. Please use only starttime and endtime to specify a time range."
}
}
Query Storage Metrics
範例要求
POST {endpoint}/subscriptions/12345678-abcd-1234-abcd-123456789abc/metrics:getBatch?starttime=2023-02-01T20:00:00.123Z&endtime=2023-02-01T23:00:00.345Z&interval=PT15M&metricnamespace=Microsoft.Storage/storageAccounts&metricnames=Ingress,Egress&aggregation=average,minimum,maximum&top=10&orderby=average desc&filter=ApiName eq 'GetBlob' or ApiName eq 'GetBlobServiceProperties' and Authentication eq '*'&api-version=2023-10-01
{
"resourceids": [
"/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/TestGroup/providers/Microsoft.Storage/storageAccounts/TestStorage1",
"/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/TestGroup/providers/Microsoft.Storage/storageAccounts/TestStorage2"
]
}
範例回覆
{
"values": [
{
"starttime": "2023-02-01T20:00:00.123Z",
"endtime": "2023-02-01T23:00:00.345Z",
"interval": "PT15M",
"value": [
{
"id": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/TestGroup/providers/Microsoft.Storage/storageAccounts/TestStorage1/providers/Microsoft.Insights/metrics/Ingress",
"type": "Microsoft.Insights/metrics",
"name": {
"value": "Ingress",
"localizedValue": "Ingress"
},
"displayDescription": "The amount of ingress data, in bytes. This number includes ingress from an external client into Azure Storage as well as ingress within Azure.",
"unit": "Bytes",
"timeseries": [
{
"metadatavalues": [
{
"name": {
"value": "apiname",
"localizedValue": "apiname"
},
"value": "GetBlob"
},
{
"name": {
"value": "authentication",
"localizedValue": "authentication"
},
"value": "SAS"
}
],
"data": [
{
"timeStamp": "2023-02-01T20:00:00Z",
"average": 437,
"minimum": 437,
"maximum": 437
},
{
"timeStamp": "2023-02-01T20:15:00Z",
"average": 438.0735294117647,
"minimum": 437,
"maximum": 583
},
{
"timeStamp": "2023-02-01T20:30:00Z",
"average": 437,
"minimum": 437,
"maximum": 437
},
{
"timeStamp": "2023-02-01T20:45:00Z",
"average": 437.54477611940297,
"minimum": 437,
"maximum": 583
},
{
"timeStamp": "2023-02-01T21:00:00Z",
"average": 437,
"minimum": 437,
"maximum": 437
},
{
"timeStamp": "2023-02-01T21:15:00Z",
"average": 438.0735294117647,
"minimum": 437,
"maximum": 583
},
{
"timeStamp": "2023-02-01T21:30:00Z",
"average": 437,
"minimum": 437,
"maximum": 437
},
{
"timeStamp": "2023-02-01T21:45:00Z",
"average": 437.54477611940297,
"minimum": 437,
"maximum": 583
},
{
"timeStamp": "2023-02-01T22:00:00Z",
"average": 437,
"minimum": 437,
"maximum": 437
},
{
"timeStamp": "2023-02-01T22:15:00Z",
"average": 438.0735294117647,
"minimum": 437,
"maximum": 583
},
{
"timeStamp": "2023-02-01T22:30:00Z",
"average": 437,
"minimum": 437,
"maximum": 437
},
{
"timeStamp": "2023-02-01T22:45:00Z",
"average": 437.542750929368,
"minimum": 437,
"maximum": 583
}
]
},
{
"metadatavalues": [
{
"name": {
"value": "apiname",
"localizedValue": "apiname"
},
"value": "GetBlobServiceProperties"
},
{
"name": {
"value": "authentication",
"localizedValue": "authentication"
},
"value": "AccountKey"
}
],
"data": [
{
"timeStamp": "2023-02-01T20:00:00Z"
},
{
"timeStamp": "2023-02-01T20:15:00Z"
},
{
"timeStamp": "2023-02-01T20:30:00Z"
},
{
"timeStamp": "2023-02-01T20:45:00Z"
},
{
"timeStamp": "2023-02-01T21:00:00Z"
},
{
"timeStamp": "2023-02-01T21:15:00Z"
},
{
"timeStamp": "2023-02-01T21:30:00Z"
},
{
"timeStamp": "2023-02-01T21:45:00Z"
},
{
"timeStamp": "2023-02-01T22:00:00Z",
"average": 342,
"minimum": 342,
"maximum": 342
},
{
"timeStamp": "2023-02-01T22:15:00Z"
},
{
"timeStamp": "2023-02-01T22:30:00Z"
},
{
"timeStamp": "2023-02-01T22:45:00Z"
}
]
}
],
"errorCode": "Success"
},
{
"id": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/TestGroup/providers/Microsoft.Storage/storageAccounts/TestStorage1/providers/Microsoft.Insights/metrics/Egress",
"type": "Microsoft.Insights/metrics",
"name": {
"value": "Egress",
"localizedValue": "Egress"
},
"displayDescription": "The amount of egress data. This number includes egress to external client from Azure Storage as well as egress within Azure. As a result, this number does not reflect billable egress.",
"unit": "Bytes",
"timeseries": [
{
"metadatavalues": [
{
"name": {
"value": "apiname",
"localizedValue": "apiname"
},
"value": "GetBlobServiceProperties"
},
{
"name": {
"value": "authentication",
"localizedValue": "authentication"
},
"value": "AccountKey"
}
],
"data": [
{
"timeStamp": "2023-02-01T20:00:00Z"
},
{
"timeStamp": "2023-02-01T20:15:00Z"
},
{
"timeStamp": "2023-02-01T20:30:00Z"
},
{
"timeStamp": "2023-02-01T20:45:00Z"
},
{
"timeStamp": "2023-02-01T21:00:00Z"
},
{
"timeStamp": "2023-02-01T21:15:00Z"
},
{
"timeStamp": "2023-02-01T21:30:00Z"
},
{
"timeStamp": "2023-02-01T21:45:00Z"
},
{
"timeStamp": "2023-02-01T22:00:00Z",
"average": 796,
"minimum": 796,
"maximum": 796
},
{
"timeStamp": "2023-02-01T22:15:00Z"
},
{
"timeStamp": "2023-02-01T22:30:00Z"
},
{
"timeStamp": "2023-02-01T22:45:00Z"
}
]
},
{
"metadatavalues": [
{
"name": {
"value": "apiname",
"localizedValue": "apiname"
},
"value": "GetBlob"
},
{
"name": {
"value": "authentication",
"localizedValue": "authentication"
},
"value": "SAS"
}
],
"data": [
{
"timeStamp": "2023-02-01T20:00:00Z",
"average": 361,
"minimum": 361,
"maximum": 361
},
{
"timeStamp": "2023-02-01T20:15:00Z",
"average": 365.83088235294116,
"minimum": 361,
"maximum": 1018
},
{
"timeStamp": "2023-02-01T20:30:00Z",
"average": 361,
"minimum": 361,
"maximum": 361
},
{
"timeStamp": "2023-02-01T20:45:00Z",
"average": 363.4514925373134,
"minimum": 361,
"maximum": 1018
},
{
"timeStamp": "2023-02-01T21:00:00Z",
"average": 361,
"minimum": 361,
"maximum": 361
},
{
"timeStamp": "2023-02-01T21:15:00Z",
"average": 365.83088235294116,
"minimum": 361,
"maximum": 1018
},
{
"timeStamp": "2023-02-01T21:30:00Z",
"average": 361,
"minimum": 361,
"maximum": 361
},
{
"timeStamp": "2023-02-01T21:45:00Z",
"average": 363.4514925373134,
"minimum": 361,
"maximum": 1018
},
{
"timeStamp": "2023-02-01T22:00:00Z",
"average": 361,
"minimum": 361,
"maximum": 361
},
{
"timeStamp": "2023-02-01T22:15:00Z",
"average": 365.83088235294116,
"minimum": 361,
"maximum": 1018
},
{
"timeStamp": "2023-02-01T22:30:00Z",
"average": 361,
"minimum": 361,
"maximum": 361
},
{
"timeStamp": "2023-02-01T22:45:00Z",
"average": 363.4423791821561,
"minimum": 361,
"maximum": 1018
}
]
}
],
"errorCode": "Success"
}
],
"namespace": "microsoft.storage/storageaccounts",
"resourceregion": "eastus",
"resourceid": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/TestGroup/providers/Microsoft.Storage/storageAccounts/TestStorage1"
},
{
"starttime": "2023-02-01T20:00:00.123Z",
"endtime": "2023-02-01T23:00:00.345Z",
"interval": "PT15M",
"value": [
{
"id": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/TestGroup/providers/Microsoft.Storage/storageAccounts/TestStorage2/providers/Microsoft.Insights/metrics/Ingress",
"type": "Microsoft.Insights/metrics",
"name": {
"value": "Ingress",
"localizedValue": "Ingress"
},
"displayDescription": "The amount of ingress data, in bytes. This number includes ingress from an external client into Azure Storage as well as ingress within Azure.",
"unit": "Bytes",
"timeseries": [
{
"metadatavalues": [
{
"name": {
"value": "apiname",
"localizedValue": "apiname"
},
"value": "GetBlobServiceProperties"
},
{
"name": {
"value": "authentication",
"localizedValue": "authentication"
},
"value": "AccountKey"
}
],
"data": [
{
"timeStamp": "2023-02-01T20:00:00Z"
},
{
"timeStamp": "2023-02-01T20:15:00Z"
},
{
"timeStamp": "2023-02-01T20:30:00Z"
},
{
"timeStamp": "2023-02-01T20:45:00Z"
},
{
"timeStamp": "2023-02-01T21:00:00Z"
},
{
"timeStamp": "2023-02-01T21:15:00Z"
},
{
"timeStamp": "2023-02-01T21:30:00Z"
},
{
"timeStamp": "2023-02-01T21:45:00Z"
},
{
"timeStamp": "2023-02-01T22:00:00Z",
"average": 330,
"minimum": 330,
"maximum": 330
},
{
"timeStamp": "2023-02-01T22:15:00Z"
},
{
"timeStamp": "2023-02-01T22:30:00Z"
},
{
"timeStamp": "2023-02-01T22:45:00Z"
}
]
}
],
"errorCode": "Success"
},
{
"id": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/TestGroup/providers/Microsoft.Storage/storageAccounts/TestStorage2/providers/Microsoft.Insights/metrics/Egress",
"type": "Microsoft.Insights/metrics",
"name": {
"value": "Egress",
"localizedValue": "Egress"
},
"displayDescription": "The amount of egress data. This number includes egress to external client from Azure Storage as well as egress within Azure. As a result, this number does not reflect billable egress.",
"unit": "Bytes",
"timeseries": [
{
"metadatavalues": [
{
"name": {
"value": "apiname",
"localizedValue": "apiname"
},
"value": "GetBlobServiceProperties"
},
{
"name": {
"value": "authentication",
"localizedValue": "authentication"
},
"value": "AccountKey"
}
],
"data": [
{
"timeStamp": "2023-02-01T20:00:00Z"
},
{
"timeStamp": "2023-02-01T20:15:00Z"
},
{
"timeStamp": "2023-02-01T20:30:00Z"
},
{
"timeStamp": "2023-02-01T20:45:00Z"
},
{
"timeStamp": "2023-02-01T21:00:00Z"
},
{
"timeStamp": "2023-02-01T21:15:00Z"
},
{
"timeStamp": "2023-02-01T21:30:00Z"
},
{
"timeStamp": "2023-02-01T21:45:00Z"
},
{
"timeStamp": "2023-02-01T22:00:00Z",
"average": 880,
"minimum": 880,
"maximum": 880
},
{
"timeStamp": "2023-02-01T22:15:00Z"
},
{
"timeStamp": "2023-02-01T22:30:00Z"
},
{
"timeStamp": "2023-02-01T22:45:00Z"
}
]
}
],
"errorCode": "Success"
}
],
"namespace": "microsoft.storage/storageaccounts",
"resourceregion": "eastus",
"resourceid": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/TestGroup/providers/Microsoft.Storage/storageAccounts/TestStorage2"
}
]
}
x-ms-error-code: BadRequest
{
"error": {
"additionalInfo": [
{
"type": "string",
"info": "TraceId={00000000-0000-0000-0000-000000000000}"
},
{
"type": "string",
"info": "ExceptionType=Microsoft.Online.Metrics.MetricsMP.Utilities.RPRequestFormatException"
}
],
"code": "BadRequest",
"message": "Query endTime: 06/06/2021 00:00:00 is out of the Max metrics retention period: 93.00:00:00, traceId: {00000000-0000-0000-0000-000000000000}"
}
}
定義
名稱 | Description |
---|---|
Error |
資源管理錯誤其他資訊。 |
Error |
錯誤詳細數據。 |
Error |
錯誤回應 |
Localizable |
可本地化的字串類別。 |
Metadata |
表示計量元數據值。 |
Metric |
查詢的結果數據。 |
Metric |
資源的計量結果。 |
Metric |
計量的單位。 |
Metric |
表示計量值。 |
Resource |
要查詢計量的資源標識碼逗號分隔清單。 |
Time |
時間序列結果類型。 在此案例中,辨別子值一律為 TimeSeries。 |
Values |
每個資源的計量數據回應集合,每個計量。 |
ErrorAdditionalInfo
資源管理錯誤其他資訊。
名稱 | 類型 | Description |
---|---|---|
info |
object |
其他資訊。 |
type |
string |
其他信息類型。 |
ErrorDetail
錯誤詳細數據。
名稱 | 類型 | Description |
---|---|---|
additionalInfo |
錯誤其他資訊。 |
|
code |
string |
錯誤碼。 |
details |
錯誤詳細資料。 |
|
message |
string |
錯誤訊息。 |
target |
string |
錯誤目標。 |
ErrorResponse
錯誤回應
名稱 | 類型 | Description |
---|---|---|
error |
error 物件。 |
LocalizableString
可本地化的字串類別。
名稱 | 類型 | Description |
---|---|---|
localizedValue |
string |
顯示名稱。 |
value |
string |
不變異值。 |
MetadataValue
表示計量元數據值。
名稱 | 類型 | Description |
---|---|---|
name |
中繼資料名稱。 |
|
value |
string |
中繼資料的值。 |
Metric
查詢的結果數據。
名稱 | 類型 | Description |
---|---|---|
displayDescription |
string |
此計量的詳細描述。 |
errorCode |
string |
「成功」或此計量查詢失敗的錯誤詳細數據。 |
errorMessage |
string |
查詢此特定計量時發生錯誤訊息。 |
id |
string |
計量標識碼。 |
name |
計量的名稱和顯示名稱,也就是可本地化的字串。 |
|
timeseries |
執行資料查詢時傳回的時間序列。 |
|
type |
string |
計量資源的資源類型。 |
unit |
計量的單位。 |
MetricResultsResponse
資源的計量結果。
名稱 | 類型 | Description |
---|---|---|
values |
Values[] |
每個資源的計量數據回應集合,每個計量。 |
MetricUnit
計量的單位。
名稱 | 類型 | Description |
---|---|---|
BitsPerSecond |
string |
每秒二進位數位的速率單位。 |
ByteSeconds |
string |
數據傳輸或記憶體單位。 這是以位元組為單位的數據大小乘以傳輸或儲存數據所花費的時間。 |
Bytes |
string |
以位元組為單位的記憶體單位。 |
BytesPerSecond |
string |
每秒以位元組為單位的記憶體速率單位。 |
Cores |
string |
處理能力單位。 |
Count |
string |
原始數量單位。 |
CountPerSecond |
string |
每秒原始數量的速率單位。 |
MilliCores |
string |
CPU 核心 1/1000 的處理能力單位。 |
MilliSeconds |
string |
每秒 1/1000 秒的時間單位。 |
NanoCores |
string |
以 10 億個 CPU 核心為單位的處理能力單位。 |
Percent |
string |
百分比單位。 |
Seconds |
string |
以秒為單位的時間單位。 |
Unspecified |
string |
沒有指定的單位。 |
MetricValue
表示計量值。
名稱 | 類型 | Description |
---|---|---|
average |
number |
時間範圍內的平均值。 |
count |
number |
時間範圍內的樣本數目。 可用來判斷參與平均值的值數目。 |
maximum |
number |
時間範圍中的最大值。 |
minimum |
number |
時間範圍中的最小值。 |
timeStamp |
string |
ISO 8601 格式計量值的時間戳。 |
total |
number |
時間範圍內所有值的總和。 |
ResourceIdList
要查詢計量的資源標識碼逗號分隔清單。
名稱 | 類型 | Description |
---|---|---|
resourceids |
string[] |
要查詢計量的資源標識碼清單。 |
TimeSeriesElement
時間序列結果類型。 在此案例中,辨別子值一律為 TimeSeries。
名稱 | 類型 | Description |
---|---|---|
data |
代表計量值的數據點陣列。 只有在指定了數據的結果類型時,才會傳回這個值。 |
|
metadatavalues |
如果在呼叫中指定了$filter,則傳回的元數據值。 |
Values
每個資源的計量數據回應集合,每個計量。
名稱 | 類型 | Description |
---|---|---|
endtime |
string |
以日期時間格式擷取資料的結束時間。 |
interval |
string |
間隔 (視窗大小) ,計量數據是以 ISO 8601 持續時間格式傳回,其特殊案例為 『FULL』 值,此值會針對要求的整個時間範圍傳回單一數據點 (範例:PT15M、PT1H、P1D、FULL) 。 如果指定 AutoAdjustTimegrain=true,可能會調整和原本要求的內容不同。 |
namespace |
string |
已查詢計量的命名空間 |
resourceid |
string |
已查詢計量的資源。 |
resourceregion |
string |
已查詢資源的計量區域。 |
starttime |
string |
以日期時間格式擷取資料的開始時間。 |
value |
Metric[] |
集合的值。 |