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)
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new WindowsMalwareInformation
{
OdataType = "#microsoft.graph.windowsMalwareInformation",
DisplayName = "Display Name value",
AdditionalInformationUrl = "https://example.com/additionalInformationUrl/",
Severity = WindowsMalwareSeverity.Low,
Category = WindowsMalwareCategory.Adware,
LastDetectionDateTime = DateTimeOffset.Parse("2016-12-31T23:59:27.3805104-08:00"),
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.WindowsMalwareInformation["{windowsMalwareInformation-id}"].PatchAsync(requestBody);
// 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.NewWindowsMalwareInformation()
displayName := "Display Name value"
requestBody.SetDisplayName(&displayName)
additionalInformationUrl := "https://example.com/additionalInformationUrl/"
requestBody.SetAdditionalInformationUrl(&additionalInformationUrl)
severity := graphmodels.LOW_WINDOWSMALWARESEVERITY
requestBody.SetSeverity(&severity)
category := graphmodels.ADWARE_WINDOWSMALWARECATEGORY
requestBody.SetCategory(&category)
lastDetectionDateTime , err := time.Parse(time.RFC3339, "2016-12-31T23:59:27.3805104-08:00")
requestBody.SetLastDetectionDateTime(&lastDetectionDateTime)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
windowsMalwareInformation, err := graphClient.DeviceManagement().WindowsMalwareInformation().ByWindowsMalwareInformationId("windowsMalwareInformation-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);
WindowsMalwareInformation windowsMalwareInformation = new WindowsMalwareInformation();
windowsMalwareInformation.setOdataType("#microsoft.graph.windowsMalwareInformation");
windowsMalwareInformation.setDisplayName("Display Name value");
windowsMalwareInformation.setAdditionalInformationUrl("https://example.com/additionalInformationUrl/");
windowsMalwareInformation.setSeverity(WindowsMalwareSeverity.Low);
windowsMalwareInformation.setCategory(WindowsMalwareCategory.Adware);
OffsetDateTime lastDetectionDateTime = OffsetDateTime.parse("2016-12-31T23:59:27.3805104-08:00");
windowsMalwareInformation.setLastDetectionDateTime(lastDetectionDateTime);
WindowsMalwareInformation result = graphClient.deviceManagement().windowsMalwareInformation().byWindowsMalwareInformationId("{windowsMalwareInformation-id}").patch(windowsMalwareInformation);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\WindowsMalwareInformation;
use Microsoft\Graph\Generated\Models\WindowsMalwareSeverity;
use Microsoft\Graph\Generated\Models\WindowsMalwareCategory;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new WindowsMalwareInformation();
$requestBody->setOdataType('#microsoft.graph.windowsMalwareInformation');
$requestBody->setDisplayName('Display Name value');
$requestBody->setAdditionalInformationUrl('https://example.com/additionalInformationUrl/');
$requestBody->setSeverity(new WindowsMalwareSeverity('low'));
$requestBody->setCategory(new WindowsMalwareCategory('adware'));
$requestBody->setLastDetectionDateTime(new \DateTime('2016-12-31T23:59:27.3805104-08:00'));
$result = $graphServiceClient->deviceManagement()->windowsMalwareInformation()->byWindowsMalwareInformationId('windowsMalwareInformation-id')->patch($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.windows_malware_information import WindowsMalwareInformation
from msgraph.generated.models.windows_malware_severity import WindowsMalwareSeverity
from msgraph.generated.models.windows_malware_category import WindowsMalwareCategory
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = WindowsMalwareInformation(
odata_type = "#microsoft.graph.windowsMalwareInformation",
display_name = "Display Name value",
additional_information_url = "https://example.com/additionalInformationUrl/",
severity = WindowsMalwareSeverity.Low,
category = WindowsMalwareCategory.Adware,
last_detection_date_time = "2016-12-31T23:59:27.3805104-08:00",
)
result = await graph_client.device_management.windows_malware_information.by_windows_malware_information_id('windowsMalwareInformation-id').patch(request_body)
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.