describe_audit_task
(**kwargs)¶Gets information about a Device Defender audit.
Requires permission to access the DescribeAuditTask action.
See also: AWS API Documentation
Request Syntax
response = client.describe_audit_task(
taskId='string'
)
[REQUIRED]
The ID of the audit whose information you want to get.
{
'taskStatus': 'IN_PROGRESS'|'COMPLETED'|'FAILED'|'CANCELED',
'taskType': 'ON_DEMAND_AUDIT_TASK'|'SCHEDULED_AUDIT_TASK',
'taskStartTime': datetime(2015, 1, 1),
'taskStatistics': {
'totalChecks': 123,
'inProgressChecks': 123,
'waitingForDataCollectionChecks': 123,
'compliantChecks': 123,
'nonCompliantChecks': 123,
'failedChecks': 123,
'canceledChecks': 123
},
'scheduledAuditName': 'string',
'auditDetails': {
'string': {
'checkRunStatus': 'IN_PROGRESS'|'WAITING_FOR_DATA_COLLECTION'|'CANCELED'|'COMPLETED_COMPLIANT'|'COMPLETED_NON_COMPLIANT'|'FAILED',
'checkCompliant': True|False,
'totalResourcesCount': 123,
'nonCompliantResourcesCount': 123,
'suppressedNonCompliantResourcesCount': 123,
'errorCode': 'string',
'message': 'string'
}
}
}
Response Structure
The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED".
The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK".
The time the audit started.
Statistical information about the audit.
The number of checks in this audit.
The number of checks in progress.
The number of checks waiting for data collection.
The number of checks that found compliant resources.
The number of checks that found noncompliant resources.
The number of checks.
The number of checks that did not run because the audit was canceled.
The name of the scheduled audit (only if the audit was a scheduled audit).
Detailed information about each check performed during this audit.
An audit check name. Checks must be enabled for your account. (Use DescribeAccountAuditConfiguration
to see the list of all checks, including those that are enabled or use UpdateAccountAuditConfiguration
to select which checks are enabled.)
Information about the audit check.
The completion status of this check. One of "IN_PROGRESS", "WAITING_FOR_DATA_COLLECTION", "CANCELED", "COMPLETED_COMPLIANT", "COMPLETED_NON_COMPLIANT", or "FAILED".
True if the check is complete and found all resources compliant.
The number of resources on which the check was performed.
The number of resources that were found noncompliant during the check.
Describes how many of the non-compliant resources created during the evaluation of an audit check were marked as suppressed.
The code of any error encountered when this check is performed during this audit. One of "INSUFFICIENT_PERMISSIONS" or "AUDIT_CHECK_DISABLED".
The message associated with any error encountered when this check is performed during this audit.
Exceptions
IoT.Client.exceptions.InvalidRequestException
IoT.Client.exceptions.ResourceNotFoundException
IoT.Client.exceptions.ThrottlingException
IoT.Client.exceptions.InternalFailureException