Namespace: microsoft.graph
Wichtig
Die APIs unter der /beta Version in Microsoft Graph können sich ändern. Die Verwendung dieser APIs in Produktionsanwendungen wird nicht unterstützt. Um festzustellen, ob eine API in v1.0 verfügbar ist, verwenden Sie die Version Selektor.
Aktualisieren Sie die Eigenschaften eines cloudPcCloudApp-Objekts , z. B. den Anzeigenamen oder den Symbolpfad.
API-Verfügbarkeit
Diese API ist in den folgenden nationalen Cloudbereitstellungen verfügbar.
| Weltweiter Service |
US Government L4 |
US Government L5 (DOD) |
China, betrieben von 21Vianet |
| ✅ |
✅ |
✅ |
❌ |
Berechtigungen
Wählen Sie die Berechtigungen aus, die für diese API als am wenigsten privilegiert markiert sind. Verwenden Sie eine höhere Berechtigung oder Berechtigungen nur, wenn Ihre App dies erfordert. Ausführliche Informationen zu delegierten Berechtigungen und Anwendungsberechtigungen finden Sie unter Berechtigungstypen. Weitere Informationen zu diesen Berechtigungen finden Sie in der Berechtigungsreferenz.
| Berechtigungstyp |
Berechtigungen mit den geringsten Berechtigungen |
Berechtigungen mit höheren Berechtigungen |
| Delegiert (Geschäfts-, Schul- oder Unikonto) |
CloudPC.ReadWrite.All |
Nicht verfügbar. |
| Delegiert (persönliches Microsoft-Konto) |
Nicht unterstützt |
Nicht unterstützt |
| Application |
CloudPC.ReadWrite.All |
Nicht verfügbar. |
HTTP-Anforderung
PATCH /deviceManagement/virtualEndpoint/cloudApps/{id}
Anforderungstext
Geben Sie im Anforderungstext eine JSON-Darstellung des cloudPcCloudApp-Objekts an.
Die folgende Tabelle zeigt die Eigenschaften, die Sie verwenden können, wenn Sie eine cloudPcCloudApp aktualisieren.
| Eigenschaft |
Typ |
Beschreibung |
| appDetail |
cloudPcCloudAppDetail |
Die Details zur Cloud-App. Hierbei handelt es sich um einen polymorphen Typ. Verwenden Sie @odata.type , um den abgeleiteten Typ anzugeben: #microsoft.graph.cloudPcFilePathAppDetail für Apps mit einem manuell angegebenen Dateipfad oder #microsoft.graph.cloudPcAutomaticDiscoveredAppDetail für automatisch erkannte Apps. Diese Werte stammen zunächst aus der appDetail-Eigenschaft der zugeordneten ermittelten App. Die Eigenschaften iconPath, iconIndex und commandLineArguments können nach Bedarf geändert werden, wenn Sie die Cloud-App aktualisieren. Unterstützt $select. Optional. |
| description |
Zeichenfolge |
Die Beschreibung, die der Cloud-App zugeordnet ist. Die maximal zulässige Länge für diese Eigenschaft beträgt 512 Zeichen. Unterstützt $filter, $select und $orderBy. Optional. |
| displayName |
Zeichenfolge |
Der Anzeigename für die Cloud-App, der im Endbenutzerportal angezeigt wird und innerhalb einer einzelnen Bereitstellungsrichtlinie eindeutig sein muss. Es verwendet den ermittelten App-Namen als Standardwert. Die maximal zulässige Länge für diese Eigenschaft beträgt 64 Zeichen. Beispiel: Paint. Unterstützt $filter, $select und $orderBy. Optional. |
Antwort
Wenn die Methode erfolgreich verläuft, wird der Antwortcode 204 No Content zurückgegeben.
Beispiele
Anforderung
Das folgende Beispiel zeigt eine Anfrage.
PATCH https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/cloudApps/40d0e128-de93-41dc-89ec-33d84bb662a0
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.cloudPcCloudApp",
"displayName": "Cloud App example3",
"appDetail": {
"@odata.type": "#microsoft.graph.cloudPcAutomaticDiscoveredAppDetail",
"iconPath": "C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell_ise.exe"
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new CloudPcCloudApp
{
OdataType = "#microsoft.graph.cloudPcCloudApp",
DisplayName = "Cloud App example3",
AppDetail = new CloudPcAutomaticDiscoveredAppDetail
{
OdataType = "#microsoft.graph.cloudPcAutomaticDiscoveredAppDetail",
IconPath = "C:\Windows\system32\WindowsPowerShell\v1.0\powershell_ise.exe",
},
};
// 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.CloudApps["{cloudPcCloudApp-id}"].PatchAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewCloudPcCloudApp()
displayName := "Cloud App example3"
requestBody.SetDisplayName(&displayName)
appDetail := graphmodels.NewCloudPcAutomaticDiscoveredAppDetail()
iconPath := "C:\Windows\system32\WindowsPowerShell\v1.0\powershell_ise.exe"
appDetail.SetIconPath(&iconPath)
requestBody.SetAppDetail(appDetail)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
cloudApps, err := graphClient.DeviceManagement().VirtualEndpoint().CloudApps().ByCloudPcCloudAppId("cloudPcCloudApp-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);
CloudPcCloudApp cloudPcCloudApp = new CloudPcCloudApp();
cloudPcCloudApp.setOdataType("#microsoft.graph.cloudPcCloudApp");
cloudPcCloudApp.setDisplayName("Cloud App example3");
CloudPcAutomaticDiscoveredAppDetail appDetail = new CloudPcAutomaticDiscoveredAppDetail();
appDetail.setOdataType("#microsoft.graph.cloudPcAutomaticDiscoveredAppDetail");
appDetail.setIconPath("C:\Windows\system32\WindowsPowerShell\v1.0\powershell_ise.exe");
cloudPcCloudApp.setAppDetail(appDetail);
CloudPcCloudApp result = graphClient.deviceManagement().virtualEndpoint().cloudApps().byCloudPcCloudAppId("{cloudPcCloudApp-id}").patch(cloudPcCloudApp);
const options = {
authProvider,
};
const client = Client.init(options);
const cloudPcCloudApp = {
'@odata.type': '#microsoft.graph.cloudPcCloudApp',
displayName: 'Cloud App example3',
appDetail: {
'@odata.type': '#microsoft.graph.cloudPcAutomaticDiscoveredAppDetail',
iconPath: 'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell_ise.exe'
}
};
await client.api('/deviceManagement/virtualEndpoint/cloudApps/40d0e128-de93-41dc-89ec-33d84bb662a0')
.version('beta')
.update(cloudPcCloudApp);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\CloudPcCloudApp;
use Microsoft\Graph\Beta\Generated\Models\CloudPcAutomaticDiscoveredAppDetail;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new CloudPcCloudApp();
$requestBody->setOdataType('#microsoft.graph.cloudPcCloudApp');
$requestBody->setDisplayName('Cloud App example3');
$appDetail = new CloudPcAutomaticDiscoveredAppDetail();
$appDetail->setOdataType('#microsoft.graph.cloudPcAutomaticDiscoveredAppDetail');
$appDetail->setIconPath('C:\Windows\system32\WindowsPowerShell\v1.0\powershell_ise.exe');
$requestBody->setAppDetail($appDetail);
$result = $graphServiceClient->deviceManagement()->virtualEndpoint()->cloudApps()->byCloudPcCloudAppId('cloudPcCloudApp-id')->patch($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.cloud_pc_cloud_app import CloudPcCloudApp
from msgraph_beta.generated.models.cloud_pc_automatic_discovered_app_detail import CloudPcAutomaticDiscoveredAppDetail
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = CloudPcCloudApp(
odata_type = "#microsoft.graph.cloudPcCloudApp",
display_name = "Cloud App example3",
app_detail = CloudPcAutomaticDiscoveredAppDetail(
odata_type = "#microsoft.graph.cloudPcAutomaticDiscoveredAppDetail",
icon_path = "C:\Windows\system32\WindowsPowerShell\v1.0\powershell_ise.exe",
),
)
result = await graph_client.device_management.virtual_endpoint.cloud_apps.by_cloud_pc_cloud_app_id('cloudPcCloudApp-id').patch(request_body)
Antwort
Das folgende Beispiel zeigt die Antwort.
HTTP/1.1 204 No Content