Skip to content

DetectiveClient#

Index > Detective > DetectiveClient

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

DetectiveClient#

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

# DetectiveClient usage example

from boto3.session import Session
from types_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 types_boto3_detective.client import Exceptions

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

Methods#

can_paginate#

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:
    ...

generate_presigned_url#

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:
    ...

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: AcceptInvitationRequestTypeDef = {  # (1)
    "GraphArn": ...,
}

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

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: BatchGetGraphMemberDatasourcesRequestTypeDef = {  # (1)
    "GraphArn": ...,
    "AccountIds": ...,
}

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

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: BatchGetMembershipDatasourcesRequestTypeDef = {  # (1)
    "GraphArns": ...,
}

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

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: CreateGraphRequestTypeDef = {  # (1)
    "Tags": ...,
}

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

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: CreateMembersRequestTypeDef = {  # (1)
    "GraphArn": ...,
    "Accounts": ...,
}

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

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: DeleteGraphRequestTypeDef = {  # (1)
    "GraphArn": ...,
}

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

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: DeleteMembersRequestTypeDef = {  # (1)
    "GraphArn": ...,
    "AccountIds": ...,
}

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

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: DescribeOrganizationConfigurationRequestTypeDef = {  # (1)
    "GraphArn": ...,
}

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

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: DisassociateMembershipRequestTypeDef = {  # (1)
    "GraphArn": ...,
}

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

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: EnableOrganizationAdminAccountRequestTypeDef = {  # (1)
    "AccountId": ...,
}

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

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: GetInvestigationRequestTypeDef = {  # (1)
    "GraphArn": ...,
    "InvestigationId": ...,
}

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

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: GetMembersRequestTypeDef = {  # (1)
    "GraphArn": ...,
    "AccountIds": ...,
}

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

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: ListDatasourcePackagesRequestTypeDef = {  # (1)
    "GraphArn": ...,
}

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

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: ListGraphsRequestTypeDef = {  # (1)
    "NextToken": ...,
}

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

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: ListIndicatorsRequestTypeDef = {  # (1)
    "GraphArn": ...,
    "InvestigationId": ...,
}

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

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: ListInvestigationsRequestTypeDef = {  # (1)
    "GraphArn": ...,
}

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

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: ListInvitationsRequestTypeDef = {  # (1)
    "NextToken": ...,
}

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

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: ListMembersRequestTypeDef = {  # (1)
    "GraphArn": ...,
}

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

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: ListOrganizationAdminAccountsRequestTypeDef = {  # (1)
    "NextToken": ...,
}

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

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: ListTagsForResourceRequestTypeDef = {  # (1)
    "ResourceArn": ...,
}

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

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: RejectInvitationRequestTypeDef = {  # (1)
    "GraphArn": ...,
}

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

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: TimestampTypeDef,
    ScopeEndTime: TimestampTypeDef,
) -> StartInvestigationResponseTypeDef:  # (1)
    ...
  1. See StartInvestigationResponseTypeDef
# start_investigation method usage example with argument unpacking

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

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

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: StartMonitoringMemberRequestTypeDef = {  # (1)
    "GraphArn": ...,
    "AccountId": ...,
}

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

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: TagResourceRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "Tags": ...,
}

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

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: UntagResourceRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "TagKeys": ...,
}

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

update_datasource_packages#

Starts a data source package for the Detective 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: UpdateDatasourcePackagesRequestTypeDef = {  # (1)
    "GraphArn": ...,
    "DatasourcePackages": ...,
}

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

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: UpdateInvestigationStateRequestTypeDef = {  # (1)
    "GraphArn": ...,
    "InvestigationId": ...,
    "State": ...,
}

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

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: UpdateOrganizationConfigurationRequestTypeDef = {  # (1)
    "GraphArn": ...,
}

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