[英]Azure Rest API to fetch RU Metrics of Cosmos DB account
我正在嘗試使用 Azure 監視器 Z50780F47F6839D403D60BC45 以編程方式在點網應用程序中獲取 azure cosmos DB 的規范化 RU(請求單位)度量標准,但無法繼續執行 APIFZ 55EE0。
我從官方文檔中找到了這個 API 但不確定要提供哪些參數才能獲得所需的結果。
誰能指出我正確的方向(任何視頻/博客/文檔)?
We can use .NET Cosmos DB SDK with the DocumentClient class, or using existing MongoDB SDKs or just leveraging the Azure Cosmos DB REST API directly - all of them provide the opportunity to receive the consumed Request Units:
// https://docs.microsoft.com/en-us/azure/cosmos-db/performance-tips#throughput
var client = new DocumentClient(new Uri(accountEndpoint), accountKey);
ResourceResponse<Document> response = await client.CreateDocumentAsync(collectionSelfLink, myDocument);
var requestCharge = response.RequestCharge;
請參閱此Github 鏈接以計算 Azure Cosmos DB 中的請求單位。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.