audit_tasks
Creates, updates, deletes, gets or lists an audit_tasks resource.
Overview
| Name | audit_tasks |
| Type | Resource |
| Id | aws.iot.audit_tasks |
Fields
The following fields are returned by SELECT queries:
- list_audit_tasks
- describe_audit_task
| Name | Datatype | Description |
|---|---|---|
task_id | string | The ID of this audit. (pattern: <code>[a-zA-Z0-9-]+</code>) |
task_status | string | The status of this audit. One of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED". (IN_PROGRESS, COMPLETED, FAILED, CANCELED) |
task_type | string | The type of this audit. One of "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK". (ON_DEMAND_AUDIT_TASK, SCHEDULED_AUDIT_TASK) |
| Name | Datatype | Description |
|---|---|---|
audit_details | object | Detailed information about each check performed during this audit. |
scheduled_audit_name | string | The name of the scheduled audit (only if the audit was a scheduled audit). (pattern: <code>[a-zA-Z0-9_-]+</code>) |
task_start_time | string (date-time) | The time the audit started. |
task_statistics | object | Statistical information about the audit. |
task_status | string | The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED". (IN_PROGRESS, COMPLETED, FAILED, CANCELED) |
task_type | string | The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK". (ON_DEMAND_AUDIT_TASK, SCHEDULED_AUDIT_TASK) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_audit_tasks | select | startTime, endTime, region | taskType, taskStatus, nextToken, maxResults | Lists the Device Defender audits that have been performed during a given time period. Requires permission to access the ListAuditTasks action. |
describe_audit_task | select | task_id, region | Gets information about a Device Defender audit. Requires permission to access the DescribeAuditTask action. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
endTime | string (date-time) | The end of the time period. |
region | string | AWS region (default: us-east-1) |
startTime | string (date-time) | The beginning of the time period. Audit information is retained for a limited time (90 days). Requesting a start time prior to what is retained results in an "InvalidRequestException". |
task_id | string | The ID of the audit whose information you want to get. |
maxResults | integer | The maximum number of results to return at one time. The default is 25. |
nextToken | string | The token for the next set of results. |
taskStatus | string | A filter to limit the output to audits with the specified completion status: can be one of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED". |
taskType | string | A filter to limit the output to the specified type of audit: can be one of "ON_DEMAND_AUDIT_TASK" or "SCHEDULED__AUDIT_TASK". |
SELECT examples
- list_audit_tasks
- describe_audit_task
Lists the Device Defender audits that have been performed during a given time period. Requires permission to access the ListAuditTasks action.
SELECT
task_id,
task_status,
task_type
FROM aws.iot.audit_tasks
WHERE startTime = '{{ startTime }}' -- required
AND endTime = '{{ endTime }}' -- required
AND region = '{{ region }}' -- required
AND taskType = '{{ taskType }}'
AND taskStatus = '{{ taskStatus }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
Gets information about a Device Defender audit. Requires permission to access the DescribeAuditTask action.
SELECT
audit_details,
scheduled_audit_name,
task_start_time,
task_statistics,
task_status,
task_type
FROM aws.iot.audit_tasks
WHERE task_id = '{{ task_id }}' -- required
AND region = '{{ region }}' -- required
;