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

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

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

Starts a Device Defender ML Detect mitigation actions task.

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

## Path parameters

- `taskId` string, required

## Request body

- object
  - `target` object, required — The target of a mitigation action task.
    - `violationIds` ViolationId[] — The unique identifiers of the violations.
    - `securityProfileName` string — The name of the security profile.
    - `behaviorName` string — The name of the behavior.
  - `actions` MitigationActionName[], required — The actions to be performed when a device has unexpected behavior.
  - `violationEventOccurrenceRange` object — Specifies the time period of which violation events occurred between.
    - `startTime` string, date-time — The start date and time of a time period in which violation events occurred.
    - `endTime` string, date-time — The end date and time of a time period in which violation events occurred.
  - `includeOnlyActiveViolations` boolean — Specifies to list only active violations.
  - `includeSuppressedAlerts` boolean — Specifies to include suppressed alerts.
  - `clientRequestToken` string, required — Each mitigation action task must have a unique client request token. If you try to create a new task with the same token as a task that already exists, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.

## Response `200`

Success

- StartDetectMitigationActionsTaskResponse
  - `taskId` string — The unique identifier of the task.

## Other responses

- `480` — InvalidRequestException
- `481` — TaskAlreadyExistsException
- `482` — LimitExceededException
- `483` — ThrottlingException
- `484` — 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/revisions/deef5c4b09f0/schema)
