此方法的文档都可以找到here天青流利的API - AppServicePlanOperations.ListMetricsWithHttpMessagesAsync返回InternalServerError
这里是我的代码:
var appServiceManager = AppServiceManager.Authenticate(credentials, subscriptionId);
var filter = "(name.value eq 'CpuPercentage') and startTime eq '2017-10-06T08:00:00Z' and endTime eq '2017-10-06T09:00:00Z' and timeGrain eq duration'PT1H'";
var metrics = appServiceManager.AppServicePlans.Inner.ListMetricsWithHttpMessagesAsync("myResourceGroupName", "myAppServicePlanName", false, filter).Result;
这是唯一的详细的异常,我得到:
发生一处或多处错误。 (操作返回无效状态码“InternalServerError”)---> Microsoft.Rest.Azure.CloudException:操作返回了无效的状态代码“InternalServerError”
文档说filter
是可选的,它不是(如果我通过null
,我会收到BadRequest)。我现在提供一个,现在它会引发内部服务器错误。
我在azure-sdk-for-net
回购协议中开了一个问题,但我希望别人能看到我在我的filter
字符串中是否犯了错误。
感谢汤姆抽空回复的时间。我打算玩弄你的发现,如果它满足我的需求,我会接受你的答案 – AMoghrabi