ListDetectMitigationActionsExecutionsCommand

Lists mitigation actions executions for a Device Defender ML Detect Security Profile.

Requires permission to access the ListDetectMitigationActionsExecutions  action.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { IoTClient, ListDetectMitigationActionsExecutionsCommand } from "@aws-sdk/client-iot"; // ES Modules import
// const { IoTClient, ListDetectMitigationActionsExecutionsCommand } = require("@aws-sdk/client-iot"); // CommonJS import
const client = new IoTClient(config);
const input = { // ListDetectMitigationActionsExecutionsRequest
  taskId: "STRING_VALUE",
  violationId: "STRING_VALUE",
  thingName: "STRING_VALUE",
  startTime: new Date("TIMESTAMP"),
  endTime: new Date("TIMESTAMP"),
  maxResults: Number("int"),
  nextToken: "STRING_VALUE",
};
const command = new ListDetectMitigationActionsExecutionsCommand(input);
const response = await client.send(command);
// { // ListDetectMitigationActionsExecutionsResponse
//   actionsExecutions: [ // DetectMitigationActionExecutionList
//     { // DetectMitigationActionExecution
//       taskId: "STRING_VALUE",
//       violationId: "STRING_VALUE",
//       actionName: "STRING_VALUE",
//       thingName: "STRING_VALUE",
//       executionStartDate: new Date("TIMESTAMP"),
//       executionEndDate: new Date("TIMESTAMP"),
//       status: "IN_PROGRESS" || "SUCCESSFUL" || "FAILED" || "SKIPPED",
//       errorCode: "STRING_VALUE",
//       message: "STRING_VALUE",
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListDetectMitigationActionsExecutionsCommand Input

Parameter
Type
Description
endTime
Date | undefined

The end of the time period for which ML Detect mitigation actions executions are returned.

maxResults
number | undefined

The maximum number of results to return at one time. The default is 25.

nextToken
string | undefined

The token for the next set of results.

startTime
Date | undefined

A filter to limit results to those found after the specified time. You must specify either the startTime and endTime or the taskId, but not both.

taskId
string | undefined

The unique identifier of the task.

thingName
string | undefined

The name of the thing whose mitigation actions are listed.

violationId
string | undefined

The unique identifier of the violation.

ListDetectMitigationActionsExecutionsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
actionsExecutions
DetectMitigationActionExecution[] | undefined

List of actions executions.

nextToken
string | undefined

A token that can be used to retrieve the next set of results, or null if there are no additional results.

Throws

Name
Fault
Details
InternalFailureException
server

An unexpected error has occurred.

InvalidRequestException
client

The request is not valid.

ThrottlingException
client

The rate exceeds the limit.

IoTServiceException
Base exception class for all service exceptions from IoT service.