Namespace: microsoft.graph
Important
APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Update the properties of a cloudPcPool object.
This API is available in the following national cloud deployments.
| Global service |
US Government L4 |
US Government L5 (DOD) |
China operated by 21Vianet |
| ✅ |
❌ |
❌ |
❌ |
Permissions
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
| Permission type |
Least privileged permissions |
Higher privileged permissions |
| Delegated (work or school account) |
CloudPC.ReadWrite.All |
Not available. |
| Delegated (personal Microsoft account) |
Not supported. |
Not supported. |
| Application |
CloudPC.ReadWrite.All |
Not available. |
HTTP request
PATCH /deviceManagement/virtualEndpoint/cloudPcPools/{cloudPcPool-id}
Request body
You must specify the @odata.type property and the value of the cloudPcPool object type to update. For example, "@odata.type": "#microsoft.graph.cloudPcAgentPool".
The following table lists the properties that can be updated for a cloudPcPool.
| Property |
Type |
Description |
| @odata.type |
String |
The type of the cloud PC pool to update. Required. |
| billingConfiguration |
cloudPcAgentPoolBillingConfiguration |
The billing configuration for the agent pool, including billing type and billing plan identifier. |
| capabilities |
cloudPcPoolCapabilityConfiguration |
The capabilities configuration for the pool, including single sign-on settings. |
| cloudPcConfiguration |
cloudPcConfiguration |
The Cloud PC specification, including image and operating system locale settings for provisioning. |
| description |
String |
The description of the pool. The maximum length is 512 characters. |
| displayName |
String |
The display name of the pool. The name is unique across Cloud PC pools in an organization. The maximum length is 60 characters. |
| scalingPolicy |
cloudPcAgentPoolScalingPolicy |
The scaling policy defining minimum and maximum Cloud PC counts for the pool. |
Response
If successful, this method returns a 204 No Content response code.
Examples
Request
The following example shows a request.
PATCH https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/cloudPcPools/a1b2c3d4-e5f6-7890-abcd-ef1234567890
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.cloudPcAgentPool",
"displayName": "Contoso Development Pool Updated",
"description": "Contoso Development Pool Description Updated"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new CloudPcAgentPool
{
OdataType = "#microsoft.graph.cloudPcAgentPool",
DisplayName = "Contoso Development Pool Updated",
Description = "Contoso Development Pool Description Updated",
};
// 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.CloudPcPools["{cloudPcPool-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.NewCloudPcPool()
displayName := "Contoso Development Pool Updated"
requestBody.SetDisplayName(&displayName)
description := "Contoso Development Pool Description Updated"
requestBody.SetDescription(&description)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
cloudPcPools, err := graphClient.DeviceManagement().VirtualEndpoint().CloudPcPools().ByCloudPcPoolId("cloudPcPool-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);
CloudPcAgentPool cloudPcPool = new CloudPcAgentPool();
cloudPcPool.setOdataType("#microsoft.graph.cloudPcAgentPool");
cloudPcPool.setDisplayName("Contoso Development Pool Updated");
cloudPcPool.setDescription("Contoso Development Pool Description Updated");
CloudPcPool result = graphClient.deviceManagement().virtualEndpoint().cloudPcPools().byCloudPcPoolId("{cloudPcPool-id}").patch(cloudPcPool);
const options = {
authProvider,
};
const client = Client.init(options);
const cloudPcPool = {
'@odata.type': '#microsoft.graph.cloudPcAgentPool',
displayName: 'Contoso Development Pool Updated',
description: 'Contoso Development Pool Description Updated'
};
await client.api('/deviceManagement/virtualEndpoint/cloudPcPools/a1b2c3d4-e5f6-7890-abcd-ef1234567890')
.version('beta')
.update(cloudPcPool);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\CloudPcAgentPool;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new CloudPcAgentPool();
$requestBody->setOdataType('#microsoft.graph.cloudPcAgentPool');
$requestBody->setDisplayName('Contoso Development Pool Updated');
$requestBody->setDescription('Contoso Development Pool Description Updated');
$result = $graphServiceClient->deviceManagement()->virtualEndpoint()->cloudPcPools()->byCloudPcPoolId('cloudPcPool-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_agent_pool import CloudPcAgentPool
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = CloudPcAgentPool(
odata_type = "#microsoft.graph.cloudPcAgentPool",
display_name = "Contoso Development Pool Updated",
description = "Contoso Development Pool Description Updated",
)
result = await graph_client.device_management.virtual_endpoint.cloud_pc_pools.by_cloud_pc_pool_id('cloudPcPool-id').patch(request_body)
Response
The following example shows the response.
HTTP/1.1 204 No Content