Skip to content

Inspector2Client#

Index > Inspector2 > Inspector2Client

Auto-generated documentation for Inspector2 type annotations stubs module mypy-boto3-inspector2.

Inspector2Client#

Type annotations and code completion for boto3.client("inspector2"). boto3 documentation

# Inspector2Client usage example

from boto3.session import Session
from mypy_boto3_inspector2.client import Inspector2Client

def get_inspector2_client() -> Inspector2Client:
    return Session().client("inspector2")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("inspector2").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("inspector2")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.BadRequestException,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.InternalServerException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceQuotaExceededException,
    client.exceptions.ThrottlingException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_inspector2.client import Exceptions

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

Methods#

associate_member#

Associates an Amazon Web Services account with an Amazon Inspector delegated administrator.

Type annotations and code completion for boto3.client("inspector2").associate_member method. boto3 documentation

# associate_member method definition

def associate_member(
    self,
    *,
    accountId: str,
) -> AssociateMemberResponseTypeDef:  # (1)
    ...
  1. See AssociateMemberResponseTypeDef
# associate_member method usage example with argument unpacking

kwargs: AssociateMemberRequestRequestTypeDef = {  # (1)
    "accountId": ...,
}

parent.associate_member(**kwargs)
  1. See AssociateMemberRequestRequestTypeDef

batch_get_account_status#

Retrieves the Amazon Inspector status of multiple Amazon Web Services accounts within your environment.

Type annotations and code completion for boto3.client("inspector2").batch_get_account_status method. boto3 documentation

# batch_get_account_status method definition

def batch_get_account_status(
    self,
    *,
    accountIds: Sequence[str] = ...,
) -> BatchGetAccountStatusResponseTypeDef:  # (1)
    ...
  1. See BatchGetAccountStatusResponseTypeDef
# batch_get_account_status method usage example with argument unpacking

kwargs: BatchGetAccountStatusRequestRequestTypeDef = {  # (1)
    "accountIds": ...,
}

parent.batch_get_account_status(**kwargs)
  1. See BatchGetAccountStatusRequestRequestTypeDef

batch_get_code_snippet#

Retrieves code snippets from findings that Amazon Inspector detected code vulnerabilities in.

Type annotations and code completion for boto3.client("inspector2").batch_get_code_snippet method. boto3 documentation

# batch_get_code_snippet method definition

def batch_get_code_snippet(
    self,
    *,
    findingArns: Sequence[str],
) -> BatchGetCodeSnippetResponseTypeDef:  # (1)
    ...
  1. See BatchGetCodeSnippetResponseTypeDef
# batch_get_code_snippet method usage example with argument unpacking

kwargs: BatchGetCodeSnippetRequestRequestTypeDef = {  # (1)
    "findingArns": ...,
}

parent.batch_get_code_snippet(**kwargs)
  1. See BatchGetCodeSnippetRequestRequestTypeDef

batch_get_finding_details#

Gets vulnerability details for findings.

Type annotations and code completion for boto3.client("inspector2").batch_get_finding_details method. boto3 documentation

# batch_get_finding_details method definition

def batch_get_finding_details(
    self,
    *,
    findingArns: Sequence[str],
) -> BatchGetFindingDetailsResponseTypeDef:  # (1)
    ...
  1. See BatchGetFindingDetailsResponseTypeDef
# batch_get_finding_details method usage example with argument unpacking

kwargs: BatchGetFindingDetailsRequestRequestTypeDef = {  # (1)
    "findingArns": ...,
}

parent.batch_get_finding_details(**kwargs)
  1. See BatchGetFindingDetailsRequestRequestTypeDef

batch_get_free_trial_info#

Gets free trial status for multiple Amazon Web Services accounts.

Type annotations and code completion for boto3.client("inspector2").batch_get_free_trial_info method. boto3 documentation

# batch_get_free_trial_info method definition

def batch_get_free_trial_info(
    self,
    *,
    accountIds: Sequence[str],
) -> BatchGetFreeTrialInfoResponseTypeDef:  # (1)
    ...
  1. See BatchGetFreeTrialInfoResponseTypeDef
# batch_get_free_trial_info method usage example with argument unpacking

kwargs: BatchGetFreeTrialInfoRequestRequestTypeDef = {  # (1)
    "accountIds": ...,
}

parent.batch_get_free_trial_info(**kwargs)
  1. See BatchGetFreeTrialInfoRequestRequestTypeDef

batch_get_member_ec2_deep_inspection_status#

Retrieves Amazon Inspector deep inspection activation status of multiple member accounts within your organization.

Type annotations and code completion for boto3.client("inspector2").batch_get_member_ec2_deep_inspection_status method. boto3 documentation

# batch_get_member_ec2_deep_inspection_status method definition

def batch_get_member_ec2_deep_inspection_status(
    self,
    *,
    accountIds: Sequence[str] = ...,
) -> BatchGetMemberEc2DeepInspectionStatusResponseTypeDef:  # (1)
    ...
  1. See BatchGetMemberEc2DeepInspectionStatusResponseTypeDef
# batch_get_member_ec2_deep_inspection_status method usage example with argument unpacking

kwargs: BatchGetMemberEc2DeepInspectionStatusRequestRequestTypeDef = {  # (1)
    "accountIds": ...,
}

parent.batch_get_member_ec2_deep_inspection_status(**kwargs)
  1. See BatchGetMemberEc2DeepInspectionStatusRequestRequestTypeDef

batch_update_member_ec2_deep_inspection_status#

Activates or deactivates Amazon Inspector deep inspection for the provided member accounts in your organization.

Type annotations and code completion for boto3.client("inspector2").batch_update_member_ec2_deep_inspection_status method. boto3 documentation

# batch_update_member_ec2_deep_inspection_status method definition

def batch_update_member_ec2_deep_inspection_status(
    self,
    *,
    accountIds: Sequence[MemberAccountEc2DeepInspectionStatusTypeDef],  # (1)
) -> BatchUpdateMemberEc2DeepInspectionStatusResponseTypeDef:  # (2)
    ...
  1. See MemberAccountEc2DeepInspectionStatusTypeDef
  2. See BatchUpdateMemberEc2DeepInspectionStatusResponseTypeDef
# batch_update_member_ec2_deep_inspection_status method usage example with argument unpacking

kwargs: BatchUpdateMemberEc2DeepInspectionStatusRequestRequestTypeDef = {  # (1)
    "accountIds": ...,
}

parent.batch_update_member_ec2_deep_inspection_status(**kwargs)
  1. See BatchUpdateMemberEc2DeepInspectionStatusRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("inspector2").can_paginate method. boto3 documentation

# can_paginate method definition

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

cancel_findings_report#

Cancels the given findings report.

Type annotations and code completion for boto3.client("inspector2").cancel_findings_report method. boto3 documentation

# cancel_findings_report method definition

def cancel_findings_report(
    self,
    *,
    reportId: str,
) -> CancelFindingsReportResponseTypeDef:  # (1)
    ...
  1. See CancelFindingsReportResponseTypeDef
# cancel_findings_report method usage example with argument unpacking

kwargs: CancelFindingsReportRequestRequestTypeDef = {  # (1)
    "reportId": ...,
}

parent.cancel_findings_report(**kwargs)
  1. See CancelFindingsReportRequestRequestTypeDef

cancel_sbom_export#

Cancels a software bill of materials (SBOM) report.

Type annotations and code completion for boto3.client("inspector2").cancel_sbom_export method. boto3 documentation

# cancel_sbom_export method definition

def cancel_sbom_export(
    self,
    *,
    reportId: str,
) -> CancelSbomExportResponseTypeDef:  # (1)
    ...
  1. See CancelSbomExportResponseTypeDef
# cancel_sbom_export method usage example with argument unpacking

kwargs: CancelSbomExportRequestRequestTypeDef = {  # (1)
    "reportId": ...,
}

parent.cancel_sbom_export(**kwargs)
  1. See CancelSbomExportRequestRequestTypeDef

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("inspector2").close method. boto3 documentation

# close method definition

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

create_filter#

Creates a filter resource using specified filter criteria.

Type annotations and code completion for boto3.client("inspector2").create_filter method. boto3 documentation

# create_filter method definition

def create_filter(
    self,
    *,
    action: FilterActionType,  # (1)
    filterCriteria: FilterCriteriaTypeDef,  # (2)
    name: str,
    description: str = ...,
    reason: str = ...,
    tags: Mapping[str, str] = ...,
) -> CreateFilterResponseTypeDef:  # (3)
    ...
  1. See FilterActionType
  2. See FilterCriteriaTypeDef
  3. See CreateFilterResponseTypeDef
# create_filter method usage example with argument unpacking

kwargs: CreateFilterRequestRequestTypeDef = {  # (1)
    "action": ...,
    "filterCriteria": ...,
    "name": ...,
}

parent.create_filter(**kwargs)
  1. See CreateFilterRequestRequestTypeDef

create_findings_report#

Creates a finding report.

Type annotations and code completion for boto3.client("inspector2").create_findings_report method. boto3 documentation

# create_findings_report method definition

def create_findings_report(
    self,
    *,
    reportFormat: ReportFormatType,  # (1)
    s3Destination: DestinationTypeDef,  # (2)
    filterCriteria: FilterCriteriaTypeDef = ...,  # (3)
) -> CreateFindingsReportResponseTypeDef:  # (4)
    ...
  1. See ReportFormatType
  2. See DestinationTypeDef
  3. See FilterCriteriaTypeDef
  4. See CreateFindingsReportResponseTypeDef
# create_findings_report method usage example with argument unpacking

kwargs: CreateFindingsReportRequestRequestTypeDef = {  # (1)
    "reportFormat": ...,
    "s3Destination": ...,
}

parent.create_findings_report(**kwargs)
  1. See CreateFindingsReportRequestRequestTypeDef

create_sbom_export#

Creates a software bill of materials (SBOM) report.

Type annotations and code completion for boto3.client("inspector2").create_sbom_export method. boto3 documentation

# create_sbom_export method definition

def create_sbom_export(
    self,
    *,
    reportFormat: SbomReportFormatType,  # (1)
    s3Destination: DestinationTypeDef,  # (2)
    resourceFilterCriteria: ResourceFilterCriteriaTypeDef = ...,  # (3)
) -> CreateSbomExportResponseTypeDef:  # (4)
    ...
  1. See SbomReportFormatType
  2. See DestinationTypeDef
  3. See ResourceFilterCriteriaTypeDef
  4. See CreateSbomExportResponseTypeDef
# create_sbom_export method usage example with argument unpacking

kwargs: CreateSbomExportRequestRequestTypeDef = {  # (1)
    "reportFormat": ...,
    "s3Destination": ...,
}

parent.create_sbom_export(**kwargs)
  1. See CreateSbomExportRequestRequestTypeDef

delete_filter#

Deletes a filter resource.

Type annotations and code completion for boto3.client("inspector2").delete_filter method.