【发布时间】:2021-02-02 17:15:13
【问题描述】:
使用 Microsoft.Azure.Management.Monitor 的预览包,我试图将 ActivityLogs 从 Azure 获取到 .NET 应用程序中,但我不确定要输入什么作为“odataquery”。
var serviceCreds = await ApplicationTokenProvider.LoginSilentAsync(tenantId, clientId, secret);
var monitorClient = new MonitorManagementClient(serviceCreds);
monitorClient.SubscriptionId = subscriptionId;
var odataquery = "";
var activityLogs = await monitorClient.ActivityLogs.ListAsync(odataQuery: odataquery, cancellationToken: CancellationToken.None);
我应该在 odataQuery 变量中插入什么,以及我从 Azure 中的何处获取此 odataQuery? Azure 有很多很棒的地方,但没有这方面的文档
【问题讨论】:
标签: c# .net azure azure-monitoring