命名空间:microsoft.graph
重要
Microsoft Graph /beta
版本下的 API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。
获取云电脑的故障排除报告。 可以获取区域故障排除报告、包含故障排除详细信息的报告、包含故障排除趋势的报告或有关故障排除问题数量的报告。
此 API 可用于以下国家级云部署。
全局服务 |
美国政府 L4 |
美国政府 L5 (DOD) |
由世纪互联运营的中国 |
✅ |
❌ |
❌ |
❌ |
权限
为此 API 选择标记为最低特权的权限。
只有在应用需要它时,才使用更高的特权权限。 有关委派权限和应用程序权限的详细信息,请参阅权限类型。 要了解有关这些权限的详细信息,请参阅 权限参考。
权限类型 |
最低特权权限 |
更高特权权限 |
委派(工作或学校帐户) |
CloudPC.ReadWrite.All |
不可用。 |
委派(个人 Microsoft 帐户) |
不支持。 |
不支持。 |
应用程序 |
CloudPC.ReadWrite.All |
不可用。 |
HTTP 请求
POST /deviceManagement/virtualEndpoint/reports/retrieveCloudPcTroubleshootReports
名称 |
说明 |
Authorization |
持有者 {token}。 必填。 详细了解 身份验证和授权。 |
Content-Type |
application/json. 必需。 |
请求正文
在请求正文中,提供参数的 JSON 表示形式。
下表列出了可用于此作的参数。
参数 |
类型 |
说明 |
filter |
String |
OData $filter 语法。 支持的筛选器包括: and 、 or 、 gt 、ge 和 eq 。 可选。 |
groupBy |
字符串集合 |
描述如何对报表中的数据进行分组的列列表。 可选。 |
orderBy |
字符串集合 |
按列名称指定顺序。 可选。 |
reportName |
cloudPCTroubleshootReportType |
报表名称。 可能的值包括 troubleshootDetailsReport 、troubleshootTrendCountReport 、troubleshootRegionalReport 、unknownFutureValue 、troubleshootIssueCountReport 。 使用 Prefer: include-unknown-enum-members 请求标头获取此 可演变枚举中的以下值: troubleshootIssueCountReport 。 默认值为 troubleshootDetailsReport 。 |
search |
String |
搜索字符串。 可选。 |
select |
字符串集合 |
OData $select 语法。 报表的选定列。 可选。 |
skip |
Int32 |
要跳过的记录数。 可选。 |
top |
Int32 |
要返回的排名靠前的记录数。 如果未指定,则默认限制为 25,最大值为 100。 可选。 |
响应
如果成功,此作将在200 OK
响应正文中返回响应代码和Stream。
下表描述了在 API 调用中为 reportName 属性指定troubleshootRegionalReport
时返回的报表中的列。
成员 |
说明 |
AvgBandwidthInMbps |
特定 HostRegion -GatewayRegion 对的平均可用带宽(以 Mbps 为单位)。 |
AvgRoundTripTimeInMs |
特定 HostRegion -GatewayRegion 对的平均往返时间(以毫秒为单位)。 |
BandwidthIssueCount |
具有可用带宽问题的云电脑实例数。 |
BandwidthStabilityIssueCount |
具有带宽稳定性问题的云电脑实例数。 |
ConnectErrorIssueCount |
出现连接错误问题的云电脑实例数。 |
ConnectionErrorCount |
特定 HostRegion -GatewayRegion 对中的连接错误数。 |
ConnectionQualityIssueCount |
具有连接质量问题的云电脑实例数。 |
GatewayRegion |
网关所在的区域。 |
HostRegion |
云电脑预配所在的区域。 |
RTTIssueCount |
具有往返时间问题的云电脑实例数。 |
RTTStabilityIssueCount |
具有往返时间稳定性问题的云电脑实例数。 |
StabilityIssueCount |
具有稳定性问题的云电脑实例数。 |
下表描述了在 API 调用中为 reportName 属性指定troubleshootDetailsReport
时返回的报表中的列。
成员 |
说明 |
AvailableBandwidthInMbpsAvg |
平均可用带宽(以 Mbps 为单位)。 |
ConnectionErrorCount |
连接错误数。 |
CurrentCPU |
资源的当前 CPU 使用率。 |
CurrentDiskInGB |
当前磁盘使用情况(以 GB 为单位)。 |
CurrentRamInGB |
当前 RAM 使用情况(以 GB 为单位)。 |
CurrentSize |
资源的当前大小。 |
HasNetworkIssue |
指示网络问题。 |
HasPerformanceIssue |
指示性能问题。 |
HasReliabilityIssue |
指示可靠性问题。 |
ProvisionPolicyName |
预配策略的名称。 |
RecommendedRamInGB |
建议的 RAM 使用率(以 GB 为单位)。 |
建议的CPU |
资源的建议 CPU 使用率。 |
RecommendedDiskInGB |
建议的磁盘使用量(以 GB 为单位)。 |
RecommendedSize |
资源的建议大小。 |
RoundTripTimeInMsAvg |
平均往返时间(以毫秒为单位)。 |
UsageInsight |
有关资源的当前使用情况的见解。 |
下表描述了在 API 调用中为 reportName 属性指定troubleshootTrendCountReport
时返回的报表中的列。
成员 |
说明 |
CpuIssueCloudPcCount |
有 CPU 问题的云电脑实例数。 |
CpuIssueTrend |
每周有 CPU 问题的云电脑实例数的趋势。 |
ConnectionQualityIssueCloudPcCount |
具有连接质量问题的云电脑实例数。 |
ConnectionQualityIssueTrend |
具有连接质量问题的云电脑实例的每周数量趋势。 |
MemoryIssueCloudPcCount |
具有内存问题的云电脑实例数。 |
MemoryIssueTrend |
每周有内存问题的云电脑实例数的趋势。 |
NetworkIssueCount |
网络问题的数量。 |
PerformanceIssueCount |
性能问题的数量。 |
ReliabilityIssueCount |
可靠性问题的数目。 |
RTTIssueCloudPcCount |
具有往返时间问题的云电脑实例数。 |
RTTIssueTrend |
每周有往返时间问题的云电脑实例数的趋势。 |
StabilityIssueCloudPcCount |
具有稳定性问题的云电脑实例数。 |
StabilityIssueTrend |
具有稳定性问题的云电脑实例的每周数量趋势。 |
TotalImpactedCloudPcCount |
受影响的云电脑的总计数。 |
下表描述了在 API 调用中为 reportName 属性指定troubleshootIssueCountReport
时返回的报表中的列。
成员 |
说明 |
AsofDate |
记录数据的日期和时间。 |
ConnectionQualityIssueCount |
连接质量问题的数量。 |
CpuIssueCount |
CPU 问题数。 |
MemoryIssueCount |
内存问题的数目。 |
NetworkIssueCount |
网络问题的数量。 |
PerformanceIssueCount |
性能问题的数量。 |
ReliabilityIssueCount |
可靠性问题的数目。 |
RTTIssueCount |
往返时间问题的数目。 |
StabilityIssueCount |
稳定性问题的数目。 |
示例
请求
以下示例显示了一个请求。
POST https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/reports/retrieveCloudPcTroubleshootReports
Content-Type: application/json
{
"reportName": "troubleshootDetailsReport",
"select": [
"CloudPcId",
"ManagedDeviceName",
"UserPrincipalName",
"UsageInsight",
"CurrentSize",
"CurrentCPU",
"CurrentRamInGB",
"CurrentDiskInGB",
"RecommendedSize",
"RecommendedCPU",
"RecommendedRamInGB",
"RecommendedDiskInGB",
"ProvisionPolicyName",
"RoundTripTimeInMsAvg",
"AvailableBandwidthInMbpsAvg"
],
"search": "",
"skip": 0,
"top": 50
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveCloudPcTroubleshootReports;
using Microsoft.Graph.Beta.Models;
var requestBody = new RetrieveCloudPcTroubleshootReportsPostRequestBody
{
ReportName = CloudPCTroubleshootReportType.TroubleshootDetailsReport,
Select = new List<string>
{
"CloudPcId",
"ManagedDeviceName",
"UserPrincipalName",
"UsageInsight",
"CurrentSize",
"CurrentCPU",
"CurrentRamInGB",
"CurrentDiskInGB",
"RecommendedSize",
"RecommendedCPU",
"RecommendedRamInGB",
"RecommendedDiskInGB",
"ProvisionPolicyName",
"RoundTripTimeInMsAvg",
"AvailableBandwidthInMbpsAvg",
},
Search = "",
Skip = 0,
Top = 50,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.DeviceManagement.VirtualEndpoint.Reports.RetrieveCloudPcTroubleshootReports.PostAsync(requestBody);
mgc-beta device-management virtual-endpoint reports retrieve-cloud-pc-troubleshoot-reports post --body '{\
"reportName": "troubleshootDetailsReport",\
"select": [\
"CloudPcId",\
"ManagedDeviceName",\
"UserPrincipalName",\
"UsageInsight",\
"CurrentSize",\
"CurrentCPU",\
"CurrentRamInGB",\
"CurrentDiskInGB",\
"RecommendedSize",\
"RecommendedCPU",\
"RecommendedRamInGB",\
"RecommendedDiskInGB",\
"ProvisionPolicyName",\
"RoundTripTimeInMsAvg",\
"AvailableBandwidthInMbpsAvg"\
],\
"search": "",\
"skip": 0,\
"top": 50\
}\
'
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphdevicemanagement "github.com/microsoftgraph/msgraph-beta-sdk-go/devicemanagement"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphdevicemanagement.NewRetrieveCloudPcTroubleshootReportsPostRequestBody()
reportName := graphmodels.TROUBLESHOOTDETAILSREPORT_CLOUDPCTROUBLESHOOTREPORTTYPE
requestBody.SetReportName(&reportName)
select := []string {
"CloudPcId",
"ManagedDeviceName",
"UserPrincipalName",
"UsageInsight",
"CurrentSize",
"CurrentCPU",
"CurrentRamInGB",
"CurrentDiskInGB",
"RecommendedSize",
"RecommendedCPU",
"RecommendedRamInGB",
"RecommendedDiskInGB",
"ProvisionPolicyName",
"RoundTripTimeInMsAvg",
"AvailableBandwidthInMbpsAvg",
}
requestBody.SetSelect(select)
search := ""
requestBody.SetSearch(&search)
skip := int32(0)
requestBody.SetSkip(&skip)
top := int32(50)
requestBody.SetTop(&top)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.DeviceManagement().VirtualEndpoint().Reports().RetrieveCloudPcTroubleshootReports().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.devicemanagement.virtualendpoint.reports.retrievecloudpctroubleshootreports.RetrieveCloudPcTroubleshootReportsPostRequestBody retrieveCloudPcTroubleshootReportsPostRequestBody = new com.microsoft.graph.beta.devicemanagement.virtualendpoint.reports.retrievecloudpctroubleshootreports.RetrieveCloudPcTroubleshootReportsPostRequestBody();
retrieveCloudPcTroubleshootReportsPostRequestBody.setReportName(CloudPCTroubleshootReportType.TroubleshootDetailsReport);
LinkedList<String> select = new LinkedList<String>();
select.add("CloudPcId");
select.add("ManagedDeviceName");
select.add("UserPrincipalName");
select.add("UsageInsight");
select.add("CurrentSize");
select.add("CurrentCPU");
select.add("CurrentRamInGB");
select.add("CurrentDiskInGB");
select.add("RecommendedSize");
select.add("RecommendedCPU");
select.add("RecommendedRamInGB");
select.add("RecommendedDiskInGB");
select.add("ProvisionPolicyName");
select.add("RoundTripTimeInMsAvg");
select.add("AvailableBandwidthInMbpsAvg");
retrieveCloudPcTroubleshootReportsPostRequestBody.setSelect(select);
retrieveCloudPcTroubleshootReportsPostRequestBody.setSearch("");
retrieveCloudPcTroubleshootReportsPostRequestBody.setSkip(0);
retrieveCloudPcTroubleshootReportsPostRequestBody.setTop(50);
graphClient.deviceManagement().virtualEndpoint().reports().retrieveCloudPcTroubleshootReports().post(retrieveCloudPcTroubleshootReportsPostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const stream = {
reportName: 'troubleshootDetailsReport',
select: [
'CloudPcId',
'ManagedDeviceName',
'UserPrincipalName',
'UsageInsight',
'CurrentSize',
'CurrentCPU',
'CurrentRamInGB',
'CurrentDiskInGB',
'RecommendedSize',
'RecommendedCPU',
'RecommendedRamInGB',
'RecommendedDiskInGB',
'ProvisionPolicyName',
'RoundTripTimeInMsAvg',
'AvailableBandwidthInMbpsAvg'
],
search: '',
skip: 0,
top: 50
};
await client.api('/deviceManagement/virtualEndpoint/reports/retrieveCloudPcTroubleshootReports')
.version('beta')
.post(stream);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\DeviceManagement\VirtualEndpoint\Reports\RetrieveCloudPcTroubleshootReports\RetrieveCloudPcTroubleshootReportsPostRequestBody;
use Microsoft\Graph\Beta\Generated\Models\CloudPCTroubleshootReportType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new RetrieveCloudPcTroubleshootReportsPostRequestBody();
$requestBody->setReportName(new CloudPCTroubleshootReportType('troubleshootDetailsReport'));
$requestBody->setSelect(['CloudPcId', 'ManagedDeviceName', 'UserPrincipalName', 'UsageInsight', 'CurrentSize', 'CurrentCPU', 'CurrentRamInGB', 'CurrentDiskInGB', 'RecommendedSize', 'RecommendedCPU', 'RecommendedRamInGB', 'RecommendedDiskInGB', 'ProvisionPolicyName', 'RoundTripTimeInMsAvg', 'AvailableBandwidthInMbpsAvg', ]);
$requestBody->setSearch('');
$requestBody->setSkip(0);
$requestBody->setTop(50);
$graphServiceClient->deviceManagement()->virtualEndpoint()->reports()->retrieveCloudPcTroubleshootReports()->post($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.devicemanagement.virtualendpoint.reports.retrieve_cloud_pc_troubleshoot_reports.retrieve_cloud_pc_troubleshoot_reports_post_request_body import RetrieveCloudPcTroubleshootReportsPostRequestBody
from msgraph_beta.generated.models.cloud_p_c_troubleshoot_report_type import CloudPCTroubleshootReportType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = RetrieveCloudPcTroubleshootReportsPostRequestBody(
report_name = CloudPCTroubleshootReportType.TroubleshootDetailsReport,
select = [
"CloudPcId",
"ManagedDeviceName",
"UserPrincipalName",
"UsageInsight",
"CurrentSize",
"CurrentCPU",
"CurrentRamInGB",
"CurrentDiskInGB",
"RecommendedSize",
"RecommendedCPU",
"RecommendedRamInGB",
"RecommendedDiskInGB",
"ProvisionPolicyName",
"RoundTripTimeInMsAvg",
"AvailableBandwidthInMbpsAvg",
],
search = "",
skip = 0,
top = 50,
)
await graph_client.device_management.virtual_endpoint.reports.retrieve_cloud_pc_troubleshoot_reports.post(request_body)
响应
以下示例显示了相应的响应。
注意:为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 OK
Content-Type: application/json
{
"TotalRowCount": 1,
"Schema": [
{
"Column": "CloudPcId",
"PropertyType": "String"
},
{
"Column": "ManagedDeviceName",
"PropertyType": "String"
},
{
"Column": "UserPrincipalName",
"PropertyType": "String"
},
{
"Column": "UsageInsight",
"PropertyType": "String"
},
{
"Column": "CurrentSize",
"PropertyType": "Int"
},
{
"Column": "CurrentCPU",
"PropertyType": "Int"
},
{
"Column": "CurrentRamInGB",
"PropertyType": "Int"
},
{
"Column": "CurrentDiskInGB",
"PropertyType": "Int"
},
{
"Column": "RecommendedSize",
"PropertyType": "String"
},
{
"Column": "RecommendedCPU",
"PropertyType": "Int"
},
{
"Column": "RecommendedRamInGB",
"PropertyType": "Int"
},
{
"Column": "RecommendedDiskInGB",
"PropertyType": "Int"
},
{
"Column": "ProvisionPolicyName",
"PropertyType": "String"
},
{
"Column": "RoundTripTimeInMsAvg",
"PropertyType": "Double"
},
{
"Column": "AvailableBandwidthInMbpsAvg",
"PropertyType": "Double"
}
],
"Values": [
[
"f5ff445f-7488-40f8-8ab9-ee784a9c1f33",
"Cloud PC-Ana Bowman",
"ana@contoso.com",
"Performance",
"2",
"4",
"64",
"Undersized",
"4",
"8",
"128",
"policy1",
"200.1",
"50.65"
]
]
}