Access Analyzer

2024/11/14 - Access Analyzer - 1 new10 updated api methods

Changes  Expand analyzer configuration capabilities for unused access analyzers. Unused access analyzer configurations now support the ability to exclude accounts and resource tags from analysis providing more granular control over the scope of analysis.

UpdateAnalyzer (new) Link ¶

Modifies the configuration of an existing analyzer.

See also: AWS API Documentation

Request Syntax

client.update_analyzer(
    analyzerName='string',
    configuration={
        'unusedAccess': {
            'unusedAccessAge': 123,
            'analysisRule': {
                'exclusions': [
                    {
                        'accountIds': [
                            'string',
                        ],
                        'resourceTags': [
                            {
                                'string': 'string'
                            },
                        ]
                    },
                ]
            }
        }
    }
)
type analyzerName:

string

param analyzerName:

[REQUIRED]

The name of the analyzer to modify.

type configuration:

dict

param configuration:

Contains information about the configuration of an analyzer for an Amazon Web Services organization or account.

  • unusedAccess (dict) --

    Specifies the configuration of an unused access analyzer for an Amazon Web Services organization or account.

    • unusedAccessAge (integer) --

      The specified access age in days for which to generate findings for unused access. For example, if you specify 90 days, the analyzer will generate findings for IAM entities within the accounts of the selected organization for any access that hasn't been used in 90 or more days since the analyzer's last scan. You can choose a value between 1 and 365 days.

    • analysisRule (dict) --

      Contains information about analysis rules for the analyzer. Analysis rules determine which entities will generate findings based on the criteria you define when you create the rule.

      • exclusions (list) --

        A list of rules for the analyzer containing criteria to exclude from analysis. Entities that meet the rule criteria will not generate findings.

        • (dict) --

          The criteria for an analysis rule for an analyzer. The criteria determine which entities will generate findings.

          • accountIds (list) --

            A list of Amazon Web Services account IDs to apply to the analysis rule criteria. The accounts cannot include the organization analyzer owner account. Account IDs can only be applied to the analysis rule criteria for organization-level analyzers. The list cannot include more than 2,000 account IDs.

            • (string) --

          • resourceTags (list) --

            An array of key-value pairs to match for your resources. You can use the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

            For the tag key, you can specify a value that is 1 to 128 characters in length and cannot be prefixed with aws:.

            For the tag value, you can specify a value that is 0 to 256 characters in length. If the specified tag value is 0 characters, the rule is applied to all principals with the specified tag key.

            • (dict) --

              • (string) --

                • (string) --

rtype:

dict

returns:

Response Syntax

{
    'configuration': {
        'unusedAccess': {
            'unusedAccessAge': 123,
            'analysisRule': {
                'exclusions': [
                    {
                        'accountIds': [
                            'string',
                        ],
                        'resourceTags': [
                            {
                                'string': 'string'
                            },
                        ]
                    },
                ]
            }
        }
    }
}

Response Structure

  • (dict) --

    • configuration (dict) --

      Contains information about the configuration of an analyzer for an Amazon Web Services organization or account.

      • unusedAccess (dict) --

        Specifies the configuration of an unused access analyzer for an Amazon Web Services organization or account.

        • unusedAccessAge (integer) --

          The specified access age in days for which to generate findings for unused access. For example, if you specify 90 days, the analyzer will generate findings for IAM entities within the accounts of the selected organization for any access that hasn't been used in 90 or more days since the analyzer's last scan. You can choose a value between 1 and 365 days.

        • analysisRule (dict) --

          Contains information about analysis rules for the analyzer. Analysis rules determine which entities will generate findings based on the criteria you define when you create the rule.

          • exclusions (list) --

            A list of rules for the analyzer containing criteria to exclude from analysis. Entities that meet the rule criteria will not generate findings.

            • (dict) --

              The criteria for an analysis rule for an analyzer. The criteria determine which entities will generate findings.

              • accountIds (list) --

                A list of Amazon Web Services account IDs to apply to the analysis rule criteria. The accounts cannot include the organization analyzer owner account. Account IDs can only be applied to the analysis rule criteria for organization-level analyzers. The list cannot include more than 2,000 account IDs.

                • (string) --

              • resourceTags (list) --

                An array of key-value pairs to match for your resources. You can use the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

                For the tag key, you can specify a value that is 1 to 128 characters in length and cannot be prefixed with aws:.

                For the tag value, you can specify a value that is 0 to 256 characters in length. If the specified tag value is 0 characters, the rule is applied to all principals with the specified tag key.

                • (dict) --

                  • (string) --

                    • (string) --

CreateAnalyzer (updated) Link ¶
Changes (request)
{'configuration': {'unusedAccess': {'analysisRule': {'exclusions': [{'accountIds': ['string'],
                                                                     'resourceTags': [{'string': 'string'}]}]}}}}

Creates an analyzer for your account.

See also: AWS API Documentation

Request Syntax

client.create_analyzer(
    analyzerName='string',
    type='ACCOUNT'|'ORGANIZATION'|'ACCOUNT_UNUSED_ACCESS'|'ORGANIZATION_UNUSED_ACCESS',
    archiveRules=[
        {
            'ruleName': 'string',
            'filter': {
                'string': {
                    'eq': [
                        'string',
                    ],
                    'neq': [
                        'string',
                    ],
                    'contains': [
                        'string',
                    ],
                    'exists': True|False
                }
            }
        },
    ],
    tags={
        'string': 'string'
    },
    clientToken='string',
    configuration={
        'unusedAccess': {
            'unusedAccessAge': 123,
            'analysisRule': {
                'exclusions': [
                    {
                        'accountIds': [
                            'string',
                        ],
                        'resourceTags': [
                            {
                                'string': 'string'
                            },
                        ]
                    },
                ]
            }
        }
    }
)
type analyzerName:

string

param analyzerName:

[REQUIRED]

The name of the analyzer to create.

type type:

string

param type:

[REQUIRED]

The type of analyzer to create. Only ACCOUNT, ORGANIZATION, ACCOUNT_UNUSED_ACCESS, and ORGANIZATION_UNUSED_ACCESS analyzers are supported. You can create only one analyzer per account per Region. You can create up to 5 analyzers per organization per Region.

type archiveRules:

list

param archiveRules:

Specifies the archive rules to add for the analyzer. Archive rules automatically archive findings that meet the criteria you define for the rule.

  • (dict) --

    An criterion statement in an archive rule. Each archive rule may have multiple criteria.

    • ruleName (string) -- [REQUIRED]

      The name of the rule.

    • filter (dict) -- [REQUIRED]

      The condition and values for a criterion.

      • (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.

type tags:

dict

param tags:

An array of key-value pairs to apply to the analyzer. You can use the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

For the tag key, you can specify a value that is 1 to 128 characters in length and cannot be prefixed with aws:.

For the tag value, you can specify a value that is 0 to 256 characters in length.

  • (string) --

    • (string) --

type clientToken:

string

param clientToken:

A client token.

This field is autopopulated if not provided.

type configuration:

dict

param configuration:

Specifies the configuration of the analyzer. If the analyzer is an unused access analyzer, the specified scope of unused access is used for the configuration.

  • unusedAccess (dict) --

    Specifies the configuration of an unused access analyzer for an Amazon Web Services organization or account.

    • unusedAccessAge (integer) --

      The specified access age in days for which to generate findings for unused access. For example, if you specify 90 days, the analyzer will generate findings for IAM entities within the accounts of the selected organization for any access that hasn't been used in 90 or more days since the analyzer's last scan. You can choose a value between 1 and 365 days.

    • analysisRule (dict) --

      Contains information about analysis rules for the analyzer. Analysis rules determine which entities will generate findings based on the criteria you define when you create the rule.

      • exclusions (list) --

        A list of rules for the analyzer containing criteria to exclude from analysis. Entities that meet the rule criteria will not generate findings.

        • (dict) --

          The criteria for an analysis rule for an analyzer. The criteria determine which entities will generate findings.

          • accountIds (list) --

            A list of Amazon Web Services account IDs to apply to the analysis rule criteria. The accounts cannot include the organization analyzer owner account. Account IDs can only be applied to the analysis rule criteria for organization-level analyzers. The list cannot include more than 2,000 account IDs.

            • (string) --

          • resourceTags (list) --

            An array of key-value pairs to match for your resources. You can use the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

            For the tag key, you can specify a value that is 1 to 128 characters in length and cannot be prefixed with aws:.

            For the tag value, you can specify a value that is 0 to 256 characters in length. If the specified tag value is 0 characters, the rule is applied to all principals with the specified tag key.

            • (dict) --

              • (string) --

                • (string) --

rtype:

dict

returns:

Response Syntax

{
    'arn': 'string'
}

Response Structure

  • (dict) --

    The response to the request to create an analyzer.

    • arn (string) --

      The ARN of the analyzer that was created by the request.

GetAnalyzedResource (updated) Link ¶
Changes (response)
{'resource': {'resourceType': {'AWS::IAM::User'}}}

Retrieves information about a resource that was analyzed.

See also: AWS API Documentation

Request Syntax

client.get_analyzed_resource(
    analyzerArn='string',
    resourceArn='string'
)
type analyzerArn:

string

param analyzerArn:

[REQUIRED]

The ARN of the analyzer to retrieve information from.

type resourceArn:

string

param resourceArn:

[REQUIRED]

The ARN of the resource to retrieve information about.

rtype:

dict

returns:

Response Syntax

{
    'resource': {
        'resourceArn': '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',
        'createdAt': datetime(2015, 1, 1),
        'analyzedAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'isPublic': True|False,
        'actions': [
            'string',
        ],
        'sharedVia': [
            'string',
        ],
        'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED',
        'resourceOwnerAccount': 'string',
        'error': 'string'
    }
}

Response Structure

  • (dict) --

    The response to the request.

    • resource (dict) --

      An AnalyzedResource object that contains information that IAM Access Analyzer found when it analyzed the resource.

      • resourceArn (string) --

        The ARN of the resource that was analyzed.

      • resourceType (string) --

        The type of the resource that was analyzed.

      • createdAt (datetime) --

        The time at which the finding was created.

      • analyzedAt (datetime) --

        The time at which the resource was analyzed.

      • updatedAt (datetime) --

        The time at which the finding was updated.

      • isPublic (boolean) --

        Indicates whether the policy that generated the finding grants public access to the resource.

      • actions (list) --

        The actions that an external principal is granted permission to use by the policy that generated the finding.

        • (string) --

      • sharedVia (list) --

        Indicates how the access that generated the finding is granted. This is populated for Amazon S3 bucket findings.

        • (string) --

      • status (string) --

        The current status of the finding generated from the analyzed resource.

      • resourceOwnerAccount (string) --

        The Amazon Web Services account ID that owns the resource.

      • error (string) --

        An error message.

GetAnalyzer (updated) Link ¶
Changes (response)
{'analyzer': {'configuration': {'unusedAccess': {'analysisRule': {'exclusions': [{'accountIds': ['string'],
                                                                                  'resourceTags': [{'string': 'string'}]}]}}}}}

Retrieves information about the specified analyzer.

See also: AWS API Documentation

Request Syntax

client.get_analyzer(
    analyzerName='string'
)
type analyzerName:

string

param analyzerName:

[REQUIRED]

The name of the analyzer retrieved.

rtype:

dict

returns:

Response Syntax

{
    'analyzer': {
        'arn': 'string',
        'name': 'string',
        'type': 'ACCOUNT'|'ORGANIZATION'|'ACCOUNT_UNUSED_ACCESS'|'ORGANIZATION_UNUSED_ACCESS',
        'createdAt': datetime(2015, 1, 1),
        'lastResourceAnalyzed': 'string',
        'lastResourceAnalyzedAt': datetime(2015, 1, 1),
        'tags': {
            'string': 'string'
        },
        'status': 'ACTIVE'|'CREATING'|'DISABLED'|'FAILED',
        'statusReason': {
            'code': 'AWS_SERVICE_ACCESS_DISABLED'|'DELEGATED_ADMINISTRATOR_DEREGISTERED'|'ORGANIZATION_DELETED'|'SERVICE_LINKED_ROLE_CREATION_FAILED'
        },
        'configuration': {
            'unusedAccess': {
                'unusedAccessAge': 123,
                'analysisRule': {
                    'exclusions': [
                        {
                            'accountIds': [
                                'string',
                            ],
                            'resourceTags': [
                                {
                                    'string': 'string'
                                },
                            ]
                        },
                    ]
                }
            }
        }
    }
}

Response Structure

  • (dict) --

    The response to the request.

    • analyzer (dict) --

      An AnalyzerSummary object that contains information about the analyzer.

      • arn (string) --

        The ARN of the analyzer.

      • name (string) --

        The name of the analyzer.

      • type (string) --

        The type of analyzer, which corresponds to the zone of trust chosen for the analyzer.

      • createdAt (datetime) --

        A timestamp for the time at which the analyzer was created.

      • lastResourceAnalyzed (string) --

        The resource that was most recently analyzed by the analyzer.

      • lastResourceAnalyzedAt (datetime) --

        The time at which the most recently analyzed resource was analyzed.

      • tags (dict) --

        The tags added to the analyzer.

        • (string) --

          • (string) --

      • status (string) --

        The status of the analyzer. An Active analyzer successfully monitors supported resources and generates new findings. The analyzer is Disabled when a user action, such as removing trusted access for Identity and Access Management Access Analyzer from Organizations, causes the analyzer to stop generating new findings. The status is Creating when the analyzer creation is in progress and Failed when the analyzer creation has failed.

      • statusReason (dict) --

        The statusReason provides more details about the current status of the analyzer. For example, if the creation for the analyzer fails, a Failed status is returned. For an analyzer with organization as the type, this failure can be due to an issue with creating the service-linked roles required in the member accounts of the Amazon Web Services organization.

        • code (string) --

          The reason code for the current status of the analyzer.

      • configuration (dict) --

        Specifies whether the analyzer is an external access or unused access analyzer.

        • unusedAccess (dict) --

          Specifies the configuration of an unused access analyzer for an Amazon Web Services organization or account.

          • unusedAccessAge (integer) --

            The specified access age in days for which to generate findings for unused access. For example, if you specify 90 days, the analyzer will generate findings for IAM entities within the accounts of the selected organization for any access that hasn't been used in 90 or more days since the analyzer's last scan. You can choose a value between 1 and 365 days.

          • analysisRule (dict) --

            Contains information about analysis rules for the analyzer. Analysis rules determine which entities will generate findings based on the criteria you define when you create the rule.

            • exclusions (list) --

              A list of rules for the analyzer containing criteria to exclude from analysis. Entities that meet the rule criteria will not generate findings.

              • (dict) --

                The criteria for an analysis rule for an analyzer. The criteria determine which entities will generate findings.

                • accountIds (list) --

                  A list of Amazon Web Services account IDs to apply to the analysis rule criteria. The accounts cannot include the organization analyzer owner account. Account IDs can only be applied to the analysis rule criteria for organization-level analyzers. The list cannot include more than 2,000 account IDs.

                  • (string) --

                • resourceTags (list) --

                  An array of key-value pairs to match for your resources. You can use the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

                  For the tag key, you can specify a value that is 1 to 128 characters in length and cannot be prefixed with aws:.

                  For the tag value, you can specify a value that is 0 to 256 characters in length. If the specified tag value is 0 characters, the rule is applied to all principals with the specified tag key.

                  • (dict) --

                    • (string) --

                      • (string) --

GetFinding (updated) Link ¶
Changes (response)
{'finding': {'resourceType': {'AWS::IAM::User'}}}

Retrieves information about the specified finding. GetFinding and GetFindingV2 both use access-analyzer:GetFinding in the Action element of an IAM policy statement. You must have permission to perform the access-analyzer:GetFinding action.

See also: AWS API Documentation

Request Syntax

client.get_finding(
    analyzerArn='string',
    id='string'
)
type analyzerArn:

string

param analyzerArn:

[REQUIRED]

The ARN of the analyzer that generated the finding.

type id:

string

param id:

[REQUIRED]

The ID of the finding to retrieve.

rtype:

dict

returns:

Response Syntax

{
    'finding': {
        'id': 'string',
        'principal': {
            'string': 'string'
        },
        'action': [
            'string',
        ],
        'resource': 'string',
        'isPublic': True|False,
        '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',
        'condition': {
            'string': 'string'
        },
        'createdAt': datetime(2015, 1, 1),
        'analyzedAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED',
        'resourceOwnerAccount': 'string',
        'error': 'string',
        'sources': [
            {
                'type': 'POLICY'|'BUCKET_ACL'|'S3_ACCESS_POINT'|'S3_ACCESS_POINT_ACCOUNT',
                'detail': {
                    'accessPointArn': 'string',
                    'accessPointAccount': 'string'
                }
            },
        ],
        'resourceControlPolicyRestriction': 'APPLICABLE'|'FAILED_TO_EVALUATE_RCP'|'NOT_APPLICABLE'
    }
}

Response Structure

  • (dict) --

    The response to the request.

    • finding (dict) --

      A finding object that contains finding details.

      • id (string) --

        The ID of the finding.

      • principal (dict) --

        The external principal that has access to a resource within the zone of trust.

        • (string) --

          • (string) --

      • action (list) --

        The action in the analyzed policy statement that an external principal has permission to use.

        • (string) --

      • resource (string) --

        The resource that an external principal has access to.

      • isPublic (boolean) --

        Indicates whether the policy that generated the finding allows public access to the resource.

      • resourceType (string) --

        The type of the resource identified in the finding.

      • condition (dict) --

        The condition in the analyzed policy statement that resulted in a finding.

        • (string) --

          • (string) --

      • createdAt (datetime) --

        The time at which the finding was generated.

      • analyzedAt (datetime) --

        The time at which the resource was analyzed.

      • updatedAt (datetime) --

        The time at which the finding was updated.

      • status (string) --

        The current status of the finding.

      • resourceOwnerAccount (string) --

        The Amazon Web Services account ID that owns the resource.

      • error (string) --

        An error.

      • sources (list) --

        The sources of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

        • (dict) --

          The source of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

          • type (string) --

            Indicates the type of access that generated the finding.

          • detail (dict) --

            Includes details about how the access that generated the finding is granted. This is populated for Amazon S3 bucket findings.

            • accessPointArn (string) --

              The ARN of the access point that generated the finding. The ARN format depends on whether the ARN represents an access point or a multi-region access point.

            • accessPointAccount (string) --

              The account of the cross-account access point that generated the finding.

      • resourceControlPolicyRestriction (string) --

        The type of restriction applied to the finding by the resource owner with an Organizations resource control policy (RCP).

GetFindingV2 (updated) Link ¶
Changes (response)
{'resourceType': {'AWS::IAM::User'}}

Retrieves information about the specified finding. GetFinding and GetFindingV2 both use access-analyzer:GetFinding in the Action element of an IAM policy statement. You must have permission to perform the access-analyzer:GetFinding action.

See also: AWS API Documentation

Request Syntax

client.get_finding_v2(
    analyzerArn='string',
    id='string',
    maxResults=123,
    nextToken='string'
)
type analyzerArn:

string

param analyzerArn:

[REQUIRED]

The ARN of the analyzer that generated the finding.

type id:

string

param id:

[REQUIRED]

The ID of the finding to retrieve.

type maxResults:

integer

param maxResults:

The maximum number of results to return in the response.

type nextToken:

string

param nextToken:

A token used for pagination of results returned.

rtype:

dict

returns:

Response Syntax

{
    'analyzedAt': datetime(2015, 1, 1),
    'createdAt': datetime(2015, 1, 1),
    'error': 'string',
    'id': 'string',
    'nextToken': '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),
    'findingDetails': [
        {
            'externalAccessDetails': {
                'action': [
                    'string',
                ],
                'condition': {
                    'string': 'string'
                },
                'isPublic': True|False,
                'principal': {
                    'string': 'string'
                },
                'sources': [
                    {
                        'type': 'POLICY'|'BUCKET_ACL'|'S3_ACCESS_POINT'|'S3_ACCESS_POINT_ACCOUNT',
                        'detail': {
                            'accessPointArn': 'string',
                            'accessPointAccount': 'string'
                        }
                    },
                ],
                'resourceControlPolicyRestriction': 'APPLICABLE'|'FAILED_TO_EVALUATE_RCP'|'NOT_APPLICABLE'
            },
            'unusedPermissionDetails': {
                'actions': [
                    {
                        'action': 'string',
                        'lastAccessed': datetime(2015, 1, 1)
                    },
                ],
                'serviceNamespace': 'string',
                'lastAccessed': datetime(2015, 1, 1)
            },
            'unusedIamUserAccessKeyDetails': {
                'accessKeyId': 'string',
                'lastAccessed': datetime(2015, 1, 1)
            },
            'unusedIamRoleDetails': {
                'lastAccessed': datetime(2015, 1, 1)
            },
            'unusedIamUserPasswordDetails': {
                'lastAccessed': datetime(2015, 1, 1)
            }
        },
    ],
    'findingType': 'ExternalAccess'|'UnusedIAMRole'|'UnusedIAMUserAccessKey'|'UnusedIAMUserPassword'|'UnusedPermission'
}

Response Structure

  • (dict) --

    • 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) --

      An error.

    • id (string) --

      The ID of the finding to retrieve.

    • nextToken (string) --

      A token used for pagination of results returned.

    • resource (string) --

      The resource that generated the finding.

    • resourceType (string) --

      The type of the resource identified in the finding.

    • resourceOwnerAccount (string) --

      Tye 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 updated.

    • findingDetails (list) --

      A localized message that explains the finding and provides guidance on how to address it.

      • (dict) --

        Contains information about an external access or unused access finding. Only one parameter can be used in a FindingDetails object.

        • externalAccessDetails (dict) --

          The details for an external access analyzer finding.

          • action (list) --

            The action in the analyzed policy statement that an external principal has permission to use.

            • (string) --

          • condition (dict) --

            The condition in the analyzed policy statement that resulted in an external access finding.

            • (string) --

              • (string) --

          • isPublic (boolean) --

            Specifies whether the external access finding is public.

          • principal (dict) --

            The external principal that has access to a resource within the zone of trust.

            • (string) --

              • (string) --

          • sources (list) --

            The sources of the external access finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

            • (dict) --

              The source of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

              • type (string) --

                Indicates the type of access that generated the finding.

              • detail (dict) --

                Includes details about how the access that generated the finding is granted. This is populated for Amazon S3 bucket findings.

                • accessPointArn (string) --

                  The ARN of the access point that generated the finding. The ARN format depends on whether the ARN represents an access point or a multi-region access point.

                • accessPointAccount (string) --

                  The account of the cross-account access point that generated the finding.

          • resourceControlPolicyRestriction (string) --

            The type of restriction applied to the finding by the resource owner with an Organizations resource control policy (RCP).

        • unusedPermissionDetails (dict) --

          The details for an unused access analyzer finding with an unused permission finding type.

          • actions (list) --

            A list of unused actions for which the unused access finding was generated.

            • (dict) --

              Contains information about an unused access finding for an action. IAM Access Analyzer charges for unused access analysis based on the number of IAM roles and users analyzed per month. For more details on pricing, see IAM Access Analyzer pricing.

              • action (string) --

                The action for which the unused access finding was generated.

              • lastAccessed (datetime) --

                The time at which the action was last accessed.

          • serviceNamespace (string) --

            The namespace of the Amazon Web Services service that contains the unused actions.

          • lastAccessed (datetime) --

            The time at which the permission was last accessed.

        • unusedIamUserAccessKeyDetails (dict) --

          The details for an unused access analyzer finding with an unused IAM user access key finding type.

          • accessKeyId (string) --

            The ID of the access key for which the unused access finding was generated.

          • lastAccessed (datetime) --

            The time at which the access key was last accessed.

        • unusedIamRoleDetails (dict) --

          The details for an unused access analyzer finding with an unused IAM role finding type.

          • lastAccessed (datetime) --

            The time at which the role was last accessed.

        • unusedIamUserPasswordDetails (dict) --

          The details for an unused access analyzer finding with an unused IAM user password finding type.

          • lastAccessed (datetime) --

            The time at which the password was last accessed.

    • findingType (string) --

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

ListAccessPreviewFindings (updated) Link ¶
Changes (response)
{'findings': {'resourceType': {'AWS::IAM::User'}}}

Retrieves a list of access preview findings generated by the specified access preview.

See also: AWS API Documentation

Request Syntax

client.list_access_preview_findings(
    accessPreviewId='string',
    analyzerArn='string',
    filter={
        'string': {
            'eq': [
                'string',
            ],
            'neq': [
                'string',
            ],
            'contains': [
                'string',
            ],
            'exists': True|False
        }
    },
    nextToken='string',
    maxResults=123
)
type accessPreviewId:

string

param accessPreviewId:

[REQUIRED]

The unique ID for the access preview.

type analyzerArn:

string

param analyzerArn:

[REQUIRED]

The ARN of the analyzer used to generate the access.

type filter:

dict

param filter:

Criteria to filter the returned findings.

  • (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.

type nextToken:

string

param nextToken:

A token used for pagination of results returned.

type maxResults:

integer

param maxResults:

The maximum number of results to return in the response.

rtype:

dict

returns:

Response Syntax

{
    'findings': [
        {
            'id': 'string',
            'existingFindingId': 'string',
            'existingFindingStatus': 'ACTIVE'|'ARCHIVED'|'RESOLVED',
            'principal': {
                'string': 'string'
            },
            'action': [
                'string',
            ],
            'condition': {
                'string': 'string'
            },
            'resource': 'string',
            'isPublic': True|False,
            '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',
            'createdAt': datetime(2015, 1, 1),
            'changeType': 'CHANGED'|'NEW'|'UNCHANGED',
            'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED',
            'resourceOwnerAccount': 'string',
            'error': 'string',
            'sources': [
                {
                    'type': 'POLICY'|'BUCKET_ACL'|'S3_ACCESS_POINT'|'S3_ACCESS_POINT_ACCOUNT',
                    'detail': {
                        'accessPointArn': 'string',
                        'accessPointAccount': 'string'
                    }
                },
            ],
            'resourceControlPolicyRestriction': 'APPLICABLE'|'FAILED_TO_EVALUATE_RCP'|'NOT_APPLICABLE'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • findings (list) --

      A list of access preview findings that match the specified filter criteria.

      • (dict) --

        An access preview finding generated by the access preview.

        • id (string) --

          The ID of the access preview finding. This ID uniquely identifies the element in the list of access preview findings and is not related to the finding ID in Access Analyzer.

        • existingFindingId (string) --

          The existing ID of the finding in IAM Access Analyzer, provided only for existing findings.

        • existingFindingStatus (string) --

          The existing status of the finding, provided only for existing findings.

        • principal (dict) --

          The external principal that has access to a resource within the zone of trust.

          • (string) --

            • (string) --

        • action (list) --

          The action in the analyzed policy statement that an external principal has permission to perform.

          • (string) --

        • condition (dict) --

          The condition in the analyzed policy statement that resulted in a finding.

          • (string) --

            • (string) --

        • resource (string) --

          The resource that an external principal has access to. This is the resource associated with the access preview.

        • isPublic (boolean) --

          Indicates whether the policy that generated the finding allows public access to the resource.

        • resourceType (string) --

          The type of the resource that can be accessed in the finding.

        • createdAt (datetime) --

          The time at which the access preview finding was created.

        • changeType (string) --

          Provides context on how the access preview finding compares to existing access identified in IAM Access Analyzer.

          • New - The finding is for newly-introduced access.

          • Unchanged - The preview finding is an existing finding that would remain unchanged.

          • Changed - The preview finding is an existing finding with a change in status.

          For example, a Changed finding with preview status Resolved and existing status Active indicates the existing Active finding would become Resolved as a result of the proposed permissions change.

        • status (string) --

          The preview status of the finding. This is what the status of the finding would be after permissions deployment. For example, a Changed finding with preview status Resolved and existing status Active indicates the existing Active finding would become Resolved as a result of the proposed permissions change.

        • resourceOwnerAccount (string) --

          The Amazon Web Services account ID that owns the resource. For most Amazon Web Services resources, the owning account is the account in which the resource was created.

        • error (string) --

          An error.

        • sources (list) --

          The sources of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

          • (dict) --

            The source of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

            • type (string) --

              Indicates the type of access that generated the finding.

            • detail (dict) --

              Includes details about how the access that generated the finding is granted. This is populated for Amazon S3 bucket findings.

              • accessPointArn (string) --

                The ARN of the access point that generated the finding. The ARN format depends on whether the ARN represents an access point or a multi-region access point.

              • accessPointAccount (string) --

                The account of the cross-account access point that generated the finding.

        • resourceControlPolicyRestriction (string) --

          The type of restriction applied to the finding by the resource owner with an Organizations resource control policy (RCP).

    • nextToken (string) --

      A token used for pagination of results returned.

ListAnalyzedResources (updated) Link ¶
Changes (request, response)
Request
{'resourceType': {'AWS::IAM::User'}}
Response
{'analyzedResources': {'resourceType': {'AWS::IAM::User'}}}

Retrieves a list of resources of the specified type that have been analyzed by the specified analyzer.

See also: AWS API Documentation

Request Syntax

client.list_analyzed_resources(
    analyzerArn='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',
    nextToken='string',
    maxResults=123
)
type analyzerArn:

string

param analyzerArn:

[REQUIRED]

The ARN of the analyzer to retrieve a list of analyzed resources from.

type resourceType:

string

param resourceType:

The type of resource.

type nextToken:

string

param nextToken:

A token used for pagination of results returned.

type maxResults:

integer

param maxResults:

The maximum number of results to return in the response.

rtype:

dict

returns:

Response Syntax

{
    'analyzedResources': [
        {
            'resourceArn': 'string',
            'resourceOwnerAccount': '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'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    The response to the request.

    • analyzedResources (list) --

      A list of resources that were analyzed.

      • (dict) --

        Contains the ARN of the analyzed resource.

        • resourceArn (string) --

          The ARN of the analyzed resource.

        • resourceOwnerAccount (string) --

          The Amazon Web Services account ID that owns the resource.

        • resourceType (string) --

          The type of resource that was analyzed.

    • nextToken (string) --

      A token used for pagination of results returned.

ListAnalyzers (updated) Link ¶
Changes (response)
{'analyzers': {'configuration': {'unusedAccess': {'analysisRule': {'exclusions': [{'accountIds': ['string'],
                                                                                   'resourceTags': [{'string': 'string'}]}]}}}}}

Retrieves a list of analyzers.

See also: AWS API Documentation

Request Syntax

client.list_analyzers(
    nextToken='string',
    maxResults=123,
    type='ACCOUNT'|'ORGANIZATION'|'ACCOUNT_UNUSED_ACCESS'|'ORGANIZATION_UNUSED_ACCESS'
)
type nextToken:

string

param nextToken:

A token used for pagination of results returned.

type maxResults:

integer

param maxResults:

The maximum number of results to return in the response.

type type:

string

param type:

The type of analyzer.

rtype:

dict

returns:

Response Syntax

{
    'analyzers': [
        {
            'arn': 'string',
            'name': 'string',
            'type': 'ACCOUNT'|'ORGANIZATION'|'ACCOUNT_UNUSED_ACCESS'|'ORGANIZATION_UNUSED_ACCESS',
            'createdAt': datetime(2015, 1, 1),
            'lastResourceAnalyzed': 'string',
            'lastResourceAnalyzedAt': datetime(2015, 1, 1),
            'tags': {
                'string': 'string'
            },
            'status': 'ACTIVE'|'CREATING'|'DISABLED'|'FAILED',
            'statusReason': {
                'code': 'AWS_SERVICE_ACCESS_DISABLED'|'DELEGATED_ADMINISTRATOR_DEREGISTERED'|'ORGANIZATION_DELETED'|'SERVICE_LINKED_ROLE_CREATION_FAILED'
            },
            'configuration': {
                'unusedAccess': {
                    'unusedAccessAge': 123,
                    'analysisRule': {
                        'exclusions': [
                            {
                                'accountIds': [
                                    'string',
                                ],
                                'resourceTags': [
                                    {
                                        'string': 'string'
                                    },
                                ]
                            },
                        ]
                    }
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    The response to the request.

    • analyzers (list) --

      The analyzers retrieved.

      • (dict) --

        Contains information about the analyzer.

        • arn (string) --

          The ARN of the analyzer.

        • name (string) --

          The name of the analyzer.

        • type (string) --

          The type of analyzer, which corresponds to the zone of trust chosen for the analyzer.

        • createdAt (datetime) --

          A timestamp for the time at which the analyzer was created.

        • lastResourceAnalyzed (string) --

          The resource that was most recently analyzed by the analyzer.

        • lastResourceAnalyzedAt (datetime) --

          The time at which the most recently analyzed resource was analyzed.

        • tags (dict) --

          The tags added to the analyzer.

          • (string) --

            • (string) --

        • status (string) --

          The status of the analyzer. An Active analyzer successfully monitors supported resources and generates new findings. The analyzer is Disabled when a user action, such as removing trusted access for Identity and Access Management Access Analyzer from Organizations, causes the analyzer to stop generating new findings. The status is Creating when the analyzer creation is in progress and Failed when the analyzer creation has failed.

        • statusReason (dict) --

          The statusReason provides more details about the current status of the analyzer. For example, if the creation for the analyzer fails, a Failed status is returned. For an analyzer with organization as the type, this failure can be due to an issue with creating the service-linked roles required in the member accounts of the Amazon Web Services organization.

          • code (string) --

            The reason code for the current status of the analyzer.

        • configuration (dict) --

          Specifies whether the analyzer is an external access or unused access analyzer.

          • unusedAccess (dict) --

            Specifies the configuration of an unused access analyzer for an Amazon Web Services organization or account.

            • unusedAccessAge (integer) --

              The specified access age in days for which to generate findings for unused access. For example, if you specify 90 days, the analyzer will generate findings for IAM entities within the accounts of the selected organization for any access that hasn't been used in 90 or more days since the analyzer's last scan. You can choose a value between 1 and 365 days.

            • analysisRule (dict) --

              Contains information about analysis rules for the analyzer. Analysis rules determine which entities will generate findings based on the criteria you define when you create the rule.

              • exclusions (list) --

                A list of rules for the analyzer containing criteria to exclude from analysis. Entities that meet the rule criteria will not generate findings.

                • (dict) --

                  The criteria for an analysis rule for an analyzer. The criteria determine which entities will generate findings.

                  • accountIds (list) --

                    A list of Amazon Web Services account IDs to apply to the analysis rule criteria. The accounts cannot include the organization analyzer owner account. Account IDs can only be applied to the analysis rule criteria for organization-level analyzers. The list cannot include more than 2,000 account IDs.

                    • (string) --

                  • resourceTags (list) --

                    An array of key-value pairs to match for your resources. You can use the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

                    For the tag key, you can specify a value that is 1 to 128 characters in length and cannot be prefixed with aws:.

                    For the tag value, you can specify a value that is 0 to 256 characters in length. If the specified tag value is 0 characters, the rule is applied to all principals with the specified tag key.

                    • (dict) --

                      • (string) --

                        • (string) --

    • nextToken (string) --

      A token used for pagination of results returned.

ListFindings (updated) Link ¶
Changes (response)
{'findings': {'resourceType': {'AWS::IAM::User'}}}

Retrieves a list of findings generated by the specified analyzer. ListFindings and ListFindingsV2 both use access-analyzer:ListFindings in the Action element of an IAM policy statement. You must have permission to perform the access-analyzer:ListFindings action.

To learn about filter keys that you can use to retrieve a list of findings, see IAM Access Analyzer filter keys in the IAM User Guide.

See also: AWS API Documentation

Request Syntax

client.list_findings(
    analyzerArn='string',
    filter={
        'string': {
            'eq': [
                'string',
            ],
            'neq': [
                'string',
            ],
            'contains': [
                'string',
            ],
            'exists': True|False
        }
    },
    sort={
        'attributeName': 'string',
        'orderBy': 'ASC'|'DESC'
    },
    nextToken='string',
    maxResults=123
)
type analyzerArn:

string

param analyzerArn:

[REQUIRED]

The ARN of the analyzer to retrieve findings from.

type filter:

dict

param filter:

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.

type sort:

dict

param sort:

The sort order for the findings returned.

  • attributeName (string) --

    The name of the attribute to sort on.

  • orderBy (string) --

    The sort order, ascending or descending.

type nextToken:

string

param nextToken:

A token used for pagination of results returned.

type maxResults:

integer

param maxResults:

The maximum number of results to return in the response.

rtype:

dict

returns:

Response Syntax

{
    'findings': [
        {
            'id': 'string',
            'principal': {
                'string': 'string'
            },
            'action': [
                'string',
            ],
            'resource': 'string',
            'isPublic': True|False,
            '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',
            'condition': {
                'string': 'string'
            },
            'createdAt': datetime(2015, 1, 1),
            'analyzedAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1),
            'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED',
            'resourceOwnerAccount': 'string',
            'error': 'string',
            'sources': [
                {
                    'type': 'POLICY'|'BUCKET_ACL'|'S3_ACCESS_POINT'|'S3_ACCESS_POINT_ACCOUNT',
                    'detail': {
                        'accessPointArn': 'string',
                        'accessPointAccount': 'string'
                    }
                },
            ],
            'resourceControlPolicyRestriction': 'APPLICABLE'|'FAILED_TO_EVALUATE_RCP'|'NOT_APPLICABLE'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    The response to the request.

    • findings (list) --

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

      • (dict) --

        Contains information about a finding.

        • id (string) --

          The ID of the finding.

        • principal (dict) --

          The external principal that has access to a resource within the zone of trust.

          • (string) --

            • (string) --

        • action (list) --

          The action in the analyzed policy statement that an external principal has permission to use.

          • (string) --

        • resource (string) --

          The resource that the external principal has access to.

        • isPublic (boolean) --

          Indicates whether the finding reports a resource that has a policy that allows public access.

        • resourceType (string) --

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

        • condition (dict) --

          The condition in the analyzed policy statement that resulted in a finding.

          • (string) --

            • (string) --

        • createdAt (datetime) --

          The time at which the finding was created.

        • analyzedAt (datetime) --

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

        • updatedAt (datetime) --

          The time at which the finding was most recently updated.

        • status (string) --

          The status of the finding.

        • resourceOwnerAccount (string) --

          The Amazon Web Services account ID that owns the resource.

        • error (string) --

          The error that resulted in an Error finding.

        • sources (list) --

          The sources of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

          • (dict) --

            The source of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

            • type (string) --

              Indicates the type of access that generated the finding.

            • detail (dict) --

              Includes details about how the access that generated the finding is granted. This is populated for Amazon S3 bucket findings.

              • accessPointArn (string) --

                The ARN of the access point that generated the finding. The ARN format depends on whether the ARN represents an access point or a multi-region access point.

              • accessPointAccount (string) --

                The account of the cross-account access point that generated the finding.

        • resourceControlPolicyRestriction (string) --

          The type of restriction applied to the finding by the resource owner with an Organizations resource control policy (RCP).

    • nextToken (string) --

      A token used for pagination of results returned.

ListFindingsV2 (updated) Link ¶
Changes (response)
{'findings': {'resourceType': {'AWS::IAM::User'}}}

Retrieves a list of findings generated by the specified analyzer. ListFindings and ListFindingsV2 both use access-analyzer:ListFindings in the Action element of an IAM policy statement. You must have permission to perform the access-analyzer:ListFindings action.

To learn about filter keys that you can use to retrieve a list of findings, see IAM Access Analyzer filter keys in the IAM User Guide.

See also: AWS API Documentation

Request Syntax

client.list_findings_v2(
    analyzerArn='string',
    filter={
        'string': {
            'eq': [
                'string',
            ],
            'neq': [
                'string',
            ],
            'contains': [
                'string',
            ],
            'exists': True|False
        }
    },
    maxResults=123,
    nextToken='string',
    sort={
        'attributeName': 'string',
        'orderBy': 'ASC'|'DESC'
    }
)
type analyzerArn:

string

param analyzerArn:

[REQUIRED]

The ARN of the analyzer to retrieve findings from.

type filter:

dict

param filter:

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.

type maxResults:

integer

param maxResults:

The maximum number of results to return in the response.

type nextToken:

string

param nextToken:

A token used for pagination of results returned.

type sort:

dict

param sort:

The criteria used to sort.

  • attributeName (string) --

    The name of the attribute to sort on.

  • orderBy (string) --

    The sort order, ascending or descending.

rtype:

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'
        },
    ],
    '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 external access or unused access finding.

    • nextToken (string) --

      A token used for pagination of results returned.