Die lokale Netzwerkverbindung wurde in Azure-Netzwerkverbindung umbenannt.
cloudPcOnPremisesConnection-Objekte entsprechen hier der Azure-Netzwerkverbindung für das Cloud-PC-Produkt.
Wählen Sie für diese API die Als am wenigsten privilegierten Berechtigungen gekennzeichneten Berechtigungen aus. Verwenden Sie nur dann eine Berechtigung mit höheren Berechtigungen , wenn dies für Ihre App erforderlich ist. Ausführliche Informationen zu delegierten Berechtigungen und Anwendungsberechtigungen finden Sie unter Berechtigungstypen. Weitere Informationen zu diesen Berechtigungen finden Sie in der Berechtigungsreferenz.
Der vollqualifizierte Domänenname (FQDN) der Active Directory-Domäne, der Sie beitreten möchten.
adDomainPassword
Zeichenfolge
Das Kennwort, das adDomainUsername zugeordnet ist.
adDomainUsername
Zeichenfolge
Der Benutzername eines Active Directory-Kontos (Benutzer- oder Dienstkonto), das über Berechtigungen zum Erstellen von Computerobjekten in Active Directory verfügt. Erforderliches Format: username@contoso.com.
connectionType
cloudPcOnPremisesConnectionType
Gibt an, wie der bereitgestellte Cloud-PC mit der Microsoft Entra ID verknüpft wird. Der Standardwert ist hybridAzureADJoin. Mögliche Werte sind: azureADJoin, hybridAzureADJoin und unknownFutureValue.
displayName
Zeichenfolge
Der Anzeigename für die Azure-Netzwerkverbindung.
resourceGroupId
Zeichenfolge
Die ID der Zielressourcengruppe. Erforderliches Format: "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}".
subnetId
Zeichenfolge
Die ID des Zielsubnetzes. Erforderliches Format: "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkId}/subnets/{subnetName}".
subscriptionId
Zeichenfolge
Die ID des Azure-Zielabonnements, das Ihrem Mandanten zugeordnet ist.
virtualNetworkId
Zeichenfolge
Die ID des virtuellen Zielnetzwerks. Erforderliches Format: "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}".
Antwort
Bei erfolgreicher Ausführung gibt die Methode den 200 OK Antwortcode und ein aktualisiertes cloudPcOnPremisesConnection-Objekt im Antworttext zurück.
PATCH https://graph.microsoft.com/v1.0/deviceManagement/virtualEndpoint/onPremisesConnections/{id}
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.cloudPcOnPremisesConnection",
"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"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new CloudPcOnPremisesConnection
{
OdataType = "#microsoft.graph.cloudPcOnPremisesConnection",
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",
};
// 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}"].PatchAsync(requestBody);
// 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"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewCloudPcOnPremisesConnection()
displayName := "Display Name value"
requestBody.SetDisplayName(&displayName)
subscriptionId := "0ac520ee-14c0-480f-b6c9-0a90c585ffff"
requestBody.SetSubscriptionId(&subscriptionId)
subscriptionName := "Subscription Name value"
requestBody.SetSubscriptionName(&subscriptionName)
adDomainName := "Active Directory Domain Name value"
requestBody.SetAdDomainName(&adDomainName)
adDomainUsername := "Active Directory Domain User Name value"
requestBody.SetAdDomainUsername(&adDomainUsername)
organizationalUnit := "Organization Unit value"
requestBody.SetOrganizationalUnit(&organizationalUnit)
resourceGroupId := "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c585ffff/resourceGroups/ExampleRG"
requestBody.SetResourceGroupId(&resourceGroupId)
virtualNetworkId := "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet"
requestBody.SetVirtualNetworkId(&virtualNetworkId)
subnetId := "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c585ffff/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default"
requestBody.SetSubnetId(&subnetId)
// 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").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
CloudPcOnPremisesConnection cloudPcOnPremisesConnection = new CloudPcOnPremisesConnection();
cloudPcOnPremisesConnection.setOdataType("#microsoft.graph.cloudPcOnPremisesConnection");
cloudPcOnPremisesConnection.setDisplayName("Display Name value");
cloudPcOnPremisesConnection.setSubscriptionId("0ac520ee-14c0-480f-b6c9-0a90c585ffff");
cloudPcOnPremisesConnection.setSubscriptionName("Subscription Name value");
cloudPcOnPremisesConnection.setAdDomainName("Active Directory Domain Name value");
cloudPcOnPremisesConnection.setAdDomainUsername("Active Directory Domain User Name value");
cloudPcOnPremisesConnection.setOrganizationalUnit("Organization Unit value");
cloudPcOnPremisesConnection.setResourceGroupId("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c585ffff/resourceGroups/ExampleRG");
cloudPcOnPremisesConnection.setVirtualNetworkId("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet");
cloudPcOnPremisesConnection.setSubnetId("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c585ffff/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default");
CloudPcOnPremisesConnection result = graphClient.deviceManagement().virtualEndpoint().onPremisesConnections().byCloudPcOnPremisesConnectionId("{cloudPcOnPremisesConnection-id}").patch(cloudPcOnPremisesConnection);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\CloudPcOnPremisesConnection;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new CloudPcOnPremisesConnection();
$requestBody->setOdataType('#microsoft.graph.cloudPcOnPremisesConnection');
$requestBody->setDisplayName('Display Name value');
$requestBody->setSubscriptionId('0ac520ee-14c0-480f-b6c9-0a90c585ffff');
$requestBody->setSubscriptionName('Subscription Name value');
$requestBody->setAdDomainName('Active Directory Domain Name value');
$requestBody->setAdDomainUsername('Active Directory Domain User Name value');
$requestBody->setOrganizationalUnit('Organization Unit value');
$requestBody->setResourceGroupId('/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c585ffff/resourceGroups/ExampleRG');
$requestBody->setVirtualNetworkId('/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet');
$requestBody->setSubnetId('/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c585ffff/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default');
$result = $graphServiceClient->deviceManagement()->virtualEndpoint()->onPremisesConnections()->byCloudPcOnPremisesConnectionId('cloudPcOnPremisesConnection-id')->patch($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.cloud_pc_on_premises_connection import CloudPcOnPremisesConnection
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = CloudPcOnPremisesConnection(
odata_type = "#microsoft.graph.cloudPcOnPremisesConnection",
display_name = "Display Name value",
subscription_id = "0ac520ee-14c0-480f-b6c9-0a90c585ffff",
subscription_name = "Subscription Name value",
ad_domain_name = "Active Directory Domain Name value",
ad_domain_username = "Active Directory Domain User Name value",
organizational_unit = "Organization Unit value",
resource_group_id = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c585ffff/resourceGroups/ExampleRG",
virtual_network_id = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet",
subnet_id = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c585ffff/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default",
)
result = await graph_client.device_management.virtual_endpoint.on_premises_connections.by_cloud_pc_on_premises_connection_id('cloudPcOnPremisesConnection-id').patch(request_body)