Skip to content

Commit 5a3e63e

Browse files
authored
Merge pull request #25756 from microsoftgraph/add_policy_schedule_apply
Add cloudPcProvisioningPolicySchedule
2 parents 224cb09 + 8f48c29 commit 5a3e63e

10 files changed

+470
-1
lines changed
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
title: "cloudpcprovisioningpolicy: retrievePolicyApplyActionResult"
3+
description: "Get the result of the latest apply operation of a provision policy. `Frontline shared` only. Administrators only."
4+
author: "zhuangzhuang131419"
5+
ms.localizationpriority: medium
6+
ms.subservice: "cloud-pc"
7+
doc_type: apiPageType
8+
ms.date: 01/07/2025
9+
---
10+
11+
# cloudpcprovisioningpolicy: retrievePolicyApplyActionResult
12+
13+
Namespace: microsoft.graph
14+
15+
[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]
16+
17+
Get the result of the latest apply operation of a provision policy. `Frontline shared` only. Administrators only.
18+
19+
[!INCLUDE [national-cloud-support](../../includes/global-us.md)]
20+
21+
## Permissions
22+
23+
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](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference).
24+
25+
<!-- { "blockType": "permissions", "name": "cloudpcprovisioningpolicy-retrievePolicyApplyActionResult" } -->
26+
[!INCLUDE [permissions-table](../includes/permissions/cloudpcprovisioningpolicy-retrievePolicyApplyActionResult-permissions.md)]
27+
28+
## HTTP request
29+
30+
<!-- {
31+
"blockType": "ignored"
32+
}
33+
-->
34+
35+
``` http
36+
GET /deviceManagement/virtualEndpoint/provisioningPolicies/{id}/retrievePolicyApplyActionResult
37+
```
38+
39+
## Request headers
40+
41+
|Name|Description|
42+
|:---|:---|
43+
|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).|
44+
|Content-Type|application/json. Required.|
45+
46+
## Request body
47+
48+
Don't supply a request body for this method.
49+
50+
## Response
51+
52+
If successful, this method returns a `200 OK` response code and a status, startDateTime, and finishDateTime in the response body.
53+
54+
|Parameter|Type|Description|
55+
|:---|:---|:---|
56+
|status|string|The status of the applied operation. Possible values are, `succeeded`, `pending`, `failed` and `unknownFutureValue`.|
57+
|startDateTime|DateTime|The date and time when the operation was applied.|
58+
|finishDateTime|DateTime|The date and time when the operation finished.|
59+
60+
## Examples
61+
62+
### Request
63+
64+
The following example shows a request.
65+
66+
<!-- {
67+
"blockType": "request",
68+
"name": "cloudpcprovisioningpolicy-retrievePolicyApplyActionResult"
69+
}
70+
-->
71+
72+
``` http
73+
GET https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/provisioningPolicies/b0c2d35f-3385-46c8-a6f5-6c3dfad7708b/retrievePolicyApplyActionResult
74+
```
75+
76+
### Response
77+
78+
The following example shows the response.
79+
80+
<!-- {
81+
"blockType": "response",
82+
"truncated": true,
83+
"@odata.type": "microsoft.graph.cloudPcPolicyApplyActionResult"
84+
}
85+
-->
86+
87+
``` http
88+
HTTP/1.1 200 OK
89+
90+
{
91+
"@odata.type": "https://graph.microsoft.com/beta/$metadata#cloudPcPolicyApplyActionResult",
92+
"status": "succeeded",
93+
"startDateTime": "2024-10-10T00:00:00",
94+
"finishDateTime": "2024-10-11T00:00:00"
95+
}
96+
```
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
title: "cloudpcprovisioningpolicy: retrievePolicyApplySchedule"
3+
description: "Get the scheduled apply rule set on the policy. `Frontline shared` only. Administrators only."
4+
author: "zhuangzhuang131419"
5+
ms.localizationpriority: medium
6+
ms.subservice: "cloud-pc"
7+
doc_type: apiPageType
8+
ms.date: 01/07/2025
9+
---
10+
11+
# cloudpcprovisioningpolicy: retrievePolicyApplySchedule
12+
13+
Namespace: microsoft.graph
14+
15+
[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]
16+
17+
Get the scheduled apply rule set on the policy. `Frontline shared` only. Administrators only.
18+
19+
[!INCLUDE [national-cloud-support](../../includes/global-us.md)]
20+
21+
## Permissions
22+
23+
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](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference).
24+
25+
<!-- { "blockType": "permissions", "name": "cloudpcprovisioningpolicy-retrievePolicyApplySchedule" } -->
26+
[!INCLUDE [permissions-table](../includes/permissions/cloudpcprovisioningpolicy-retrievePolicyApplySchedule-permissions.md)]
27+
28+
## HTTP request
29+
30+
<!-- {
31+
"blockType": "ignored"
32+
}
33+
-->
34+
35+
``` http
36+
GET /deviceManagement/virtualEndpoint/provisioningPolicies/{id}/retrievePolicyApplySchedule
37+
```
38+
39+
## Request headers
40+
41+
|Name|Description|
42+
|:---|:---|
43+
|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).|
44+
|Content-Type|application/json. Required.|
45+
46+
## Request body
47+
48+
Don't supply a request body for this method.
49+
50+
## Response
51+
52+
If successful, this method returns a `200 OK` response code and [cloudpcpolicyscheduledapplyactiondetail](../resources/cloudpcpolicyscheduledapplyactiondetail.md) in the response body.
53+
54+
## Examples
55+
56+
### Request
57+
58+
The following example shows a request.
59+
60+
<!-- {
61+
"blockType": "request",
62+
"name": "cloudpcprovisioningpolicy-retrievePolicyApplySchedule"
63+
}
64+
-->
65+
66+
``` http
67+
GET https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/provisioningPolicies/b0c2d35f-3385-46c8-a6f5-6c3dfad7708b/retrievePolicyApplySchedule
68+
```
69+
70+
### Response
71+
72+
The following example shows the response.
73+
74+
<!-- {
75+
"blockType": "response",
76+
"truncated": true,
77+
"@odata.type": "microsoft.graph.cloudPcPolicyScheduledApplyActionDetail"
78+
}
79+
-->
80+
81+
``` http
82+
HTTP/1.1 200 OK
83+
84+
{
85+
"@odata.type": "https://graph.microsoft.com/beta/$metadata#cloudPcPolicyScheduledApplyActionDetail",
86+
"reservePercentage": 50,
87+
"cronScheduleExpression": "0 0 0 20 * *"
88+
}
89+
```
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
title: "cloudpcprovisioningpolicy: schedulePolicyApplyTask"
3+
description: "Set a scheduled auto-reprovision task to do automatic regular apply. `Frontline shared` only. Administrators only."
4+
author: "zhuangzhuang131419"
5+
ms.localizationpriority: medium
6+
ms.subservice: "cloud-pc"
7+
doc_type: apiPageType
8+
ms.date: 01/07/2025
9+
---
10+
11+
# cloudpcprovisioningpolicy: schedulePolicyApplyTask
12+
13+
Namespace: microsoft.graph
14+
15+
[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]
16+
17+
Set a scheduled auto-reprovision task to do automatic regular apply. `Frontline shared` only. Administrators only.
18+
19+
[!INCLUDE [national-cloud-support](../../includes/global-us.md)]
20+
21+
## Permissions
22+
23+
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](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference).
24+
25+
<!-- { "blockType": "permissions", "name": "cloudpcprovisioningpolicy-schedulePolicyApplyTask" } -->
26+
[!INCLUDE [permissions-table](../includes/permissions/cloudpcprovisioningpolicy-schedulePolicyApplyTask-permissions.md)]
27+
28+
## HTTP request
29+
30+
<!-- {
31+
"blockType": "ignored"
32+
}
33+
-->
34+
35+
``` http
36+
POST /deviceManagement/virtualEndpoint/provisioningPolicies/{id}/schedulePolicyApplyTask
37+
```
38+
39+
## Request headers
40+
41+
|Name|Description|
42+
|:---|:---|
43+
|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).|
44+
|Content-Type|application/json. Required.|
45+
46+
## Request body
47+
48+
In the request body, supply a JSON representation of the [cloudpcpolicyscheduledapplyactiondetail](../resources/cloudpcpolicyscheduledapplyactiondetail.md) object.
49+
50+
The following table shows the properties that can be supplied when you schedule a policy apply task.
51+
52+
|Parameter|Type|Description|
53+
|:---|:---|:---|
54+
|reservePercentage|Int32|For `Frontline shared` only. The percentage of Cloud PCs to keep available. Administrators can set this property to a value from 0 to 99. Cloud PCs are reprovisioned only when there are no active and connected Cloud PC users.|
55+
|cronScheduleExpression|String|Administrators can set a cron expression to define the scheduling rules for automatic regular apply. When auto provision is disabled, `cronScheduleExpression` is set to null, stopping the automatic task scheduling (ex. "0 0 0 20 * *" means schedules a job to run at midnight on the 20th of every month). Read-only.|
56+
57+
## Response
58+
59+
If successful, this method returns a `202 ACCEPTED` response code.
60+
61+
## Examples
62+
63+
### Request
64+
65+
The following example shows a request.
66+
67+
<!-- {
68+
"blockType": "request",
69+
"name": "cloudpcprovisioningpolicy-schedulePolicyApplyTask"
70+
}
71+
-->
72+
73+
``` http
74+
POST https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/provisioningPolicies/b0c2d35f-3385-46c8-a6f5-6c3dfad7708b/schedulePolicyApplyTask
75+
76+
{
77+
"reservePercentage": 50,
78+
"cronScheduleExpression": "0 0 0 20 * *"
79+
}
80+
81+
```
82+
83+
### Response
84+
85+
The following example shows the response.
86+
87+
<!-- {
88+
"blockType": "response",
89+
"truncated": true
90+
}
91+
-->
92+
93+
``` http
94+
HTTP/1.1 204 No Content
95+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
description: "Automatically generated file. DO NOT MODIFY"
3+
ms.topic: include
4+
ms.localizationpriority: medium
5+
---
6+
7+
|Permission type|Least privileged permissions|Higher privileged permissions|
8+
|:---|:---|:---|
9+
|Delegated (work or school account)|CloudPC.ReadWrite.All|Not available.|
10+
|Delegated (personal Microsoft account)|Not supported.|Not supported.|
11+
|Application|CloudPC.ReadWrite.All|Not available.|
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
description: "Automatically generated file. DO NOT MODIFY"
3+
ms.topic: include
4+
ms.localizationpriority: medium
5+
---
6+
7+
|Permission type|Least privileged permissions|Higher privileged permissions|
8+
|:---|:---|:---|
9+
|Delegated (work or school account)|CloudPC.ReadWrite.All|Not available.|
10+
|Delegated (personal Microsoft account)|Not supported.|Not supported.|
11+
|Application|CloudPC.ReadWrite.All|Not available.|
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
description: "Automatically generated file. DO NOT MODIFY"
3+
ms.topic: include
4+
ms.localizationpriority: medium
5+
---
6+
7+
|Permission type|Least privileged permissions|Higher privileged permissions|
8+
|:---|:---|:---|
9+
|Delegated (work or school account)|CloudPC.ReadWrite.All|Not available.|
10+
|Delegated (personal Microsoft account)|Not supported.|Not supported.|
11+
|Application|CloudPC.ReadWrite.All|Not available.|
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: "cloudPcPolicyApplyActionResult resource type"
3+
description: "Specifies the policy apply status, apply start time, and finish time. `Frontline shared` only."
4+
author: "zhuangzhuang131419"
5+
ms.localizationpriority: medium
6+
ms.subservice: "cloud-pc"
7+
doc_type: resourcePageType
8+
ms.date: 01/07/2025
9+
---
10+
11+
# cloudPcPolicyApplyActionResult resource type
12+
13+
Namespace: microsoft.graph
14+
15+
[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]
16+
17+
Specifies the policy apply status, apply start time, and finish time. `Frontline shared` only.
18+
19+
## Properties
20+
21+
|Property|Type|Description|
22+
|:---|:---|:---|
23+
|status|string|The status of the applied operation. Possible values are: `succeeded`, `pending`,`failed`, and `unknownFutureValue`.|
24+
|startDateTime|DateTime|The date and time when the operation was applied.|
25+
|finishDateTime|DateTime|The date and time when the operation finished.|
26+
27+
## JSON representation
28+
29+
The following JSON representation shows the resource type.
30+
<!-- {
31+
"blockType": "resource",
32+
"keyProperty": "id",
33+
"@odata.type": "microsoft.graph.cloudPcPolicyApplyActionResult",
34+
"baseType": "microsoft.graph.entity",
35+
"openType": false
36+
}
37+
-->
38+
39+
``` json
40+
{
41+
"@odata.type": "https://graph.microsoft.com/beta/$metadata#cloudPcPolicyApplyActionResult",
42+
"status": "succeeded",
43+
"startDateTime": "2024-10-10T00:00:00",
44+
"finishDateTime": "2024-10-11T00:00:00"
45+
}
46+
```

0 commit comments

Comments
 (0)