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.