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.