IoT / Paginator / ListAuditTasks

ListAuditTasks#

class IoT.Paginator.ListAuditTasks#
paginator = client.get_paginator('list_audit_tasks')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from IoT.Client.list_audit_tasks().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    startTime=datetime(2015, 1, 1),
    endTime=datetime(2015, 1, 1),
    taskType='ON_DEMAND_AUDIT_TASK'|'SCHEDULED_AUDIT_TASK',
    taskStatus='IN_PROGRESS'|'COMPLETED'|'FAILED'|'CANCELED',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • startTime (datetime) –

    [REQUIRED]

    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”.

  • endTime (datetime) –

    [REQUIRED]

    The end of the time period.

  • 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”.

  • 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”.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'tasks': [
        {
            'taskId': 'string',
            'taskStatus': 'IN_PROGRESS'|'COMPLETED'|'FAILED'|'CANCELED',
            'taskType': 'ON_DEMAND_AUDIT_TASK'|'SCHEDULED_AUDIT_TASK'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • tasks (list) –

      The audits that were performed during the specified time period.

      • (dict) –

        The audits that were performed.

        • taskId (string) –

          The ID of this audit.

        • taskStatus (string) –

          The status of this audit. One of “IN_PROGRESS”, “COMPLETED”, “FAILED”, or “CANCELED”.

        • taskType (string) –

          The type of this audit. One of “ON_DEMAND_AUDIT_TASK” or “SCHEDULED_AUDIT_TASK”.

    • NextToken (string) –

      A token to resume pagination.