diff --git a/flow/record/adapter/elastic.py b/flow/record/adapter/elastic.py index 794f26a..3b143c6 100644 --- a/flow/record/adapter/elastic.py +++ b/flow/record/adapter/elastic.py @@ -2,7 +2,7 @@ import logging import queue import threading -from typing import Iterator, Union +from typing import Iterator, Optional, Union import elasticsearch import elasticsearch.helpers @@ -40,7 +40,7 @@ def __init__( verify_certs: Union[str, bool] = True, http_compress: Union[str, bool] = True, hash_record: Union[str, bool] = False, - api_key: Union[str, bool] = False, + api_key: Optional[str] = None, **kwargs, ) -> None: self.index = index @@ -152,7 +152,7 @@ def __init__( verify_certs: Union[str, bool] = True, http_compress: Union[str, bool] = True, selector: Union[None, Selector, CompiledSelector] = None, - api_key: Union[str] = None, + api_key: Optional[str] = None, **kwargs, ) -> None: self.index = index