// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetInaccessibleCloudPcReports;
var requestBody = new GetInaccessibleCloudPcReportsPostRequestBody
{
Filter = "region eq 'westus2'",
OrderBy = new List<string>
{
"cloudPcId",
},
Select = new List<string>
{
"cloudPcId",
"aadDeviceId",
"cloudPcName",
"userPrincipalName",
"provisioningStatus",
"region",
"deviceHealthStatus",
"deviceHealthStatusDateTime",
"recentDeviceHealthFailureCount",
"recentConnectionFailureCount",
"systemStatus",
"systemStatusDateTime",
},
Top = 10,
Skip = 0,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.DeviceManagement.VirtualEndpoint.Reports.GetInaccessibleCloudPcReports.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.getinaccessiblecloudpcreports.GetInaccessibleCloudPcReportsPostRequestBody getInaccessibleCloudPcReportsPostRequestBody = new com.microsoft.graph.beta.devicemanagement.virtualendpoint.reports.getinaccessiblecloudpcreports.GetInaccessibleCloudPcReportsPostRequestBody();
getInaccessibleCloudPcReportsPostRequestBody.setFilter("region eq 'westus2'");
LinkedList<String> orderBy = new LinkedList<String>();
orderBy.add("cloudPcId");
getInaccessibleCloudPcReportsPostRequestBody.setOrderBy(orderBy);
LinkedList<String> select = new LinkedList<String>();
select.add("cloudPcId");
select.add("aadDeviceId");
select.add("cloudPcName");
select.add("userPrincipalName");
select.add("provisioningStatus");
select.add("region");
select.add("deviceHealthStatus");
select.add("deviceHealthStatusDateTime");
select.add("recentDeviceHealthFailureCount");
select.add("recentConnectionFailureCount");
select.add("systemStatus");
select.add("systemStatusDateTime");
getInaccessibleCloudPcReportsPostRequestBody.setSelect(select);
getInaccessibleCloudPcReportsPostRequestBody.setTop(10);
getInaccessibleCloudPcReportsPostRequestBody.setSkip(0);
graphClient.deviceManagement().virtualEndpoint().reports().getInaccessibleCloudPcReports().post(getInaccessibleCloudPcReportsPostRequestBody);
# 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.get_inaccessible_cloud_pc_reports.get_inaccessible_cloud_pc_reports_post_request_body import GetInaccessibleCloudPcReportsPostRequestBody
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = GetInaccessibleCloudPcReportsPostRequestBody(
filter = "region eq 'westus2'",
order_by = [
"cloudPcId",
],
select = [
"cloudPcId",
"aadDeviceId",
"cloudPcName",
"userPrincipalName",
"provisioningStatus",
"region",
"deviceHealthStatus",
"deviceHealthStatusDateTime",
"recentDeviceHealthFailureCount",
"recentConnectionFailureCount",
"systemStatus",
"systemStatusDateTime",
],
top = 10,
skip = 0,
)
await graph_client.device_management.virtual_endpoint.reports.get_inaccessible_cloud_pc_reports.post(request_body)