---
title: "GET /detect/mitigationactions/tasks/{taskId}"
method: GET
path: "/detect/mitigationactions/tasks/{taskId}"
---

# GET /detect/mitigationactions/tasks/{taskId}

`GET /detect/mitigationactions/tasks/{taskId}`

Gets information about a Device Defender ML Detect mitigation action.

Requires permission to access the [DescribeDetectMitigationActionsTask](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) action.

## Path parameters

- `taskId` string, required

## Response `200`

Success

- DescribeDetectMitigationActionsTaskResponse
  - `taskSummary` object — The description of a task.
    - `taskId` string — The unique identifier of the task.
    - `taskStatus` 'IN_PROGRESS' | 'SUCCESSFUL' | 'FAILED' | 'CANCELED' — The status of the task.
    - `taskStartTime` string, date-time — The date the task started.
    - `taskEndTime` string, date-time — The date the task ended.
    - `target` object — Specifies the ML Detect findings to which the mitigation actions are applied.
      - `violationIds` ViolationId[] — The unique identifiers of the violations.
      - `securityProfileName` string — The name of the security profile.
      - `behaviorName` string — The name of the behavior.
    - `violationEventOccurrenceRange` object — Specifies the time period of which violation events occurred between.
      - `startTime` string, date-time, required — The start date and time of a time period in which violation events occurred.
      - `endTime` string, date-time, required — The end date and time of a time period in which violation events occurred.
    - `onlyActiveViolationsIncluded` boolean — Includes only active violations.
    - `suppressedAlertsIncluded` boolean — Includes suppressed alerts.
    - `actionsDefinition` MitigationAction[] — The definition of the actions.
      - `name` string — A user-friendly name for the mitigation action.
      - `id` string — A unique identifier for the mitigation action.
      - `roleArn` string — The IAM role ARN used to apply this mitigation action.
      - `actionParams` object — The set of parameters for this mitigation action. The parameters vary, depending on the kind of action you apply.
        - `updateDeviceCertificateParams` object — Parameters to define a mitigation action that changes the state of the device certificate to inactive.
          - `action` 'DEACTIVATE', required — The action that you want to apply to the device certificate. The only supported value is <code>DEACTIVATE</code>.
        - `updateCACertificateParams` object — Parameters to define a mitigation action that changes the state of the CA certificate to inactive.
          - `action` 'DEACTIVATE', required — The action that you want to apply to the CA certificate. The only supported value is <code>DEACTIVATE</code>.
        - `addThingsToThingGroupParams` object — Parameters to define a mitigation action that moves devices associated with a certificate to one or more specified thing groups, typically for quarantine.
          - `thingGroupNames` ThingGroupName[], required — The list of groups to which you want to add the things that triggered the mitigation action. You can add a thing to a maximum of 10 groups, but you can't add a thing to more than one group in the same hierarchy.
          - `overrideDynamicGroups` boolean — Specifies if this mitigation action can move the things that triggered the mitigation action even if they are part of one or more dynamic thing groups.
        - `replaceDefaultPolicyVersionParams` object — Parameters to define a mitigation action that adds a blank policy to restrict permissions.
          - `templateName` 'BLANK_POLICY', required — The name of the template to be applied. The only supported value is <code>BLANK_POLICY</code>.
        - `enableIoTLoggingParams` object — Parameters to define a mitigation action that enables Amazon Web Services IoT Core logging at a specified level of detail.
          - `roleArnForLogging` string, required — The Amazon Resource Name (ARN) of the IAM role used for logging.
          - `logLevel` 'DEBUG' | 'INFO' | 'ERROR' | 'WARN' | 'DISABLED', required — Specifies the type of information to be logged.
        - `publishFindingToSnsParams` object — Parameters to define a mitigation action that publishes findings to Amazon Simple Notification Service (Amazon SNS. You can implement your own custom actions in response to the Amazon SNS messages.
          - `topicArn` string, required — The ARN of the topic to which you want to publish the findings.
    - `taskStatistics` object — The statistics of a mitigation action task.
      - `actionsExecuted` integer — The actions that were performed.
      - `actionsSkipped` integer — The actions that were skipped.
      - `actionsFailed` integer — The actions that failed.

## Other responses

- `480` — ResourceNotFoundException
- `481` — InvalidRequestException
- `482` — ThrottlingException
- `483` — InternalFailureException

---

[API](https://skmtc.net/aws/apis/iot.md) · [All operations](https://skmtc.net/aws/apis/iot/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/iot/versions/deef5c4b09f0/schema)
