Indica o estado de execução do software maligno. Os valores possíveis são: desconhecido, bloqueado, permitido, em execução e não Em execução. A predefinição é desconhecida. Os valores possíveis são: unknown, blocked, allowed, running, notRunning.
Indica o estado de ameaça do software maligno. Os valores possíveis são: ativo, actionFailed, manualStepsRequired, fullScanRequired, rebootRequired, remediatedWithNonCriticalFailures, em quarentena, removido, limpo, permitido, noStatusCleared. a predefinição é noStatusCleared. Os valores possíveis são: active, actionFailed, manualStepsRequired, fullScanRequired, rebootRequired, remediatedWithNonCriticalFailures, quarantined, removed, cleaned, allowed, noStatusCleared.
initialDetectionDateTime
DateTimeOffset
Datetime de deteção inicial do software maligno
lastStateChangeDateTime
DateTimeOffset
A última vez que esta ameaça em particular foi alterada
detectionCount
Int32
Indica o número de vezes que o software maligno é detetado
Resposta
Se for bem-sucedido, este método devolve um 200 OK código de resposta e um objeto malwareStateForWindowsDevice atualizado no corpo da resposta.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new MalwareStateForWindowsDevice
{
OdataType = "#microsoft.graph.malwareStateForWindowsDevice",
DeviceName = "Device Name value",
ExecutionState = WindowsMalwareExecutionState.Blocked,
ThreatState = WindowsMalwareThreatState.ActionFailed,
InitialDetectionDateTime = DateTimeOffset.Parse("2016-12-31T23:57:05.3889692-08:00"),
LastStateChangeDateTime = DateTimeOffset.Parse("2016-12-31T23:59:51.0767794-08:00"),
DetectionCount = 14,
};
// 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}"].DeviceMalwareStates["{malwareStateForWindowsDevice-id}"].PatchAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
MalwareStateForWindowsDevice malwareStateForWindowsDevice = new MalwareStateForWindowsDevice();
malwareStateForWindowsDevice.setOdataType("#microsoft.graph.malwareStateForWindowsDevice");
malwareStateForWindowsDevice.setDeviceName("Device Name value");
malwareStateForWindowsDevice.setExecutionState(WindowsMalwareExecutionState.Blocked);
malwareStateForWindowsDevice.setThreatState(WindowsMalwareThreatState.ActionFailed);
OffsetDateTime initialDetectionDateTime = OffsetDateTime.parse("2016-12-31T23:57:05.3889692-08:00");
malwareStateForWindowsDevice.setInitialDetectionDateTime(initialDetectionDateTime);
OffsetDateTime lastStateChangeDateTime = OffsetDateTime.parse("2016-12-31T23:59:51.0767794-08:00");
malwareStateForWindowsDevice.setLastStateChangeDateTime(lastStateChangeDateTime);
malwareStateForWindowsDevice.setDetectionCount(14);
MalwareStateForWindowsDevice result = graphClient.deviceManagement().windowsMalwareInformation().byWindowsMalwareInformationId("{windowsMalwareInformation-id}").deviceMalwareStates().byMalwareStateForWindowsDeviceId("{malwareStateForWindowsDevice-id}").patch(malwareStateForWindowsDevice);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\MalwareStateForWindowsDevice;
use Microsoft\Graph\Generated\Models\WindowsMalwareExecutionState;
use Microsoft\Graph\Generated\Models\WindowsMalwareThreatState;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new MalwareStateForWindowsDevice();
$requestBody->setOdataType('#microsoft.graph.malwareStateForWindowsDevice');
$requestBody->setDeviceName('Device Name value');
$requestBody->setExecutionState(new WindowsMalwareExecutionState('blocked'));
$requestBody->setThreatState(new WindowsMalwareThreatState('actionFailed'));
$requestBody->setInitialDetectionDateTime(new \DateTime('2016-12-31T23:57:05.3889692-08:00'));
$requestBody->setLastStateChangeDateTime(new \DateTime('2016-12-31T23:59:51.0767794-08:00'));
$requestBody->setDetectionCount(14);
$result = $graphServiceClient->deviceManagement()->windowsMalwareInformation()->byWindowsMalwareInformationId('windowsMalwareInformation-id')->deviceMalwareStates()->byMalwareStateForWindowsDeviceId('malwareStateForWindowsDevice-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.malware_state_for_windows_device import MalwareStateForWindowsDevice
from msgraph.generated.models.windows_malware_execution_state import WindowsMalwareExecutionState
from msgraph.generated.models.windows_malware_threat_state import WindowsMalwareThreatState
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = MalwareStateForWindowsDevice(
odata_type = "#microsoft.graph.malwareStateForWindowsDevice",
device_name = "Device Name value",
execution_state = WindowsMalwareExecutionState.Blocked,
threat_state = WindowsMalwareThreatState.ActionFailed,
initial_detection_date_time = "2016-12-31T23:57:05.3889692-08:00",
last_state_change_date_time = "2016-12-31T23:59:51.0767794-08:00",
detection_count = 14,
)
result = await graph_client.device_management.windows_malware_information.by_windows_malware_information_id('windowsMalwareInformation-id').device_malware_states.by_malware_state_for_windows_device_id('malwareStateForWindowsDevice-id').patch(request_body)
Veja a seguir um exemplo da resposta. Observação: o objeto response mostrado aqui pode estar truncado por motivos de concisão. Todas as propriedades serão retornadas de uma chamada real.