// 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);
// 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);
# 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)