Inspector2 / Client / list_cis_scan_results_aggregated_by_target_resource

list_cis_scan_results_aggregated_by_target_resource#

Inspector2.Client.list_cis_scan_results_aggregated_by_target_resource(**kwargs)#

Lists scan results aggregated by a target resource.

See also: AWS API Documentation

Request Syntax

response = client.list_cis_scan_results_aggregated_by_target_resource(
    filterCriteria={
        'accountIdFilters': [
            {
                'comparison': 'EQUALS'|'PREFIX'|'NOT_EQUALS',
                'value': 'string'
            },
        ],
        'checkIdFilters': [
            {
                'comparison': 'EQUALS'|'PREFIX'|'NOT_EQUALS',
                'value': 'string'
            },
        ],
        'failedChecksFilters': [
            {
                'lowerInclusive': 123,
                'upperInclusive': 123
            },
        ],
        'platformFilters': [
            {
                'comparison': 'EQUALS'|'PREFIX'|'NOT_EQUALS',
                'value': 'string'
            },
        ],
        'statusFilters': [
            {
                'comparison': 'EQUALS',
                'value': 'PASSED'|'FAILED'|'SKIPPED'
            },
        ],
        'targetResourceIdFilters': [
            {
                'comparison': 'EQUALS'|'PREFIX'|'NOT_EQUALS',
                'value': 'string'
            },
        ],
        'targetResourceTagFilters': [
            {
                'comparison': 'EQUALS',
                'key': 'string',
                'value': 'string'
            },
        ],
        'targetStatusFilters': [
            {
                'comparison': 'EQUALS',
                'value': 'TIMED_OUT'|'CANCELLED'|'COMPLETED'
            },
        ],
        'targetStatusReasonFilters': [
            {
                'comparison': 'EQUALS',
                'value': 'SCAN_IN_PROGRESS'|'UNSUPPORTED_OS'|'SSM_UNMANAGED'
            },
        ]
    },
    maxResults=123,
    nextToken='string',
    scanArn='string',
    sortBy='RESOURCE_ID'|'FAILED_COUNTS'|'ACCOUNT_ID'|'PLATFORM'|'TARGET_STATUS'|'TARGET_STATUS_REASON',
    sortOrder='ASC'|'DESC'
)
Parameters:
  • filterCriteria (dict) –

    The filter criteria.

    • accountIdFilters (list) –

      The criteria’s account ID filters.

      • (dict) –

        The CIS string filter.

        • comparison (string) – [REQUIRED]

          The comparison value of the CIS string filter.

        • value (string) – [REQUIRED]

          The value of the CIS string filter.

    • checkIdFilters (list) –

      The criteria’s check ID filters.

      • (dict) –

        The CIS string filter.

        • comparison (string) – [REQUIRED]

          The comparison value of the CIS string filter.

        • value (string) – [REQUIRED]

          The value of the CIS string filter.

    • failedChecksFilters (list) –

      The criteria’s failed checks filters.

      • (dict) –

        The CIS number filter.

        • lowerInclusive (integer) –

          The CIS number filter’s lower inclusive.

        • upperInclusive (integer) –

          The CIS number filter’s upper inclusive.

    • platformFilters (list) –

      The criteria’s platform filters.

      • (dict) –

        The CIS string filter.

        • comparison (string) – [REQUIRED]

          The comparison value of the CIS string filter.

        • value (string) – [REQUIRED]

          The value of the CIS string filter.

    • statusFilters (list) –

      The criteria’s status filter.

      • (dict) –

        The CIS result status filter.

        • comparison (string) – [REQUIRED]

          The comparison value of the CIS result status filter.

        • value (string) – [REQUIRED]

          The value of the CIS result status filter.

    • targetResourceIdFilters (list) –

      The criteria’s target resource ID filters.

      • (dict) –

        The CIS string filter.

        • comparison (string) – [REQUIRED]

          The comparison value of the CIS string filter.

        • value (string) – [REQUIRED]

          The value of the CIS string filter.

    • targetResourceTagFilters (list) –

      The criteria’s target resource tag filters.

      • (dict) –

        The tag filter.

        • comparison (string) – [REQUIRED]

          The tag filter comparison value.

        • key (string) – [REQUIRED]

          The tag filter key.

        • value (string) – [REQUIRED]

          The tag filter value.

    • targetStatusFilters (list) –

      The criteria’s target status filters.

      • (dict) –

        The CIS target status filter.

        • comparison (string) – [REQUIRED]

          The comparison value of the CIS target status filter.

        • value (string) – [REQUIRED]

          The value of the CIS target status filter.

    • targetStatusReasonFilters (list) –

      The criteria’s target status reason filters.

      • (dict) –

        The CIS target status reason filter.

        • comparison (string) – [REQUIRED]

          The comparison value of the CIS target status reason filter.

        • value (string) – [REQUIRED]

          The value of the CIS target status reason filter.

  • maxResults (integer) – The maximum number of scan results aggregated by a target resource to be returned in a single page of results.

  • nextToken (string) – The pagination token from a previous request that’s used to retrieve the next page of results.

  • scanArn (string) –

    [REQUIRED]

    The scan ARN.

  • sortBy (string) – The sort by order.

  • sortOrder (string) – The sort order.

Return type:

dict

Returns:

Response Syntax

{
    'nextToken': 'string',
    'targetResourceAggregations': [
        {
            'accountId': 'string',
            'platform': 'string',
            'scanArn': 'string',
            'statusCounts': {
                'failed': 123,
                'passed': 123,
                'skipped': 123
            },
            'targetResourceId': 'string',
            'targetResourceTags': {
                'string': [
                    'string',
                ]
            },
            'targetStatus': 'TIMED_OUT'|'CANCELLED'|'COMPLETED',
            'targetStatusReason': 'SCAN_IN_PROGRESS'|'UNSUPPORTED_OS'|'SSM_UNMANAGED'
        },
    ]
}

Response Structure

  • (dict) –

    • nextToken (string) –

      The pagination token from a previous request that’s used to retrieve the next page of results.

    • targetResourceAggregations (list) –

      The resource aggregations.

      • (dict) –

        The CIS target resource aggregation.

        • accountId (string) –

          The account ID for the CIS target resource.

        • platform (string) –

          The platform for the CIS target resource.

        • scanArn (string) –

          The scan ARN for the CIS target resource.

        • statusCounts (dict) –

          The target resource status counts.

          • failed (integer) –

            The number of checks that failed.

          • passed (integer) –

            The number of checks that passed.

          • skipped (integer) –

            The number of checks that were skipped.

        • targetResourceId (string) –

          The ID of the target resource.

        • targetResourceTags (dict) –

          The tag for the target resource.

          • (string) –

            • (list) –

              • (string) –

        • targetStatus (string) –

          The status of the target resource.

        • targetStatusReason (string) –

          The reason for the target resource.

Exceptions