Macie2 / Client / list_findings

list_findings#

Macie2.Client.list_findings(**kwargs)#

Retrieves a subset of information about one or more findings.

See also: AWS API Documentation

Request Syntax

response = client.list_findings(
    findingCriteria={
        'criterion': {
            'string': {
                'eq': [
                    'string',
                ],
                'eqExactMatch': [
                    'string',
                ],
                'gt': 123,
                'gte': 123,
                'lt': 123,
                'lte': 123,
                'neq': [
                    'string',
                ]
            }
        }
    },
    maxResults=123,
    nextToken='string',
    sortCriteria={
        'attributeName': 'string',
        'orderBy': 'ASC'|'DESC'
    }
)
Parameters:
  • findingCriteria (dict) –

    The criteria to use to filter the results.

    • criterion (dict) –

      A condition that specifies the property, operator, and one or more values to use to filter the results.

      • (string) –

        • (dict) –

          Specifies the operator to use in a property-based condition that filters the results of a query for findings. For detailed information and examples of each operator, see Fundamentals of filtering findings in the Amazon Macie User Guide.

          • eq (list) –

            The value for the property matches (equals) the specified value. If you specify multiple values, Macie uses OR logic to join the values.

            • (string) –

          • eqExactMatch (list) –

            The value for the property exclusively matches (equals an exact match for) all the specified values. If you specify multiple values, Amazon Macie uses AND logic to join the values.

            You can use this operator with the following properties: customDataIdentifiers.detections.arn, customDataIdentifiers.detections.name, resourcesAffected.s3Bucket.tags.key, resourcesAffected.s3Bucket.tags.value, resourcesAffected.s3Object.tags.key, resourcesAffected.s3Object.tags.value, sensitiveData.category, and sensitiveData.detections.type.

            • (string) –

          • gt (integer) –

            The value for the property is greater than the specified value.

          • gte (integer) –

            The value for the property is greater than or equal to the specified value.

          • lt (integer) –

            The value for the property is less than the specified value.

          • lte (integer) –

            The value for the property is less than or equal to the specified value.

          • neq (list) –

            The value for the property doesn’t match (doesn’t equal) the specified value. If you specify multiple values, Macie uses OR logic to join the values.

            • (string) –

  • maxResults (integer) – The maximum number of items to include in each page of the response.

  • nextToken (string) – The nextToken string that specifies which page of results to return in a paginated response.

  • sortCriteria (dict) –

    The criteria to use to sort the results.

    • attributeName (string) –

      The name of the property to sort the results by. Valid values are: count, createdAt, policyDetails.action.apiCallDetails.firstSeen, policyDetails.action.apiCallDetails.lastSeen, resourcesAffected, severity.score, type, and updatedAt.

    • orderBy (string) –

      The sort order to apply to the results, based on the value for the property specified by the attributeName property. Valid values are: ASC, sort the results in ascending order; and, DESC, sort the results in descending order.

Return type:

dict

Returns:

Response Syntax

{
    'findingIds': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    The request succeeded.

    • findingIds (list) –

      An array of strings, where each string is the unique identifier for a finding that matches the filter criteria specified in the request.

      • (string) –

    • nextToken (string) –

      The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.

Exceptions

  • Macie2.Client.exceptions.ValidationException

  • Macie2.Client.exceptions.InternalServerException

  • Macie2.Client.exceptions.ServiceQuotaExceededException

  • Macie2.Client.exceptions.AccessDeniedException

  • Macie2.Client.exceptions.ResourceNotFoundException

  • Macie2.Client.exceptions.ThrottlingException

  • Macie2.Client.exceptions.ConflictException