名前空間: microsoft.graph
cloudPcOnPremisesConnection オブジェクトのプロパティとリレーションシップを読み取ります。
重要
オンプレミスのネットワーク接続 の名前が Azure ネットワーク接続として変更されました。
cloudPcOnPremisesConnection オブジェクトは、クラウド PC 製品の Azure ネットワーク接続 と同じです。
この API は、次の国内クラウド展開で使用できます。
| グローバル サービス |
米国政府機関 L4 |
米国政府機関 L5 (DOD) |
21Vianet が運営する中国 |
| ✅ |
✅ |
✅ |
❌ |
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。
アプリで必要な場合にのみ、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、「アクセス許可のリファレンス」を参照してください。
| アクセス許可の種類 |
最小特権アクセス許可 |
より高い特権のアクセス許可 |
| 委任 (職場または学校のアカウント) |
CloudPC.Read.All |
CloudPC.ReadWrite.All |
| 委任 (個人用 Microsoft アカウント) |
サポートされていません。 |
サポートされていません。 |
| アプリケーション |
CloudPC.Read.All |
CloudPC.ReadWrite.All |
HTTP 要求
GET /deviceManagement/virtualEndpoint/onPremisesConnections/{id}
オプションのクエリ パラメーター
このメソッドは、応答のカスタマイズ $select 役立つ OData クエリ パラメーターをサポートします。 一般的な情報については、「OData クエリ パラメーター」を参照してください。
| 名前 |
説明 |
| Authorization |
ベアラー {token}。 必須です。
認証と認可についての詳細をご覧ください。 |
要求本文
このメソッドには、要求本文を指定しません。
応答
成功した場合、このメソッドは応答コード 200 OK と、応答本文に cloudPcOnPremisesConnection オブジェクトを返します。
例
例 1: Azure ネットワーク接続の既定のプロパティを取得する
要求
次の例は要求を示しています。
GET https://graph.microsoft.com/v1.0/deviceManagement/virtualEndpoint/onPremisesConnections/{id}
// 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.OnPremisesConnections["{cloudPcOnPremisesConnection-id}"].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
onPremisesConnections, err := graphClient.DeviceManagement().VirtualEndpoint().OnPremisesConnections().ByCloudPcOnPremisesConnectionId("cloudPcOnPremisesConnection-id").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);
CloudPcOnPremisesConnection result = graphClient.deviceManagement().virtualEndpoint().onPremisesConnections().byCloudPcOnPremisesConnectionId("{cloudPcOnPremisesConnection-id}").get();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
let cloudPcOnPremisesConnection = await client.api('/deviceManagement/virtualEndpoint/onPremisesConnections/{id}')
.get();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->deviceManagement()->virtualEndpoint()->onPremisesConnections()->byCloudPcOnPremisesConnectionId('cloudPcOnPremisesConnection-id')->get()->wait();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
Import-Module Microsoft.Graph.DeviceManagement.Administration
Get-MgDeviceManagementVirtualEndpointOnPremiseConnection -CloudPcOnPremisesConnectionId $cloudPcOnPremisesConnectionId
プロジェクトに 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.on_premises_connections.by_cloud_pc_on_premises_connection_id('cloudPcOnPremisesConnection-id').get()
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.cloudPcOnPremisesConnection",
"id": "9ec90ff8-fd63-4fb9-ab5a-aa4fdccffff",
"connectionType": "hybridAzureADJoin",
"displayName": "Display Name value",
"subscriptionId": "0ac520ee-14c0-480f-b6c9-0a90c585ffff",
"subscriptionName": "Subscription Name value",
"adDomainName": "Active Directory Domain Name value",
"adDomainUsername": "Active Directory Domain User Name value",
"organizationalUnit": "Organization Unit value",
"resourceGroupId": "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c585ffff/resourceGroups/ExampleRG",
"virtualNetworkId": "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet",
"subnetId": "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c585ffff/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default",
"healthCheckStatus": "running",
"virtualNetworkLocation": "westus2"
}
例 2: healthCheckStatusDetail など、Azure ネットワーク接続の選択したプロパティを取得する
要求
次の例は要求を示しています。
GET https://graph.microsoft.com/v1.0/deviceManagement/virtualEndpoint/onPremisesConnections/{id}?$select=id,displayName,healthCheckStatus,healthCheckStatusDetail,inUse
// 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.OnPremisesConnections["{cloudPcOnPremisesConnection-id}"].GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Select = new string []{ "id","displayName","healthCheckStatus","healthCheckStatusDetail","inUse" };
});
プロジェクトに 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
)
requestParameters := &graphdevicemanagement.VirtualEndpointOnPremisesConnectionsItemRequestBuilderGetQueryParameters{
Select: [] string {"id","displayName","healthCheckStatus","healthCheckStatusDetail","inUse"},
}
configuration := &graphdevicemanagement.VirtualEndpointOnPremisesConnectionsItemRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
onPremisesConnections, err := graphClient.DeviceManagement().VirtualEndpoint().OnPremisesConnections().ByCloudPcOnPremisesConnectionId("cloudPcOnPremisesConnection-id").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);
CloudPcOnPremisesConnection result = graphClient.deviceManagement().virtualEndpoint().onPremisesConnections().byCloudPcOnPremisesConnectionId("{cloudPcOnPremisesConnection-id}").get(requestConfiguration -> {
requestConfiguration.queryParameters.select = new String []{"id", "displayName", "healthCheckStatus", "healthCheckStatusDetail", "inUse"};
});
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
let cloudPcOnPremisesConnection = await client.api('/deviceManagement/virtualEndpoint/onPremisesConnections/{id}')
.select('id,displayName,healthCheckStatus,healthCheckStatusDetail,inUse')
.get();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\DeviceManagement\VirtualEndpoint\OnPremisesConnections\Item\CloudPcOnPremisesConnectionItemRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new CloudPcOnPremisesConnectionItemRequestBuilderGetRequestConfiguration();
$queryParameters = CloudPcOnPremisesConnectionItemRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->select = ["id","displayName","healthCheckStatus","healthCheckStatusDetail","inUse"];
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->deviceManagement()->virtualEndpoint()->onPremisesConnections()->byCloudPcOnPremisesConnectionId('cloudPcOnPremisesConnection-id')->get($requestConfiguration)->wait();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
Import-Module Microsoft.Graph.DeviceManagement.Administration
Get-MgDeviceManagementVirtualEndpointOnPremiseConnection -CloudPcOnPremisesConnectionId $cloudPcOnPremisesConnectionId -Property "id,displayName,healthCheckStatus,healthCheckStatusDetail,inUse"
プロジェクトに 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.on_premises_connections.item.cloud_pc_on_premises_connection_item_request_builder import CloudPcOnPremisesConnectionItemRequestBuilder
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 = CloudPcOnPremisesConnectionItemRequestBuilder.CloudPcOnPremisesConnectionItemRequestBuilderGetQueryParameters(
select = ["id","displayName","healthCheckStatus","healthCheckStatusDetail","inUse"],
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.device_management.virtual_endpoint.on_premises_connections.by_cloud_pc_on_premises_connection_id('cloudPcOnPremisesConnection-id').get(request_configuration = request_configuration)
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.cloudPcOnPremisesConnection",
"id": "9ec90ff8-fd63-4fb9-ab5a-aa4fdccffff",
"displayName": "Display Name value",
"healthCheckStatus": "failed",
"healthCheckStatusDetail": {
"@odata.type": "microsoft.graph.cloudPcOnPremisesConnectionStatusDetail",
"startDateTime": "2020-11-03T12:43:14Z",
"endDateTime": "2020-11-03T12:43:32Z",
"healthChecks": [
{
"@odata.type": "microsoft.graph.cloudPcOnPremisesConnectionHealthCheck",
"status": "failed",
"displayName": "Display Name value",
"startDateTime": "2020-11-03T12:43:14Z",
"endDateTime": "2020-11-03T12:43:15Z",
"errorType": "dnsCheckFqdnNotFound",
"recommendedAction": "We did not find the provided domain name; please re-enter",
"additionalDdetail": null,
"correlationId": "992e64f0-231c-46b0-8918-c5aed0585f53"
},
{
"@odata.type": "microsoft.graph.cloudPcOnPremisesConnectionHealthCheck",
"status": "passed",
"displayName": "Display Name value",
"startDateTime": "2020-11-03T12:43:15Z",
"endDateTime": "2020-11-03T12:43:26Z",
"errorType": null,
"recommendedAction": null,
"additionalDetail": null,
"correlationId": null
},
{
"@odata.type": "microsoft.graph.cloudPcOnPremisesConnectionHealthCheck",
"status": "failed",
"displayName": "Display Name value",
"startDateTime": "2020-11-03T12:43:27Z",
"endDateTime": "2020-11-03T12:43:32Z",
"errorType": "endpointConnectivityCheckUrlNotWhitelisted",
"recommendedAction": "Recommended Action value",
"additionaldDetail": "Additional Details value",
"correlationId": "119f8363-ace2-412b-a79a-867dc0737db0"
},
{
"@odata.type": "microsoft.graph.cloudPcOnPremisesConnectionHealthCheck",
"status": "passed",
"displayName": "Display Name value",
"startDateTime": null,
"endDateTime": null,
"errorType": null,
"recommendedAction": null,
"additionaldDetail": null,
"correlationId": "119f8363-ace2-412b-a79a-867dc0737db0"
}
]
},
"inUse": false
}