AccessAnalyzer / Paginator / ListFindingsV2

ListFindingsV2

class AccessAnalyzer.Paginator.ListFindingsV2
paginator = client.get_paginator('list_findings_v2')
paginate(**kwargs)

Creates an iterator that will paginate through responses from AccessAnalyzer.Client.list_findings_v2().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    analyzerArn='string',
    filter={
        'string': {
            'eq': [
                'string',
            ],
            'neq': [
                'string',
            ],
            'contains': [
                'string',
            ],
            'exists': True|False
        }
    },
    sort={
        'attributeName': 'string',
        'orderBy': 'ASC'|'DESC'
    },
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • analyzerArn (string) –

    [REQUIRED]

    The ARN of the analyzer to retrieve findings from.

  • filter (dict) –

    A filter to match for the findings to return.

    • (string) –

      • (dict) –

        The criteria to use in the filter that defines the archive rule. For more information on available filter keys, see IAM Access Analyzer filter keys.

        • eq (list) –

          An “equals” operator to match for the filter used to create the rule.

          • (string) –

        • neq (list) –

          A “not equals” operator to match for the filter used to create the rule.

          • (string) –

        • contains (list) –

          A “contains” operator to match for the filter used to create the rule.

          • (string) –

        • exists (boolean) –

          An “exists” operator to match for the filter used to create the rule.

  • sort (dict) –

    The criteria used to sort.

    • attributeName (string) –

      The name of the attribute to sort on.

    • orderBy (string) –

      The sort order, ascending or descending.

  • 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

{
    'findings': [
        {
            'analyzedAt': datetime(2015, 1, 1),
            'createdAt': datetime(2015, 1, 1),
            'error': 'string',
            'id': 'string',
            'resource': 'string',
            'resourceType': 'AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic'|'AWS::S3Express::DirectoryBucket'|'AWS::DynamoDB::Table'|'AWS::DynamoDB::Stream'|'AWS::IAM::User',
            'resourceOwnerAccount': 'string',
            'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED',
            'updatedAt': datetime(2015, 1, 1),
            'findingType': 'ExternalAccess'|'UnusedIAMRole'|'UnusedIAMUserAccessKey'|'UnusedIAMUserPassword'|'UnusedPermission'|'InternalAccess'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • findings (list) –

      A list of findings retrieved from the analyzer that match the filter criteria specified, if any.

      • (dict) –

        Contains information about a finding.

        • analyzedAt (datetime) –

          The time at which the resource-based policy or IAM entity that generated the finding was analyzed.

        • createdAt (datetime) –

          The time at which the finding was created.

        • error (string) –

          The error that resulted in an Error finding.

        • id (string) –

          The ID of the finding.

        • resource (string) –

          The resource that the external principal has access to.

        • resourceType (string) –

          The type of the resource that the external principal has access to.

        • resourceOwnerAccount (string) –

          The Amazon Web Services account ID that owns the resource.

        • status (string) –

          The status of the finding.

        • updatedAt (datetime) –

          The time at which the finding was most recently updated.

        • findingType (string) –

          The type of the access finding. For external access analyzers, the type is ExternalAccess. For unused access analyzers, the type can be UnusedIAMRole, UnusedIAMUserAccessKey, UnusedIAMUserPassword, or UnusedPermission. For internal access analyzers, the type is InternalAccess.

    • NextToken (string) –

      A token to resume pagination.