名前空間: microsoft.graph
テナント内の cloudPC デバイスを一覧表示します。
この API は、次の国内クラウド展開で使用できます。
| グローバル サービス |
米国政府機関 L4 |
米国政府機関 L5 (DOD) |
21Vianet が運営する中国 |
| ✅ |
❌ |
❌ |
❌ |
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。
アプリで必要な場合にのみ、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、「アクセス許可のリファレンス」を参照してください。
| アクセス許可の種類 |
最小特権アクセス許可 |
より高い特権のアクセス許可 |
| 委任 (職場または学校のアカウント) |
CloudPC.Read.All |
CloudPC.ReadWrite.All |
| 委任 (個人用 Microsoft アカウント) |
サポートされていません。 |
サポートされていません。 |
| アプリケーション |
CloudPC.Read.All |
CloudPC.ReadWrite.All |
HTTP 要求
GET /deviceManagement/virtualEndpoint/cloudPCs
オプションのクエリ パラメーター
このメソッドは、応答をカスタマイズするための $select、$filter、$count、$top OData クエリ パラメーターをサポートします。 一般的な情報については、「OData クエリ パラメーター」を参照してください。
| 名前 |
説明 |
| Authorization |
ベアラー {token}。 必須です。
認証と認可についての詳細をご覧ください。 |
要求本文
このメソッドには、要求本文を指定しません。
応答
成功した場合、このメソッドは 200 OK 応答コードと、応答本文の cloudPC オブジェクトのコレクションを返します。
例
例 1: テナント内のすべての cloudPC デバイスを一覧表示する
次の例は、テナント内のすべての cloudPC デバイスの一覧を取得する方法を示しています。
要求
次の例は要求を示しています。
GET https://graph.microsoft.com/v1.0/deviceManagement/virtualEndpoint/cloudPCs
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.VirtualEndpoint.CloudPCs.GetAsync();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
cloudPCs, err := graphClient.DeviceManagement().VirtualEndpoint().CloudPCs().Get(context.Background(), nil)
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
CloudPCCollectionResponse result = graphClient.deviceManagement().virtualEndpoint().cloudPCs().get();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
let cloudPCs = await client.api('/deviceManagement/virtualEndpoint/cloudPCs')
.get();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->deviceManagement()->virtualEndpoint()->cloudPCs()->get()->wait();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
result = await graph_client.device_management.virtual_endpoint.cloud_p_cs.get()
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-Type: application/json
{
"value": [
{
"@odata.type": "#microsoft.graph.cloudPC",
"aadDeviceId": "f5ff445f-7488-40f8-8ab9-ee784a9c1f33",
"id": "662009bc-7732-4f6f-8726-25883518ffff",
"displayName": "Demo-1",
"imageDisplayName": "Windows-10 19h1-evd",
"managedDeviceId": "bdc8e6dd-0455-4412-83d9-c818664fffff",
"managedDeviceName": "A00002GI001",
"provisioningPolicyId": "7ed725ad-0a00-4117-b557-d965c373ffff",
"provisioningPolicyName": "HR provisioning policy",
"onPremisesConnectionName": "Azure network connection for HR",
"servicePlanId": "dbb9148c-ff83-4a4c-8d7f-28752e93ffff",
"servicePlanName": "lite",
"userPrincipalName": "dujanjic@contoso.com",
"lastModifiedDateTime": "2020-11-03T10:29:57Z",
"gracePeriodEndDateTime": "2020-11-010T20:00:34Z",
"provisioningType": "dedicated"
}
]
}
例 2: テナント内の上位 2 つの cloudPC デバイスを取得する
次の例では、 $top クエリ パラメーターを使用して、テナント内の上位 2 つの cloudPC デバイスを取得する方法を示します。
要求
次の例は要求を示しています。
GET https://graph.microsoft.com/v1.0/deviceManagement/virtualEndpoint/cloudPCs?$top=2
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.VirtualEndpoint.CloudPCs.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Top = 2;
});
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphdevicemanagement "github.com/microsoftgraph/msgraph-sdk-go/devicemanagement"
//other-imports
)
requestTop := int32(2)
requestParameters := &graphdevicemanagement.VirtualEndpointCloudPCsRequestBuilderGetQueryParameters{
Top: &requestTop,
}
configuration := &graphdevicemanagement.VirtualEndpointCloudPCsRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
cloudPCs, err := graphClient.DeviceManagement().VirtualEndpoint().CloudPCs().Get(context.Background(), configuration)
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
CloudPCCollectionResponse result = graphClient.deviceManagement().virtualEndpoint().cloudPCs().get(requestConfiguration -> {
requestConfiguration.queryParameters.top = 2;
});
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
let cloudPCs = await client.api('/deviceManagement/virtualEndpoint/cloudPCs')
.top(2)
.get();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\DeviceManagement\VirtualEndpoint\CloudPCs\CloudPCsRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new CloudPCsRequestBuilderGetRequestConfiguration();
$queryParameters = CloudPCsRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->top = 2;
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->deviceManagement()->virtualEndpoint()->cloudPCs()->get($requestConfiguration)->wait();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.device_management.virtual_endpoint.cloud_p_cs.cloud_p_cs_request_builder import CloudPCsRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = CloudPCsRequestBuilder.CloudPCsRequestBuilderGetQueryParameters(
top = 2,
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.device_management.virtual_endpoint.cloud_p_cs.get(request_configuration = request_configuration)
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#deviceManagement/virtualEndpoint/cloudPCs",
"@odata.count": 200,
"@odata.nextLink": "https://graph.microsoft.com/v1.0/deviceManagement/virtualEndpoint/cloudPCs?$top=2&$skiptoken=7d4e1527-fe5a-4d86-81eb-2c532ac567ce",
"value": [
{
"id": "fd0230cd-4e05-4ecd-ad05-72f8a30042f1",
"displayName": "RMS-Resize-policy - RMS-Resize-user-05",
"imageDisplayName": "Windows 11 Enterprise + Microsoft 365 Apps 22H2",
"provisioningPolicyId": "7f247338-3d25-4bcf-11a0-fe6fba68f41c",
"provisioningPolicyName": "RMS-Resize-policy",
"onPremisesConnectionName": "",
"servicePlanId": "23a25099-1b2f-4e07-84bd-b81606109438",
"servicePlanName": "Cloud PC Enterprise 2vCPU/4GB/64GB",
"userPrincipalName": "RMS-Resize-user-05@contoso.com",
"lastModifiedDateTime": "2023-04-25T06:24:02Z",
"managedDeviceId": null,
"managedDeviceName": null,
"aadDeviceId": null,
"gracePeriodEndDateTime": null,
"provisioningType": "dedicated"
},
{
"id": "69621742-aad4-4976-990c-d10ff6d73fc1",
"displayName": "TestSweden - Akhilesh Khare",
"imageDisplayName": "TestSweden",
"provisioningPolicyId": "5865dd09-797d-4885-85ab-bb96594b5f1b",
"provisioningPolicyName": "TestSweden",
"onPremisesConnectionName": "TestSweden",
"servicePlanId": "0e837228-8250-4047-8a80-d4a34ba11618",
"servicePlanName": "Cloud PC Enterprise 8vCPU/32GB/512GB",
"userPrincipalName": "akhkhare_contoso.com#EXT#@contoso.com",
"lastModifiedDateTime": "2023-04-25T06:12:10Z",
"managedDeviceId": null,
"managedDeviceName": null,
"aadDeviceId": null,
"gracePeriodEndDateTime": null,
"provisioningType": "dedicated"
}
]
}