AWS IoT
API Reference

DescribeAuditTask

Gets information about a Device Defender audit.

Request Syntax

GET /audit/tasks/taskId HTTP/1.1

URI Request Parameters

The request requires the following URI parameters.

taskId

The ID of the audit whose information you want to get.

Length Constraints: Minimum length of 1. Maximum length of 40.

Pattern: [a-zA-Z0-9\-]+

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "auditDetails": { "string" : { "checkCompliant": boolean, "checkRunStatus": "string", "errorCode": "string", "message": "string", "nonCompliantResourcesCount": number, "totalResourcesCount": number } }, "scheduledAuditName": "string", "taskStartTime": number, "taskStatistics": { "canceledChecks": number, "compliantChecks": number, "failedChecks": number, "inProgressChecks": number, "nonCompliantChecks": number, "totalChecks": number, "waitingForDataCollectionChecks": number }, "taskStatus": "string", "taskType": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

auditDetails

Detailed information about each check performed during this audit.

Type: String to AuditCheckDetails object map

scheduledAuditName

The name of the scheduled audit (only if the audit was a scheduled audit).

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [a-zA-Z0-9_-]+

taskStartTime

The time the audit started.

Type: Timestamp

taskStatistics

Statistical information about the audit.

Type: TaskStatistics object

taskStatus

The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED".

Type: String

Valid Values: IN_PROGRESS | COMPLETED | FAILED | CANCELED

taskType

The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK".

Type: String

Valid Values: ON_DEMAND_AUDIT_TASK | SCHEDULED_AUDIT_TASK

Errors

InternalFailureException

An unexpected error has occurred.

HTTP Status Code: 500

InvalidRequestException

The request is not valid.

HTTP Status Code: 400

ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 404

ThrottlingException

The rate exceeds the limit.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: