AccessAnalyzer ************** Client ====== class AccessAnalyzer.Client A low-level client representing Access Analyzer Identity and Access Management Access Analyzer helps you to set, verify, and refine your IAM policies by providing a suite of capabilities. Its features include findings for external and unused access, basic and custom policy checks for validating policies, and policy generation to generate fine-grained policies. To start using IAM Access Analyzer to identify external or unused access, you first need to create an analyzer. **External access analyzers** help identify potential risks of accessing resources by enabling you to identify any resource policies that grant access to an external principal. It does this by using logic-based reasoning to analyze resource-based policies in your Amazon Web Services environment. An external principal can be another Amazon Web Services account, a root user, an IAM user or role, a federated user, an Amazon Web Services service, or an anonymous user. You can also use IAM Access Analyzer to preview public and cross-account access to your resources before deploying permissions changes. **Unused access analyzers** help identify potential identity access risks by enabling you to identify unused IAM roles, unused access keys, unused console passwords, and IAM principals with unused service and action-level permissions. Beyond findings, IAM Access Analyzer provides basic and custom policy checks to validate IAM policies before deploying permissions changes. You can use policy generation to refine permissions by attaching a policy generated using access activity logged in CloudTrail logs. This guide describes the IAM Access Analyzer operations that you can call programmatically. For general information about IAM Access Analyzer, see Identity and Access Management Access Analyzer in the **IAM User Guide**. import boto3 client = boto3.client('accessanalyzer') These are the available methods: * apply_archive_rule * can_paginate * cancel_policy_generation * check_access_not_granted * check_no_new_access * check_no_public_access * close * create_access_preview * create_analyzer * create_archive_rule * delete_analyzer * delete_archive_rule * generate_finding_recommendation * get_access_preview * get_analyzed_resource * get_analyzer * get_archive_rule * get_finding * get_finding_recommendation * get_finding_v2 * get_findings_statistics * get_generated_policy * get_paginator * get_waiter * list_access_preview_findings * list_access_previews * list_analyzed_resources * list_analyzers * list_archive_rules * list_findings * list_findings_v2 * list_policy_generations * list_tags_for_resource * start_policy_generation * start_resource_scan * tag_resource * untag_resource * update_analyzer * update_archive_rule * update_findings * validate_policy Paginators ========== Paginators are available on a client instance via the "get_paginator" method. For more detailed instructions and examples on the usage of paginators, see the paginators user guide. The available paginators are: * GetFindingRecommendation * GetFindingV2 * ListAccessPreviewFindings * ListAccessPreviews * ListAnalyzedResources * ListAnalyzers * ListArchiveRules * ListFindings * ListFindingsV2 * ListPolicyGenerations * ValidatePolicy AccessAnalyzer / Paginator / ListPolicyGenerations ListPolicyGenerations ********************* class AccessAnalyzer.Paginator.ListPolicyGenerations paginator = client.get_paginator('list_policy_generations') paginate(**kwargs) Creates an iterator that will paginate through responses from "AccessAnalyzer.Client.list_policy_generations()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( principalArn='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **principalArn** (*string*) -- The ARN of the IAM entity (user or role) for which you are generating a policy. Use this with "ListGeneratedPolicies" to filter the results to only include results for a specific principal. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'policyGenerations': [ { 'jobId': 'string', 'principalArn': 'string', 'status': 'IN_PROGRESS'|'SUCCEEDED'|'FAILED'|'CANCELED', 'startedOn': datetime(2015, 1, 1), 'completedOn': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **policyGenerations** *(list) --* A "PolicyGeneration" object that contains details about the generated policy. * *(dict) --* Contains details about the policy generation status and properties. * **jobId** *(string) --* The "JobId" that is returned by the "StartPolicyGeneration" operation. The "JobId" can be used with "GetGeneratedPolicy" to retrieve the generated policies or used with "CancelPolicyGeneration" to cancel the policy generation request. * **principalArn** *(string) --* The ARN of the IAM entity (user or role) for which you are generating a policy. * **status** *(string) --* The status of the policy generation request. * **startedOn** *(datetime) --* A timestamp of when the policy generation started. * **completedOn** *(datetime) --* A timestamp of when the policy generation was completed. * **NextToken** *(string) --* A token to resume pagination. AccessAnalyzer / Paginator / ListAnalyzedResources ListAnalyzedResources ********************* class AccessAnalyzer.Paginator.ListAnalyzedResources paginator = client.get_paginator('list_analyzed_resources') paginate(**kwargs) Creates an iterator that will paginate through responses from "AccessAnalyzer.Client.list_analyzed_resources()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( analyzerArn='string', resourceType='AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic'|'AWS::S3Express::DirectoryBucket'|'AWS::DynamoDB::Table'|'AWS::DynamoDB::Stream'|'AWS::IAM::User', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer to retrieve a list of analyzed resources from. * **resourceType** (*string*) -- The type of resource. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'analyzedResources': [ { 'resourceArn': 'string', 'resourceOwnerAccount': 'string', 'resourceType': 'AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic'|'AWS::S3Express::DirectoryBucket'|'AWS::DynamoDB::Table'|'AWS::DynamoDB::Stream'|'AWS::IAM::User' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* The response to the request. * **analyzedResources** *(list) --* A list of resources that were analyzed. * *(dict) --* Contains the ARN of the analyzed resource. * **resourceArn** *(string) --* The ARN of the analyzed resource. * **resourceOwnerAccount** *(string) --* The Amazon Web Services account ID that owns the resource. * **resourceType** *(string) --* The type of resource that was analyzed. * **NextToken** *(string) --* A token to resume pagination. AccessAnalyzer / Paginator / ValidatePolicy ValidatePolicy ************** class AccessAnalyzer.Paginator.ValidatePolicy paginator = client.get_paginator('validate_policy') paginate(**kwargs) Creates an iterator that will paginate through responses from "AccessAnalyzer.Client.validate_policy()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( locale='DE'|'EN'|'ES'|'FR'|'IT'|'JA'|'KO'|'PT_BR'|'ZH_CN'|'ZH_TW', policyDocument='string', policyType='IDENTITY_POLICY'|'RESOURCE_POLICY'|'SERVICE_CONTROL_POLICY'|'RESOURCE_CONTROL_POLICY', validatePolicyResourceType='AWS::S3::Bucket'|'AWS::S3::AccessPoint'|'AWS::S3::MultiRegionAccessPoint'|'AWS::S3ObjectLambda::AccessPoint'|'AWS::IAM::AssumeRolePolicyDocument'|'AWS::DynamoDB::Table', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **locale** (*string*) -- The locale to use for localizing the findings. * **policyDocument** (*string*) -- **[REQUIRED]** The JSON policy document to use as the content for the policy. * **policyType** (*string*) -- **[REQUIRED]** The type of policy to validate. Identity policies grant permissions to IAM principals. Identity policies include managed and inline policies for IAM roles, users, and groups. Resource policies grant permissions on Amazon Web Services resources. Resource policies include trust policies for IAM roles and bucket policies for Amazon S3 buckets. You can provide a generic input such as identity policy or resource policy or a specific input such as managed policy or Amazon S3 bucket policy. Service control policies (SCPs) are a type of organization policy attached to an Amazon Web Services organization, organizational unit (OU), or an account. * **validatePolicyResourceType** (*string*) -- The type of resource to attach to your resource policy. Specify a value for the policy validation resource type only if the policy type is "RESOURCE_POLICY". For example, to validate a resource policy to attach to an Amazon S3 bucket, you can choose "AWS::S3::Bucket" for the policy validation resource type. For resource types not supported as valid values, IAM Access Analyzer runs policy checks that apply to all resource policies. For example, to validate a resource policy to attach to a KMS key, do not specify a value for the policy validation resource type and IAM Access Analyzer will run policy checks that apply to all resource policies. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'findings': [ { 'findingDetails': 'string', 'findingType': 'ERROR'|'SECURITY_WARNING'|'SUGGESTION'|'WARNING', 'issueCode': 'string', 'learnMoreLink': 'string', 'locations': [ { 'path': [ { 'index': 123, 'key': 'string', 'substring': { 'start': 123, 'length': 123 }, 'value': 'string' }, ], 'span': { 'start': { 'line': 123, 'column': 123, 'offset': 123 }, 'end': { 'line': 123, 'column': 123, 'offset': 123 } } }, ] }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **findings** *(list) --* The list of findings in a policy returned by IAM Access Analyzer based on its suite of policy checks. * *(dict) --* A finding in a policy. Each finding is an actionable recommendation that can be used to improve the policy. * **findingDetails** *(string) --* A localized message that explains the finding and provides guidance on how to address it. * **findingType** *(string) --* The impact of the finding. Security warnings report when the policy allows access that we consider overly permissive. Errors report when a part of the policy is not functional. Warnings report non-security issues when a policy does not conform to policy writing best practices. Suggestions recommend stylistic improvements in the policy that do not impact access. * **issueCode** *(string) --* The issue code provides an identifier of the issue associated with this finding. * **learnMoreLink** *(string) --* A link to additional documentation about the type of finding. * **locations** *(list) --* The list of locations in the policy document that are related to the finding. The issue code provides a summary of an issue identified by the finding. * *(dict) --* A location in a policy that is represented as a path through the JSON representation and a corresponding span. * **path** *(list) --* A path in a policy, represented as a sequence of path elements. * *(dict) --* A single element in a path through the JSON representation of a policy. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "index", "key", "substring", "value". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **index** *(integer) --* Refers to an index in a JSON array. * **key** *(string) --* Refers to a key in a JSON object. * **substring** *(dict) --* Refers to a substring of a literal string in a JSON object. * **start** *(integer) --* The start index of the substring, starting from 0. * **length** *(integer) --* The length of the substring. * **value** *(string) --* Refers to the value associated with a given key in a JSON object. * **span** *(dict) --* A span in a policy. * **start** *(dict) --* The start position of the span (inclusive). * **line** *(integer) --* The line of the position, starting from 1. * **column** *(integer) --* The column of the position, starting from 0. * **offset** *(integer) --* The offset within the policy that corresponds to the position, starting from 0. * **end** *(dict) --* The end position of the span (exclusive). * **line** *(integer) --* The line of the position, starting from 1. * **column** *(integer) --* The column of the position, starting from 0. * **offset** *(integer) --* The offset within the policy that corresponds to the position, starting from 0. * **NextToken** *(string) --* A token to resume pagination. AccessAnalyzer / Paginator / ListFindingsV2 ListFindingsV2 ************** class AccessAnalyzer.Paginator.ListFindingsV2 paginator = client.get_paginator('list_findings_v2') paginate(**kwargs) Creates an iterator that will paginate through responses from "AccessAnalyzer.Client.list_findings_v2()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( analyzerArn='string', filter={ 'string': { 'eq': [ 'string', ], 'neq': [ 'string', ], 'contains': [ 'string', ], 'exists': True|False } }, sort={ 'attributeName': 'string', 'orderBy': 'ASC'|'DESC' }, PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer to retrieve findings from. * **filter** (*dict*) -- A filter to match for the findings to return. * *(string) --* * *(dict) --* The criteria to use in the filter that defines the archive rule. For more information on available filter keys, see IAM Access Analyzer filter keys. * **eq** *(list) --* An "equals" operator to match for the filter used to create the rule. * *(string) --* * **neq** *(list) --* A "not equals" operator to match for the filter used to create the rule. * *(string) --* * **contains** *(list) --* A "contains" operator to match for the filter used to create the rule. * *(string) --* * **exists** *(boolean) --* An "exists" operator to match for the filter used to create the rule. * **sort** (*dict*) -- The criteria used to sort. * **attributeName** *(string) --* The name of the attribute to sort on. * **orderBy** *(string) --* The sort order, ascending or descending. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'findings': [ { 'analyzedAt': datetime(2015, 1, 1), 'createdAt': datetime(2015, 1, 1), 'error': 'string', 'id': 'string', 'resource': 'string', 'resourceType': 'AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic'|'AWS::S3Express::DirectoryBucket'|'AWS::DynamoDB::Table'|'AWS::DynamoDB::Stream'|'AWS::IAM::User', 'resourceOwnerAccount': 'string', 'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED', 'updatedAt': datetime(2015, 1, 1), 'findingType': 'ExternalAccess'|'UnusedIAMRole'|'UnusedIAMUserAccessKey'|'UnusedIAMUserPassword'|'UnusedPermission'|'InternalAccess' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **findings** *(list) --* A list of findings retrieved from the analyzer that match the filter criteria specified, if any. * *(dict) --* Contains information about a finding. * **analyzedAt** *(datetime) --* The time at which the resource-based policy or IAM entity that generated the finding was analyzed. * **createdAt** *(datetime) --* The time at which the finding was created. * **error** *(string) --* The error that resulted in an Error finding. * **id** *(string) --* The ID of the finding. * **resource** *(string) --* The resource that the external principal has access to. * **resourceType** *(string) --* The type of the resource that the external principal has access to. * **resourceOwnerAccount** *(string) --* The Amazon Web Services account ID that owns the resource. * **status** *(string) --* The status of the finding. * **updatedAt** *(datetime) --* The time at which the finding was most recently updated. * **findingType** *(string) --* The type of the access finding. For external access analyzers, the type is "ExternalAccess". For unused access analyzers, the type can be "UnusedIAMRole", "UnusedIAMUserAccessKey", "UnusedIAMUserPassword", or "UnusedPermission". For internal access analyzers, the type is "InternalAccess". * **NextToken** *(string) --* A token to resume pagination. AccessAnalyzer / Paginator / ListFindings ListFindings ************ class AccessAnalyzer.Paginator.ListFindings paginator = client.get_paginator('list_findings') paginate(**kwargs) Creates an iterator that will paginate through responses from "AccessAnalyzer.Client.list_findings()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( analyzerArn='string', filter={ 'string': { 'eq': [ 'string', ], 'neq': [ 'string', ], 'contains': [ 'string', ], 'exists': True|False } }, sort={ 'attributeName': 'string', 'orderBy': 'ASC'|'DESC' }, PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer to retrieve findings from. * **filter** (*dict*) -- A filter to match for the findings to return. * *(string) --* * *(dict) --* The criteria to use in the filter that defines the archive rule. For more information on available filter keys, see IAM Access Analyzer filter keys. * **eq** *(list) --* An "equals" operator to match for the filter used to create the rule. * *(string) --* * **neq** *(list) --* A "not equals" operator to match for the filter used to create the rule. * *(string) --* * **contains** *(list) --* A "contains" operator to match for the filter used to create the rule. * *(string) --* * **exists** *(boolean) --* An "exists" operator to match for the filter used to create the rule. * **sort** (*dict*) -- The sort order for the findings returned. * **attributeName** *(string) --* The name of the attribute to sort on. * **orderBy** *(string) --* The sort order, ascending or descending. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'findings': [ { '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 to resume pagination. AccessAnalyzer / Paginator / ListAccessPreviews ListAccessPreviews ****************** class AccessAnalyzer.Paginator.ListAccessPreviews paginator = client.get_paginator('list_access_previews') paginate(**kwargs) Creates an iterator that will paginate through responses from "AccessAnalyzer.Client.list_access_previews()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( analyzerArn='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer used to generate the access preview. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'accessPreviews': [ { 'id': 'string', 'analyzerArn': 'string', 'createdAt': datetime(2015, 1, 1), 'status': 'COMPLETED'|'CREATING'|'FAILED', 'statusReason': { 'code': 'INTERNAL_ERROR'|'INVALID_CONFIGURATION' } }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **accessPreviews** *(list) --* A list of access previews retrieved for the analyzer. * *(dict) --* Contains a summary of information about an access preview. * **id** *(string) --* The unique ID for the access preview. * **analyzerArn** *(string) --* The ARN of the analyzer used to generate the access preview. * **createdAt** *(datetime) --* The time at which the access preview was created. * **status** *(string) --* The status of the access preview. * "Creating" - The access preview creation is in progress. * "Completed" - The access preview is complete and previews the findings for external access to the resource. * "Failed" - The access preview creation has failed. * **statusReason** *(dict) --* Provides more details about the current status of the access preview. For example, if the creation of the access preview fails, a "Failed" status is returned. This failure can be due to an internal issue with the analysis or due to an invalid proposed resource configuration. * **code** *(string) --* The reason code for the current status of the access preview. * **NextToken** *(string) --* A token to resume pagination. AccessAnalyzer / Paginator / ListAccessPreviewFindings ListAccessPreviewFindings ************************* class AccessAnalyzer.Paginator.ListAccessPreviewFindings paginator = client.get_paginator('list_access_preview_findings') paginate(**kwargs) Creates an iterator that will paginate through responses from "AccessAnalyzer.Client.list_access_preview_findings()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( accessPreviewId='string', analyzerArn='string', filter={ 'string': { 'eq': [ 'string', ], 'neq': [ 'string', ], 'contains': [ 'string', ], 'exists': True|False } }, PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **accessPreviewId** (*string*) -- **[REQUIRED]** The unique ID for the access preview. * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer used to generate the access. * **filter** (*dict*) -- 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. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'findings': [ { '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 to resume pagination. AccessAnalyzer / Paginator / ListAnalyzers ListAnalyzers ************* class AccessAnalyzer.Paginator.ListAnalyzers paginator = client.get_paginator('list_analyzers') paginate(**kwargs) Creates an iterator that will paginate through responses from "AccessAnalyzer.Client.list_analyzers()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( type='ACCOUNT'|'ORGANIZATION'|'ACCOUNT_UNUSED_ACCESS'|'ORGANIZATION_UNUSED_ACCESS'|'ACCOUNT_INTERNAL_ACCESS'|'ORGANIZATION_INTERNAL_ACCESS', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **type** (*string*) -- The type of analyzer. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { '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. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "unusedAccess", "internalAccess". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **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 to resume pagination. AccessAnalyzer / Paginator / GetFindingV2 GetFindingV2 ************ class AccessAnalyzer.Paginator.GetFindingV2 paginator = client.get_paginator('get_finding_v2') paginate(**kwargs) Creates an iterator that will paginate through responses from "AccessAnalyzer.Client.get_finding_v2()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( analyzerArn='string', id='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer that generated the finding. * **id** (*string*) -- **[REQUIRED]** The ID of the finding to retrieve. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { '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), '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', 'NextToken': 'string' } **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. * **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. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "internalAccessDetails", "externalAccessDetails", "unusedPermissionDetails", "unusedIamUserAccessKeyDetails", "unusedIamRoleDetails", "unusedIamUserPasswordDetails". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **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". * **NextToken** *(string) --* A token to resume pagination. AccessAnalyzer / Paginator / ListArchiveRules ListArchiveRules **************** class AccessAnalyzer.Paginator.ListArchiveRules paginator = client.get_paginator('list_archive_rules') paginate(**kwargs) Creates an iterator that will paginate through responses from "AccessAnalyzer.Client.list_archive_rules()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( analyzerName='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **analyzerName** (*string*) -- **[REQUIRED]** The name of the analyzer to retrieve rules from. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'archiveRules': [ { 'ruleName': 'string', 'filter': { 'string': { 'eq': [ 'string', ], 'neq': [ 'string', ], 'contains': [ 'string', ], 'exists': True|False } }, 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* The response to the request. * **archiveRules** *(list) --* A list of archive rules created for the specified analyzer. * *(dict) --* Contains information about an archive rule. Archive rules automatically archive new findings that meet the criteria you define when you create the rule. * **ruleName** *(string) --* The name of the archive rule. * **filter** *(dict) --* A filter used to define the archive rule. * *(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. * **createdAt** *(datetime) --* The time at which the archive rule was created. * **updatedAt** *(datetime) --* The time at which the archive rule was last updated. * **NextToken** *(string) --* A token to resume pagination. AccessAnalyzer / Paginator / GetFindingRecommendation GetFindingRecommendation ************************ class AccessAnalyzer.Paginator.GetFindingRecommendation paginator = client.get_paginator('get_finding_recommendation') paginate(**kwargs) Creates an iterator that will paginate through responses from "AccessAnalyzer.Client.get_finding_recommendation()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( analyzerArn='string', id='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer used to generate the finding recommendation. * **id** (*string*) -- **[REQUIRED]** The unique ID for the finding recommendation. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'startedAt': datetime(2015, 1, 1), 'completedAt': datetime(2015, 1, 1), 'error': { 'code': 'string', 'message': 'string' }, 'resourceArn': 'string', 'recommendedSteps': [ { 'unusedPermissionsRecommendedStep': { 'policyUpdatedAt': datetime(2015, 1, 1), 'recommendedAction': 'CREATE_POLICY'|'DETACH_POLICY', 'recommendedPolicy': 'string', 'existingPolicyId': 'string' } }, ], 'recommendationType': 'UnusedPermissionRecommendation', 'status': 'SUCCEEDED'|'FAILED'|'IN_PROGRESS', 'NextToken': 'string' } **Response Structure** * *(dict) --* * **startedAt** *(datetime) --* The time at which the retrieval of the finding recommendation was started. * **completedAt** *(datetime) --* The time at which the retrieval of the finding recommendation was completed. * **error** *(dict) --* Detailed information about the reason that the retrieval of a recommendation for the finding failed. * **code** *(string) --* The error code for a failed retrieval of a recommendation for a finding. * **message** *(string) --* The error message for a failed retrieval of a recommendation for a finding. * **resourceArn** *(string) --* The ARN of the resource of the finding. * **recommendedSteps** *(list) --* A group of recommended steps for the finding. * *(dict) --* Contains information about a recommended step for an unused access analyzer finding. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "unusedPermissionsRecommendedStep". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **unusedPermissionsRecommendedStep** *(dict) --* A recommended step for an unused permissions finding. * **policyUpdatedAt** *(datetime) --* The time at which the existing policy for the unused permissions finding was last updated. * **recommendedAction** *(string) --* A recommendation of whether to create or detach a policy for an unused permissions finding. * **recommendedPolicy** *(string) --* If the recommended action for the unused permissions finding is to replace the existing policy, the contents of the recommended policy to replace the policy specified in the "existingPolicyId" field. * **existingPolicyId** *(string) --* If the recommended action for the unused permissions finding is to detach a policy, the ID of an existing policy to be detached. * **recommendationType** *(string) --* The type of recommendation for the finding. * **status** *(string) --* The status of the retrieval of the finding recommendation. * **NextToken** *(string) --* A token to resume pagination. AccessAnalyzer / Client / get_paginator get_paginator ************* AccessAnalyzer.Client.get_paginator(operation_name) Create a paginator for an operation. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Raises: **OperationNotPageableError** -- Raised if the operation is not pageable. You can use the "client.can_paginate" method to check if an operation is pageable. Return type: "botocore.paginate.Paginator" Returns: A paginator object. AccessAnalyzer / Client / create_analyzer create_analyzer *************** AccessAnalyzer.Client.create_analyzer(**kwargs) Creates an analyzer for your account. See also: AWS API Documentation **Request Syntax** response = 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', ] }, ] } } } ) Parameters: * **analyzerName** (*string*) -- **[REQUIRED]** The name of the analyzer to create. * **type** (*string*) -- **[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. * **archiveRules** (*list*) -- 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. * **tags** (*dict*) -- 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) --* * **clientToken** (*string*) -- A client token. This field is autopopulated if not provided. * **configuration** (*dict*) -- 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. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "unusedAccess", "internalAccess". * **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) --* Return type: 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. **Exceptions** * "AccessAnalyzer.Client.exceptions.ConflictException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ServiceQuotaExceededException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / list_analyzed_resources list_analyzed_resources *********************** AccessAnalyzer.Client.list_analyzed_resources(**kwargs) Retrieves a list of resources of the specified type that have been analyzed by the specified analyzer. See also: AWS API Documentation **Request Syntax** response = client.list_analyzed_resources( analyzerArn='string', resourceType='AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic'|'AWS::S3Express::DirectoryBucket'|'AWS::DynamoDB::Table'|'AWS::DynamoDB::Stream'|'AWS::IAM::User', nextToken='string', maxResults=123 ) Parameters: * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer to retrieve a list of analyzed resources from. * **resourceType** (*string*) -- The type of resource. * **nextToken** (*string*) -- A token used for pagination of results returned. * **maxResults** (*integer*) -- The maximum number of results to return in the response. Return type: dict Returns: **Response Syntax** { 'analyzedResources': [ { 'resourceArn': 'string', 'resourceOwnerAccount': 'string', 'resourceType': 'AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic'|'AWS::S3Express::DirectoryBucket'|'AWS::DynamoDB::Table'|'AWS::DynamoDB::Stream'|'AWS::IAM::User' }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* The response to the request. * **analyzedResources** *(list) --* A list of resources that were analyzed. * *(dict) --* Contains the ARN of the analyzed resource. * **resourceArn** *(string) --* The ARN of the analyzed resource. * **resourceOwnerAccount** *(string) --* The Amazon Web Services account ID that owns the resource. * **resourceType** *(string) --* The type of resource that was analyzed. * **nextToken** *(string) --* A token used for pagination of results returned. **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / cancel_policy_generation cancel_policy_generation ************************ AccessAnalyzer.Client.cancel_policy_generation(**kwargs) Cancels the requested policy generation. See also: AWS API Documentation **Request Syntax** response = client.cancel_policy_generation( jobId='string' ) Parameters: **jobId** (*string*) -- **[REQUIRED]** The "JobId" that is returned by the "StartPolicyGeneration" operation. The "JobId" can be used with "GetGeneratedPolicy" to retrieve the generated policies or used with "CancelPolicyGeneration" to cancel the policy generation request. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / get_archive_rule get_archive_rule **************** AccessAnalyzer.Client.get_archive_rule(**kwargs) Retrieves information about an archive rule. To learn about filter keys that you can use to create an archive rule, see IAM Access Analyzer filter keys in the **IAM User Guide**. See also: AWS API Documentation **Request Syntax** response = client.get_archive_rule( analyzerName='string', ruleName='string' ) Parameters: * **analyzerName** (*string*) -- **[REQUIRED]** The name of the analyzer to retrieve rules from. * **ruleName** (*string*) -- **[REQUIRED]** The name of the rule to retrieve. Return type: dict Returns: **Response Syntax** { 'archiveRule': { 'ruleName': 'string', 'filter': { 'string': { 'eq': [ 'string', ], 'neq': [ 'string', ], 'contains': [ 'string', ], 'exists': True|False } }, 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* The response to the request. * **archiveRule** *(dict) --* Contains information about an archive rule. Archive rules automatically archive new findings that meet the criteria you define when you create the rule. * **ruleName** *(string) --* The name of the archive rule. * **filter** *(dict) --* A filter used to define the archive rule. * *(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. * **createdAt** *(datetime) --* The time at which the archive rule was created. * **updatedAt** *(datetime) --* The time at which the archive rule was last updated. **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / start_resource_scan start_resource_scan ******************* AccessAnalyzer.Client.start_resource_scan(**kwargs) Immediately starts a scan of the policies applied to the specified resource. See also: AWS API Documentation **Request Syntax** response = client.start_resource_scan( analyzerArn='string', resourceArn='string', resourceOwnerAccount='string' ) Parameters: * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer to use to scan the policies applied to the specified resource. * **resourceArn** (*string*) -- **[REQUIRED]** The ARN of the resource to scan. * **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. Returns: None **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / create_archive_rule create_archive_rule ******************* AccessAnalyzer.Client.create_archive_rule(**kwargs) Creates an archive rule for the specified analyzer. Archive rules automatically archive new findings that meet the criteria you define when you create the rule. To learn about filter keys that you can use to create an archive rule, see IAM Access Analyzer filter keys in the **IAM User Guide**. See also: AWS API Documentation **Request Syntax** response = client.create_archive_rule( analyzerName='string', ruleName='string', filter={ 'string': { 'eq': [ 'string', ], 'neq': [ 'string', ], 'contains': [ 'string', ], 'exists': True|False } }, clientToken='string' ) Parameters: * **analyzerName** (*string*) -- **[REQUIRED]** The name of the created analyzer. * **ruleName** (*string*) -- **[REQUIRED]** The name of the rule to create. * **filter** (*dict*) -- **[REQUIRED]** The criteria for the rule. * *(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. * **clientToken** (*string*) -- A client token. This field is autopopulated if not provided. Returns: None **Exceptions** * "AccessAnalyzer.Client.exceptions.ConflictException" * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ServiceQuotaExceededException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / can_paginate can_paginate ************ AccessAnalyzer.Client.can_paginate(operation_name) Check if an operation can be paginated. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Returns: "True" if the operation can be paginated, "False" otherwise. AccessAnalyzer / Client / get_generated_policy get_generated_policy ******************** AccessAnalyzer.Client.get_generated_policy(**kwargs) Retrieves the policy that was generated using "StartPolicyGeneration". See also: AWS API Documentation **Request Syntax** response = client.get_generated_policy( jobId='string', includeResourcePlaceholders=True|False, includeServiceLevelTemplate=True|False ) Parameters: * **jobId** (*string*) -- **[REQUIRED]** The "JobId" that is returned by the "StartPolicyGeneration" operation. The "JobId" can be used with "GetGeneratedPolicy" to retrieve the generated policies or used with "CancelPolicyGeneration" to cancel the policy generation request. * **includeResourcePlaceholders** (*boolean*) -- The level of detail that you want to generate. You can specify whether to generate policies with placeholders for resource ARNs for actions that support resource level granularity in policies. For example, in the resource section of a policy, you can receive a placeholder such as ""Resource":"arn:aws:s3:::${BucketName}"" instead of ""*"". * **includeServiceLevelTemplate** (*boolean*) -- The level of detail that you want to generate. You can specify whether to generate service-level policies. IAM Access Analyzer uses "iam:servicelastaccessed" to identify services that have been used recently to create this service- level template. Return type: dict Returns: **Response Syntax** { 'jobDetails': { 'jobId': 'string', 'status': 'IN_PROGRESS'|'SUCCEEDED'|'FAILED'|'CANCELED', 'startedOn': datetime(2015, 1, 1), 'completedOn': datetime(2015, 1, 1), 'jobError': { 'code': 'AUTHORIZATION_ERROR'|'RESOURCE_NOT_FOUND_ERROR'|'SERVICE_QUOTA_EXCEEDED_ERROR'|'SERVICE_ERROR', 'message': 'string' } }, 'generatedPolicyResult': { 'properties': { 'isComplete': True|False, 'principalArn': 'string', 'cloudTrailProperties': { 'trailProperties': [ { 'cloudTrailArn': 'string', 'regions': [ 'string', ], 'allRegions': True|False }, ], 'startTime': datetime(2015, 1, 1), 'endTime': datetime(2015, 1, 1) } }, 'generatedPolicies': [ { 'policy': 'string' }, ] } } **Response Structure** * *(dict) --* * **jobDetails** *(dict) --* A "GeneratedPolicyDetails" object that contains details about the generated policy. * **jobId** *(string) --* The "JobId" that is returned by the "StartPolicyGeneration" operation. The "JobId" can be used with "GetGeneratedPolicy" to retrieve the generated policies or used with "CancelPolicyGeneration" to cancel the policy generation request. * **status** *(string) --* The status of the job request. * **startedOn** *(datetime) --* A timestamp of when the job was started. * **completedOn** *(datetime) --* A timestamp of when the job was completed. * **jobError** *(dict) --* The job error for the policy generation request. * **code** *(string) --* The job error code. * **message** *(string) --* Specific information about the error. For example, which service quota was exceeded or which resource was not found. * **generatedPolicyResult** *(dict) --* A "GeneratedPolicyResult" object that contains the generated policies and associated details. * **properties** *(dict) --* A "GeneratedPolicyProperties" object that contains properties of the generated policy. * **isComplete** *(boolean) --* This value is set to "true" if the generated policy contains all possible actions for a service that IAM Access Analyzer identified from the CloudTrail trail that you specified, and "false" otherwise. * **principalArn** *(string) --* The ARN of the IAM entity (user or role) for which you are generating a policy. * **cloudTrailProperties** *(dict) --* Lists details about the "Trail" used to generated policy. * **trailProperties** *(list) --* A "TrailProperties" object that contains settings for trail properties. * *(dict) --* Contains details about the CloudTrail trail being analyzed to generate a policy. * **cloudTrailArn** *(string) --* Specifies the ARN of the trail. The format of a trail ARN is "arn:aws:cloudtrail:us- east-2:123456789012:trail/MyTrail". * **regions** *(list) --* A list of regions to get CloudTrail data from and analyze to generate a policy. * *(string) --* * **allRegions** *(boolean) --* Possible values are "true" or "false". If set to "true", IAM Access Analyzer retrieves CloudTrail data from all regions to analyze and generate a policy. * **startTime** *(datetime) --* The start of the time range for which IAM Access Analyzer reviews your CloudTrail events. Events with a timestamp before this time are not considered to generate a policy. * **endTime** *(datetime) --* The end of the time range for which IAM Access Analyzer reviews your CloudTrail events. Events with a timestamp after this time are not considered to generate a policy. If this is not included in the request, the default value is the current time. * **generatedPolicies** *(list) --* The text to use as the content for the new policy. The policy is created using the CreatePolicy action. * *(dict) --* Contains the text for the generated policy. * **policy** *(string) --* The text to use as the content for the new policy. The policy is created using the CreatePolicy action. **Exceptions** * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / update_analyzer update_analyzer *************** AccessAnalyzer.Client.update_analyzer(**kwargs) Modifies the configuration of an existing analyzer. See also: AWS API Documentation **Request Syntax** response = 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', ] }, ] } } } ) Parameters: * **analyzerName** (*string*) -- **[REQUIRED]** The name of the analyzer to modify. * **configuration** (*dict*) -- Contains information about the configuration of an analyzer for an Amazon Web Services organization or account. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "unusedAccess", "internalAccess". * **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) --* Return type: 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. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "unusedAccess", "internalAccess". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **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) --* **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.ConflictException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / list_analyzers list_analyzers ************** AccessAnalyzer.Client.list_analyzers(**kwargs) Retrieves a list of analyzers. See also: AWS API Documentation **Request Syntax** response = client.list_analyzers( nextToken='string', maxResults=123, type='ACCOUNT'|'ORGANIZATION'|'ACCOUNT_UNUSED_ACCESS'|'ORGANIZATION_UNUSED_ACCESS'|'ACCOUNT_INTERNAL_ACCESS'|'ORGANIZATION_INTERNAL_ACCESS' ) Parameters: * **nextToken** (*string*) -- A token used for pagination of results returned. * **maxResults** (*integer*) -- The maximum number of results to return in the response. * **type** (*string*) -- The type of analyzer. Return type: 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. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "unusedAccess", "internalAccess". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **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. **Exceptions** * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / get_finding_recommendation get_finding_recommendation ************************** AccessAnalyzer.Client.get_finding_recommendation(**kwargs) Retrieves information about a finding recommendation for the specified analyzer. See also: AWS API Documentation **Request Syntax** response = client.get_finding_recommendation( analyzerArn='string', id='string', maxResults=123, nextToken='string' ) Parameters: * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer used to generate the finding recommendation. * **id** (*string*) -- **[REQUIRED]** The unique ID for the finding recommendation. * **maxResults** (*integer*) -- The maximum number of results to return in the response. * **nextToken** (*string*) -- A token used for pagination of results returned. Return type: dict Returns: **Response Syntax** { 'startedAt': datetime(2015, 1, 1), 'completedAt': datetime(2015, 1, 1), 'nextToken': 'string', 'error': { 'code': 'string', 'message': 'string' }, 'resourceArn': 'string', 'recommendedSteps': [ { 'unusedPermissionsRecommendedStep': { 'policyUpdatedAt': datetime(2015, 1, 1), 'recommendedAction': 'CREATE_POLICY'|'DETACH_POLICY', 'recommendedPolicy': 'string', 'existingPolicyId': 'string' } }, ], 'recommendationType': 'UnusedPermissionRecommendation', 'status': 'SUCCEEDED'|'FAILED'|'IN_PROGRESS' } **Response Structure** * *(dict) --* * **startedAt** *(datetime) --* The time at which the retrieval of the finding recommendation was started. * **completedAt** *(datetime) --* The time at which the retrieval of the finding recommendation was completed. * **nextToken** *(string) --* A token used for pagination of results returned. * **error** *(dict) --* Detailed information about the reason that the retrieval of a recommendation for the finding failed. * **code** *(string) --* The error code for a failed retrieval of a recommendation for a finding. * **message** *(string) --* The error message for a failed retrieval of a recommendation for a finding. * **resourceArn** *(string) --* The ARN of the resource of the finding. * **recommendedSteps** *(list) --* A group of recommended steps for the finding. * *(dict) --* Contains information about a recommended step for an unused access analyzer finding. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "unusedPermissionsRecommendedStep". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **unusedPermissionsRecommendedStep** *(dict) --* A recommended step for an unused permissions finding. * **policyUpdatedAt** *(datetime) --* The time at which the existing policy for the unused permissions finding was last updated. * **recommendedAction** *(string) --* A recommendation of whether to create or detach a policy for an unused permissions finding. * **recommendedPolicy** *(string) --* If the recommended action for the unused permissions finding is to replace the existing policy, the contents of the recommended policy to replace the policy specified in the "existingPolicyId" field. * **existingPolicyId** *(string) --* If the recommended action for the unused permissions finding is to detach a policy, the ID of an existing policy to be detached. * **recommendationType** *(string) --* The type of recommendation for the finding. * **status** *(string) --* The status of the retrieval of the finding recommendation. **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / list_access_previews list_access_previews ******************** AccessAnalyzer.Client.list_access_previews(**kwargs) Retrieves a list of access previews for the specified analyzer. See also: AWS API Documentation **Request Syntax** response = client.list_access_previews( analyzerArn='string', nextToken='string', maxResults=123 ) Parameters: * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer used to generate the access preview. * **nextToken** (*string*) -- A token used for pagination of results returned. * **maxResults** (*integer*) -- The maximum number of results to return in the response. Return type: dict Returns: **Response Syntax** { 'accessPreviews': [ { 'id': 'string', 'analyzerArn': 'string', 'createdAt': datetime(2015, 1, 1), 'status': 'COMPLETED'|'CREATING'|'FAILED', 'statusReason': { 'code': 'INTERNAL_ERROR'|'INVALID_CONFIGURATION' } }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **accessPreviews** *(list) --* A list of access previews retrieved for the analyzer. * *(dict) --* Contains a summary of information about an access preview. * **id** *(string) --* The unique ID for the access preview. * **analyzerArn** *(string) --* The ARN of the analyzer used to generate the access preview. * **createdAt** *(datetime) --* The time at which the access preview was created. * **status** *(string) --* The status of the access preview. * "Creating" - The access preview creation is in progress. * "Completed" - The access preview is complete and previews the findings for external access to the resource. * "Failed" - The access preview creation has failed. * **statusReason** *(dict) --* Provides more details about the current status of the access preview. For example, if the creation of the access preview fails, a "Failed" status is returned. This failure can be due to an internal issue with the analysis or due to an invalid proposed resource configuration. * **code** *(string) --* The reason code for the current status of the access preview. * **nextToken** *(string) --* A token used for pagination of results returned. **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / list_tags_for_resource list_tags_for_resource ********************** AccessAnalyzer.Client.list_tags_for_resource(**kwargs) Retrieves a list of tags applied to the specified resource. See also: AWS API Documentation **Request Syntax** response = client.list_tags_for_resource( resourceArn='string' ) Parameters: **resourceArn** (*string*) -- **[REQUIRED]** The ARN of the resource to retrieve tags from. Return type: dict Returns: **Response Syntax** { 'tags': { 'string': 'string' } } **Response Structure** * *(dict) --* The response to the request. * **tags** *(dict) --* The tags that are applied to the specified resource. * *(string) --* * *(string) --* **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / get_analyzed_resource get_analyzed_resource ********************* AccessAnalyzer.Client.get_analyzed_resource(**kwargs) Retrieves information about a resource that was analyzed. See also: AWS API Documentation **Request Syntax** response = client.get_analyzed_resource( analyzerArn='string', resourceArn='string' ) Parameters: * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer to retrieve information from. * **resourceArn** (*string*) -- **[REQUIRED]** The ARN of the resource to retrieve information about. Return type: dict Returns: **Response Syntax** { 'resource': { 'resourceArn': 'string', 'resourceType': 'AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic'|'AWS::S3Express::DirectoryBucket'|'AWS::DynamoDB::Table'|'AWS::DynamoDB::Stream'|'AWS::IAM::User', 'createdAt': datetime(2015, 1, 1), 'analyzedAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'isPublic': True|False, 'actions': [ 'string', ], 'sharedVia': [ 'string', ], 'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED', 'resourceOwnerAccount': 'string', 'error': 'string' } } **Response Structure** * *(dict) --* The response to the request. * **resource** *(dict) --* An "AnalyzedResource" object that contains information that IAM Access Analyzer found when it analyzed the resource. * **resourceArn** *(string) --* The ARN of the resource that was analyzed. * **resourceType** *(string) --* The type of the resource that was analyzed. * **createdAt** *(datetime) --* The time at which the finding was created. * **analyzedAt** *(datetime) --* The time at which the resource was analyzed. * **updatedAt** *(datetime) --* The time at which the finding was updated. * **isPublic** *(boolean) --* Indicates whether the policy that generated the finding grants public access to the resource. * **actions** *(list) --* The actions that an external principal is granted permission to use by the policy that generated the finding. * *(string) --* * **sharedVia** *(list) --* Indicates how the access that generated the finding is granted. This is populated for Amazon S3 bucket findings. * *(string) --* * **status** *(string) --* The current status of the finding generated from the analyzed resource. * **resourceOwnerAccount** *(string) --* The Amazon Web Services account ID that owns the resource. * **error** *(string) --* An error message. **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / update_archive_rule update_archive_rule ******************* AccessAnalyzer.Client.update_archive_rule(**kwargs) Updates the criteria and values for the specified archive rule. See also: AWS API Documentation **Request Syntax** response = client.update_archive_rule( analyzerName='string', ruleName='string', filter={ 'string': { 'eq': [ 'string', ], 'neq': [ 'string', ], 'contains': [ 'string', ], 'exists': True|False } }, clientToken='string' ) Parameters: * **analyzerName** (*string*) -- **[REQUIRED]** The name of the analyzer to update the archive rules for. * **ruleName** (*string*) -- **[REQUIRED]** The name of the rule to update. * **filter** (*dict*) -- **[REQUIRED]** A filter to match for the rules to update. Only rules that match the filter are updated. * *(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. * **clientToken** (*string*) -- A client token. This field is autopopulated if not provided. Returns: None **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / list_findings_v2 list_findings_v2 **************** AccessAnalyzer.Client.list_findings_v2(**kwargs) 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** response = 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' } ) Parameters: * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer to retrieve findings from. * **filter** (*dict*) -- A filter to match for the findings to return. * *(string) --* * *(dict) --* The criteria to use in the filter that defines the archive rule. For more information on available filter keys, see IAM Access Analyzer filter keys. * **eq** *(list) --* An "equals" operator to match for the filter used to create the rule. * *(string) --* * **neq** *(list) --* A "not equals" operator to match for the filter used to create the rule. * *(string) --* * **contains** *(list) --* A "contains" operator to match for the filter used to create the rule. * *(string) --* * **exists** *(boolean) --* An "exists" operator to match for the filter used to create the rule. * **maxResults** (*integer*) -- The maximum number of results to return in the response. * **nextToken** (*string*) -- A token used for pagination of results returned. * **sort** (*dict*) -- The criteria used to sort. * **attributeName** *(string) --* The name of the attribute to sort on. * **orderBy** *(string) --* The sort order, ascending or descending. Return type: dict Returns: **Response Syntax** { 'findings': [ { 'analyzedAt': datetime(2015, 1, 1), 'createdAt': datetime(2015, 1, 1), 'error': 'string', 'id': 'string', 'resource': 'string', 'resourceType': 'AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic'|'AWS::S3Express::DirectoryBucket'|'AWS::DynamoDB::Table'|'AWS::DynamoDB::Stream'|'AWS::IAM::User', 'resourceOwnerAccount': 'string', 'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED', 'updatedAt': datetime(2015, 1, 1), 'findingType': 'ExternalAccess'|'UnusedIAMRole'|'UnusedIAMUserAccessKey'|'UnusedIAMUserPassword'|'UnusedPermission'|'InternalAccess' }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **findings** *(list) --* A list of findings retrieved from the analyzer that match the filter criteria specified, if any. * *(dict) --* Contains information about a finding. * **analyzedAt** *(datetime) --* The time at which the resource-based policy or IAM entity that generated the finding was analyzed. * **createdAt** *(datetime) --* The time at which the finding was created. * **error** *(string) --* The error that resulted in an Error finding. * **id** *(string) --* The ID of the finding. * **resource** *(string) --* The resource that the external principal has access to. * **resourceType** *(string) --* The type of the resource that the external principal has access to. * **resourceOwnerAccount** *(string) --* The Amazon Web Services account ID that owns the resource. * **status** *(string) --* The status of the finding. * **updatedAt** *(datetime) --* The time at which the finding was most recently updated. * **findingType** *(string) --* The type of the access finding. For external access analyzers, the type is "ExternalAccess". For unused access analyzers, the type can be "UnusedIAMRole", "UnusedIAMUserAccessKey", "UnusedIAMUserPassword", or "UnusedPermission". For internal access analyzers, the type is "InternalAccess". * **nextToken** *(string) --* A token used for pagination of results returned. **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / untag_resource untag_resource ************** AccessAnalyzer.Client.untag_resource(**kwargs) Removes a tag from the specified resource. See also: AWS API Documentation **Request Syntax** response = client.untag_resource( resourceArn='string', tagKeys=[ 'string', ] ) Parameters: * **resourceArn** (*string*) -- **[REQUIRED]** The ARN of the resource to remove the tag from. * **tagKeys** (*list*) -- **[REQUIRED]** The key for the tag to add. * *(string) --* Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* The response to the request. **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / check_no_public_access check_no_public_access ********************** AccessAnalyzer.Client.check_no_public_access(**kwargs) Checks whether a resource policy can grant public access to the specified resource type. See also: AWS API Documentation **Request Syntax** response = client.check_no_public_access( policyDocument='string', resourceType='AWS::DynamoDB::Table'|'AWS::DynamoDB::Stream'|'AWS::EFS::FileSystem'|'AWS::OpenSearchService::Domain'|'AWS::Kinesis::Stream'|'AWS::Kinesis::StreamConsumer'|'AWS::KMS::Key'|'AWS::Lambda::Function'|'AWS::S3::Bucket'|'AWS::S3::AccessPoint'|'AWS::S3Express::DirectoryBucket'|'AWS::S3::Glacier'|'AWS::S3Outposts::Bucket'|'AWS::S3Outposts::AccessPoint'|'AWS::SecretsManager::Secret'|'AWS::SNS::Topic'|'AWS::SQS::Queue'|'AWS::IAM::AssumeRolePolicyDocument'|'AWS::S3Tables::TableBucket'|'AWS::ApiGateway::RestApi'|'AWS::CodeArtifact::Domain'|'AWS::Backup::BackupVault'|'AWS::CloudTrail::Dashboard'|'AWS::CloudTrail::EventDataStore'|'AWS::S3Tables::Table'|'AWS::S3Express::AccessPoint' ) Parameters: * **policyDocument** (*string*) -- **[REQUIRED]** The JSON policy document to evaluate for public access. * **resourceType** (*string*) -- **[REQUIRED]** The type of resource to evaluate for public access. For example, to check for public access to Amazon S3 buckets, you can choose "AWS::S3::Bucket" for the resource type. For resource types not supported as valid values, IAM Access Analyzer will return an error. Return type: dict Returns: **Response Syntax** { 'result': 'PASS'|'FAIL', 'message': 'string', 'reasons': [ { 'description': 'string', 'statementIndex': 123, 'statementId': 'string' }, ] } **Response Structure** * *(dict) --* * **result** *(string) --* The result of the check for public access to the specified resource type. If the result is "PASS", the policy doesn't allow public access to the specified resource type. If the result is "FAIL", the policy might allow public access to the specified resource type. * **message** *(string) --* The message indicating whether the specified policy allows public access to resources. * **reasons** *(list) --* A list of reasons why the specified resource policy grants public access for the resource type. * *(dict) --* Contains information about the reasoning why a check for access passed or failed. * **description** *(string) --* A description of the reasoning of a result of checking for access. * **statementIndex** *(integer) --* The index number of the reason statement. * **statementId** *(string) --* The identifier for the reason statement. **Exceptions** * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InvalidParameterException" * "AccessAnalyzer.Client.exceptions.UnprocessableEntityException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / get_waiter get_waiter ********** AccessAnalyzer.Client.get_waiter(waiter_name) Returns an object that can wait for some condition. Parameters: **waiter_name** (*str*) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters. Returns: The specified waiter object. Return type: "botocore.waiter.Waiter" AccessAnalyzer / Client / create_access_preview create_access_preview ********************* AccessAnalyzer.Client.create_access_preview(**kwargs) Creates an access preview that allows you to preview IAM Access Analyzer findings for your resource before deploying resource permissions. See also: AWS API Documentation **Request Syntax** response = client.create_access_preview( analyzerArn='string', configurations={ 'string': { 'ebsSnapshot': { 'userIds': [ 'string', ], 'groups': [ 'string', ], 'kmsKeyId': 'string' }, 'ecrRepository': { 'repositoryPolicy': 'string' }, 'iamRole': { 'trustPolicy': 'string' }, 'efsFileSystem': { 'fileSystemPolicy': 'string' }, 'kmsKey': { 'keyPolicies': { 'string': 'string' }, 'grants': [ { 'operations': [ 'CreateGrant'|'Decrypt'|'DescribeKey'|'Encrypt'|'GenerateDataKey'|'GenerateDataKeyPair'|'GenerateDataKeyPairWithoutPlaintext'|'GenerateDataKeyWithoutPlaintext'|'GetPublicKey'|'ReEncryptFrom'|'ReEncryptTo'|'RetireGrant'|'Sign'|'Verify', ], 'granteePrincipal': 'string', 'retiringPrincipal': 'string', 'constraints': { 'encryptionContextEquals': { 'string': 'string' }, 'encryptionContextSubset': { 'string': 'string' } }, 'issuingAccount': 'string' }, ] }, 'rdsDbClusterSnapshot': { 'attributes': { 'string': { 'accountIds': [ 'string', ] } }, 'kmsKeyId': 'string' }, 'rdsDbSnapshot': { 'attributes': { 'string': { 'accountIds': [ 'string', ] } }, 'kmsKeyId': 'string' }, 'secretsManagerSecret': { 'kmsKeyId': 'string', 'secretPolicy': 'string' }, 's3Bucket': { 'bucketPolicy': 'string', 'bucketAclGrants': [ { 'permission': 'READ'|'WRITE'|'READ_ACP'|'WRITE_ACP'|'FULL_CONTROL', 'grantee': { 'id': 'string', 'uri': 'string' } }, ], 'bucketPublicAccessBlock': { 'ignorePublicAcls': True|False, 'restrictPublicBuckets': True|False }, 'accessPoints': { 'string': { 'accessPointPolicy': 'string', 'publicAccessBlock': { 'ignorePublicAcls': True|False, 'restrictPublicBuckets': True|False }, 'networkOrigin': { 'vpcConfiguration': { 'vpcId': 'string' }, 'internetConfiguration': {} } } } }, 'snsTopic': { 'topicPolicy': 'string' }, 'sqsQueue': { 'queuePolicy': 'string' }, 's3ExpressDirectoryBucket': { 'bucketPolicy': 'string', 'accessPoints': { 'string': { 'accessPointPolicy': 'string', 'networkOrigin': { 'vpcConfiguration': { 'vpcId': 'string' }, 'internetConfiguration': {} } } } }, 'dynamodbStream': { 'streamPolicy': 'string' }, 'dynamodbTable': { 'tablePolicy': 'string' } } }, clientToken='string' ) Parameters: * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the account analyzer used to generate the access preview. You can only create an access preview for analyzers with an "Account" type and "Active" status. * **configurations** (*dict*) -- **[REQUIRED]** Access control configuration for your resource that is used to generate the access preview. The access preview includes findings for external access allowed to the resource with the proposed access control configuration. The configuration must contain exactly one element. * *(string) --* * *(dict) --* Access control configuration structures for your resource. You specify the configuration as a type-value pair. You can specify only one type of access control configuration. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "ebsSnapshot", "ecrRepository", "iamRole", "efsFileSystem", "kmsKey", "rdsDbClusterSnapshot", "rdsDbSnapshot", "secretsManagerSecret", "s3Bucket", "snsTopic", "sqsQueue", "s3ExpressDirectoryBucket", "dynamodbStream", "dynamodbTable". * **ebsSnapshot** *(dict) --* The access control configuration is for an Amazon EBS volume snapshot. * **userIds** *(list) --* The IDs of the Amazon Web Services accounts that have access to the Amazon EBS volume snapshot. * If the configuration is for an existing Amazon EBS volume snapshot and you do not specify the "userIds", then the access preview uses the existing shared "userIds" for the snapshot. * If the access preview is for a new resource and you do not specify the "userIds", then the access preview considers the snapshot without any "userIds". * To propose deletion of existing shared "accountIds", you can specify an empty list for "userIds". * *(string) --* * **groups** *(list) --* The groups that have access to the Amazon EBS volume snapshot. If the value "all" is specified, then the Amazon EBS volume snapshot is public. * If the configuration is for an existing Amazon EBS volume snapshot and you do not specify the "groups", then the access preview uses the existing shared "groups" for the snapshot. * If the access preview is for a new resource and you do not specify the "groups", then the access preview considers the snapshot without any "groups". * To propose deletion of existing shared "groups", you can specify an empty list for "groups". * *(string) --* * **kmsKeyId** *(string) --* The KMS key identifier for an encrypted Amazon EBS volume snapshot. The KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. * If the configuration is for an existing Amazon EBS volume snapshot and you do not specify the "kmsKeyId", or you specify an empty string, then the access preview uses the existing "kmsKeyId" of the snapshot. * If the access preview is for a new resource and you do not specify the "kmsKeyId", the access preview considers the snapshot as unencrypted. * **ecrRepository** *(dict) --* The access control configuration is for an Amazon ECR repository. * **repositoryPolicy** *(string) --* The JSON repository policy text to apply to the Amazon ECR repository. For more information, see Private repository policy examples in the *Amazon ECR User Guide*. * **iamRole** *(dict) --* The access control configuration is for an IAM role. * **trustPolicy** *(string) --* The proposed trust policy for the IAM role. * **efsFileSystem** *(dict) --* The access control configuration is for an Amazon EFS file system. * **fileSystemPolicy** *(string) --* The JSON policy definition to apply to the Amazon EFS file system. For more information on the elements that make up a file system policy, see Amazon EFS Resource- based policies. * **kmsKey** *(dict) --* The access control configuration is for a KMS key. * **keyPolicies** *(dict) --* Resource policy configuration for the KMS key. The only valid value for the name of the key policy is "default". For more information, see Default key policy. * *(string) --* * *(string) --* * **grants** *(list) --* A list of proposed grant configurations for the KMS key. If the proposed grant configuration is for an existing key, the access preview uses the proposed list of grant configurations in place of the existing grants. Otherwise, the access preview uses the existing grants for the key. * *(dict) --* A proposed grant configuration for a KMS key. For more information, see CreateGrant. * **operations** *(list) --* **[REQUIRED]** A list of operations that the grant permits. * *(string) --* * **granteePrincipal** *(string) --* **[REQUIRED]** The principal that is given permission to perform the operations that the grant permits. * **retiringPrincipal** *(string) --* The principal that is given permission to retire the grant by using RetireGrant operation. * **constraints** *(dict) --* Use this structure to propose allowing cryptographic operations in the grant only when the operation request includes the specified encryption context. * **encryptionContextEquals** *(dict) --* A list of key-value pairs that must match the encryption context in the cryptographic operation request. The grant allows the operation only when the encryption context in the request is the same as the encryption context specified in this constraint. * *(string) --* * *(string) --* * **encryptionContextSubset** *(dict) --* A list of key-value pairs that must be included in the encryption context of the cryptographic operation request. The grant allows the cryptographic operation only when the encryption context in the request includes the key-value pairs specified in this constraint, although it can include additional key-value pairs. * *(string) --* * *(string) --* * **issuingAccount** *(string) --* **[REQUIRED]** The Amazon Web Services account under which the grant was issued. The account is used to propose KMS grants issued by accounts other than the owner of the key. * **rdsDbClusterSnapshot** *(dict) --* The access control configuration is for an Amazon RDS DB cluster snapshot. * **attributes** *(dict) --* The names and values of manual DB cluster snapshot attributes. Manual DB cluster snapshot attributes are used to authorize other Amazon Web Services accounts to restore a manual DB cluster snapshot. The only valid value for "AttributeName" for the attribute map is "restore" * *(string) --* * *(dict) --* The values for a manual Amazon RDS DB cluster snapshot attribute. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "accountIds". * **accountIds** *(list) --* The Amazon Web Services account IDs that have access to the manual Amazon RDS DB cluster snapshot. If the value "all" is specified, then the Amazon RDS DB cluster snapshot is public and can be copied or restored by all Amazon Web Services accounts. * If the configuration is for an existing Amazon RDS DB cluster snapshot and you do not specify the "accountIds" in "RdsDbClusterSnapshotAttributeValue", then the access preview uses the existing shared "accountIds" for the snapshot. * If the access preview is for a new resource and you do not specify the specify the "accountIds" in "RdsDbClusterSnapshotAttributeValue", then the access preview considers the snapshot without any attributes. * To propose deletion of existing shared "accountIds", you can specify an empty list for "accountIds" in the "RdsDbClusterSnapshotAttributeValue". * *(string) --* * **kmsKeyId** *(string) --* The KMS key identifier for an encrypted Amazon RDS DB cluster snapshot. The KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. * If the configuration is for an existing Amazon RDS DB cluster snapshot and you do not specify the "kmsKeyId", or you specify an empty string, then the access preview uses the existing "kmsKeyId" of the snapshot. * If the access preview is for a new resource and you do not specify the specify the "kmsKeyId", then the access preview considers the snapshot as unencrypted. * **rdsDbSnapshot** *(dict) --* The access control configuration is for an Amazon RDS DB snapshot. * **attributes** *(dict) --* The names and values of manual DB snapshot attributes. Manual DB snapshot attributes are used to authorize other Amazon Web Services accounts to restore a manual DB snapshot. The only valid value for "attributeName" for the attribute map is restore. * *(string) --* * *(dict) --* The name and values of a manual Amazon RDS DB snapshot attribute. Manual DB snapshot attributes are used to authorize other Amazon Web Services accounts to restore a manual DB snapshot. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "accountIds". * **accountIds** *(list) --* The Amazon Web Services account IDs that have access to the manual Amazon RDS DB snapshot. If the value "all" is specified, then the Amazon RDS DB snapshot is public and can be copied or restored by all Amazon Web Services accounts. * If the configuration is for an existing Amazon RDS DB snapshot and you do not specify the "accountIds" in "RdsDbSnapshotAttributeValue", then the access preview uses the existing shared "accountIds" for the snapshot. * If the access preview is for a new resource and you do not specify the specify the "accountIds" in "RdsDbSnapshotAttributeValue", then the access preview considers the snapshot without any attributes. * To propose deletion of an existing shared "accountIds", you can specify an empty list for "accountIds" in the "RdsDbSnapshotAttributeValue". * *(string) --* * **kmsKeyId** *(string) --* The KMS key identifier for an encrypted Amazon RDS DB snapshot. The KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. * If the configuration is for an existing Amazon RDS DB snapshot and you do not specify the "kmsKeyId", or you specify an empty string, then the access preview uses the existing "kmsKeyId" of the snapshot. * If the access preview is for a new resource and you do not specify the specify the "kmsKeyId", then the access preview considers the snapshot as unencrypted. * **secretsManagerSecret** *(dict) --* The access control configuration is for a Secrets Manager secret. * **kmsKeyId** *(string) --* The proposed ARN, key ID, or alias of the KMS key. * **secretPolicy** *(string) --* The proposed resource policy defining who can access or manage the secret. * **s3Bucket** *(dict) --* The access control configuration is for an Amazon S3 bucket. * **bucketPolicy** *(string) --* The proposed bucket policy for the Amazon S3 bucket. * **bucketAclGrants** *(list) --* The proposed list of ACL grants for the Amazon S3 bucket. You can propose up to 100 ACL grants per bucket. If the proposed grant configuration is for an existing bucket, the access preview uses the proposed list of grant configurations in place of the existing grants. Otherwise, the access preview uses the existing grants for the bucket. * *(dict) --* A proposed access control list grant configuration for an Amazon S3 bucket. For more information, see How to Specify an ACL. * **permission** *(string) --* **[REQUIRED]** The permissions being granted. * **grantee** *(dict) --* **[REQUIRED]** The grantee to whom you’re assigning access rights. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "id", "uri". * **id** *(string) --* The value specified is the canonical user ID of an Amazon Web Services account. * **uri** *(string) --* Used for granting permissions to a predefined group. * **bucketPublicAccessBlock** *(dict) --* The proposed block public access configuration for the Amazon S3 bucket. * **ignorePublicAcls** *(boolean) --* **[REQUIRED]** Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket. * **restrictPublicBuckets** *(boolean) --* **[REQUIRED]** Specifies whether Amazon S3 should restrict public bucket policies for this bucket. * **accessPoints** *(dict) --* The configuration of Amazon S3 access points or multi- region access points for the bucket. You can propose up to 10 new access points per bucket. * *(string) --* * *(dict) --* The configuration for an Amazon S3 access point or multi-region access point for the bucket. You can propose up to 10 access points or multi-region access points per bucket. If the proposed Amazon S3 access point configuration is for an existing bucket, the access preview uses the proposed access point configuration in place of the existing access points. To propose an access point without a policy, you can provide an empty string as the access point policy. For more information, see Creating access points. For more information about access point policy limits, see Access points restrictions and limitations. * **accessPointPolicy** *(string) --* The access point or multi-region access point policy. * **publicAccessBlock** *(dict) --* The proposed "S3PublicAccessBlock" configuration to apply to this Amazon S3 access point or multi-region access point. * **ignorePublicAcls** *(boolean) --* **[REQUIRED]** Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket. * **restrictPublicBuckets** *(boolean) --* **[REQUIRED]** Specifies whether Amazon S3 should restrict public bucket policies for this bucket. * **networkOrigin** *(dict) --* The proposed "Internet" and "VpcConfiguration" to apply to this Amazon S3 access point. "VpcConfiguration" does not apply to multi- region access points. If the access preview is for a new resource and neither is specified, the access preview uses "Internet" for the network origin. If the access preview is for an existing resource and neither is specified, the access preview uses the existing network origin. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "vpcConfiguration", "internetConfiguration". * **vpcConfiguration** *(dict) --* The proposed virtual private cloud (VPC) configuration for the Amazon S3 access point. VPC configuration does not apply to multi- region access points. For more information, see VpcConfiguration. * **vpcId** *(string) --* **[REQUIRED]** If this field is specified, this access point will only allow connections from the specified VPC ID. * **internetConfiguration** *(dict) --* The configuration for the Amazon S3 access point or multi-region access point with an "Internet" origin. * **snsTopic** *(dict) --* The access control configuration is for an Amazon SNS topic * **topicPolicy** *(string) --* The JSON policy text that defines who can access an Amazon SNS topic. For more information, see Example cases for Amazon SNS access control in the *Amazon SNS Developer Guide*. * **sqsQueue** *(dict) --* The access control configuration is for an Amazon SQS queue. * **queuePolicy** *(string) --* The proposed resource policy for the Amazon SQS queue. * **s3ExpressDirectoryBucket** *(dict) --* The access control configuration is for an Amazon S3 directory bucket. * **bucketPolicy** *(string) --* The proposed bucket policy for the Amazon S3 directory bucket. * **accessPoints** *(dict) --* The proposed access points for the Amazon S3 directory bucket. * *(string) --* * *(dict) --* Proposed configuration for an access point attached to an Amazon S3 directory bucket. You can propose up to 10 access points per bucket. If the proposed access point configuration is for an existing Amazon S3 directory bucket, the access preview uses the proposed access point configuration in place of the existing access points. To propose an access point without a policy, you can provide an empty string as the access point policy. For more information about access points for Amazon S3 directory buckets, see Managing access to directory buckets with access points in the Amazon Simple Storage Service User Guide. * **accessPointPolicy** *(string) --* The proposed access point policy for an Amazon S3 directory bucket access point. * **networkOrigin** *(dict) --* The proposed "InternetConfiguration" or "VpcConfiguration" to apply to the Amazon S3 access point. You can make the access point accessible from the internet, or you can specify that all requests made through that access point must originate from a specific virtual private cloud (VPC). You can specify only one type of network configuration. For more information, see Creating access points. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "vpcConfiguration", "internetConfiguration". * **vpcConfiguration** *(dict) --* The proposed virtual private cloud (VPC) configuration for the Amazon S3 access point. VPC configuration does not apply to multi- region access points. For more information, see VpcConfiguration. * **vpcId** *(string) --* **[REQUIRED]** If this field is specified, this access point will only allow connections from the specified VPC ID. * **internetConfiguration** *(dict) --* The configuration for the Amazon S3 access point or multi-region access point with an "Internet" origin. * **dynamodbStream** *(dict) --* The access control configuration is for a DynamoDB stream. * **streamPolicy** *(string) --* The proposed resource policy defining who can access or manage the DynamoDB stream. * **dynamodbTable** *(dict) --* The access control configuration is for a DynamoDB table or index. * **tablePolicy** *(string) --* The proposed resource policy defining who can access or manage the DynamoDB table. * **clientToken** (*string*) -- A client token. This field is autopopulated if not provided. Return type: dict Returns: **Response Syntax** { 'id': 'string' } **Response Structure** * *(dict) --* * **id** *(string) --* The unique ID for the access preview. **Exceptions** * "AccessAnalyzer.Client.exceptions.ConflictException" * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.ServiceQuotaExceededException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / start_policy_generation start_policy_generation *********************** AccessAnalyzer.Client.start_policy_generation(**kwargs) Starts the policy generation request. See also: AWS API Documentation **Request Syntax** response = client.start_policy_generation( policyGenerationDetails={ 'principalArn': 'string' }, cloudTrailDetails={ 'trails': [ { 'cloudTrailArn': 'string', 'regions': [ 'string', ], 'allRegions': True|False }, ], 'accessRole': 'string', 'startTime': datetime(2015, 1, 1), 'endTime': datetime(2015, 1, 1) }, clientToken='string' ) Parameters: * **policyGenerationDetails** (*dict*) -- **[REQUIRED]** Contains the ARN of the IAM entity (user or role) for which you are generating a policy. * **principalArn** *(string) --* **[REQUIRED]** The ARN of the IAM entity (user or role) for which you are generating a policy. * **cloudTrailDetails** (*dict*) -- A "CloudTrailDetails" object that contains details about a "Trail" that you want to analyze to generate policies. * **trails** *(list) --* **[REQUIRED]** A "Trail" object that contains settings for a trail. * *(dict) --* Contains details about the CloudTrail trail being analyzed to generate a policy. * **cloudTrailArn** *(string) --* **[REQUIRED]** Specifies the ARN of the trail. The format of a trail ARN is "arn:aws:cloudtrail:us- east-2:123456789012:trail/MyTrail". * **regions** *(list) --* A list of regions to get CloudTrail data from and analyze to generate a policy. * *(string) --* * **allRegions** *(boolean) --* Possible values are "true" or "false". If set to "true", IAM Access Analyzer retrieves CloudTrail data from all regions to analyze and generate a policy. * **accessRole** *(string) --* **[REQUIRED]** The ARN of the service role that IAM Access Analyzer uses to access your CloudTrail trail and service last accessed information. * **startTime** *(datetime) --* **[REQUIRED]** The start of the time range for which IAM Access Analyzer reviews your CloudTrail events. Events with a timestamp before this time are not considered to generate a policy. * **endTime** *(datetime) --* The end of the time range for which IAM Access Analyzer reviews your CloudTrail events. Events with a timestamp after this time are not considered to generate a policy. If this is not included in the request, the default value is the current time. * **clientToken** (*string*) -- A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK. This field is autopopulated if not provided. Return type: dict Returns: **Response Syntax** { 'jobId': 'string' } **Response Structure** * *(dict) --* * **jobId** *(string) --* The "JobId" that is returned by the "StartPolicyGeneration" operation. The "JobId" can be used with "GetGeneratedPolicy" to retrieve the generated policies or used with "CancelPolicyGeneration" to cancel the policy generation request. **Exceptions** * "AccessAnalyzer.Client.exceptions.ConflictException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.ServiceQuotaExceededException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / delete_analyzer delete_analyzer *************** AccessAnalyzer.Client.delete_analyzer(**kwargs) Deletes the specified analyzer. When you delete an analyzer, IAM Access Analyzer is disabled for the account or organization in the current or specific Region. All findings that were generated by the analyzer are deleted. You cannot undo this action. See also: AWS API Documentation **Request Syntax** response = client.delete_analyzer( analyzerName='string', clientToken='string' ) Parameters: * **analyzerName** (*string*) -- **[REQUIRED]** The name of the analyzer to delete. * **clientToken** (*string*) -- A client token. This field is autopopulated if not provided. Returns: None **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / get_access_preview get_access_preview ****************** AccessAnalyzer.Client.get_access_preview(**kwargs) Retrieves information about an access preview for the specified analyzer. See also: AWS API Documentation **Request Syntax** response = client.get_access_preview( accessPreviewId='string', analyzerArn='string' ) Parameters: * **accessPreviewId** (*string*) -- **[REQUIRED]** The unique ID for the access preview. * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer used to generate the access preview. Return type: dict Returns: **Response Syntax** { 'accessPreview': { 'id': 'string', 'analyzerArn': 'string', 'configurations': { 'string': { 'ebsSnapshot': { 'userIds': [ 'string', ], 'groups': [ 'string', ], 'kmsKeyId': 'string' }, 'ecrRepository': { 'repositoryPolicy': 'string' }, 'iamRole': { 'trustPolicy': 'string' }, 'efsFileSystem': { 'fileSystemPolicy': 'string' }, 'kmsKey': { 'keyPolicies': { 'string': 'string' }, 'grants': [ { 'operations': [ 'CreateGrant'|'Decrypt'|'DescribeKey'|'Encrypt'|'GenerateDataKey'|'GenerateDataKeyPair'|'GenerateDataKeyPairWithoutPlaintext'|'GenerateDataKeyWithoutPlaintext'|'GetPublicKey'|'ReEncryptFrom'|'ReEncryptTo'|'RetireGrant'|'Sign'|'Verify', ], 'granteePrincipal': 'string', 'retiringPrincipal': 'string', 'constraints': { 'encryptionContextEquals': { 'string': 'string' }, 'encryptionContextSubset': { 'string': 'string' } }, 'issuingAccount': 'string' }, ] }, 'rdsDbClusterSnapshot': { 'attributes': { 'string': { 'accountIds': [ 'string', ] } }, 'kmsKeyId': 'string' }, 'rdsDbSnapshot': { 'attributes': { 'string': { 'accountIds': [ 'string', ] } }, 'kmsKeyId': 'string' }, 'secretsManagerSecret': { 'kmsKeyId': 'string', 'secretPolicy': 'string' }, 's3Bucket': { 'bucketPolicy': 'string', 'bucketAclGrants': [ { 'permission': 'READ'|'WRITE'|'READ_ACP'|'WRITE_ACP'|'FULL_CONTROL', 'grantee': { 'id': 'string', 'uri': 'string' } }, ], 'bucketPublicAccessBlock': { 'ignorePublicAcls': True|False, 'restrictPublicBuckets': True|False }, 'accessPoints': { 'string': { 'accessPointPolicy': 'string', 'publicAccessBlock': { 'ignorePublicAcls': True|False, 'restrictPublicBuckets': True|False }, 'networkOrigin': { 'vpcConfiguration': { 'vpcId': 'string' }, 'internetConfiguration': {} } } } }, 'snsTopic': { 'topicPolicy': 'string' }, 'sqsQueue': { 'queuePolicy': 'string' }, 's3ExpressDirectoryBucket': { 'bucketPolicy': 'string', 'accessPoints': { 'string': { 'accessPointPolicy': 'string', 'networkOrigin': { 'vpcConfiguration': { 'vpcId': 'string' }, 'internetConfiguration': {} } } } }, 'dynamodbStream': { 'streamPolicy': 'string' }, 'dynamodbTable': { 'tablePolicy': 'string' } } }, 'createdAt': datetime(2015, 1, 1), 'status': 'COMPLETED'|'CREATING'|'FAILED', 'statusReason': { 'code': 'INTERNAL_ERROR'|'INVALID_CONFIGURATION' } } } **Response Structure** * *(dict) --* * **accessPreview** *(dict) --* An object that contains information about the access preview. * **id** *(string) --* The unique ID for the access preview. * **analyzerArn** *(string) --* The ARN of the analyzer used to generate the access preview. * **configurations** *(dict) --* A map of resource ARNs for the proposed resource configuration. * *(string) --* * *(dict) --* Access control configuration structures for your resource. You specify the configuration as a type- value pair. You can specify only one type of access control configuration. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "ebsSnapshot", "ecrRepository", "iamRole", "efsFileSystem", "kmsKey", "rdsDbClusterSnapshot", "rdsDbSnapshot", "secretsManagerSecret", "s3Bucket", "snsTopic", "sqsQueue", "s3ExpressDirectoryBucket", "dynamodbStream", "dynamodbTable". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **ebsSnapshot** *(dict) --* The access control configuration is for an Amazon EBS volume snapshot. * **userIds** *(list) --* The IDs of the Amazon Web Services accounts that have access to the Amazon EBS volume snapshot. * If the configuration is for an existing Amazon EBS volume snapshot and you do not specify the "userIds", then the access preview uses the existing shared "userIds" for the snapshot. * If the access preview is for a new resource and you do not specify the "userIds", then the access preview considers the snapshot without any "userIds". * To propose deletion of existing shared "accountIds", you can specify an empty list for "userIds". * *(string) --* * **groups** *(list) --* The groups that have access to the Amazon EBS volume snapshot. If the value "all" is specified, then the Amazon EBS volume snapshot is public. * If the configuration is for an existing Amazon EBS volume snapshot and you do not specify the "groups", then the access preview uses the existing shared "groups" for the snapshot. * If the access preview is for a new resource and you do not specify the "groups", then the access preview considers the snapshot without any "groups". * To propose deletion of existing shared "groups", you can specify an empty list for "groups". * *(string) --* * **kmsKeyId** *(string) --* The KMS key identifier for an encrypted Amazon EBS volume snapshot. The KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. * If the configuration is for an existing Amazon EBS volume snapshot and you do not specify the "kmsKeyId", or you specify an empty string, then the access preview uses the existing "kmsKeyId" of the snapshot. * If the access preview is for a new resource and you do not specify the "kmsKeyId", the access preview considers the snapshot as unencrypted. * **ecrRepository** *(dict) --* The access control configuration is for an Amazon ECR repository. * **repositoryPolicy** *(string) --* The JSON repository policy text to apply to the Amazon ECR repository. For more information, see Private repository policy examples in the *Amazon ECR User Guide*. * **iamRole** *(dict) --* The access control configuration is for an IAM role. * **trustPolicy** *(string) --* The proposed trust policy for the IAM role. * **efsFileSystem** *(dict) --* The access control configuration is for an Amazon EFS file system. * **fileSystemPolicy** *(string) --* The JSON policy definition to apply to the Amazon EFS file system. For more information on the elements that make up a file system policy, see Amazon EFS Resource-based policies. * **kmsKey** *(dict) --* The access control configuration is for a KMS key. * **keyPolicies** *(dict) --* Resource policy configuration for the KMS key. The only valid value for the name of the key policy is "default". For more information, see Default key policy. * *(string) --* * *(string) --* * **grants** *(list) --* A list of proposed grant configurations for the KMS key. If the proposed grant configuration is for an existing key, the access preview uses the proposed list of grant configurations in place of the existing grants. Otherwise, the access preview uses the existing grants for the key. * *(dict) --* A proposed grant configuration for a KMS key. For more information, see CreateGrant. * **operations** *(list) --* A list of operations that the grant permits. * *(string) --* * **granteePrincipal** *(string) --* The principal that is given permission to perform the operations that the grant permits. * **retiringPrincipal** *(string) --* The principal that is given permission to retire the grant by using RetireGrant operation. * **constraints** *(dict) --* Use this structure to propose allowing cryptographic operations in the grant only when the operation request includes the specified encryption context. * **encryptionContextEquals** *(dict) --* A list of key-value pairs that must match the encryption context in the cryptographic operation request. The grant allows the operation only when the encryption context in the request is the same as the encryption context specified in this constraint. * *(string) --* * *(string) --* * **encryptionContextSubset** *(dict) --* A list of key-value pairs that must be included in the encryption context of the cryptographic operation request. The grant allows the cryptographic operation only when the encryption context in the request includes the key-value pairs specified in this constraint, although it can include additional key-value pairs. * *(string) --* * *(string) --* * **issuingAccount** *(string) --* The Amazon Web Services account under which the grant was issued. The account is used to propose KMS grants issued by accounts other than the owner of the key. * **rdsDbClusterSnapshot** *(dict) --* The access control configuration is for an Amazon RDS DB cluster snapshot. * **attributes** *(dict) --* The names and values of manual DB cluster snapshot attributes. Manual DB cluster snapshot attributes are used to authorize other Amazon Web Services accounts to restore a manual DB cluster snapshot. The only valid value for "AttributeName" for the attribute map is "restore" * *(string) --* * *(dict) --* The values for a manual Amazon RDS DB cluster snapshot attribute. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "accountIds". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **accountIds** *(list) --* The Amazon Web Services account IDs that have access to the manual Amazon RDS DB cluster snapshot. If the value "all" is specified, then the Amazon RDS DB cluster snapshot is public and can be copied or restored by all Amazon Web Services accounts. * If the configuration is for an existing Amazon RDS DB cluster snapshot and you do not specify the "accountIds" in "RdsDbClusterSnapshotAttributeValue", then the access preview uses the existing shared "accountIds" for the snapshot. * If the access preview is for a new resource and you do not specify the specify the "accountIds" in "RdsDbClusterSnapshotAttributeValue", then the access preview considers the snapshot without any attributes. * To propose deletion of existing shared "accountIds", you can specify an empty list for "accountIds" in the "RdsDbClusterSnapshotAttributeValue". * *(string) --* * **kmsKeyId** *(string) --* The KMS key identifier for an encrypted Amazon RDS DB cluster snapshot. The KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. * If the configuration is for an existing Amazon RDS DB cluster snapshot and you do not specify the "kmsKeyId", or you specify an empty string, then the access preview uses the existing "kmsKeyId" of the snapshot. * If the access preview is for a new resource and you do not specify the specify the "kmsKeyId", then the access preview considers the snapshot as unencrypted. * **rdsDbSnapshot** *(dict) --* The access control configuration is for an Amazon RDS DB snapshot. * **attributes** *(dict) --* The names and values of manual DB snapshot attributes. Manual DB snapshot attributes are used to authorize other Amazon Web Services accounts to restore a manual DB snapshot. The only valid value for "attributeName" for the attribute map is restore. * *(string) --* * *(dict) --* The name and values of a manual Amazon RDS DB snapshot attribute. Manual DB snapshot attributes are used to authorize other Amazon Web Services accounts to restore a manual DB snapshot. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "accountIds". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **accountIds** *(list) --* The Amazon Web Services account IDs that have access to the manual Amazon RDS DB snapshot. If the value "all" is specified, then the Amazon RDS DB snapshot is public and can be copied or restored by all Amazon Web Services accounts. * If the configuration is for an existing Amazon RDS DB snapshot and you do not specify the "accountIds" in "RdsDbSnapshotAttributeValue", then the access preview uses the existing shared "accountIds" for the snapshot. * If the access preview is for a new resource and you do not specify the specify the "accountIds" in "RdsDbSnapshotAttributeValue", then the access preview considers the snapshot without any attributes. * To propose deletion of an existing shared "accountIds", you can specify an empty list for "accountIds" in the "RdsDbSnapshotAttributeValue". * *(string) --* * **kmsKeyId** *(string) --* The KMS key identifier for an encrypted Amazon RDS DB snapshot. The KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. * If the configuration is for an existing Amazon RDS DB snapshot and you do not specify the "kmsKeyId", or you specify an empty string, then the access preview uses the existing "kmsKeyId" of the snapshot. * If the access preview is for a new resource and you do not specify the specify the "kmsKeyId", then the access preview considers the snapshot as unencrypted. * **secretsManagerSecret** *(dict) --* The access control configuration is for a Secrets Manager secret. * **kmsKeyId** *(string) --* The proposed ARN, key ID, or alias of the KMS key. * **secretPolicy** *(string) --* The proposed resource policy defining who can access or manage the secret. * **s3Bucket** *(dict) --* The access control configuration is for an Amazon S3 bucket. * **bucketPolicy** *(string) --* The proposed bucket policy for the Amazon S3 bucket. * **bucketAclGrants** *(list) --* The proposed list of ACL grants for the Amazon S3 bucket. You can propose up to 100 ACL grants per bucket. If the proposed grant configuration is for an existing bucket, the access preview uses the proposed list of grant configurations in place of the existing grants. Otherwise, the access preview uses the existing grants for the bucket. * *(dict) --* A proposed access control list grant configuration for an Amazon S3 bucket. For more information, see How to Specify an ACL. * **permission** *(string) --* The permissions being granted. * **grantee** *(dict) --* The grantee to whom you’re assigning access rights. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "id", "uri". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **id** *(string) --* The value specified is the canonical user ID of an Amazon Web Services account. * **uri** *(string) --* Used for granting permissions to a predefined group. * **bucketPublicAccessBlock** *(dict) --* The proposed block public access configuration for the Amazon S3 bucket. * **ignorePublicAcls** *(boolean) --* Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket. * **restrictPublicBuckets** *(boolean) --* Specifies whether Amazon S3 should restrict public bucket policies for this bucket. * **accessPoints** *(dict) --* The configuration of Amazon S3 access points or multi-region access points for the bucket. You can propose up to 10 new access points per bucket. * *(string) --* * *(dict) --* The configuration for an Amazon S3 access point or multi-region access point for the bucket. You can propose up to 10 access points or multi-region access points per bucket. If the proposed Amazon S3 access point configuration is for an existing bucket, the access preview uses the proposed access point configuration in place of the existing access points. To propose an access point without a policy, you can provide an empty string as the access point policy. For more information, see Creating access points. For more information about access point policy limits, see Access points restrictions and limitations. * **accessPointPolicy** *(string) --* The access point or multi-region access point policy. * **publicAccessBlock** *(dict) --* The proposed "S3PublicAccessBlock" configuration to apply to this Amazon S3 access point or multi-region access point. * **ignorePublicAcls** *(boolean) --* Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket. * **restrictPublicBuckets** *(boolean) --* Specifies whether Amazon S3 should restrict public bucket policies for this bucket. * **networkOrigin** *(dict) --* The proposed "Internet" and "VpcConfiguration" to apply to this Amazon S3 access point. "VpcConfiguration" does not apply to multi-region access points. If the access preview is for a new resource and neither is specified, the access preview uses "Internet" for the network origin. If the access preview is for an existing resource and neither is specified, the access preview uses the existing network origin. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "vpcConfiguration", "internetConfiguration". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **vpcConfiguration** *(dict) --* The proposed virtual private cloud (VPC) configuration for the Amazon S3 access point. VPC configuration does not apply to multi-region access points. For more information, see VpcConfiguration. * **vpcId** *(string) --* If this field is specified, this access point will only allow connections from the specified VPC ID. * **internetConfiguration** *(dict) --* The configuration for the Amazon S3 access point or multi-region access point with an "Internet" origin. * **snsTopic** *(dict) --* The access control configuration is for an Amazon SNS topic * **topicPolicy** *(string) --* The JSON policy text that defines who can access an Amazon SNS topic. For more information, see Example cases for Amazon SNS access control in the *Amazon SNS Developer Guide*. * **sqsQueue** *(dict) --* The access control configuration is for an Amazon SQS queue. * **queuePolicy** *(string) --* The proposed resource policy for the Amazon SQS queue. * **s3ExpressDirectoryBucket** *(dict) --* The access control configuration is for an Amazon S3 directory bucket. * **bucketPolicy** *(string) --* The proposed bucket policy for the Amazon S3 directory bucket. * **accessPoints** *(dict) --* The proposed access points for the Amazon S3 directory bucket. * *(string) --* * *(dict) --* Proposed configuration for an access point attached to an Amazon S3 directory bucket. You can propose up to 10 access points per bucket. If the proposed access point configuration is for an existing Amazon S3 directory bucket, the access preview uses the proposed access point configuration in place of the existing access points. To propose an access point without a policy, you can provide an empty string as the access point policy. For more information about access points for Amazon S3 directory buckets, see Managing access to directory buckets with access points in the Amazon Simple Storage Service User Guide. * **accessPointPolicy** *(string) --* The proposed access point policy for an Amazon S3 directory bucket access point. * **networkOrigin** *(dict) --* The proposed "InternetConfiguration" or "VpcConfiguration" to apply to the Amazon S3 access point. You can make the access point accessible from the internet, or you can specify that all requests made through that access point must originate from a specific virtual private cloud (VPC). You can specify only one type of network configuration. For more information, see Creating access points. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "vpcConfiguration", "internetConfiguration". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **vpcConfiguration** *(dict) --* The proposed virtual private cloud (VPC) configuration for the Amazon S3 access point. VPC configuration does not apply to multi-region access points. For more information, see VpcConfiguration. * **vpcId** *(string) --* If this field is specified, this access point will only allow connections from the specified VPC ID. * **internetConfiguration** *(dict) --* The configuration for the Amazon S3 access point or multi-region access point with an "Internet" origin. * **dynamodbStream** *(dict) --* The access control configuration is for a DynamoDB stream. * **streamPolicy** *(string) --* The proposed resource policy defining who can access or manage the DynamoDB stream. * **dynamodbTable** *(dict) --* The access control configuration is for a DynamoDB table or index. * **tablePolicy** *(string) --* The proposed resource policy defining who can access or manage the DynamoDB table. * **createdAt** *(datetime) --* The time at which the access preview was created. * **status** *(string) --* The status of the access preview. * "Creating" - The access preview creation is in progress. * "Completed" - The access preview is complete. You can preview findings for external access to the resource. * "Failed" - The access preview creation has failed. * **statusReason** *(dict) --* Provides more details about the current status of the access preview. For example, if the creation of the access preview fails, a "Failed" status is returned. This failure can be due to an internal issue with the analysis or due to an invalid resource configuration. * **code** *(string) --* The reason code for the current status of the access preview. **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / get_finding get_finding *********** AccessAnalyzer.Client.get_finding(**kwargs) 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** response = client.get_finding( analyzerArn='string', id='string' ) Parameters: * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer that generated the finding. * **id** (*string*) -- **[REQUIRED]** The ID of the finding to retrieve. Return type: 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). **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / apply_archive_rule apply_archive_rule ****************** AccessAnalyzer.Client.apply_archive_rule(**kwargs) Retroactively applies the archive rule to existing findings that meet the archive rule criteria. See also: AWS API Documentation **Request Syntax** response = client.apply_archive_rule( analyzerArn='string', ruleName='string', clientToken='string' ) Parameters: * **analyzerArn** (*string*) -- **[REQUIRED]** The Amazon resource name (ARN) of the analyzer. * **ruleName** (*string*) -- **[REQUIRED]** The name of the rule to apply. * **clientToken** (*string*) -- A client token. This field is autopopulated if not provided. Returns: None **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / generate_finding_recommendation generate_finding_recommendation ******************************* AccessAnalyzer.Client.generate_finding_recommendation(**kwargs) Creates a recommendation for an unused permissions finding. See also: AWS API Documentation **Request Syntax** response = client.generate_finding_recommendation( analyzerArn='string', id='string' ) Parameters: * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer used to generate the finding recommendation. * **id** (*string*) -- **[REQUIRED]** The unique ID for the finding recommendation. Returns: None **Exceptions** * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / get_finding_v2 get_finding_v2 ************** AccessAnalyzer.Client.get_finding_v2(**kwargs) 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** response = client.get_finding_v2( analyzerArn='string', id='string', maxResults=123, nextToken='string' ) Parameters: * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer that generated the finding. * **id** (*string*) -- **[REQUIRED]** The ID of the finding to retrieve. * **maxResults** (*integer*) -- The maximum number of results to return in the response. * **nextToken** (*string*) -- A token used for pagination of results returned. Return type: 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. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "internalAccessDetails", "externalAccessDetails", "unusedPermissionDetails", "unusedIamUserAccessKeyDetails", "unusedIamRoleDetails", "unusedIamUserPasswordDetails". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **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". **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / list_access_preview_findings list_access_preview_findings **************************** AccessAnalyzer.Client.list_access_preview_findings(**kwargs) Retrieves a list of access preview findings generated by the specified access preview. See also: AWS API Documentation **Request Syntax** response = client.list_access_preview_findings( accessPreviewId='string', analyzerArn='string', filter={ 'string': { 'eq': [ 'string', ], 'neq': [ 'string', ], 'contains': [ 'string', ], 'exists': True|False } }, nextToken='string', maxResults=123 ) Parameters: * **accessPreviewId** (*string*) -- **[REQUIRED]** The unique ID for the access preview. * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer used to generate the access. * **filter** (*dict*) -- 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. * **nextToken** (*string*) -- A token used for pagination of results returned. * **maxResults** (*integer*) -- The maximum number of results to return in the response. Return type: 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. **Exceptions** * "AccessAnalyzer.Client.exceptions.ConflictException" * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / close close ***** AccessAnalyzer.Client.close() Closes underlying endpoint connections. AccessAnalyzer / Client / validate_policy validate_policy *************** AccessAnalyzer.Client.validate_policy(**kwargs) Requests the validation of a policy and returns a list of findings. The findings help you identify issues and provide actionable recommendations to resolve the issue and enable you to author functional policies that meet security best practices. See also: AWS API Documentation **Request Syntax** response = client.validate_policy( locale='DE'|'EN'|'ES'|'FR'|'IT'|'JA'|'KO'|'PT_BR'|'ZH_CN'|'ZH_TW', maxResults=123, nextToken='string', policyDocument='string', policyType='IDENTITY_POLICY'|'RESOURCE_POLICY'|'SERVICE_CONTROL_POLICY'|'RESOURCE_CONTROL_POLICY', validatePolicyResourceType='AWS::S3::Bucket'|'AWS::S3::AccessPoint'|'AWS::S3::MultiRegionAccessPoint'|'AWS::S3ObjectLambda::AccessPoint'|'AWS::IAM::AssumeRolePolicyDocument'|'AWS::DynamoDB::Table' ) Parameters: * **locale** (*string*) -- The locale to use for localizing the findings. * **maxResults** (*integer*) -- The maximum number of results to return in the response. * **nextToken** (*string*) -- A token used for pagination of results returned. * **policyDocument** (*string*) -- **[REQUIRED]** The JSON policy document to use as the content for the policy. * **policyType** (*string*) -- **[REQUIRED]** The type of policy to validate. Identity policies grant permissions to IAM principals. Identity policies include managed and inline policies for IAM roles, users, and groups. Resource policies grant permissions on Amazon Web Services resources. Resource policies include trust policies for IAM roles and bucket policies for Amazon S3 buckets. You can provide a generic input such as identity policy or resource policy or a specific input such as managed policy or Amazon S3 bucket policy. Service control policies (SCPs) are a type of organization policy attached to an Amazon Web Services organization, organizational unit (OU), or an account. * **validatePolicyResourceType** (*string*) -- The type of resource to attach to your resource policy. Specify a value for the policy validation resource type only if the policy type is "RESOURCE_POLICY". For example, to validate a resource policy to attach to an Amazon S3 bucket, you can choose "AWS::S3::Bucket" for the policy validation resource type. For resource types not supported as valid values, IAM Access Analyzer runs policy checks that apply to all resource policies. For example, to validate a resource policy to attach to a KMS key, do not specify a value for the policy validation resource type and IAM Access Analyzer will run policy checks that apply to all resource policies. Return type: dict Returns: **Response Syntax** { 'findings': [ { 'findingDetails': 'string', 'findingType': 'ERROR'|'SECURITY_WARNING'|'SUGGESTION'|'WARNING', 'issueCode': 'string', 'learnMoreLink': 'string', 'locations': [ { 'path': [ { 'index': 123, 'key': 'string', 'substring': { 'start': 123, 'length': 123 }, 'value': 'string' }, ], 'span': { 'start': { 'line': 123, 'column': 123, 'offset': 123 }, 'end': { 'line': 123, 'column': 123, 'offset': 123 } } }, ] }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **findings** *(list) --* The list of findings in a policy returned by IAM Access Analyzer based on its suite of policy checks. * *(dict) --* A finding in a policy. Each finding is an actionable recommendation that can be used to improve the policy. * **findingDetails** *(string) --* A localized message that explains the finding and provides guidance on how to address it. * **findingType** *(string) --* The impact of the finding. Security warnings report when the policy allows access that we consider overly permissive. Errors report when a part of the policy is not functional. Warnings report non-security issues when a policy does not conform to policy writing best practices. Suggestions recommend stylistic improvements in the policy that do not impact access. * **issueCode** *(string) --* The issue code provides an identifier of the issue associated with this finding. * **learnMoreLink** *(string) --* A link to additional documentation about the type of finding. * **locations** *(list) --* The list of locations in the policy document that are related to the finding. The issue code provides a summary of an issue identified by the finding. * *(dict) --* A location in a policy that is represented as a path through the JSON representation and a corresponding span. * **path** *(list) --* A path in a policy, represented as a sequence of path elements. * *(dict) --* A single element in a path through the JSON representation of a policy. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "index", "key", "substring", "value". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **index** *(integer) --* Refers to an index in a JSON array. * **key** *(string) --* Refers to a key in a JSON object. * **substring** *(dict) --* Refers to a substring of a literal string in a JSON object. * **start** *(integer) --* The start index of the substring, starting from 0. * **length** *(integer) --* The length of the substring. * **value** *(string) --* Refers to the value associated with a given key in a JSON object. * **span** *(dict) --* A span in a policy. * **start** *(dict) --* The start position of the span (inclusive). * **line** *(integer) --* The line of the position, starting from 1. * **column** *(integer) --* The column of the position, starting from 0. * **offset** *(integer) --* The offset within the policy that corresponds to the position, starting from 0. * **end** *(dict) --* The end position of the span (exclusive). * **line** *(integer) --* The line of the position, starting from 1. * **column** *(integer) --* The column of the position, starting from 0. * **offset** *(integer) --* The offset within the policy that corresponds to the position, starting from 0. * **nextToken** *(string) --* A token used for pagination of results returned. **Exceptions** * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / get_findings_statistics get_findings_statistics *********************** AccessAnalyzer.Client.get_findings_statistics(**kwargs) Retrieves a list of aggregated finding statistics for an external access or unused access analyzer. See also: AWS API Documentation **Request Syntax** response = client.get_findings_statistics( analyzerArn='string' ) Parameters: **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer used to generate the statistics. Return type: 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. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "externalAccessFindingsStatistics", "internalAccessFindingsStatistics", "unusedAccessFindingsStatistics". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **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. **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / update_findings update_findings *************** AccessAnalyzer.Client.update_findings(**kwargs) Updates the status for the specified findings. See also: AWS API Documentation **Request Syntax** response = client.update_findings( analyzerArn='string', status='ACTIVE'|'ARCHIVED', ids=[ 'string', ], resourceArn='string', clientToken='string' ) Parameters: * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer that generated the findings to update. * **status** (*string*) -- **[REQUIRED]** The state represents the action to take to update the finding Status. Use "ARCHIVE" to change an Active finding to an Archived finding. Use "ACTIVE" to change an Archived finding to an Active finding. * **ids** (*list*) -- The IDs of the findings to update. * *(string) --* * **resourceArn** (*string*) -- The ARN of the resource identified in the finding. * **clientToken** (*string*) -- A client token. This field is autopopulated if not provided. Returns: None **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / delete_archive_rule delete_archive_rule ******************* AccessAnalyzer.Client.delete_archive_rule(**kwargs) Deletes the specified archive rule. See also: AWS API Documentation **Request Syntax** response = client.delete_archive_rule( analyzerName='string', ruleName='string', clientToken='string' ) Parameters: * **analyzerName** (*string*) -- **[REQUIRED]** The name of the analyzer that associated with the archive rule to delete. * **ruleName** (*string*) -- **[REQUIRED]** The name of the rule to delete. * **clientToken** (*string*) -- A client token. This field is autopopulated if not provided. Returns: None **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / check_access_not_granted check_access_not_granted ************************ AccessAnalyzer.Client.check_access_not_granted(**kwargs) Checks whether the specified access isn't allowed by a policy. See also: AWS API Documentation **Request Syntax** response = client.check_access_not_granted( policyDocument='string', access=[ { 'actions': [ 'string', ], 'resources': [ 'string', ] }, ], policyType='IDENTITY_POLICY'|'RESOURCE_POLICY' ) Parameters: * **policyDocument** (*string*) -- **[REQUIRED]** The JSON policy document to use as the content for the policy. * **access** (*list*) -- **[REQUIRED]** An access object containing the permissions that shouldn't be granted by the specified policy. If only actions are specified, IAM Access Analyzer checks for access to peform at least one of the actions on any resource in the policy. If only resources are specified, then IAM Access Analyzer checks for access to perform any action on at least one of the resources. If both actions and resources are specified, IAM Access Analyzer checks for access to perform at least one of the specified actions on at least one of the specified resources. * *(dict) --* Contains information about actions and resources that define permissions to check against a policy. * **actions** *(list) --* A list of actions for the access permissions. Any strings that can be used as an action in an IAM policy can be used in the list of actions to check. * *(string) --* * **resources** *(list) --* A list of resources for the access permissions. Any strings that can be used as an Amazon Resource Name (ARN) in an IAM policy can be used in the list of resources to check. You can only use a wildcard in the portion of the ARN that specifies the resource ID. * *(string) --* * **policyType** (*string*) -- **[REQUIRED]** The type of policy. Identity policies grant permissions to IAM principals. Identity policies include managed and inline policies for IAM roles, users, and groups. Resource policies grant permissions on Amazon Web Services resources. Resource policies include trust policies for IAM roles and bucket policies for Amazon S3 buckets. Return type: dict Returns: **Response Syntax** { 'result': 'PASS'|'FAIL', 'message': 'string', 'reasons': [ { 'description': 'string', 'statementIndex': 123, 'statementId': 'string' }, ] } **Response Structure** * *(dict) --* * **result** *(string) --* The result of the check for whether the access is allowed. If the result is "PASS", the specified policy doesn't allow any of the specified permissions in the access object. If the result is "FAIL", the specified policy might allow some or all of the permissions in the access object. * **message** *(string) --* The message indicating whether the specified access is allowed. * **reasons** *(list) --* A description of the reasoning of the result. * *(dict) --* Contains information about the reasoning why a check for access passed or failed. * **description** *(string) --* A description of the reasoning of a result of checking for access. * **statementIndex** *(integer) --* The index number of the reason statement. * **statementId** *(string) --* The identifier for the reason statement. **Exceptions** * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InvalidParameterException" * "AccessAnalyzer.Client.exceptions.UnprocessableEntityException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / list_findings list_findings ************* AccessAnalyzer.Client.list_findings(**kwargs) 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** response = 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 ) Parameters: * **analyzerArn** (*string*) -- **[REQUIRED]** The ARN of the analyzer to retrieve findings from. * **filter** (*dict*) -- A filter to match for the findings to return. * *(string) --* * *(dict) --* The criteria to use in the filter that defines the archive rule. For more information on available filter keys, see IAM Access Analyzer filter keys. * **eq** *(list) --* An "equals" operator to match for the filter used to create the rule. * *(string) --* * **neq** *(list) --* A "not equals" operator to match for the filter used to create the rule. * *(string) --* * **contains** *(list) --* A "contains" operator to match for the filter used to create the rule. * *(string) --* * **exists** *(boolean) --* An "exists" operator to match for the filter used to create the rule. * **sort** (*dict*) -- The sort order for the findings returned. * **attributeName** *(string) --* The name of the attribute to sort on. * **orderBy** *(string) --* The sort order, ascending or descending. * **nextToken** (*string*) -- A token used for pagination of results returned. * **maxResults** (*integer*) -- The maximum number of results to return in the response. Return type: 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. **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / get_analyzer get_analyzer ************ AccessAnalyzer.Client.get_analyzer(**kwargs) Retrieves information about the specified analyzer. See also: AWS API Documentation **Request Syntax** response = client.get_analyzer( analyzerName='string' ) Parameters: **analyzerName** (*string*) -- **[REQUIRED]** The name of the analyzer retrieved. Return type: 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. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "unusedAccess", "internalAccess". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **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) --* **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / tag_resource tag_resource ************ AccessAnalyzer.Client.tag_resource(**kwargs) Adds a tag to the specified resource. See also: AWS API Documentation **Request Syntax** response = client.tag_resource( resourceArn='string', tags={ 'string': 'string' } ) Parameters: * **resourceArn** (*string*) -- **[REQUIRED]** The ARN of the resource to add the tag to. * **tags** (*dict*) -- **[REQUIRED]** The tags to add to the resource. * *(string) --* * *(string) --* Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* The response to the request. **Exceptions** * "AccessAnalyzer.Client.exceptions.ResourceNotFoundException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / list_archive_rules list_archive_rules ****************** AccessAnalyzer.Client.list_archive_rules(**kwargs) Retrieves a list of archive rules created for the specified analyzer. See also: AWS API Documentation **Request Syntax** response = client.list_archive_rules( analyzerName='string', nextToken='string', maxResults=123 ) Parameters: * **analyzerName** (*string*) -- **[REQUIRED]** The name of the analyzer to retrieve rules from. * **nextToken** (*string*) -- A token used for pagination of results returned. * **maxResults** (*integer*) -- The maximum number of results to return in the request. Return type: dict Returns: **Response Syntax** { 'archiveRules': [ { 'ruleName': 'string', 'filter': { 'string': { 'eq': [ 'string', ], 'neq': [ 'string', ], 'contains': [ 'string', ], 'exists': True|False } }, 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* The response to the request. * **archiveRules** *(list) --* A list of archive rules created for the specified analyzer. * *(dict) --* Contains information about an archive rule. Archive rules automatically archive new findings that meet the criteria you define when you create the rule. * **ruleName** *(string) --* The name of the archive rule. * **filter** *(dict) --* A filter used to define the archive rule. * *(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. * **createdAt** *(datetime) --* The time at which the archive rule was created. * **updatedAt** *(datetime) --* The time at which the archive rule was last updated. * **nextToken** *(string) --* A token used for pagination of results returned. **Exceptions** * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / check_no_new_access check_no_new_access ******************* AccessAnalyzer.Client.check_no_new_access(**kwargs) Checks whether new access is allowed for an updated policy when compared to the existing policy. You can find examples for reference policies and learn how to set up and run a custom policy check for new access in the IAM Access Analyzer custom policy checks samples repository on GitHub. The reference policies in this repository are meant to be passed to the "existingPolicyDocument" request parameter. See also: AWS API Documentation **Request Syntax** response = client.check_no_new_access( newPolicyDocument='string', existingPolicyDocument='string', policyType='IDENTITY_POLICY'|'RESOURCE_POLICY' ) Parameters: * **newPolicyDocument** (*string*) -- **[REQUIRED]** The JSON policy document to use as the content for the updated policy. * **existingPolicyDocument** (*string*) -- **[REQUIRED]** The JSON policy document to use as the content for the existing policy. * **policyType** (*string*) -- **[REQUIRED]** The type of policy to compare. Identity policies grant permissions to IAM principals. Identity policies include managed and inline policies for IAM roles, users, and groups. Resource policies grant permissions on Amazon Web Services resources. Resource policies include trust policies for IAM roles and bucket policies for Amazon S3 buckets. You can provide a generic input such as identity policy or resource policy or a specific input such as managed policy or Amazon S3 bucket policy. Return type: dict Returns: **Response Syntax** { 'result': 'PASS'|'FAIL', 'message': 'string', 'reasons': [ { 'description': 'string', 'statementIndex': 123, 'statementId': 'string' }, ] } **Response Structure** * *(dict) --* * **result** *(string) --* The result of the check for new access. If the result is "PASS", no new access is allowed by the updated policy. If the result is "FAIL", the updated policy might allow new access. * **message** *(string) --* The message indicating whether the updated policy allows new access. * **reasons** *(list) --* A description of the reasoning of the result. * *(dict) --* Contains information about the reasoning why a check for access passed or failed. * **description** *(string) --* A description of the reasoning of a result of checking for access. * **statementIndex** *(integer) --* The index number of the reason statement. * **statementId** *(string) --* The identifier for the reason statement. **Exceptions** * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.InvalidParameterException" * "AccessAnalyzer.Client.exceptions.UnprocessableEntityException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException" AccessAnalyzer / Client / list_policy_generations list_policy_generations *********************** AccessAnalyzer.Client.list_policy_generations(**kwargs) Lists all of the policy generations requested in the last seven days. See also: AWS API Documentation **Request Syntax** response = client.list_policy_generations( principalArn='string', maxResults=123, nextToken='string' ) Parameters: * **principalArn** (*string*) -- The ARN of the IAM entity (user or role) for which you are generating a policy. Use this with "ListGeneratedPolicies" to filter the results to only include results for a specific principal. * **maxResults** (*integer*) -- The maximum number of results to return in the response. * **nextToken** (*string*) -- A token used for pagination of results returned. Return type: dict Returns: **Response Syntax** { 'policyGenerations': [ { 'jobId': 'string', 'principalArn': 'string', 'status': 'IN_PROGRESS'|'SUCCEEDED'|'FAILED'|'CANCELED', 'startedOn': datetime(2015, 1, 1), 'completedOn': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **policyGenerations** *(list) --* A "PolicyGeneration" object that contains details about the generated policy. * *(dict) --* Contains details about the policy generation status and properties. * **jobId** *(string) --* The "JobId" that is returned by the "StartPolicyGeneration" operation. The "JobId" can be used with "GetGeneratedPolicy" to retrieve the generated policies or used with "CancelPolicyGeneration" to cancel the policy generation request. * **principalArn** *(string) --* The ARN of the IAM entity (user or role) for which you are generating a policy. * **status** *(string) --* The status of the policy generation request. * **startedOn** *(datetime) --* A timestamp of when the policy generation started. * **completedOn** *(datetime) --* A timestamp of when the policy generation was completed. * **nextToken** *(string) --* A token used for pagination of results returned. **Exceptions** * "AccessAnalyzer.Client.exceptions.InternalServerException" * "AccessAnalyzer.Client.exceptions.ValidationException" * "AccessAnalyzer.Client.exceptions.ThrottlingException" * "AccessAnalyzer.Client.exceptions.AccessDeniedException"