L’une des autorisations suivantes est nécessaire pour appeler cette API. Pour plus d’informations, notamment sur la façon de choisir les autorisations, voir Autorisations.
Type d’autorisation
Autorisations (de celle qui offre le plus de privilèges à celle qui en offre le moins)
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new SettingStateDeviceSummary
{
OdataType = "#microsoft.graph.settingStateDeviceSummary",
SettingName = "Setting Name value",
InstancePath = "Instance Path value",
UnknownDeviceCount = 2,
NotApplicableDeviceCount = 8,
CompliantDeviceCount = 4,
RemediatedDeviceCount = 5,
NonCompliantDeviceCount = 7,
ErrorDeviceCount = 0,
ConflictDeviceCount = 3,
};
// To initialize your graphClient, see https://zcusa.951200.xyz/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.DeviceConfigurations["{deviceConfiguration-id}"].DeviceSettingStateSummaries["{settingStateDeviceSummary-id}"].PatchAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
SettingStateDeviceSummary settingStateDeviceSummary = new SettingStateDeviceSummary();
settingStateDeviceSummary.setOdataType("#microsoft.graph.settingStateDeviceSummary");
settingStateDeviceSummary.setSettingName("Setting Name value");
settingStateDeviceSummary.setInstancePath("Instance Path value");
settingStateDeviceSummary.setUnknownDeviceCount(2);
settingStateDeviceSummary.setNotApplicableDeviceCount(8);
settingStateDeviceSummary.setCompliantDeviceCount(4);
settingStateDeviceSummary.setRemediatedDeviceCount(5);
settingStateDeviceSummary.setNonCompliantDeviceCount(7);
settingStateDeviceSummary.setErrorDeviceCount(0);
settingStateDeviceSummary.setConflictDeviceCount(3);
SettingStateDeviceSummary result = graphClient.deviceManagement().deviceConfigurations().byDeviceConfigurationId("{deviceConfiguration-id}").deviceSettingStateSummaries().bySettingStateDeviceSummaryId("{settingStateDeviceSummary-id}").patch(settingStateDeviceSummary);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.setting_state_device_summary import SettingStateDeviceSummary
# To initialize your graph_client, see https://zcusa.951200.xyz/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = SettingStateDeviceSummary(
odata_type = "#microsoft.graph.settingStateDeviceSummary",
setting_name = "Setting Name value",
instance_path = "Instance Path value",
unknown_device_count = 2,
not_applicable_device_count = 8,
compliant_device_count = 4,
remediated_device_count = 5,
non_compliant_device_count = 7,
error_device_count = 0,
conflict_device_count = 3,
)
result = await graph_client.device_management.device_configurations.by_device_configuration_id('deviceConfiguration-id').device_setting_state_summaries.by_setting_state_device_summary_id('settingStateDeviceSummary-id').patch(request_body)
Voici un exemple de réponse. Remarque : l’objet de réponse illustré ici peut être tronqué à des fins de concision. Toutes les propriétés sont renvoyées à partir d’un appel réel.