CodeGuruSecurity / Client / list_scans

list_scans

CodeGuruSecurity.Client.list_scans(**kwargs)

Returns a list of all scans in an account. Does not return EXPRESS scans.

See also: AWS API Documentation

Request Syntax

response = client.list_scans(
    nextToken='string',
    maxResults=123
)
Parameters:
  • nextToken (string) – A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the nextToken value returned from the previous request to continue listing results after the first page.

  • maxResults (integer) – The maximum number of results to return in the response. Use this parameter when paginating results. If additional results exist beyond the number you specify, the nextToken element is returned in the response. Use nextToken in a subsequent request to retrieve additional results. If not specified, returns 100 results.

Return type:

dict

Returns:

Response Syntax

{
    'summaries': [
        {
            'scanState': 'InProgress'|'Successful'|'Failed',
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1),
            'scanName': 'string',
            'runId': 'string',
            'scanNameArn': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • summaries (list) –

      A list of ScanSummary objects with information about all scans in an account.

      • (dict) –

        Information about a scan.

        • scanState (string) –

          The state of the scan. A scan can be In Progress, Complete, or Failed.

        • createdAt (datetime) –

          The time when the scan was created.

        • updatedAt (datetime) –

          The time the scan was last updated. A scan is updated when it is re-run.

        • scanName (string) –

          The name of the scan.

        • runId (string) –

          The identifier for the scan run.

        • scanNameArn (string) –

          The ARN for the scan name.

    • nextToken (string) –

      A pagination token. You can use this in future calls to ListScans to continue listing results after the current page.

Exceptions