Assurance / Client / list_tasks

list_tasks

Assurance.Client.list_tasks(**kwargs)

Lists all tasks within a governance environment.

See also: AWS API Documentation

Request Syntax

response = client.list_tasks(
    environmentArn='string',
    project='string',
    filters=[
        {
            'name': 'framework'|'framework-version'|'control-id'|'task-id'|'status'|'priority'|'assessment-id',
            'values': [
                'string',
            ]
        },
    ],
    maxResults=123,
    nextToken='string'
)
Parameters:
  • environmentArn (string) –

    [REQUIRED]

    The ARN of this governance environment.

  • project (string) –

    [REQUIRED]

    The project to list tasks for. Each request is scoped to one project.

  • filters (list) –

    The response filter criteria. Optional. See TaskFilterName for the filterable attributes. A result must match every attribute you name, and matches if it equals any of the values you give for that attribute. Omitting filters returns every task in the project.

    A single-valued criterion for framework, framework-version, or control-id narrows the results when every broader component is also supplied. When a broader component is absent, the criterion is applied to the returned results.

    An assessment-id criterion returns the task history for that assessment. It accepts one value and requires single-valued framework, framework-version, and control-id criteria alongside it.

    • (dict) –

      A single ListTasks filter criterion. Values within one criterion are combined with OR; criteria naming different attributes are combined with AND. Repeating an attribute name unions its value lists. Every criterion matches on exact equality.

      • name (string) – [REQUIRED]

        The task attribute to match on.

      • values (list) – [REQUIRED]

        The values to match the attribute against, compared for exact equality.

        • (string) –

          A value to match against a filter attribute. The match is exact. Wildcards aren’t supported.

  • maxResults (integer) – The maximum number of records to return on one page. If you omit it, the operation uses its default page size. If more records are available, use the nextToken value from the response to get the next page.

  • nextToken (string) – The pagination token returned by a previous request. Use it to retrieve the next page of results. If the value is null, there are no more results to return.

Return type:

dict

Returns:

Response Syntax

{
    'tasks': [
        {
            'environment': 'string',
            'project': 'string',
            'framework': 'string',
            'frameworkVersion': 'string',
            'controlId': 'string',
            'taskId': 'string',
            'title': 'string',
            'status': 'OPEN'|'PENDING'|'COMPLETED'|'CANCELLED',
            'createdBy': 'string',
            'assessmentId': 'string',
            'dueAt': datetime(2015, 1, 1),
            'priority': 'HIGH'|'MEDIUM'|'LOW'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • tasks (list) –

      The list of tasks.

      • (dict) –

        Contains a summary of a task.

        • environment (string) –

          The name of the governance environment the task belongs to.

        • project (string) –

          The name of the project.

        • framework (string) –

          The name of the compliance framework.

        • frameworkVersion (string) –

          The version of the compliance framework.

        • controlId (string) –

          The control identifier. Optional. If omitted, the operation applies to the full framework.

        • taskId (string) –

          The identifier of the task.

        • title (string) –

          The human-readable title of the task.

        • status (string) –

          The current lifecycle state of the task.

        • createdBy (string) –

          The identity of the principal who created the task.

        • assessmentId (string) –

          The assessment whose task history this task was reached through. Present when the request selected an assessment.

        • dueAt (datetime) –

          The deadline for the task.

        • priority (string) –

          The relative priority of the item.

    • nextToken (string) –

      The pagination token returned by a previous request. Use it to retrieve the next page of results. If the value is null, there are no more results to return.

Exceptions

  • Assurance.Client.exceptions.ValidationException

  • Assurance.Client.exceptions.InternalServerException

  • Assurance.Client.exceptions.ThrottlingException

  • Assurance.Client.exceptions.AccessDeniedException

  • Assurance.Client.exceptions.ResourceNotFoundException