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

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.

Usage example
client = boto3.client("inspector2")

try:
    do_something(client)
except (
    client.AccessDeniedException,
    client.BadRequestException,
    client.ClientError,
    client.ConflictException,
    client.InternalServerException,
    client.ResourceNotFoundException,
    client.ServiceQuotaExceededException,
    client.ThrottlingException,
    client.ValidationException,
) as e:
    print(e)
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

Method definition
def associate_member(
    self,
    *,
    accountId: str,
) -> AssociateMemberResponseTypeDef:  # (1)
    ...
  1. See AssociateMemberResponseTypeDef
Usage example with kwargs
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

Method definition
def batch_get_account_status(
    self,
    *,
    accountIds: Sequence[str] = ...,
) -> BatchGetAccountStatusResponseTypeDef:  # (1)
    ...
  1. See BatchGetAccountStatusResponseTypeDef
Usage example with kwargs
kwargs: BatchGetAccountStatusRequestRequestTypeDef = {  # (1)
    "accountIds": ...,
}

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

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

Method definition
def batch_get_free_trial_info(
    self,
    *,
    accountIds: Sequence[str],
) -> BatchGetFreeTrialInfoResponseTypeDef:  # (1)
    ...
  1. See BatchGetFreeTrialInfoResponseTypeDef
Usage example with kwargs
kwargs: BatchGetFreeTrialInfoRequestRequestTypeDef = {  # (1)
    "accountIds": ...,
}

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

can_paginate

Check if an operation can be paginated.

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

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

Method definition
def cancel_findings_report(
    self,
    *,
    reportId: str,
) -> CancelFindingsReportResponseTypeDef:  # (1)
    ...
  1. See CancelFindingsReportResponseTypeDef
Usage example with kwargs
kwargs: CancelFindingsReportRequestRequestTypeDef = {  # (1)
    "reportId": ...,
}

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

close

Closes underlying endpoint connections.

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

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

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
Usage example with kwargs
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

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
Usage example with kwargs
kwargs: CreateFindingsReportRequestRequestTypeDef = {  # (1)
    "reportFormat": ...,
    "s3Destination": ...,
}

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

delete_filter

Deletes a filter resource.

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

Method definition
def delete_filter(
    self,
    *,
    arn: str,
) -> DeleteFilterResponseTypeDef:  # (1)
    ...
  1. See DeleteFilterResponseTypeDef
Usage example with kwargs
kwargs: DeleteFilterRequestRequestTypeDef = {  # (1)
    "arn": ...,
}

parent.delete_filter(**kwargs)
  1. See DeleteFilterRequestRequestTypeDef

describe_organization_configuration

Describe Amazon Inspector configuration settings for an Amazon Web Services organization.

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

Method definition
def describe_organization_configuration(
    self,
) -> DescribeOrganizationConfigurationResponseTypeDef:  # (1)
    ...
  1. See DescribeOrganizationConfigurationResponseTypeDef

disable

Disables Amazon Inspector scans for one or more Amazon Web Services accounts.

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

Method definition
def disable(
    self,
    *,
    accountIds: Sequence[str] = ...,
    resourceTypes: Sequence[ResourceScanTypeType] = ...,  # (1)
) -> DisableResponseTypeDef:  # (2)
    ...
  1. See ResourceScanTypeType
  2. See DisableResponseTypeDef
Usage example with kwargs
kwargs: DisableRequestRequestTypeDef = {  # (1)
    "accountIds": ...,
}

parent.disable(**kwargs)
  1. See DisableRequestRequestTypeDef

disable_delegated_admin_account

Disables the Amazon Inspector delegated administrator for your organization.

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

Method definition
def disable_delegated_admin_account(
    self,
    *,
    delegatedAdminAccountId: str,
) -> DisableDelegatedAdminAccountResponseTypeDef:  # (1)
    ...
  1. See DisableDelegatedAdminAccountResponseTypeDef
Usage example with kwargs
kwargs: DisableDelegatedAdminAccountRequestRequestTypeDef = {  # (1)
    "delegatedAdminAccountId": ...,
}

parent.disable_delegated_admin_account(**kwargs)
  1. See DisableDelegatedAdminAccountRequestRequestTypeDef

disassociate_member

Disassociates a member account from an Amazon Inspector delegated administrator.

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

Method definition
def disassociate_member(
    self,
    *,
    accountId: str,
) -> DisassociateMemberResponseTypeDef:  # (1)
    ...
  1. See DisassociateMemberResponseTypeDef
Usage example with kwargs
kwargs: DisassociateMemberRequestRequestTypeDef = {  # (1)
    "accountId": ...,
}

parent.disassociate_member(**kwargs)
  1. See DisassociateMemberRequestRequestTypeDef

enable

Enables Amazon Inspector scans for one or more Amazon Web Services accounts.

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

Method definition
def enable(
    self,
    *,
    resourceTypes: Sequence[ResourceScanTypeType],  # (1)
    accountIds: Sequence[str] = ...,
    clientToken: str = ...,
) -> EnableResponseTypeDef:  # (2)
    ...
  1. See ResourceScanTypeType
  2. See EnableResponseTypeDef
Usage example with kwargs
kwargs: EnableRequestRequestTypeDef = {  # (1)
    "resourceTypes": ...,
}

parent.enable(**kwargs)
  1. See EnableRequestRequestTypeDef

enable_delegated_admin_account

Enables the Amazon Inspector delegated administrator for your Organizations organization.

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

Method definition
def enable_delegated_admin_account(
    self,
    *,
    delegatedAdminAccountId: str,
    clientToken: str = ...,
) -> EnableDelegatedAdminAccountResponseTypeDef:  # (1)
    ...
  1. See EnableDelegatedAdminAccountResponseTypeDef
Usage example with kwargs
kwargs: EnableDelegatedAdminAccountRequestRequestTypeDef = {  # (1)
    "delegatedAdminAccountId": ...,
}

parent.enable_delegated_admin_account(**kwargs)
  1. See EnableDelegatedAdminAccountRequestRequestTypeDef

generate_presigned_url

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

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

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

get_configuration

Retrieves setting configurations for Inspector scans.

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

Method definition
def get_configuration(
    self,
) -> GetConfigurationResponseTypeDef:  # (1)
    ...
  1. See GetConfigurationResponseTypeDef

get_delegated_admin_account

Retrieves information about the Amazon Inspector delegated administrator for your organization.

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

Method definition
def get_delegated_admin_account(
    self,
) -> GetDelegatedAdminAccountResponseTypeDef:  # (1)
    ...
  1. See GetDelegatedAdminAccountResponseTypeDef

get_findings_report_status

Gets the status of a findings report.

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

Method definition
def get_findings_report_status(
    self,
    *,
    reportId: str = ...,
) -> GetFindingsReportStatusResponseTypeDef:  # (1)
    ...
  1. See GetFindingsReportStatusResponseTypeDef
Usage example with kwargs
kwargs: GetFindingsReportStatusRequestRequestTypeDef = {  # (1)
    "reportId": ...,
}

parent.get_findings_report_status(**kwargs)
  1. See GetFindingsReportStatusRequestRequestTypeDef

get_member

Gets member information for your organization.

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

Method definition
def get_member(
    self,
    *,
    accountId: str,
) -> GetMemberResponseTypeDef:  # (1)
    ...
  1. See GetMemberResponseTypeDef
Usage example with kwargs
kwargs: GetMemberRequestRequestTypeDef = {  # (1)
    "accountId": ...,
}

parent.get_member(**kwargs)
  1. See GetMemberRequestRequestTypeDef

list_account_permissions

Lists the permissions an account has to configure Amazon Inspector.

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

Method definition
def list_account_permissions(
    self,
    *,
    maxResults: int = ...,
    nextToken: str = ...,
    service: ServiceType = ...,  # (1)
) -> ListAccountPermissionsResponseTypeDef:  # (2)
    ...
  1. See ServiceType
  2. See ListAccountPermissionsResponseTypeDef
Usage example with kwargs
kwargs: ListAccountPermissionsRequestRequestTypeDef = {  # (1)
    "maxResults": ...,
}

parent.list_account_permissions(**kwargs)
  1. See ListAccountPermissionsRequestRequestTypeDef

list_coverage

Lists coverage details for you environment.

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

Method definition
def list_coverage(
    self,
    *,
    filterCriteria: CoverageFilterCriteriaTypeDef = ...,  # (1)
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListCoverageResponseTypeDef:  # (2)
    ...
  1. See CoverageFilterCriteriaTypeDef
  2. See ListCoverageResponseTypeDef
Usage example with kwargs
kwargs: ListCoverageRequestRequestTypeDef = {  # (1)
    "filterCriteria": ...,
}

parent.list_coverage(**kwargs)
  1. See ListCoverageRequestRequestTypeDef

list_coverage_statistics

Lists Amazon Inspector coverage statistics for your environment.

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

Method definition
def list_coverage_statistics(
    self,
    *,
    filterCriteria: CoverageFilterCriteriaTypeDef = ...,  # (1)
    groupBy: GroupKeyType = ...,  # (2)
    nextToken: str = ...,
) -> ListCoverageStatisticsResponseTypeDef:  # (3)
    ...
  1. See CoverageFilterCriteriaTypeDef
  2. See GroupKeyType
  3. See ListCoverageStatisticsResponseTypeDef
Usage example with kwargs
kwargs: ListCoverageStatisticsRequestRequestTypeDef = {  # (1)
    "filterCriteria": ...,
}

parent.list_coverage_statistics(**kwargs)
  1. See ListCoverageStatisticsRequestRequestTypeDef

list_delegated_admin_accounts

Lists information about the Amazon Inspector delegated administrator of your organization.

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

Method definition
def list_delegated_admin_accounts(
    self,
    *,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListDelegatedAdminAccountsResponseTypeDef:  # (1)
    ...
  1. See ListDelegatedAdminAccountsResponseTypeDef
Usage example with kwargs
kwargs: ListDelegatedAdminAccountsRequestRequestTypeDef = {  # (1)
    "maxResults": ...,
}

parent.list_delegated_admin_accounts(**kwargs)
  1. See ListDelegatedAdminAccountsRequestRequestTypeDef

list_filters

Lists the filters associated with your account.

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

Method definition
def list_filters(
    self,
    *,
    action: FilterActionType = ...,  # (1)
    arns: Sequence[str] = ...,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListFiltersResponseTypeDef:  # (2)
    ...
  1. See FilterActionType
  2. See ListFiltersResponseTypeDef
Usage example with kwargs
kwargs: ListFiltersRequestRequestTypeDef = {  # (1)
    "action": ...,
}

parent.list_filters(**kwargs)
  1. See ListFiltersRequestRequestTypeDef

list_finding_aggregations

Lists aggregated finding data for your environment based on specific criteria.

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

Method definition
def list_finding_aggregations(
    self,
    *,
    aggregationType: AggregationTypeType,  # (1)
    accountIds: Sequence[StringFilterTypeDef] = ...,  # (2)
    aggregationRequest: AggregationRequestTypeDef = ...,  # (3)
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListFindingAggregationsResponseTypeDef:  # (4)
    ...
  1. See AggregationTypeType
  2. See StringFilterTypeDef
  3. See AggregationRequestTypeDef
  4. See ListFindingAggregationsResponseTypeDef
Usage example with kwargs
kwargs: ListFindingAggregationsRequestRequestTypeDef = {  # (1)
    "aggregationType": ...,
}

parent.list_finding_aggregations(**kwargs)
  1. See ListFindingAggregationsRequestRequestTypeDef

list_findings

Lists findings for your environment.

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

Method definition
def list_findings(
    self,
    *,
    filterCriteria: FilterCriteriaTypeDef = ...,  # (1)
    maxResults: int = ...,
    nextToken: str = ...,
    sortCriteria: SortCriteriaTypeDef = ...,  # (2)
) -> ListFindingsResponseTypeDef:  # (3)
    ...
  1. See FilterCriteriaTypeDef
  2. See SortCriteriaTypeDef
  3. See ListFindingsResponseTypeDef
Usage example with kwargs
kwargs: ListFindingsRequestRequestTypeDef = {  # (1)
    "filterCriteria": ...,
}

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

list_members

List members associated with the Amazon Inspector delegated administrator for your organization.

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

Method definition
def list_members(
    self,
    *,
    maxResults: int = ...,
    nextToken: str = ...,
    onlyAssociated: bool = ...,
) -> ListMembersResponseTypeDef:  # (1)
    ...
  1. See ListMembersResponseTypeDef
Usage example with kwargs
kwargs: ListMembersRequestRequestTypeDef = {  # (1)
    "maxResults": ...,
}

parent.list_members(**kwargs)
  1. See ListMembersRequestRequestTypeDef

list_tags_for_resource

Lists all tags attached to a given resource.

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

Method definition
def list_tags_for_resource(
    self,
    *,
    resourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
Usage example with kwargs
kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

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

list_usage_totals

Lists the Amazon Inspector usage totals over the last 30 days.

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

Method definition
def list_usage_totals(
    self,
    *,
    accountIds: Sequence[str] = ...,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListUsageTotalsResponseTypeDef:  # (1)
    ...
  1. See ListUsageTotalsResponseTypeDef
Usage example with kwargs
kwargs: ListUsageTotalsRequestRequestTypeDef = {  # (1)
    "accountIds": ...,
}

parent.list_usage_totals(**kwargs)
  1. See ListUsageTotalsRequestRequestTypeDef

tag_resource

Adds tags to a resource.

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

Method definition
def tag_resource(
    self,
    *,
    resourceArn: str,
    tags: Mapping[str, str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tags": ...,
}

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

untag_resource

Removes tags from a resource.

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

Method definition
def untag_resource(
    self,
    *,
    resourceArn: str,
    tagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tagKeys": ...,
}

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

update_configuration

Updates setting configurations for your Amazon Inspector account.

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

Method definition
def update_configuration(
    self,
    *,
    ecrConfiguration: EcrConfigurationTypeDef,  # (1)
) -> Dict[str, Any]:
    ...
  1. See EcrConfigurationTypeDef
Usage example with kwargs
kwargs: UpdateConfigurationRequestRequestTypeDef = {  # (1)
    "ecrConfiguration": ...,
}

parent.update_configuration(**kwargs)
  1. See UpdateConfigurationRequestRequestTypeDef

update_filter

Specifies the action that is to be applied to the findings that match the filter.

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

Method definition
def update_filter(
    self,
    *,
    filterArn: str,
    action: FilterActionType = ...,  # (1)
    description: str = ...,
    filterCriteria: FilterCriteriaTypeDef = ...,  # (2)
    name: str = ...,
    reason: str = ...,
) -> UpdateFilterResponseTypeDef:  # (3)
    ...
  1. See FilterActionType
  2. See FilterCriteriaTypeDef
  3. See UpdateFilterResponseTypeDef
Usage example with kwargs
kwargs: UpdateFilterRequestRequestTypeDef = {  # (1)
    "filterArn": ...,
}

parent.update_filter(**kwargs)
  1. See UpdateFilterRequestRequestTypeDef

update_organization_configuration

Updates the configurations for your Amazon Inspector organization.

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

Method definition
def update_organization_configuration(
    self,
    *,
    autoEnable: AutoEnableTypeDef,  # (1)
) -> UpdateOrganizationConfigurationResponseTypeDef:  # (2)
    ...
  1. See AutoEnableTypeDef
  2. See UpdateOrganizationConfigurationResponseTypeDef
Usage example with kwargs
kwargs: UpdateOrganizationConfigurationRequestRequestTypeDef = {  # (1)
    "autoEnable": ...,
}

parent.update_organization_configuration(**kwargs)
  1. See UpdateOrganizationConfigurationRequestRequestTypeDef

get_paginator

Type annotations and code completion for boto3.client("inspector2").get_paginator method with overloads.