Access Analyzer

2025/06/17 - Access Analyzer - 10 updated api methods

Changes  We are launching a new analyzer type, internal access analyzer. The new analyzer will generate internal access findings, which help customers understand who within their AWS organization or AWS Account has access to their critical AWS resources.

CreateAnalyzer (updated) Link ¶
Changes (request)
{'configuration': {'internalAccess': {'analysisRule': {'inclusions': [{'accountIds': ['string'],
                                                                       'resourceArns': ['string'],
                                                                       'resourceTypes': ['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']}]}}},
 'type': {'ACCOUNT_INTERNAL_ACCESS', 'ORGANIZATION_INTERNAL_ACCESS'}}

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'|'ACCOUNT_INTERNAL_ACCESS'|'ORGANIZATION_INTERNAL_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'
                            },
                        ]
                    },
                ]
            }
        },
        'internalAccess': {
            'analysisRule': {
                'inclusions': [
                    {
                        'accountIds': [
                            'string',
                        ],
                        'resourceTypes': [
                            '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',
                        ],
                        'resourceArns': [
                            '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. 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. If the analyzer is an internal access analyzer, the specified internal access analysis rules are 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) --

  • internalAccess (dict) --

    Specifies the configuration of an internal access analyzer for an Amazon Web Services organization or account. This configuration determines how the analyzer evaluates access within your Amazon Web Services environment.

    • analysisRule (dict) --

      Contains information about analysis rules for the internal access analyzer. These rules determine which resources and access patterns will be analyzed.

      • inclusions (list) --

        A list of rules for the internal access analyzer containing criteria to include in analysis. Only resources that meet the rule criteria will generate findings.

        • (dict) --

          The criteria for an analysis rule for an internal access analyzer.

          • accountIds (list) --

            A list of Amazon Web Services account IDs to apply to the internal access analysis rule criteria. Account IDs can only be applied to the analysis rule criteria for organization-level analyzers.

            • (string) --

          • resourceTypes (list) --

            A list of resource types to apply to the internal access analysis rule criteria. The analyzer will only generate findings for resources of these types. These resource types are currently supported for internal access analyzers:

            • AWS::S3::Bucket

            • AWS::RDS::DBSnapshot

            • AWS::RDS::DBClusterSnapshot

            • AWS::S3Express::DirectoryBucket

            • AWS::DynamoDB::Table

            • AWS::DynamoDB::Stream

            • (string) --

          • resourceArns (list) --

            A list of resource ARNs to apply to the internal access analysis rule criteria. The analyzer will only generate findings for resources that match these ARNs.

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

GetAnalyzer (updated) Link ¶
Changes (response)
{'analyzer': {'configuration': {'internalAccess': {'analysisRule': {'inclusions': [{'accountIds': ['string'],
                                                                                    'resourceArns': ['string'],
                                                                                    'resourceTypes': ['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']}]}}},
              'type': {'ACCOUNT_INTERNAL_ACCESS',
                       'ORGANIZATION_INTERNAL_ACCESS'}}}

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'|'ACCOUNT_INTERNAL_ACCESS'|'ORGANIZATION_INTERNAL_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'
                                },
                            ]
                        },
                    ]
                }
            },
            'internalAccess': {
                'analysisRule': {
                    'inclusions': [
                        {
                            'accountIds': [
                                'string',
                            ],
                            'resourceTypes': [
                                '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',
                            ],
                            'resourceArns': [
                                '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 if the analyzer is an external access, unused access, or internal 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) --

        • internalAccess (dict) --

          Specifies the configuration of an internal access analyzer for an Amazon Web Services organization or account. This configuration determines how the analyzer evaluates access within your Amazon Web Services environment.

          • analysisRule (dict) --

            Contains information about analysis rules for the internal access analyzer. These rules determine which resources and access patterns will be analyzed.

            • inclusions (list) --

              A list of rules for the internal access analyzer containing criteria to include in analysis. Only resources that meet the rule criteria will generate findings.

              • (dict) --

                The criteria for an analysis rule for an internal access analyzer.

                • accountIds (list) --

                  A list of Amazon Web Services account IDs to apply to the internal access analysis rule criteria. Account IDs can only be applied to the analysis rule criteria for organization-level analyzers.

                  • (string) --

                • resourceTypes (list) --

                  A list of resource types to apply to the internal access analysis rule criteria. The analyzer will only generate findings for resources of these types. These resource types are currently supported for internal access analyzers:

                  • AWS::S3::Bucket

                  • AWS::RDS::DBSnapshot

                  • AWS::RDS::DBClusterSnapshot

                  • AWS::S3Express::DirectoryBucket

                  • AWS::DynamoDB::Table

                  • AWS::DynamoDB::Stream

                  • (string) --

                • resourceArns (list) --

                  A list of resource ARNs to apply to the internal access analysis rule criteria. The analyzer will only generate findings for resources that match these ARNs.

                  • (string) --

GetFinding (updated) Link ¶
Changes (response)
{'finding': {'resourceControlPolicyRestriction': {'APPLIED'}}}

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'|'APPLIED'
    }
}

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)
{'findingDetails': {'externalAccessDetails': {'resourceControlPolicyRestriction': {'APPLIED'}},
                    'internalAccessDetails': {'accessType': 'INTRA_ACCOUNT | '
                                                            'INTRA_ORG',
                                              'action': ['string'],
                                              'condition': {'string': 'string'},
                                              'principal': {'string': 'string'},
                                              'principalOwnerAccount': 'string',
                                              'principalType': 'IAM_ROLE | '
                                                               'IAM_USER',
                                              'resourceControlPolicyRestriction': 'APPLICABLE '
                                                                                  '| '
                                                                                  'FAILED_TO_EVALUATE_RCP '
                                                                                  '| '
                                                                                  'NOT_APPLICABLE '
                                                                                  '| '
                                                                                  'APPLIED',
                                              'serviceControlPolicyRestriction': 'APPLICABLE '
                                                                                 '| '
                                                                                 'FAILED_TO_EVALUATE_SCP '
                                                                                 '| '
                                                                                 'NOT_APPLICABLE '
                                                                                 '| '
                                                                                 'APPLIED',
                                              'sources': [{'detail': {'accessPointAccount': 'string',
                                                                      'accessPointArn': 'string'},
                                                           'type': 'POLICY | '
                                                                   'BUCKET_ACL '
                                                                   '| '
                                                                   'S3_ACCESS_POINT '
                                                                   '| '
                                                                   'S3_ACCESS_POINT_ACCOUNT'}]}},
 'findingType': {'InternalAccess'}}

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': [
        {
            'internalAccessDetails': {
                'action': [
                    'string',
                ],
                'condition': {
                    'string': 'string'
                },
                'principal': {
                    'string': 'string'
                },
                'principalOwnerAccount': 'string',
                'accessType': 'INTRA_ACCOUNT'|'INTRA_ORG',
                'principalType': 'IAM_ROLE'|'IAM_USER',
                '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'|'APPLIED',
                'serviceControlPolicyRestriction': 'APPLICABLE'|'FAILED_TO_EVALUATE_SCP'|'NOT_APPLICABLE'|'APPLIED'
            },
            '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'|'APPLIED'
            },
            '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'|'InternalAccess'
}

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.

        • internalAccessDetails (dict) --

          The details for an internal access analyzer finding. This contains information about access patterns identified within your Amazon Web Services organization or account.

          • action (list) --

            The action in the analyzed policy statement that has internal access permission to use.

            • (string) --

          • condition (dict) --

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

            • (string) --

              • (string) --

          • principal (dict) --

            The principal that has access to a resource within the internal environment.

            • (string) --

              • (string) --

          • principalOwnerAccount (string) --

            The Amazon Web Services account ID that owns the principal identified in the internal access finding.

          • accessType (string) --

            The type of internal access identified in the finding. This indicates how the access is granted within your Amazon Web Services environment.

          • principalType (string) --

            The type of principal identified in the internal access finding, such as IAM role or IAM user.

          • sources (list) --

            The sources of the internal access finding. This indicates how the access that generated the finding is granted within your Amazon Web Services environment.

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

            • APPLICABLE: There is an RCP present in the organization but IAM Access Analyzer does not include it in the evaluation of effective permissions. For example, if s3:DeleteObject is blocked by the RCP and the restriction is APPLICABLE, then s3:DeleteObject would still be included in the list of actions for the finding. Only applicable to internal access findings with the account as the zone of trust.

            • FAILED_TO_EVALUATE_RCP: There was an error evaluating the RCP.

            • NOT_APPLICABLE: There was no RCP present in the organization. For internal access findings with the account as the zone of trust, NOT_APPLICABLE could also indicate that there was no RCP applicable to the resource.

            • APPLIED: An RCP is present in the organization and IAM Access Analyzer included it in the evaluation of effective permissions. For example, if s3:DeleteObject is blocked by the RCP and the restriction is APPLIED, then s3:DeleteObject would not be included in the list of actions for the finding. Only applicable to internal access findings with the organization as the zone of trust.

          • serviceControlPolicyRestriction (string) --

            The type of restriction applied to the finding by an Organizations service control policy (SCP).

            • APPLICABLE: There is an SCP present in the organization but IAM Access Analyzer does not include it in the evaluation of effective permissions. Only applicable to internal access findings with the account as the zone of trust.

            • FAILED_TO_EVALUATE_SCP: There was an error evaluating the SCP.

            • NOT_APPLICABLE: There was no SCP present in the organization. For internal access findings with the account as the zone of trust, NOT_APPLICABLE could also indicate that there was no SCP applicable to the principal.

            • APPLIED: An SCP is present in the organization and IAM Access Analyzer included it in the evaluation of effective permissions. Only applicable to internal access findings with the organization as the zone of trust.

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

            • APPLICABLE: There is an RCP present in the organization but IAM Access Analyzer does not include it in the evaluation of effective permissions. For example, if s3:DeleteObject is blocked by the RCP and the restriction is APPLICABLE, then s3:DeleteObject would still be included in the list of actions for the finding.

            • FAILED_TO_EVALUATE_RCP: There was an error evaluating the RCP.

            • NOT_APPLICABLE: There was no RCP present in the organization, or there was no RCP applicable to the resource. For example, the resource being analyzed is an Amazon RDS snapshot and there is an RCP in the organization, but the RCP only impacts Amazon S3 buckets.

            • APPLIED: This restriction is not currently available for external access findings.

        • 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. For internal access analyzers, the type is InternalAccess.

GetFindingsStatistics (updated) Link ¶
Changes (response)
{'findingsStatistics': {'internalAccessFindingsStatistics': {'resourceTypeStatistics': {'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': {'totalActiveFindings': 'integer',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             'totalArchivedFindings': 'integer',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             'totalResolvedFindings': 'integer'}},
                                                             'totalActiveFindings': 'integer',
                                                             'totalArchivedFindings': 'integer',
                                                             'totalResolvedFindings': 'integer'}}}

Retrieves a list of aggregated finding statistics for an external access or unused access analyzer.

See also: AWS API Documentation

Request Syntax

client.get_findings_statistics(
    analyzerArn='string'
)
type analyzerArn:

string

param analyzerArn:

[REQUIRED]

The ARN of the analyzer used to generate the statistics.

rtype:

dict

returns:

Response Syntax

{
    'findingsStatistics': [
        {
            'externalAccessFindingsStatistics': {
                'resourceTypeStatistics': {
                    'string': {
                        'totalActivePublic': 123,
                        'totalActiveCrossAccount': 123
                    }
                },
                'totalActiveFindings': 123,
                'totalArchivedFindings': 123,
                'totalResolvedFindings': 123
            },
            'internalAccessFindingsStatistics': {
                'resourceTypeStatistics': {
                    'string': {
                        'totalActiveFindings': 123,
                        'totalResolvedFindings': 123,
                        'totalArchivedFindings': 123
                    }
                },
                'totalActiveFindings': 123,
                'totalArchivedFindings': 123,
                'totalResolvedFindings': 123
            },
            'unusedAccessFindingsStatistics': {
                'unusedAccessTypeStatistics': [
                    {
                        'unusedAccessType': 'string',
                        'total': 123
                    },
                ],
                'topAccounts': [
                    {
                        'account': 'string',
                        'numberOfActiveFindings': 123,
                        'details': {
                            'string': 123
                        }
                    },
                ],
                'totalActiveFindings': 123,
                'totalArchivedFindings': 123,
                'totalResolvedFindings': 123
            }
        },
    ],
    'lastUpdatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • findingsStatistics (list) --

      A group of external access or unused access findings statistics.

      • (dict) --

        Contains information about the aggregate statistics for an external or unused access analyzer. Only one parameter can be used in a FindingsStatistics object.

        • externalAccessFindingsStatistics (dict) --

          The aggregate statistics for an external access analyzer.

          • resourceTypeStatistics (dict) --

            The total number of active cross-account and public findings for each resource type of the specified external access analyzer.

            • (string) --

              • (dict) --

                Contains information about the total number of active cross-account and public findings for a resource type of an external access analyzer.

                • totalActivePublic (integer) --

                  The total number of active public findings for the resource type.

                • totalActiveCrossAccount (integer) --

                  The total number of active cross-account findings for the resource type.

          • totalActiveFindings (integer) --

            The number of active findings for the specified external access analyzer.

          • totalArchivedFindings (integer) --

            The number of archived findings for the specified external access analyzer.

          • totalResolvedFindings (integer) --

            The number of resolved findings for the specified external access analyzer.

        • internalAccessFindingsStatistics (dict) --

          The aggregate statistics for an internal access analyzer. This includes information about active, archived, and resolved findings related to internal access within your Amazon Web Services organization or account.

          • resourceTypeStatistics (dict) --

            The total number of active findings for each resource type of the specified internal access analyzer.

            • (string) --

              • (dict) --

                Contains information about the total number of active, archived, and resolved findings for a resource type of an internal access analyzer.

                • totalActiveFindings (integer) --

                  The total number of active findings for the resource type in the internal access analyzer.

                • totalResolvedFindings (integer) --

                  The total number of resolved findings for the resource type in the internal access analyzer.

                • totalArchivedFindings (integer) --

                  The total number of archived findings for the resource type in the internal access analyzer.

          • totalActiveFindings (integer) --

            The number of active findings for the specified internal access analyzer.

          • totalArchivedFindings (integer) --

            The number of archived findings for the specified internal access analyzer.

          • totalResolvedFindings (integer) --

            The number of resolved findings for the specified internal access analyzer.

        • unusedAccessFindingsStatistics (dict) --

          The aggregate statistics for an unused access analyzer.

          • unusedAccessTypeStatistics (list) --

            A list of details about the total number of findings for each type of unused access for the analyzer.

            • (dict) --

              Contains information about the total number of findings for a type of unused access.

              • unusedAccessType (string) --

                The type of unused access.

              • total (integer) --

                The total number of findings for the specified unused access type.

          • topAccounts (list) --

            A list of one to ten Amazon Web Services accounts that have the most active findings for the unused access analyzer.

            • (dict) --

              Contains information about the findings for an Amazon Web Services account in an organization unused access analyzer.

              • account (string) --

                The ID of the Amazon Web Services account for which unused access finding details are provided.

              • numberOfActiveFindings (integer) --

                The number of active unused access findings for the specified Amazon Web Services account.

              • details (dict) --

                Provides the number of active findings for each type of unused access for the specified Amazon Web Services account.

                • (string) --

                  • (integer) --

          • totalActiveFindings (integer) --

            The total number of active findings for the unused access analyzer.

          • totalArchivedFindings (integer) --

            The total number of archived findings for the unused access analyzer.

          • totalResolvedFindings (integer) --

            The total number of resolved findings for the unused access analyzer.

    • lastUpdatedAt (datetime) --

      The time at which the retrieval of the findings statistics was last updated. If the findings statistics have not been previously retrieved for the specified analyzer, this field will not be populated.

ListAccessPreviewFindings (updated) Link ¶
Changes (response)
{'findings': {'resourceControlPolicyRestriction': {'APPLIED'}}}

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'|'APPLIED'
        },
    ],
    '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.

ListAnalyzers (updated) Link ¶
Changes (request, response)
Request
{'type': {'ACCOUNT_INTERNAL_ACCESS', 'ORGANIZATION_INTERNAL_ACCESS'}}
Response
{'analyzers': {'configuration': {'internalAccess': {'analysisRule': {'inclusions': [{'accountIds': ['string'],
                                                                                     'resourceArns': ['string'],
                                                                                     'resourceTypes': ['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']}]}}},
               'type': {'ACCOUNT_INTERNAL_ACCESS',
                        'ORGANIZATION_INTERNAL_ACCESS'}}}

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'|'ACCOUNT_INTERNAL_ACCESS'|'ORGANIZATION_INTERNAL_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'|'ACCOUNT_INTERNAL_ACCESS'|'ORGANIZATION_INTERNAL_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'
                                    },
                                ]
                            },
                        ]
                    }
                },
                'internalAccess': {
                    'analysisRule': {
                        'inclusions': [
                            {
                                'accountIds': [
                                    'string',
                                ],
                                'resourceTypes': [
                                    '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',
                                ],
                                'resourceArns': [
                                    '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 if the analyzer is an external access, unused access, or internal 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) --

          • internalAccess (dict) --

            Specifies the configuration of an internal access analyzer for an Amazon Web Services organization or account. This configuration determines how the analyzer evaluates access within your Amazon Web Services environment.

            • analysisRule (dict) --

              Contains information about analysis rules for the internal access analyzer. These rules determine which resources and access patterns will be analyzed.

              • inclusions (list) --

                A list of rules for the internal access analyzer containing criteria to include in analysis. Only resources that meet the rule criteria will generate findings.

                • (dict) --

                  The criteria for an analysis rule for an internal access analyzer.

                  • accountIds (list) --

                    A list of Amazon Web Services account IDs to apply to the internal access analysis rule criteria. Account IDs can only be applied to the analysis rule criteria for organization-level analyzers.

                    • (string) --

                  • resourceTypes (list) --

                    A list of resource types to apply to the internal access analysis rule criteria. The analyzer will only generate findings for resources of these types. These resource types are currently supported for internal access analyzers:

                    • AWS::S3::Bucket

                    • AWS::RDS::DBSnapshot

                    • AWS::RDS::DBClusterSnapshot

                    • AWS::S3Express::DirectoryBucket

                    • AWS::DynamoDB::Table

                    • AWS::DynamoDB::Stream

                    • (string) --

                  • resourceArns (list) --

                    A list of resource ARNs to apply to the internal access analysis rule criteria. The analyzer will only generate findings for resources that match these ARNs.

                    • (string) --

    • nextToken (string) --

      A token used for pagination of results returned.

ListFindings (updated) Link ¶
Changes (response)
{'findings': {'resourceControlPolicyRestriction': {'APPLIED'}}}

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'|'APPLIED'
        },
    ],
    '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': {'findingType': {'InternalAccess'}}}

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'|'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 used for pagination of results returned.

UpdateAnalyzer (updated) Link ¶
Changes (both)
{'configuration': {'internalAccess': {'analysisRule': {'inclusions': [{'accountIds': ['string'],
                                                                       'resourceArns': ['string'],
                                                                       'resourceTypes': ['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']}]}}}}

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'
                            },
                        ]
                    },
                ]
            }
        },
        'internalAccess': {
            'analysisRule': {
                'inclusions': [
                    {
                        'accountIds': [
                            'string',
                        ],
                        'resourceTypes': [
                            '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',
                        ],
                        'resourceArns': [
                            '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) --

  • internalAccess (dict) --

    Specifies the configuration of an internal access analyzer for an Amazon Web Services organization or account. This configuration determines how the analyzer evaluates access within your Amazon Web Services environment.

    • analysisRule (dict) --

      Contains information about analysis rules for the internal access analyzer. These rules determine which resources and access patterns will be analyzed.

      • inclusions (list) --

        A list of rules for the internal access analyzer containing criteria to include in analysis. Only resources that meet the rule criteria will generate findings.

        • (dict) --

          The criteria for an analysis rule for an internal access analyzer.

          • accountIds (list) --

            A list of Amazon Web Services account IDs to apply to the internal access analysis rule criteria. Account IDs can only be applied to the analysis rule criteria for organization-level analyzers.

            • (string) --

          • resourceTypes (list) --

            A list of resource types to apply to the internal access analysis rule criteria. The analyzer will only generate findings for resources of these types. These resource types are currently supported for internal access analyzers:

            • AWS::S3::Bucket

            • AWS::RDS::DBSnapshot

            • AWS::RDS::DBClusterSnapshot

            • AWS::S3Express::DirectoryBucket

            • AWS::DynamoDB::Table

            • AWS::DynamoDB::Stream

            • (string) --

          • resourceArns (list) --

            A list of resource ARNs to apply to the internal access analysis rule criteria. The analyzer will only generate findings for resources that match these ARNs.

            • (string) --

rtype:

dict

returns:

Response Syntax

{
    'configuration': {
        'unusedAccess': {
            'unusedAccessAge': 123,
            'analysisRule': {
                'exclusions': [
                    {
                        'accountIds': [
                            'string',
                        ],
                        'resourceTags': [
                            {
                                'string': 'string'
                            },
                        ]
                    },
                ]
            }
        },
        'internalAccess': {
            'analysisRule': {
                'inclusions': [
                    {
                        'accountIds': [
                            'string',
                        ],
                        'resourceTypes': [
                            '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',
                        ],
                        'resourceArns': [
                            '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) --

      • internalAccess (dict) --

        Specifies the configuration of an internal access analyzer for an Amazon Web Services organization or account. This configuration determines how the analyzer evaluates access within your Amazon Web Services environment.

        • analysisRule (dict) --

          Contains information about analysis rules for the internal access analyzer. These rules determine which resources and access patterns will be analyzed.

          • inclusions (list) --

            A list of rules for the internal access analyzer containing criteria to include in analysis. Only resources that meet the rule criteria will generate findings.

            • (dict) --

              The criteria for an analysis rule for an internal access analyzer.

              • accountIds (list) --

                A list of Amazon Web Services account IDs to apply to the internal access analysis rule criteria. Account IDs can only be applied to the analysis rule criteria for organization-level analyzers.

                • (string) --

              • resourceTypes (list) --

                A list of resource types to apply to the internal access analysis rule criteria. The analyzer will only generate findings for resources of these types. These resource types are currently supported for internal access analyzers:

                • AWS::S3::Bucket

                • AWS::RDS::DBSnapshot

                • AWS::RDS::DBClusterSnapshot

                • AWS::S3Express::DirectoryBucket

                • AWS::DynamoDB::Table

                • AWS::DynamoDB::Stream

                • (string) --

              • resourceArns (list) --

                A list of resource ARNs to apply to the internal access analysis rule criteria. The analyzer will only generate findings for resources that match these ARNs.

                • (string) --