Skip to content

DetectiveClient#

Index > Detective > DetectiveClient

Auto-generated documentation for Detective type annotations stubs module mypy-boto3-detective.

DetectiveClient#

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

# DetectiveClient usage example

from boto3.session import Session
from mypy_boto3_detective.client import DetectiveClient

def get_detective_client() -> DetectiveClient:
    return Session().client("detective")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("detective")

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

from mypy_boto3_detective.client import Exceptions

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

Methods#

accept_invitation#

Accepts an invitation for the member account to contribute data to a behavior graph.

Type annotations and code completion for boto3.client("detective").accept_invitation method. boto3 documentation

# accept_invitation method definition

def accept_invitation(
    self,
    *,
    GraphArn: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# accept_invitation method usage example with argument unpacking

kwargs: AcceptInvitationRequestRequestTypeDef = {  # (1)
    "GraphArn": ...,
}

parent.accept_invitation(**kwargs)
  1. See AcceptInvitationRequestRequestTypeDef

batch_get_graph_member_datasources#

Gets data source package information for the behavior graph.

Type annotations and code completion for boto3.client("detective").batch_get_graph_member_datasources method. boto3 documentation

# batch_get_graph_member_datasources method definition

def batch_get_graph_member_datasources(
    self,
    *,
    GraphArn: str,
    AccountIds: Sequence[str],
) -> BatchGetGraphMemberDatasourcesResponseTypeDef:  # (1)
    ...
  1. See BatchGetGraphMemberDatasourcesResponseTypeDef
# batch_get_graph_member_datasources method usage example with argument unpacking

kwargs: BatchGetGraphMemberDatasourcesRequestRequestTypeDef = {  # (1)
    "GraphArn": ...,
    "AccountIds": ...,
}

parent.batch_get_graph_member_datasources(**kwargs)
  1. See BatchGetGraphMemberDatasourcesRequestRequestTypeDef

batch_get_membership_datasources#

Gets information on the data source package history for an account.

Type annotations and code completion for boto3.client("detective").batch_get_membership_datasources method. boto3 documentation

# batch_get_membership_datasources method definition

def batch_get_membership_datasources(
    self,
    *,
    GraphArns: Sequence[str],
) -> BatchGetMembershipDatasourcesResponseTypeDef:  # (1)
    ...
  1. See BatchGetMembershipDatasourcesResponseTypeDef
# batch_get_membership_datasources method usage example with argument unpacking

kwargs: BatchGetMembershipDatasourcesRequestRequestTypeDef = {  # (1)
    "GraphArns": ...,
}

parent.batch_get_membership_datasources(**kwargs)
  1. See BatchGetMembershipDatasourcesRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

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

# can_paginate method definition

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

close#

Closes underlying endpoint connections.

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

# close method definition

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

create_graph#

Creates a new behavior graph for the calling account, and sets that account as the administrator account.

Type annotations and code completion for boto3.client("detective").create_graph method. boto3 documentation

# create_graph method definition

def create_graph(
    self,
    *,
    Tags: Mapping[str, str] = ...,
) -> CreateGraphResponseTypeDef:  # (1)
    ...
  1. See CreateGraphResponseTypeDef
# create_graph method usage example with argument unpacking

kwargs: CreateGraphRequestRequestTypeDef = {  # (1)
    "Tags": ...,
}

parent.create_graph(**kwargs)
  1. See CreateGraphRequestRequestTypeDef

create_members#

CreateMembers is used to send invitations to accounts.

Type annotations and code completion for boto3.client("detective").create_members method. boto3 documentation

# create_members method definition

def create_members(
    self,
    *,
    GraphArn: str,
    Accounts: Sequence[AccountTypeDef],  # (1)
    Message: str = ...,
    DisableEmailNotification: bool = ...,
) -> CreateMembersResponseTypeDef:  # (2)
    ...
  1. See AccountTypeDef
  2. See CreateMembersResponseTypeDef
# create_members method usage example with argument unpacking

kwargs: CreateMembersRequestRequestTypeDef = {  # (1)
    "GraphArn": ...,
    "Accounts": ...,
}

parent.create_members(**kwargs)
  1. See CreateMembersRequestRequestTypeDef

delete_graph#

Disables the specified behavior graph and queues it to be deleted.

Type annotations and code completion for boto3.client("detective").delete_graph method. boto3 documentation

# delete_graph method definition

def delete_graph(
    self,
    *,
    GraphArn: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# delete_graph method usage example with argument unpacking

kwargs: DeleteGraphRequestRequestTypeDef = {  # (1)
    "GraphArn": ...,
}

parent.delete_graph(**kwargs)
  1. See DeleteGraphRequestRequestTypeDef

delete_members#

Removes the specified member accounts from the behavior graph.

Type annotations and code completion for boto3.client("detective").delete_members method. boto3 documentation

# delete_members method definition

def delete_members(
    self,
    *,
    GraphArn: str,
    AccountIds: Sequence[str],
) -> DeleteMembersResponseTypeDef:  # (1)
    ...
  1. See DeleteMembersResponseTypeDef
# delete_members method usage example with argument unpacking

kwargs: DeleteMembersRequestRequestTypeDef = {  # (1)
    "GraphArn": ...,
    "AccountIds": ...,
}

parent.delete_members(**kwargs)
  1. See DeleteMembersRequestRequestTypeDef

describe_organization_configuration#

Returns information about the configuration for the organization behavior graph.

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

# describe_organization_configuration method definition

def describe_organization_configuration(
    self,
    *,
    GraphArn: str,
) -> DescribeOrganizationConfigurationResponseTypeDef:  # (1)
    ...
  1. See DescribeOrganizationConfigurationResponseTypeDef
# describe_organization_configuration method usage example with argument unpacking

kwargs: DescribeOrganizationConfigurationRequestRequestTypeDef = {  # (1)
    "GraphArn": ...,
}

parent.describe_organization_configuration(**kwargs)
  1. See DescribeOrganizationConfigurationRequestRequestTypeDef

disable_organization_admin_account#

Removes the Detective administrator account in the current Region.

Type annotations and code completion for boto3.client("detective").disable_organization_admin_account method. boto3 documentation

# disable_organization_admin_account method definition

def disable_organization_admin_account(
    self,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef

disassociate_membership#

Removes the member account from the specified behavior graph.

Type annotations and code completion for boto3.client("detective").disassociate_membership method. boto3 documentation

# disassociate_membership method definition

def disassociate_membership(
    self,
    *,
    GraphArn: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# disassociate_membership method usage example with argument unpacking

kwargs: DisassociateMembershipRequestRequestTypeDef = {  # (1)
    "GraphArn": ...,
}

parent.disassociate_membership(**kwargs)
  1. See DisassociateMembershipRequestRequestTypeDef

enable_organization_admin_account#

Designates the Detective administrator account for the organization in the current Region.

Type annotations and code completion for boto3.client("detective").enable_organization_admin_account method. boto3 documentation

# enable_organization_admin_account method definition

def enable_organization_admin_account(
    self,
    *,
    AccountId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# enable_organization_admin_account method usage example with argument unpacking

kwargs: EnableOrganizationAdminAccountRequestRequestTypeDef = {  # (1)
    "AccountId": ...,
}

parent.enable_organization_admin_account(**kwargs)
  1. See EnableOrganizationAdminAccountRequestRequestTypeDef

generate_presigned_url#

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

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

# generate_presigned_url method definition

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

get_investigation#

Detective investigations lets you investigate IAM users and IAM roles using indicators of compromise.

Type annotations and code completion for boto3.client("detective").get_investigation method. boto3 documentation

# get_investigation method definition

def get_investigation(
    self,
    *,
    GraphArn: str,
    InvestigationId: str,
) -> GetInvestigationResponseTypeDef:  # (1)
    ...
  1. See GetInvestigationResponseTypeDef
# get_investigation method usage example with argument unpacking

kwargs: GetInvestigationRequestRequestTypeDef = {  # (1)
    "GraphArn": ...,
    "InvestigationId": ...,
}

parent.get_investigation(**kwargs)
  1. See GetInvestigationRequestRequestTypeDef

get_members#

Returns the membership details for specified member accounts for a behavior graph.

Type annotations and code completion for boto3.client("detective").get_members method. boto3 documentation

# get_members method definition

def get_members(
    self,
    *,
    GraphArn: str,
    AccountIds: Sequence[str],
) -> GetMembersResponseTypeDef:  # (1)
    ...
  1. See GetMembersResponseTypeDef
# get_members method usage example with argument unpacking

kwargs: GetMembersRequestRequestTypeDef = {  # (1)
    "GraphArn": ...,
    "AccountIds": ...,
}

parent.get_members(**kwargs)
  1. See GetMembersRequestRequestTypeDef

list_datasource_packages#

Lists data source packages in the behavior graph.

Type annotations and code completion for boto3.client("detective").list_datasource_packages method. boto3 documentation

# list_datasource_packages method definition

def list_datasource_packages(
    self,
    *,
    GraphArn: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListDatasourcePackagesResponseTypeDef:  # (1)
    ...
  1. See ListDatasourcePackagesResponseTypeDef
# list_datasource_packages method usage example with argument unpacking

kwargs: ListDatasourcePackagesRequestRequestTypeDef = {  # (1)
    "GraphArn": ...,
}

parent.list_datasource_packages(**kwargs)
  1. See ListDatasourcePackagesRequestRequestTypeDef

list_graphs#

Returns the list of behavior graphs that the calling account is an administrator account of.

Type annotations and code completion for boto3.client("detective").list_graphs method. boto3 documentation

# list_graphs method definition

def list_graphs(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListGraphsResponseTypeDef:  # (1)
    ...
  1. See ListGraphsResponseTypeDef
# list_graphs method usage example with argument unpacking

kwargs: ListGraphsRequestRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.list_graphs(**kwargs)
  1. See ListGraphsRequestRequestTypeDef

list_indicators#

Gets the indicators from an investigation.

Type annotations and code completion for boto3.client("detective").list_indicators method. boto3 documentation

# list_indicators method definition

def list_indicators(
    self,
    *,
    GraphArn: str,
    InvestigationId: str,
    IndicatorType: IndicatorTypeType = ...,  # (1)
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListIndicatorsResponseTypeDef:  # (2)
    ...
  1. See IndicatorTypeType
  2. See ListIndicatorsResponseTypeDef
# list_indicators method usage example with argument unpacking

kwargs: ListIndicatorsRequestRequestTypeDef = {  # (1)
    "GraphArn": ...,
    "InvestigationId": ...,
}

parent.list_indicators(**kwargs)
  1. See ListIndicatorsRequestRequestTypeDef

list_investigations#

Detective investigations lets you investigate IAM users and IAM roles using indicators of compromise.

Type annotations and code completion for boto3.client("detective").list_investigations method. boto3 documentation

# list_investigations method definition

def list_investigations(
    self,
    *,
    GraphArn: str,
    NextToken: str = ...,
    MaxResults: int = ...,
    FilterCriteria: FilterCriteriaTypeDef = ...,  # (1)
    SortCriteria: SortCriteriaTypeDef = ...,  # (2)
) -> ListInvestigationsResponseTypeDef:  # (3)
    ...
  1. See FilterCriteriaTypeDef
  2. See SortCriteriaTypeDef
  3. See ListInvestigationsResponseTypeDef
# list_investigations method usage example with argument unpacking

kwargs: ListInvestigationsRequestRequestTypeDef = {  # (1)
    "GraphArn": ...,
}

parent.list_investigations(**kwargs)
  1. See ListInvestigationsRequestRequestTypeDef

list_invitations#

Retrieves the list of open and accepted behavior graph invitations for the member account.

Type annotations and code completion for boto3.client("detective").list_invitations method. boto3 documentation

# list_invitations method definition

def list_invitations(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListInvitationsResponseTypeDef:  # (1)
    ...
  1. See ListInvitationsResponseTypeDef
# list_invitations method usage example with argument unpacking

kwargs: ListInvitationsRequestRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.list_invitations(**kwargs)
  1. See ListInvitationsRequestRequestTypeDef

list_members#

Retrieves the list of member accounts for a behavior graph.

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

# list_members method definition

def list_members(
    self,
    *,
    GraphArn: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListMembersResponseTypeDef:  # (1)
    ...
  1. See ListMembersResponseTypeDef
# list_members method usage example with argument unpacking

kwargs: ListMembersRequestRequestTypeDef = {  # (1)
    "GraphArn": ...,
}

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

list_organization_admin_accounts#

Returns information about the Detective administrator account for an organization.

Type annotations and code completion for boto3.client("detective").list_organization_admin_accounts method. boto3 documentation

# list_organization_admin_accounts method definition

def list_organization_admin_accounts(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListOrganizationAdminAccountsResponseTypeDef:  # (1)
    ...
  1. See ListOrganizationAdminAccountsResponseTypeDef
# list_organization_admin_accounts method usage example with argument unpacking

kwargs: ListOrganizationAdminAccountsRequestRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.list_organization_admin_accounts(**kwargs)
  1. See ListOrganizationAdminAccountsRequestRequestTypeDef

list_tags_for_resource#

Returns the tag values that are assigned to a behavior graph.

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

# list_tags_for_resource method definition

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

reject_invitation#

Rejects an invitation to contribute the account data to a behavior graph.

Type annotations and code completion for boto3.client("detective").reject_invitation method. boto3 documentation

# reject_invitation method definition

def reject_invitation(
    self,
    *,
    GraphArn: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# reject_invitation method usage example with argument unpacking

kwargs: RejectInvitationRequestRequestTypeDef = {  # (1)
    "GraphArn": ...,
}

parent.reject_invitation(**kwargs)
  1. See RejectInvitationRequestRequestTypeDef

start_investigation#

Detective investigations lets you investigate IAM users and IAM roles using indicators of compromise.

Type annotations and code completion for boto3.client("detective").start_investigation method. boto3 documentation

# start_investigation method definition

def start_investigation(
    self,
    *,
    GraphArn: str,
    EntityArn: str,
    ScopeStartTime: Union[datetime, str],
    ScopeEndTime: Union[datetime, str],
) -> StartInvestigationResponseTypeDef:  # (1)
    ...
  1. See StartInvestigationResponseTypeDef
# start_investigation method usage example with argument unpacking

kwargs: StartInvestigationRequestRequestTypeDef = {  # (1)
    "GraphArn": ...,
    "EntityArn": ...,
    "ScopeStartTime": ...,
    "ScopeEndTime": ...,
}

parent.start_investigation(**kwargs)
  1. See StartInvestigationRequestRequestTypeDef

start_monitoring_member#

Sends a request to enable data ingest for a member account that has a status of ACCEPTED_BUT_DISABLED.

Type annotations and code completion for boto3.client("detective").start_monitoring_member method. boto3 documentation

# start_monitoring_member method definition

def start_monitoring_member(
    self,
    *,
    GraphArn: str,
    AccountId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# start_monitoring_member method usage example with argument unpacking

kwargs: StartMonitoringMemberRequestRequestTypeDef = {  # (1)
    "GraphArn": ...,
    "AccountId": ...,
}

parent.start_monitoring_member(**kwargs)
  1. See StartMonitoringMemberRequestRequestTypeDef

tag_resource#

Applies tag values to a behavior graph.

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

# tag_resource method definition

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 tags from a behavior graph.

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

# untag_resource method definition

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_datasource_packages#

Starts a data source packages for the behavior graph.

Type annotations and code completion for boto3.client("detective").update_datasource_packages method. boto3 documentation

# update_datasource_packages method definition

def update_datasource_packages(
    self,
    *,
    GraphArn: str,
    DatasourcePackages: Sequence[DatasourcePackageType],  # (1)
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See DatasourcePackageType
  2. See EmptyResponseMetadataTypeDef
# update_datasource_packages method usage example with argument unpacking

kwargs: UpdateDatasourcePackagesRequestRequestTypeDef = {  # (1)
    "GraphArn": ...,
    "DatasourcePackages": ...,
}

parent.update_datasource_packages(**kwargs)
  1. See UpdateDatasourcePackagesRequestRequestTypeDef

update_investigation_state#

Updates the state of an investigation.

Type annotations and code completion for boto3.client("detective").update_investigation_state method. boto3 documentation

# update_investigation_state method definition

def update_investigation_state(
    self,
    *,
    GraphArn: str,
    InvestigationId: str,
    State: StateType,  # (1)
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See StateType
  2. See EmptyResponseMetadataTypeDef
# update_investigation_state method usage example with argument unpacking

kwargs: UpdateInvestigationStateRequestRequestTypeDef = {  # (1)
    "GraphArn": ...,
    "InvestigationId": ...,
    "State": ...,
}

parent.update_investigation_state(**kwargs)
  1. See UpdateInvestigationStateRequestRequestTypeDef

update_organization_configuration#

Updates the configuration for the Organizations integration in the current Region.

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

# update_organization_configuration method definition

def update_organization_configuration(
    self,
    *,
    GraphArn: str,
    AutoEnable: bool = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# update_organization_configuration method usage example with argument unpacking

kwargs: UpdateOrganizationConfigurationRequestRequestTypeDef = {  # (1)
    "GraphArn": ...,
}

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