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.
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new Microsoft.Graph.Beta.Models.WindowsUpdates.Deployment
{
OdataType = "#microsoft.graph.windowsUpdates.deployment",
Content = new Microsoft.Graph.Beta.Models.WindowsUpdates.DeployableContent
{
OdataType = "#microsoft.graph.windowsUpdates.catalogContent",
AdditionalData = new Dictionary<string, object>
{
{
"catalogEntry" , new
{
OdataType = "#microsoft.graph.windowsUpdates.featureUpdateCatalogEntry",
Id = "f341705b-0b15-4ce3-aaf2-6a1681d78606",
}
},
},
},
Settings = new Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentSettings
{
OdataType = "microsoft.graph.windowsUpdates.deploymentSettings",
Schedule = new Microsoft.Graph.Beta.Models.WindowsUpdates.ScheduleSettings
{
GradualRollout = new Microsoft.Graph.Beta.Models.WindowsUpdates.GradualRolloutSettings
{
OdataType = "#microsoft.graph.windowsUpdates.rateDrivenRolloutSettings",
DurationBetweenOffers = TimeSpan.Parse("P7D"),
AdditionalData = new Dictionary<string, object>
{
{
"devicePerOffer" , 100
},
},
},
},
Monitoring = new Microsoft.Graph.Beta.Models.WindowsUpdates.MonitoringSettings
{
MonitoringRules = new List<Microsoft.Graph.Beta.Models.WindowsUpdates.MonitoringRule>
{
new Microsoft.Graph.Beta.Models.WindowsUpdates.MonitoringRule
{
Signal = Microsoft.Graph.Beta.Models.WindowsUpdates.MonitoringSignal.Rollback,
Threshold = 5,
Action = Microsoft.Graph.Beta.Models.WindowsUpdates.MonitoringAction.PauseDeployment,
},
},
},
},
};
var result = await graphClient.Admin.Windows.Updates.Deployments.PostAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new Deployment();
$requestBody->set@odatatype('#microsoft.graph.windowsUpdates.deployment');
$content = new DeployableContent();
$content->set@odatatype('#microsoft.graph.windowsUpdates.catalogContent');
$additionalData = [
'catalogEntry' => $content = new CatalogEntry();
$ content->set@odatatype('#microsoft.graph.windowsUpdates.featureUpdateCatalogEntry');
$ content->setId('f341705b-0b15-4ce3-aaf2-6a1681d78606');
$content->setCatalogEntry($catalogEntry);
];
$content->setAdditionalData($additionalData);
$requestBody->setContent($content);
$settings = new DeploymentSettings();
$settings->set@odatatype('microsoft.graph.windowsUpdates.deploymentSettings');
$settingsSchedule = new ScheduleSettings();
$settingsScheduleGradualRollout = new GradualRolloutSettings();
$settingsScheduleGradualRollout->set@odatatype('#microsoft.graph.windowsUpdates.rateDrivenRolloutSettings');
$settingsScheduleGradualRollout->setDurationBetweenOffers(new \DateInterval('P7D'));
$additionalData = [
'devicePerOffer' => 100,
];
$settingsScheduleGradualRollout->setAdditionalData($additionalData);
$settingsSchedule->setGradualRollout($settingsScheduleGradualRollout);
$settings->setSchedule($settingsSchedule);
$settingsMonitoring = new MonitoringSettings();
$monitoringRulesMonitoringRule1 = new MonitoringRule();
$monitoringRulesMonitoringRule1->setSignal(new MonitoringSignal('rollback'));
$monitoringRulesMonitoringRule1->setThreshold(5);
$monitoringRulesMonitoringRule1->setAction(new MonitoringAction('pausedeployment'));
$monitoringRulesArray []= $monitoringRulesMonitoringRule1;
$settingsMonitoring->setMonitoringRules($monitoringRulesArray);
$settings->setMonitoring($settingsMonitoring);
$requestBody->setSettings($settings);
$result = $graphServiceClient->admin()->windows()->updates()->deployments()->post($requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.