Namespace: microsoft.graph
Hinweis: Die Microsoft Graph-API für Intune setzt eine aktive Intune-Lizenz für den Mandanten voraus.
Diese Methode aktualisiert die Eigenschaften von Objekten des Typs deviceConfigurationDeviceOverview.
Diese API ist in den folgenden nationalen Cloudbereitstellungen verfügbar.
Weltweiter Service |
US Government L4 |
US Government L5 (DOD) |
China, betrieben von 21Vianet |
✅ |
✅ |
✅ |
✅ |
Berechtigungen
Eine der nachfolgenden Berechtigungen ist erforderlich, um diese API aufrufen zu können. Weitere Informationen, unter anderem zur Auswahl von Berechtigungen, finden Sie unter Berechtigungen.
Berechtigungstyp |
Berechtigungen (von der Berechtigung mit den wenigsten Rechten zu der mit den meisten Rechten) |
Delegiert (Geschäfts-, Schul- oder Unikonto) |
DeviceManagementConfiguration.ReadWrite.All |
Delegiert (persönliches Microsoft-Konto) |
Nicht unterstützt |
Anwendung |
DeviceManagementConfiguration.ReadWrite.All |
HTTP-Anforderung
PATCH /deviceManagement/deviceConfigurations/{deviceConfigurationId}/deviceStatusOverview
Anforderungstext
Geben Sie als Anforderungstext eine JSON-Darstellung des Objekts des Typs deviceConfigurationDeviceOverview an.
In der folgenden Tabelle sind die Eigenschaften aufgeführt, die angegeben werden müssen, wenn Sie ein Objekt des Typs deviceConfigurationDeviceOverview erstellen.
Eigenschaft |
Typ |
Beschreibung |
id |
String |
Schlüssel der Entität |
pendingCount |
Int32 |
Anzahl der ausstehenden Geräte |
notApplicableCount |
Int32 |
Anzahl der ausgenommenen Geräte |
successCount |
Int32 |
Anzahl der erfolgreichen Geräte |
errorCount |
Int32 |
Anzahl der fehlerhaften Geräte |
failedCount |
Int32 |
Anzahl der fehlgeschlagenen Geräte |
lastUpdateDateTime |
DateTimeOffset |
Datum und Uhrzeit der letzten Aktualisierung |
configurationVersion |
Int32 |
Version der Richtlinie für diese Übersicht |
Antwort
Bei erfolgreicher Ausführung gibt die Methode den Antwortcode 200 OK
und ein aktualisiertes Objekt des Typs deviceConfigurationDeviceOverview im Antworttext zurück.
Beispiel
Anforderung
Nachfolgend sehen Sie ein Beispiel der Anforderung.
PATCH https://graph.microsoft.com/v1.0/deviceManagement/deviceConfigurations/{deviceConfigurationId}/deviceStatusOverview
Content-type: application/json
Content-length: 284
{
"@odata.type": "#microsoft.graph.deviceConfigurationDeviceOverview",
"pendingCount": 12,
"notApplicableCount": 2,
"successCount": 12,
"errorCount": 10,
"failedCount": 11,
"lastUpdateDateTime": "2016-12-31T23:58:21.6459442-08:00",
"configurationVersion": 4
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new DeviceConfigurationDeviceOverview
{
OdataType = "#microsoft.graph.deviceConfigurationDeviceOverview",
PendingCount = 12,
NotApplicableCount = 2,
SuccessCount = 12,
ErrorCount = 10,
FailedCount = 11,
LastUpdateDateTime = DateTimeOffset.Parse("2016-12-31T23:58:21.6459442-08:00"),
ConfigurationVersion = 4,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.DeviceConfigurations["{deviceConfiguration-id}"].DeviceStatusOverview.PatchAsync(requestBody);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
mgc device-management device-configurations device-status-overview patch --device-configuration-id {deviceConfiguration-id} --body '{\
"@odata.type": "#microsoft.graph.deviceConfigurationDeviceOverview",\
"pendingCount": 12,\
"notApplicableCount": 2,\
"successCount": 12,\
"errorCount": 10,\
"failedCount": 11,\
"lastUpdateDateTime": "2016-12-31T23:58:21.6459442-08:00",\
"configurationVersion": 4\
}\
'
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
"time"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewDeviceConfigurationDeviceOverview()
pendingCount := int32(12)
requestBody.SetPendingCount(&pendingCount)
notApplicableCount := int32(2)
requestBody.SetNotApplicableCount(¬ApplicableCount)
successCount := int32(12)
requestBody.SetSuccessCount(&successCount)
errorCount := int32(10)
requestBody.SetErrorCount(&errorCount)
failedCount := int32(11)
requestBody.SetFailedCount(&failedCount)
lastUpdateDateTime , err := time.Parse(time.RFC3339, "2016-12-31T23:58:21.6459442-08:00")
requestBody.SetLastUpdateDateTime(&lastUpdateDateTime)
configurationVersion := int32(4)
requestBody.SetConfigurationVersion(&configurationVersion)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
deviceStatusOverview, err := graphClient.DeviceManagement().DeviceConfigurations().ByDeviceConfigurationId("deviceConfiguration-id").DeviceStatusOverview().Patch(context.Background(), requestBody, nil)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
DeviceConfigurationDeviceOverview deviceConfigurationDeviceOverview = new DeviceConfigurationDeviceOverview();
deviceConfigurationDeviceOverview.setOdataType("#microsoft.graph.deviceConfigurationDeviceOverview");
deviceConfigurationDeviceOverview.setPendingCount(12);
deviceConfigurationDeviceOverview.setNotApplicableCount(2);
deviceConfigurationDeviceOverview.setSuccessCount(12);
deviceConfigurationDeviceOverview.setErrorCount(10);
deviceConfigurationDeviceOverview.setFailedCount(11);
OffsetDateTime lastUpdateDateTime = OffsetDateTime.parse("2016-12-31T23:58:21.6459442-08:00");
deviceConfigurationDeviceOverview.setLastUpdateDateTime(lastUpdateDateTime);
deviceConfigurationDeviceOverview.setConfigurationVersion(4);
DeviceConfigurationDeviceOverview result = graphClient.deviceManagement().deviceConfigurations().byDeviceConfigurationId("{deviceConfiguration-id}").deviceStatusOverview().patch(deviceConfigurationDeviceOverview);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
const options = {
authProvider,
};
const client = Client.init(options);
const deviceConfigurationDeviceOverview = {
'@odata.type': '#microsoft.graph.deviceConfigurationDeviceOverview',
pendingCount: 12,
notApplicableCount: 2,
successCount: 12,
errorCount: 10,
failedCount: 11,
lastUpdateDateTime: '2016-12-31T23:58:21.6459442-08:00',
configurationVersion: 4
};
await client.api('/deviceManagement/deviceConfigurations/{deviceConfigurationId}/deviceStatusOverview')
.update(deviceConfigurationDeviceOverview);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\DeviceConfigurationDeviceOverview;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new DeviceConfigurationDeviceOverview();
$requestBody->setOdataType('#microsoft.graph.deviceConfigurationDeviceOverview');
$requestBody->setPendingCount(12);
$requestBody->setNotApplicableCount(2);
$requestBody->setSuccessCount(12);
$requestBody->setErrorCount(10);
$requestBody->setFailedCount(11);
$requestBody->setLastUpdateDateTime(new \DateTime('2016-12-31T23:58:21.6459442-08:00'));
$requestBody->setConfigurationVersion(4);
$result = $graphServiceClient->deviceManagement()->deviceConfigurations()->byDeviceConfigurationId('deviceConfiguration-id')->deviceStatusOverview()->patch($requestBody)->wait();
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
Import-Module Microsoft.Graph.DeviceManagement
$params = @{
"@odata.type" = "#microsoft.graph.deviceConfigurationDeviceOverview"
pendingCount = 12
notApplicableCount = 2
successCount = 12
errorCount = 10
failedCount = 11
lastUpdateDateTime = [System.DateTime]::Parse("2016-12-31T23:58:21.6459442-08:00")
configurationVersion = 4
}
Update-MgDeviceManagementDeviceConfigurationDeviceStatusOverview -DeviceConfigurationId $deviceConfigurationId -BodyParameter $params
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.device_configuration_device_overview import DeviceConfigurationDeviceOverview
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = DeviceConfigurationDeviceOverview(
odata_type = "#microsoft.graph.deviceConfigurationDeviceOverview",
pending_count = 12,
not_applicable_count = 2,
success_count = 12,
error_count = 10,
failed_count = 11,
last_update_date_time = "2016-12-31T23:58:21.6459442-08:00",
configuration_version = 4,
)
result = await graph_client.device_management.device_configurations.by_device_configuration_id('deviceConfiguration-id').device_status_overview.patch(request_body)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
Antwort
Nachfolgend sehen Sie ein Beispiel der Antwort. Hinweis: Das hier gezeigte Antwortobjekt ist möglicherweise aus Platzgründen abgeschnitten. Von einem tatsächlichen Aufruf werden alle Eigenschaften zurückgegeben.
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 333
{
"@odata.type": "#microsoft.graph.deviceConfigurationDeviceOverview",
"id": "62d48e3a-8e3a-62d4-3a8e-d4623a8ed462",
"pendingCount": 12,
"notApplicableCount": 2,
"successCount": 12,
"errorCount": 10,
"failedCount": 11,
"lastUpdateDateTime": "2016-12-31T23:58:21.6459442-08:00",
"configurationVersion": 4
}