deleteMembers method

Future<DeleteMembersResponse> deleteMembers({
  1. required List<String> accountIds,
  2. required String graphArn,
})

Removes the specified member accounts from the behavior graph. The removed accounts no longer contribute data to the behavior graph. This operation can only be called by the administrator account for the behavior graph.

For invited accounts, the removed accounts are deleted from the list of accounts in the behavior graph. To restore the account, the administrator account must send another invitation.

For organization accounts in the organization behavior graph, the Detective administrator account can always enable the organization account again. Organization accounts that are not enabled as member accounts are not included in the ListMembers results for the organization behavior graph.

An administrator account cannot use DeleteMembers to remove their own account from the behavior graph. To disable a behavior graph, the administrator account uses the DeleteGraph API method.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter accountIds : The list of Amazon Web Services account identifiers for the member accounts to remove from the behavior graph. You can remove up to 50 member accounts at a time.

Parameter graphArn : The ARN of the behavior graph to remove members from.

Implementation

Future<DeleteMembersResponse> deleteMembers({
  required List<String> accountIds,
  required String graphArn,
}) async {
  final $payload = <String, dynamic>{
    'AccountIds': accountIds,
    'GraphArn': graphArn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/graph/members/removal',
    exceptionFnMap: _exceptionFns,
  );
  return DeleteMembersResponse.fromJson(response);
}