Skip to content

AccessAnalyzerClient#

Index > AccessAnalyzer > AccessAnalyzerClient

Auto-generated documentation for AccessAnalyzer type annotations stubs module types-aiobotocore-accessanalyzer.

AccessAnalyzerClient#

Type annotations and code completion for session.create_client("accessanalyzer") boto3 documentation

AccessAnalyzerClient usage example

from aiobotocore.session import get_session
from types_aiobotocore_accessanalyzer.client import AccessAnalyzerClient

session = get_session()
async with session.create_client("accessanalyzer") as client:
    client: AccessAnalyzerClient

Exceptions#

aiobotocore client exceptions are generated in runtime. This class provides code completion for session.create_client("accessanalyzer").exceptions structure.

AccessAnalyzerClient.exceptions usage example

async with session.create_client("accessanalyzer") as client:
    try:
        do_something(client)
    except (
            client.AccessDeniedException,
        client.ClientError,
        client.ConflictException,
        client.InternalServerException,
        client.ResourceNotFoundException,
        client.ServiceQuotaExceededException,
        client.ThrottlingException,
        client.ValidationException,
    ) as e:
        print(e)
AccessAnalyzerClient usage type checking example

from types_aiobotocore_accessanalyzer.client import Exceptions

def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...

Methods#

apply_archive_rule#

Retroactively applies the archive rule to existing findings that meet the archive rule criteria.

Type annotations and code completion for session.create_client("accessanalyzer").apply_archive_rule method. boto3 documentation

# apply_archive_rule method definition

await def apply_archive_rule(
    self,
    *,
    analyzerArn: str,
    ruleName: str,
    clientToken: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# apply_archive_rule method usage example with argument unpacking

kwargs: ApplyArchiveRuleRequestRequestTypeDef = {  # (1)
    "analyzerArn": ...,
    "ruleName": ...,
}

parent.apply_archive_rule(**kwargs)
  1. See ApplyArchiveRuleRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for session.create_client("accessanalyzer").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

cancel_policy_generation#

Cancels the requested policy generation.

Type annotations and code completion for session.create_client("accessanalyzer").cancel_policy_generation method. boto3 documentation

# cancel_policy_generation method definition

await def cancel_policy_generation(
    self,
    *,
    jobId: str,
) -> Dict[str, Any]:
    ...
# cancel_policy_generation method usage example with argument unpacking

kwargs: CancelPolicyGenerationRequestRequestTypeDef = {  # (1)
    "jobId": ...,
}

parent.cancel_policy_generation(**kwargs)
  1. See CancelPolicyGenerationRequestRequestTypeDef

close#

Closes underlying endpoint connections.

Type annotations and code completion for session.create_client("accessanalyzer").close method. boto3 documentation

# close method definition

await def close(
    self,
) -> None:
    ...

create_access_preview#

Creates an access preview that allows you to preview IAM Access Analyzer findings for your resource before deploying resource permissions.

Type annotations and code completion for session.create_client("accessanalyzer").create_access_preview method. boto3 documentation

# create_access_preview method definition

await def create_access_preview(
    self,
    *,
    analyzerArn: str,
    configurations: Mapping[str, ConfigurationTypeDef],  # (1)
    clientToken: str = ...,
) -> CreateAccessPreviewResponseTypeDef:  # (2)
    ...
  1. See ConfigurationTypeDef
  2. See CreateAccessPreviewResponseTypeDef
# create_access_preview method usage example with argument unpacking

kwargs: CreateAccessPreviewRequestRequestTypeDef = {  # (1)
    "analyzerArn": ...,
    "configurations": ...,
}

parent.create_access_preview(**kwargs)
  1. See CreateAccessPreviewRequestRequestTypeDef

create_analyzer#

Creates an analyzer for your account.

Type annotations and code completion for session.create_client("accessanalyzer").create_analyzer method. boto3 documentation

# create_analyzer method definition

await def create_analyzer(
    self,
    *,
    analyzerName: str,
    type: TypeType,  # (1)
    archiveRules: Sequence[InlineArchiveRuleTypeDef] = ...,  # (2)
    tags: Mapping[str, str] = ...,
    clientToken: str = ...,
) -> CreateAnalyzerResponseTypeDef:  # (3)
    ...
  1. See TypeType
  2. See InlineArchiveRuleTypeDef
  3. See CreateAnalyzerResponseTypeDef
# create_analyzer method usage example with argument unpacking

kwargs: CreateAnalyzerRequestRequestTypeDef = {  # (1)
    "analyzerName": ...,
    "type": ...,
}

parent.create_analyzer(**kwargs)
  1. See CreateAnalyzerRequestRequestTypeDef

create_archive_rule#

Creates an archive rule for the specified analyzer.

Type annotations and code completion for session.create_client("accessanalyzer").create_archive_rule method. boto3 documentation

# create_archive_rule method definition

await def create_archive_rule(
    self,
    *,
    analyzerName: str,
    ruleName: str,
    filter: Mapping[str, CriterionTypeDef],  # (1)
    clientToken: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See CriterionTypeDef
  2. See EmptyResponseMetadataTypeDef
# create_archive_rule method usage example with argument unpacking

kwargs: CreateArchiveRuleRequestRequestTypeDef = {  # (1)
    "analyzerName": ...,
    "ruleName": ...,
    "filter": ...,
}

parent.create_archive_rule(**kwargs)
  1. See CreateArchiveRuleRequestRequestTypeDef

delete_analyzer#

Deletes the specified analyzer.

Type annotations and code completion for session.create_client("accessanalyzer").delete_analyzer method. boto3 documentation

# delete_analyzer method definition

await def delete_analyzer(
    self,
    *,
    analyzerName: str,
    clientToken: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# delete_analyzer method usage example with argument unpacking

kwargs: DeleteAnalyzerRequestRequestTypeDef = {  # (1)
    "analyzerName": ...,
}

parent.delete_analyzer(**kwargs)
  1. See DeleteAnalyzerRequestRequestTypeDef

delete_archive_rule#

Deletes the specified archive rule.

Type annotations and code completion for session.create_client("accessanalyzer").delete_archive_rule method. boto3 documentation

# delete_archive_rule method definition

await def delete_archive_rule(
    self,
    *,
    analyzerName: str,
    ruleName: str,
    clientToken: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# delete_archive_rule method usage example with argument unpacking

kwargs: DeleteArchiveRuleRequestRequestTypeDef = {  # (1)
    "analyzerName": ...,
    "ruleName": ...,
}

parent.delete_archive_rule(**kwargs)
  1. See DeleteArchiveRuleRequestRequestTypeDef

generate_presigned_url#

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for session.create_client("accessanalyzer").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

await def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_access_preview#

Retrieves information about an access preview for the specified analyzer.

Type annotations and code completion for session.create_client("accessanalyzer").get_access_preview method. boto3 documentation

# get_access_preview method definition

await def get_access_preview(
    self,
    *,
    accessPreviewId: str,
    analyzerArn: str,
) -> GetAccessPreviewResponseTypeDef:  # (1)
    ...
  1. See GetAccessPreviewResponseTypeDef
# get_access_preview method usage example with argument unpacking

kwargs: GetAccessPreviewRequestRequestTypeDef = {  # (1)
    "accessPreviewId": ...,
    "analyzerArn": ...,
}

parent.get_access_preview(**kwargs)
  1. See GetAccessPreviewRequestRequestTypeDef

get_analyzed_resource#

Retrieves information about a resource that was analyzed.

Type annotations and code completion for session.create_client("accessanalyzer").get_analyzed_resource method. boto3 documentation

# get_analyzed_resource method definition

await def get_analyzed_resource(
    self,
    *,
    analyzerArn: str,
    resourceArn: str,
) -> GetAnalyzedResourceResponseTypeDef:  # (1)
    ...
  1. See GetAnalyzedResourceResponseTypeDef
# get_analyzed_resource method usage example with argument unpacking

kwargs: GetAnalyzedResourceRequestRequestTypeDef = {  # (1)
    "analyzerArn": ...,
    "resourceArn": ...,
}

parent.get_analyzed_resource(**kwargs)
  1. See GetAnalyzedResourceRequestRequestTypeDef

get_analyzer#

Retrieves information about the specified analyzer.

Type annotations and code completion for session.create_client("accessanalyzer").get_analyzer method. boto3 documentation

# get_analyzer method definition

await def get_analyzer(
    self,
    *,
    analyzerName: str,
) -> GetAnalyzerResponseTypeDef:  # (1)
    ...
  1. See GetAnalyzerResponseTypeDef
# get_analyzer method usage example with argument unpacking

kwargs: GetAnalyzerRequestRequestTypeDef = {  # (1)
    "analyzerName": ...,
}

parent.get_analyzer(**kwargs)
  1. See GetAnalyzerRequestRequestTypeDef

get_archive_rule#

Retrieves information about an archive rule.

Type annotations and code completion for session.create_client("accessanalyzer").get_archive_rule method. boto3 documentation

# get_archive_rule method definition

await def get_archive_rule(
    self,
    *,
    analyzerName: str,
    ruleName: str,
) -> GetArchiveRuleResponseTypeDef:  # (1)
    ...
  1. See GetArchiveRuleResponseTypeDef
# get_archive_rule method usage example with argument unpacking

kwargs: GetArchiveRuleRequestRequestTypeDef = {  # (1)
    "analyzerName": ...,
    "ruleName": ...,
}

parent.get_archive_rule(**kwargs)
  1. See GetArchiveRuleRequestRequestTypeDef

get_finding#

Retrieves information about the specified finding.

Type annotations and code completion for session.create_client("accessanalyzer").get_finding method. boto3 documentation

# get_finding method definition

await def get_finding(
    self,
    *,
    analyzerArn: str,
    id: str,
) -> GetFindingResponseTypeDef:  # (1)
    ...
  1. See GetFindingResponseTypeDef
# get_finding method usage example with argument unpacking

kwargs: GetFindingRequestRequestTypeDef = {  # (1)
    "analyzerArn": ...,
    "id": ...,
}

parent.get_finding(**kwargs)
  1. See GetFindingRequestRequestTypeDef

get_generated_policy#

Retrieves the policy that was generated using StartPolicyGeneration.

Type annotations and code completion for session.create_client("accessanalyzer").get_generated_policy method. boto3 documentation

# get_generated_policy method definition

await def get_generated_policy(
    self,
    *,
    jobId: str,
    includeResourcePlaceholders: bool = ...,
    includeServiceLevelTemplate: bool = ...,
) -> GetGeneratedPolicyResponseTypeDef:  # (1)
    ...
  1. See GetGeneratedPolicyResponseTypeDef
# get_generated_policy method usage example with argument unpacking

kwargs: GetGeneratedPolicyRequestRequestTypeDef = {  # (1)
    "jobId": ...,
}

parent.get_generated_policy(**kwargs)
  1. See GetGeneratedPolicyRequestRequestTypeDef

list_access_preview_findings#

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

Type annotations and code completion for session.create_client("accessanalyzer").list_access_preview_findings method. boto3 documentation

# list_access_preview_findings method definition

await def list_access_preview_findings(
    self,
    *,
    accessPreviewId: str,
    analyzerArn: str,
    filter: Mapping[str, CriterionTypeDef] = ...,  # (1)
    nextToken: str = ...,
    maxResults: int = ...,
) -> ListAccessPreviewFindingsResponseTypeDef:  # (2)
    ...
  1. See CriterionTypeDef
  2. See ListAccessPreviewFindingsResponseTypeDef
# list_access_preview_findings method usage example with argument unpacking

kwargs: ListAccessPreviewFindingsRequestRequestTypeDef = {  # (1)
    "accessPreviewId": ...,
    "analyzerArn": ...,
}

parent.list_access_preview_findings(**kwargs)
  1. See ListAccessPreviewFindingsRequestRequestTypeDef

list_access_previews#

Retrieves a list of access previews for the specified analyzer.

Type annotations and code completion for session.create_client("accessanalyzer").list_access_previews method. boto3 documentation

# list_access_previews method definition

await def list_access_previews(
    self,
    *,
    analyzerArn: str,
    nextToken: str = ...,
    maxResults: int = ...,
) -> ListAccessPreviewsResponseTypeDef:  # (1)
    ...
  1. See ListAccessPreviewsResponseTypeDef
# list_access_previews method usage example with argument unpacking

kwargs: ListAccessPreviewsRequestRequestTypeDef = {  # (1)
    "analyzerArn": ...,
}

parent.list_access_previews(**kwargs)
  1. See ListAccessPreviewsRequestRequestTypeDef

list_analyzed_resources#

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

Type annotations and code completion for session.create_client("accessanalyzer").list_analyzed_resources method. boto3 documentation

# list_analyzed_resources method definition

await def list_analyzed_resources(
    self,
    *,
    analyzerArn: str,
    resourceType: ResourceTypeType = ...,  # (1)
    nextToken: str = ...,
    maxResults: int = ...,
) -> ListAnalyzedResourcesResponseTypeDef:  # (2)
    ...
  1. See ResourceTypeType
  2. See ListAnalyzedResourcesResponseTypeDef
# list_analyzed_resources method usage example with argument unpacking

kwargs: ListAnalyzedResourcesRequestRequestTypeDef = {  # (1)
    "analyzerArn": ...,
}

parent.list_analyzed_resources(**kwargs)
  1. See ListAnalyzedResourcesRequestRequestTypeDef

list_analyzers#

Retrieves a list of analyzers.

Type annotations and code completion for session.create_client("accessanalyzer").list_analyzers method. boto3 documentation

# list_analyzers method definition

await def list_analyzers(
    self,
    *,
    nextToken: str = ...,
    maxResults: int = ...,
    type: TypeType = ...,  # (1)
) -> ListAnalyzersResponseTypeDef:  # (2)
    ...
  1. See TypeType
  2. See ListAnalyzersResponseTypeDef
# list_analyzers method usage example with argument unpacking

kwargs: ListAnalyzersRequestRequestTypeDef = {  # (1)
    "nextToken": ...,
}

parent.list_analyzers(**kwargs)
  1. See ListAnalyzersRequestRequestTypeDef

list_archive_rules#

Retrieves a list of archive rules created for the specified analyzer.

Type annotations and code completion for session.create_client("accessanalyzer").list_archive_rules method. boto3 documentation

# list_archive_rules method definition

await def list_archive_rules(
    self,
    *,
    analyzerName: str,
    nextToken: str = ...,
    maxResults: int = ...,
) -> ListArchiveRulesResponseTypeDef:  # (1)
    ...
  1. See ListArchiveRulesResponseTypeDef
# list_archive_rules method usage example with argument unpacking

kwargs: ListArchiveRulesRequestRequestTypeDef = {  # (1)
    "analyzerName": ...,
}

parent.list_archive_rules(**kwargs)
  1. See ListArchiveRulesRequestRequestTypeDef

list_findings#

Retrieves a list of findings generated by the specified analyzer.

Type annotations and code completion for session.create_client("accessanalyzer").list_findings method. boto3 documentation

# list_findings method definition

await def list_findings(
    self,
    *,
    analyzerArn: str,
    filter: Mapping[str, CriterionTypeDef] = ...,  # (1)
    sort: SortCriteriaTypeDef = ...,  # (2)
    nextToken: str = ...,
    maxResults: int = ...,
) -> ListFindingsResponseTypeDef:  # (3)
    ...
  1. See CriterionTypeDef
  2. See SortCriteriaTypeDef
  3. See ListFindingsResponseTypeDef
# list_findings method usage example with argument unpacking

kwargs: ListFindingsRequestRequestTypeDef = {  # (1)
    "analyzerArn": ...,
}

parent.list_findings(**kwargs)
  1. See ListFindingsRequestRequestTypeDef

list_policy_generations#

Lists all of the policy generations requested in the last seven days.

Type annotations and code completion for session.create_client("accessanalyzer").list_policy_generations method. boto3 documentation

# list_policy_generations method definition

await def list_policy_generations(
    self,
    *,
    principalArn: str = ...,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListPolicyGenerationsResponseTypeDef:  # (1)
    ...
  1. See ListPolicyGenerationsResponseTypeDef
# list_policy_generations method usage example with argument unpacking

kwargs: ListPolicyGenerationsRequestRequestTypeDef = {  # (1)
    "principalArn": ...,
}

parent.list_policy_generations(**kwargs)
  1. See ListPolicyGenerationsRequestRequestTypeDef

list_tags_for_resource#

Retrieves a list of tags applied to the specified resource.

Type annotations and code completion for session.create_client("accessanalyzer").list_tags_for_resource method. boto3 documentation

# list_tags_for_resource method definition

await def list_tags_for_resource(
    self,
    *,
    resourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
# list_tags_for_resource method usage example with argument unpacking

kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

start_policy_generation#

Starts the policy generation request.

Type annotations and code completion for session.create_client("accessanalyzer").start_policy_generation method. boto3 documentation

# start_policy_generation method definition

await def start_policy_generation(
    self,
    *,
    policyGenerationDetails: PolicyGenerationDetailsTypeDef,  # (1)
    cloudTrailDetails: CloudTrailDetailsTypeDef = ...,  # (2)
    clientToken: str = ...,
) -> StartPolicyGenerationResponseTypeDef:  # (3)
    ...
  1. See PolicyGenerationDetailsTypeDef
  2. See CloudTrailDetailsTypeDef
  3. See StartPolicyGenerationResponseTypeDef
# start_policy_generation method usage example with argument unpacking

kwargs: StartPolicyGenerationRequestRequestTypeDef = {  # (1)
    "policyGenerationDetails": ...,
}

parent.start_policy_generation(**kwargs)
  1. See StartPolicyGenerationRequestRequestTypeDef

start_resource_scan#

Immediately starts a scan of the policies applied to the specified resource.

Type annotations and code completion for session.create_client("accessanalyzer").start_resource_scan method. boto3 documentation

# start_resource_scan method definition

await def start_resource_scan(
    self,
    *,
    analyzerArn: str,
    resourceArn: str,
    resourceOwnerAccount: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# start_resource_scan method usage example with argument unpacking

kwargs: StartResourceScanRequestRequestTypeDef = {  # (1)
    "analyzerArn": ...,
    "resourceArn": ...,
}

parent.start_resource_scan(**kwargs)
  1. See StartResourceScanRequestRequestTypeDef

tag_resource#

Adds a tag to the specified resource.

Type annotations and code completion for session.create_client("accessanalyzer").tag_resource method. boto3 documentation

# tag_resource method definition

await def tag_resource(
    self,
    *,
    resourceArn: str,
    tags: Mapping[str, str],
) -> Dict[str, Any]:
    ...
# tag_resource method usage example with argument unpacking

kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

untag_resource#

Removes a tag from the specified resource.

Type annotations and code completion for session.create_client("accessanalyzer").untag_resource method. boto3 documentation

# untag_resource method definition

await def untag_resource(
    self,
    *,
    resourceArn: str,
    tagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
# untag_resource method usage example with argument unpacking

kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef

update_archive_rule#

Updates the criteria and values for the specified archive rule.

Type annotations and code completion for session.create_client("accessanalyzer").update_archive_rule method. boto3 documentation

# update_archive_rule method definition

await def update_archive_rule(
    self,
    *,
    analyzerName: str,
    ruleName: str,
    filter: Mapping[str, CriterionTypeDef],  # (1)
    clientToken: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See CriterionTypeDef
  2. See EmptyResponseMetadataTypeDef
# update_archive_rule method usage example with argument unpacking

kwargs: UpdateArchiveRuleRequestRequestTypeDef = {  # (1)
    "analyzerName": ...,
    "ruleName": ...,
    "filter": ...,
}

parent.update_archive_rule(**kwargs)
  1. See UpdateArchiveRuleRequestRequestTypeDef

update_findings#

Updates the status for the specified findings.

Type annotations and code completion for session.create_client("accessanalyzer").update_findings method. boto3 documentation

# update_findings method definition

await def update_findings(
    self,
    *,
    analyzerArn: str,
    status: FindingStatusUpdateType,  # (1)
    ids: Sequence[str] = ...,
    resourceArn: str = ...,
    clientToken: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See FindingStatusUpdateType
  2. See EmptyResponseMetadataTypeDef
# update_findings method usage example with argument unpacking

kwargs: UpdateFindingsRequestRequestTypeDef = {  # (1)
    "analyzerArn": ...,
    "status": ...,
}

parent.update_findings(**kwargs)
  1. See UpdateFindingsRequestRequestTypeDef

validate_policy#

Requests the validation of a policy and returns a list of findings.

Type annotations and code completion for session.create_client("accessanalyzer").validate_policy method. boto3 documentation

# validate_policy method definition

await def validate_policy(
    self,
    *,
    policyDocument: str,
    policyType: PolicyTypeType,  # (1)
    locale: LocaleType = ...,  # (2)
    maxResults: int = ...,
    nextToken: str = ...,
    validatePolicyResourceType: ValidatePolicyResourceTypeType = ...,  # (3)
) -> ValidatePolicyResponseTypeDef:  # (4)
    ...
  1. See PolicyTypeType
  2. See LocaleType
  3. See ValidatePolicyResourceTypeType
  4. See ValidatePolicyResponseTypeDef
# validate_policy method usage example with argument unpacking

kwargs: ValidatePolicyRequestRequestTypeDef = {  # (1)
    "policyDocument": ...,
    "policyType": ...,
}

parent.validate_policy(**kwargs)
  1. See ValidatePolicyRequestRequestTypeDef

__aenter__#

Type annotations and code completion for session.create_client("accessanalyzer").__aenter__ method. boto3 documentation

# __aenter__ method definition

await def __aenter__(
    self,
) -> AccessAnalyzerClient:
    ...

__aexit__#

Type annotations and code completion for session.create_client("accessanalyzer").__aexit__ method. boto3 documentation

# __aexit__ method definition

await def __aexit__(
    self,
    exc_type: Any,
    exc_val: Any,
    exc_tb: Any,
) -> Any:
    ...

get_paginator#

Type annotations and code completion for session.create_client("accessanalyzer").get_paginator method with overloads.