botocore-stubs 1.34.66__py3-none-any.whl → 1.35.98__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of botocore-stubs might be problematic. Click here for more details.
- botocore-stubs/__init__.pyi +8 -2
- botocore-stubs/args.pyi +27 -26
- botocore-stubs/auth.pyi +38 -29
- botocore-stubs/awsrequest.pyi +29 -23
- botocore-stubs/client.pyi +44 -35
- botocore-stubs/compat.pyi +23 -13
- botocore-stubs/compress.pyi +8 -3
- botocore-stubs/config.pyi +29 -29
- botocore-stubs/configloader.pyi +11 -5
- botocore-stubs/configprovider.pyi +40 -28
- botocore-stubs/credentials.pyi +105 -93
- botocore-stubs/crt/__init__.pyi +6 -2
- botocore-stubs/crt/auth.pyi +6 -2
- botocore-stubs/discovery.pyi +30 -14
- botocore-stubs/docs/__init__.pyi +6 -2
- botocore-stubs/docs/bcdoc/__init__.pyi +6 -0
- botocore-stubs/docs/bcdoc/docstringparser.pyi +13 -7
- botocore-stubs/docs/bcdoc/restdoc.pyi +27 -17
- botocore-stubs/docs/bcdoc/style.pyi +13 -7
- botocore-stubs/docs/client.pyi +10 -4
- botocore-stubs/docs/docstring.pyi +6 -2
- botocore-stubs/docs/example.pyi +34 -25
- botocore-stubs/docs/method.pyi +23 -16
- botocore-stubs/docs/paginator.pyi +9 -2
- botocore-stubs/docs/params.pyi +31 -22
- botocore-stubs/docs/service.pyi +14 -9
- botocore-stubs/docs/shape.pyi +11 -4
- botocore-stubs/docs/sharedexample.pyi +19 -5
- botocore-stubs/docs/translator.pyi +8 -2
- botocore-stubs/docs/utils.pyi +15 -10
- botocore-stubs/docs/waiter.pyi +8 -3
- botocore-stubs/endpoint.pyi +24 -14
- botocore-stubs/endpoint_provider.pyi +41 -40
- botocore-stubs/errorfactory.pyi +9 -3
- botocore-stubs/eventstream.pyi +22 -16
- botocore-stubs/exceptions.pyi +10 -10
- botocore-stubs/handlers.pyi +36 -14
- botocore-stubs/history.pyi +8 -2
- botocore-stubs/hooks.pyi +28 -22
- botocore-stubs/httpchecksum.pyi +15 -10
- botocore-stubs/httpsession.pyi +23 -17
- botocore-stubs/loaders.pyi +19 -13
- botocore-stubs/model.pyi +60 -44
- botocore-stubs/monitoring.pyi +29 -22
- botocore-stubs/paginate.pyi +38 -24
- botocore-stubs/parsers.pyi +13 -7
- botocore-stubs/regions.pyi +38 -29
- botocore-stubs/response.pyi +10 -4
- botocore-stubs/retries/adaptive.pyi +7 -1
- botocore-stubs/retries/base.pyi +9 -3
- botocore-stubs/retries/bucket.pyi +13 -9
- botocore-stubs/retries/quota.pyi +11 -5
- botocore-stubs/retries/special.pyi +9 -2
- botocore-stubs/retries/standard.pyi +32 -24
- botocore-stubs/retries/throttling.pyi +6 -0
- botocore-stubs/retryhandler.pyi +12 -6
- botocore-stubs/serialize.pyi +14 -8
- botocore-stubs/session.pyi +53 -55
- botocore-stubs/signers.pyi +40 -23
- botocore-stubs/stub.pyi +15 -15
- botocore-stubs/tokens.pyi +12 -6
- botocore-stubs/translate.pyi +12 -5
- botocore-stubs/useragent.pyi +11 -5
- botocore-stubs/utils.pyi +86 -76
- botocore-stubs/validate.pyi +7 -1
- botocore-stubs/waiter.pyi +11 -5
- {botocore_stubs-1.34.66.dist-info → botocore_stubs-1.35.98.dist-info}/METADATA +39 -20
- botocore_stubs-1.35.98.dist-info/RECORD +73 -0
- {botocore_stubs-1.34.66.dist-info → botocore_stubs-1.35.98.dist-info}/WHEEL +2 -1
- botocore_stubs-1.35.98.dist-info/top_level.txt +1 -0
- botocore_stubs-1.34.66.dist-info/RECORD +0 -72
- {botocore_stubs-1.34.66.dist-info → botocore_stubs-1.35.98.dist-info}/LICENSE +0 -0
botocore-stubs/history.pyi
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for botocore.history module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
1
7
|
from logging import Logger
|
|
2
|
-
from typing import Any
|
|
8
|
+
from typing import Any
|
|
3
9
|
|
|
4
10
|
logger: Logger = ...
|
|
5
11
|
|
|
6
|
-
HISTORY_RECORDER:
|
|
12
|
+
HISTORY_RECORDER: HistoryRecorder | None
|
|
7
13
|
|
|
8
14
|
class BaseHistoryHandler:
|
|
9
15
|
def emit(self, event_type: str, payload: Any, source: str) -> None: ...
|
botocore-stubs/hooks.pyi
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for botocore.hooks module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
1
7
|
from logging import Logger
|
|
2
|
-
from typing import Any,
|
|
8
|
+
from typing import Any, Callable, Mapping, NamedTuple, TypeVar
|
|
3
9
|
|
|
4
10
|
from botocore.compat import accepts_kwargs as accepts_kwargs
|
|
5
11
|
from botocore.utils import EVENT_ALIASES as EVENT_ALIASES
|
|
@@ -16,36 +22,36 @@ class _NodeList(NamedTuple):
|
|
|
16
22
|
class NodeList(_NodeList):
|
|
17
23
|
def __copy__(self: _R) -> _R: ...
|
|
18
24
|
|
|
19
|
-
def first_non_none_response(responses: Any, default:
|
|
25
|
+
def first_non_none_response(responses: Any, default: Any | None = ...) -> Any: ...
|
|
20
26
|
|
|
21
27
|
class BaseEventHooks:
|
|
22
|
-
def emit(self, event_name:
|
|
28
|
+
def emit(self, event_name: str, **kwargs: Any) -> Any: ...
|
|
23
29
|
def register(
|
|
24
30
|
self,
|
|
25
31
|
event_name: str,
|
|
26
|
-
handler:
|
|
27
|
-
unique_id:
|
|
32
|
+
handler: Callable[..., None],
|
|
33
|
+
unique_id: str | None = ...,
|
|
28
34
|
unique_id_uses_count: bool = ...,
|
|
29
35
|
) -> None: ...
|
|
30
36
|
def register_first(
|
|
31
37
|
self,
|
|
32
38
|
event_name: str,
|
|
33
|
-
handler:
|
|
34
|
-
unique_id:
|
|
39
|
+
handler: Callable[..., None],
|
|
40
|
+
unique_id: str | None = ...,
|
|
35
41
|
unique_id_uses_count: bool = ...,
|
|
36
42
|
) -> None: ...
|
|
37
43
|
def register_last(
|
|
38
44
|
self,
|
|
39
45
|
event_name: str,
|
|
40
|
-
handler:
|
|
41
|
-
unique_id:
|
|
46
|
+
handler: Callable[..., None],
|
|
47
|
+
unique_id: str | None = ...,
|
|
42
48
|
unique_id_uses_count: bool = ...,
|
|
43
49
|
) -> None: ...
|
|
44
50
|
def unregister(
|
|
45
51
|
self,
|
|
46
52
|
event_name: str,
|
|
47
|
-
handler:
|
|
48
|
-
unique_id:
|
|
53
|
+
handler: Callable[..., None] | None = ...,
|
|
54
|
+
unique_id: str | None = ...,
|
|
49
55
|
unique_id_uses_count: bool = ...,
|
|
50
56
|
) -> None: ...
|
|
51
57
|
|
|
@@ -56,44 +62,44 @@ class HierarchicalEmitter(BaseEventHooks):
|
|
|
56
62
|
def unregister(
|
|
57
63
|
self,
|
|
58
64
|
event_name: str,
|
|
59
|
-
handler:
|
|
60
|
-
unique_id:
|
|
65
|
+
handler: Callable[..., None] | None = ...,
|
|
66
|
+
unique_id: str | None = ...,
|
|
61
67
|
unique_id_uses_count: bool = ...,
|
|
62
68
|
) -> None: ...
|
|
63
69
|
def __copy__(self: _R) -> _R: ...
|
|
64
70
|
|
|
65
71
|
class EventAliaser(BaseEventHooks):
|
|
66
72
|
def __init__(
|
|
67
|
-
self, event_emitter: BaseEventHooks, event_aliases:
|
|
73
|
+
self, event_emitter: BaseEventHooks, event_aliases: Mapping[str, str] | None = ...
|
|
68
74
|
) -> None: ...
|
|
69
75
|
def emit(self, event_name: str, **kwargs: Any) -> Any: ...
|
|
70
76
|
def emit_until_response(self, event_name: str, **kwargs: Any) -> Any: ...
|
|
71
77
|
def register(
|
|
72
78
|
self,
|
|
73
79
|
event_name: str,
|
|
74
|
-
handler:
|
|
75
|
-
unique_id:
|
|
80
|
+
handler: Callable[..., None],
|
|
81
|
+
unique_id: str | None = ...,
|
|
76
82
|
unique_id_uses_count: bool = ...,
|
|
77
83
|
) -> Any: ...
|
|
78
84
|
def register_first(
|
|
79
85
|
self,
|
|
80
86
|
event_name: str,
|
|
81
|
-
handler:
|
|
82
|
-
unique_id:
|
|
87
|
+
handler: Callable[..., None],
|
|
88
|
+
unique_id: str | None = ...,
|
|
83
89
|
unique_id_uses_count: bool = ...,
|
|
84
90
|
) -> Any: ...
|
|
85
91
|
def register_last(
|
|
86
92
|
self,
|
|
87
93
|
event_name: str,
|
|
88
|
-
handler:
|
|
89
|
-
unique_id:
|
|
94
|
+
handler: Callable[..., None],
|
|
95
|
+
unique_id: str | None = ...,
|
|
90
96
|
unique_id_uses_count: bool = ...,
|
|
91
97
|
) -> Any: ...
|
|
92
98
|
def unregister(
|
|
93
99
|
self,
|
|
94
100
|
event_name: str,
|
|
95
|
-
handler:
|
|
96
|
-
unique_id:
|
|
101
|
+
handler: Callable[..., None] | None = ...,
|
|
102
|
+
unique_id: str | None = ...,
|
|
97
103
|
unique_id_uses_count: bool = ...,
|
|
98
104
|
) -> Any: ...
|
|
99
105
|
def __copy__(self: _R) -> _R: ...
|
botocore-stubs/httpchecksum.pyi
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for botocore.httpchecksum module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
1
7
|
import logging
|
|
2
|
-
from typing import IO, Any,
|
|
8
|
+
from typing import IO, Any, Iterator, Mapping, Sequence
|
|
3
9
|
|
|
4
|
-
from awscrt import checksums as crt_checksums
|
|
5
10
|
from botocore.awsrequest import AWSHTTPResponse
|
|
6
11
|
from botocore.compat import HAS_CRT as HAS_CRT
|
|
7
12
|
from botocore.exceptions import AwsChunkedWrapperError as AwsChunkedWrapperError
|
|
@@ -14,10 +19,10 @@ from botocore.utils import determine_content_length as determine_content_length
|
|
|
14
19
|
logger: logging.Logger
|
|
15
20
|
|
|
16
21
|
class BaseChecksum:
|
|
17
|
-
def update(self, chunk:
|
|
22
|
+
def update(self, chunk: bytes | bytearray) -> None: ...
|
|
18
23
|
def digest(self) -> bytes: ...
|
|
19
24
|
def b64digest(self) -> str: ...
|
|
20
|
-
def handle(self, body:
|
|
25
|
+
def handle(self, body: bytes | bytearray | IO[Any]) -> str: ...
|
|
21
26
|
|
|
22
27
|
class Crc32Checksum(BaseChecksum):
|
|
23
28
|
def __init__(self) -> None: ...
|
|
@@ -38,19 +43,19 @@ class AwsChunkedWrapper:
|
|
|
38
43
|
def __init__(
|
|
39
44
|
self,
|
|
40
45
|
raw: IO[Any],
|
|
41
|
-
checksum_cls:
|
|
46
|
+
checksum_cls: type[BaseChecksum] | None = ...,
|
|
42
47
|
checksum_name: str = ...,
|
|
43
|
-
chunk_size:
|
|
48
|
+
chunk_size: int | None = ...,
|
|
44
49
|
) -> None: ...
|
|
45
50
|
def seek(self, offset: int, whence: int = ...) -> None: ...
|
|
46
|
-
def read(self, size:
|
|
51
|
+
def read(self, size: int | None = ...) -> bytes: ...
|
|
47
52
|
def __iter__(self) -> Iterator[bytes]: ...
|
|
48
53
|
|
|
49
54
|
class StreamingChecksumBody(StreamingBody):
|
|
50
55
|
def __init__(
|
|
51
56
|
self, raw_stream: IO[Any], content_length: int, checksum: BaseChecksum, expected: str
|
|
52
57
|
) -> None: ...
|
|
53
|
-
def read(self, amt:
|
|
58
|
+
def read(self, amt: int | None = ...) -> bytes: ...
|
|
54
59
|
|
|
55
60
|
def resolve_checksum_context(
|
|
56
61
|
request: Mapping[str, Any], operation_model: OperationModel, params: Mapping[str, Any]
|
|
@@ -59,14 +64,14 @@ def resolve_request_checksum_algorithm(
|
|
|
59
64
|
request: Mapping[str, Any],
|
|
60
65
|
operation_model: OperationModel,
|
|
61
66
|
params: Mapping[str, Any],
|
|
62
|
-
supported_algorithms:
|
|
67
|
+
supported_algorithms: Sequence[str] | None = ...,
|
|
63
68
|
) -> None: ...
|
|
64
69
|
def apply_request_checksum(request: Mapping[str, Any]) -> None: ...
|
|
65
70
|
def resolve_response_checksum_algorithms(
|
|
66
71
|
request: Mapping[str, Any],
|
|
67
72
|
operation_model: OperationModel,
|
|
68
73
|
params: Mapping[str, Any],
|
|
69
|
-
supported_algorithms:
|
|
74
|
+
supported_algorithms: Sequence[str] | None = ...,
|
|
70
75
|
) -> None: ...
|
|
71
76
|
def handle_checksum_body(
|
|
72
77
|
http_response: AWSHTTPResponse,
|
botocore-stubs/httpsession.pyi
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for botocore.httpsession module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
1
7
|
from logging import Logger
|
|
2
|
-
from typing import Any,
|
|
8
|
+
from typing import Any, Mapping
|
|
3
9
|
|
|
4
10
|
from botocore.awsrequest import AWSPreparedRequest, AWSRequest, AWSResponse
|
|
5
11
|
from botocore.compat import IPV6_ADDRZ_RE as IPV6_ADDRZ_RE
|
|
@@ -19,15 +25,15 @@ logger: Logger = ...
|
|
|
19
25
|
DEFAULT_TIMEOUT: int = ...
|
|
20
26
|
MAX_POOL_CONNECTIONS: int = ...
|
|
21
27
|
DEFAULT_CA_BUNDLE: str = ...
|
|
22
|
-
DEFAULT_CIPHERS:
|
|
28
|
+
DEFAULT_CIPHERS: str | None = ...
|
|
23
29
|
|
|
24
30
|
def where() -> str: ...
|
|
25
|
-
def get_cert_path(verify: bool) ->
|
|
31
|
+
def get_cert_path(verify: bool) -> str | None: ...
|
|
26
32
|
def create_urllib3_context(
|
|
27
|
-
ssl_version:
|
|
28
|
-
cert_reqs:
|
|
29
|
-
options:
|
|
30
|
-
ciphers:
|
|
33
|
+
ssl_version: int | None = ...,
|
|
34
|
+
cert_reqs: bool | None = ...,
|
|
35
|
+
options: int | None = ...,
|
|
36
|
+
ciphers: str | None = ...,
|
|
31
37
|
) -> Any: ...
|
|
32
38
|
def ensure_boolean(val: Any) -> bool: ...
|
|
33
39
|
def mask_proxy_url(proxy_url: str) -> str: ...
|
|
@@ -35,24 +41,24 @@ def mask_proxy_url(proxy_url: str) -> str: ...
|
|
|
35
41
|
class ProxyConfiguration:
|
|
36
42
|
def __init__(
|
|
37
43
|
self,
|
|
38
|
-
proxies:
|
|
39
|
-
proxies_settings:
|
|
44
|
+
proxies: Mapping[str, Any] | None = ...,
|
|
45
|
+
proxies_settings: Mapping[str, Any] | None = ...,
|
|
40
46
|
) -> None: ...
|
|
41
47
|
def proxy_url_for(self, url: str) -> str: ...
|
|
42
|
-
def proxy_headers_for(self, proxy_url: str) ->
|
|
48
|
+
def proxy_headers_for(self, proxy_url: str) -> dict[str, Any]: ...
|
|
43
49
|
@property
|
|
44
|
-
def settings(self) ->
|
|
50
|
+
def settings(self) -> dict[str, Any]: ...
|
|
45
51
|
|
|
46
52
|
class URLLib3Session:
|
|
47
53
|
def __init__(
|
|
48
54
|
self,
|
|
49
55
|
verify: bool = ...,
|
|
50
|
-
proxies:
|
|
51
|
-
timeout:
|
|
56
|
+
proxies: Mapping[str, Any] | None = ...,
|
|
57
|
+
timeout: int | None = ...,
|
|
52
58
|
max_pool_connections: int = ...,
|
|
53
|
-
socket_options:
|
|
54
|
-
client_cert:
|
|
55
|
-
proxies_config:
|
|
59
|
+
socket_options: list[str] | None = ...,
|
|
60
|
+
client_cert: str | tuple[str, str] | None = ...,
|
|
61
|
+
proxies_config: Mapping[str, Any] | None = ...,
|
|
56
62
|
) -> None: ...
|
|
57
63
|
def close(self) -> None: ...
|
|
58
|
-
def send(self, request:
|
|
64
|
+
def send(self, request: AWSRequest | AWSPreparedRequest) -> AWSResponse: ...
|
botocore-stubs/loaders.pyi
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for botocore.loaders module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
1
7
|
from logging import Logger
|
|
2
|
-
from typing import Any, Callable,
|
|
8
|
+
from typing import Any, Callable, Iterable, Mapping
|
|
3
9
|
|
|
4
10
|
from botocore.compat import OrderedDict as OrderedDict
|
|
5
11
|
from botocore.exceptions import DataNotFoundError as DataNotFoundError
|
|
@@ -16,33 +22,33 @@ class JSONFileLoader:
|
|
|
16
22
|
def exists(self, file_path: str) -> bool: ...
|
|
17
23
|
def load_file(self, file_path: str) -> Any: ...
|
|
18
24
|
|
|
19
|
-
def create_loader(search_path_string:
|
|
25
|
+
def create_loader(search_path_string: str | None = ...) -> Loader: ...
|
|
20
26
|
|
|
21
27
|
class Loader:
|
|
22
|
-
FILE_LOADER_CLASS:
|
|
28
|
+
FILE_LOADER_CLASS: type[JSONFileLoader] = ...
|
|
23
29
|
BUILTIN_DATA_PATH: str = ...
|
|
24
30
|
CUSTOMER_DATA_PATH: str = ...
|
|
25
|
-
BUILTIN_EXTRAS_TYPES:
|
|
31
|
+
BUILTIN_EXTRAS_TYPES: list[str] = ...
|
|
26
32
|
def __init__(
|
|
27
33
|
self,
|
|
28
|
-
extra_search_paths:
|
|
29
|
-
file_loader:
|
|
30
|
-
cache:
|
|
34
|
+
extra_search_paths: Iterable[str] | None = ...,
|
|
35
|
+
file_loader: JSONFileLoader | None = ...,
|
|
36
|
+
cache: Any | None = ...,
|
|
31
37
|
include_default_search_paths: bool = ...,
|
|
32
38
|
include_default_extras: bool = ...,
|
|
33
39
|
) -> None:
|
|
34
40
|
self.file_loader: JSONFileLoader
|
|
35
41
|
|
|
36
42
|
@property
|
|
37
|
-
def search_paths(self) ->
|
|
43
|
+
def search_paths(self) -> list[str]: ...
|
|
38
44
|
@property
|
|
39
|
-
def extras_types(self) ->
|
|
40
|
-
def list_available_services(self, type_name: str) ->
|
|
45
|
+
def extras_types(self) -> list[str]: ...
|
|
46
|
+
def list_available_services(self, type_name: str) -> list[str]: ...
|
|
41
47
|
def determine_latest_version(self, service_name: str, type_name: str) -> str: ...
|
|
42
|
-
def list_api_versions(self, service_name: str, type_name: str) ->
|
|
43
|
-
def load_data_with_path(self, name: str) ->
|
|
48
|
+
def list_api_versions(self, service_name: str, type_name: str) -> list[str]: ...
|
|
49
|
+
def load_data_with_path(self, name: str) -> tuple[dict[str, Any], str]: ...
|
|
44
50
|
def load_service_model(
|
|
45
|
-
self, service_name: str, type_name: str, api_version:
|
|
51
|
+
self, service_name: str, type_name: str, api_version: Any | None = ...
|
|
46
52
|
) -> Any: ...
|
|
47
53
|
def load_data(self, name: str) -> Any: ...
|
|
48
54
|
def is_builtin_path(self, path: str) -> bool: ...
|
botocore-stubs/model.pyi
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for botocore.model module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Mapping, NamedTuple, TypeVar
|
|
2
8
|
|
|
3
9
|
from botocore.utils import CachedProperty
|
|
4
10
|
|
|
@@ -15,31 +21,31 @@ class ServiceId(str):
|
|
|
15
21
|
def hyphenize(self) -> str: ...
|
|
16
22
|
|
|
17
23
|
class Shape:
|
|
18
|
-
SERIALIZED_ATTRS:
|
|
19
|
-
METADATA_ATTRS:
|
|
20
|
-
MAP_TYPE:
|
|
24
|
+
SERIALIZED_ATTRS: list[str]
|
|
25
|
+
METADATA_ATTRS: list[str]
|
|
26
|
+
MAP_TYPE: type[dict[str, Any]]
|
|
21
27
|
def __init__(
|
|
22
28
|
self,
|
|
23
29
|
shape_name: str,
|
|
24
30
|
shape_model: Mapping[str, Any],
|
|
25
|
-
shape_resolver:
|
|
31
|
+
shape_resolver: ShapeResolver | None = ...,
|
|
26
32
|
) -> None:
|
|
27
33
|
self.name: str
|
|
28
34
|
self.type_name: str
|
|
29
35
|
self.documentation: str
|
|
30
36
|
|
|
31
37
|
@CachedProperty
|
|
32
|
-
def serialization(self) ->
|
|
38
|
+
def serialization(self) -> dict[str, Any]: ...
|
|
33
39
|
@CachedProperty
|
|
34
|
-
def metadata(self) ->
|
|
40
|
+
def metadata(self) -> dict[str, Any]: ...
|
|
35
41
|
@CachedProperty
|
|
36
|
-
def required_members(self) ->
|
|
42
|
+
def required_members(self) -> list[str]: ...
|
|
37
43
|
@CachedProperty
|
|
38
44
|
def event_stream_name(self) -> None: ...
|
|
39
45
|
|
|
40
46
|
class StructureShape(Shape):
|
|
41
47
|
@CachedProperty
|
|
42
|
-
def members(self) ->
|
|
48
|
+
def members(self) -> dict[str, Shape]: ...
|
|
43
49
|
@CachedProperty
|
|
44
50
|
def error_code(self) -> str: ...
|
|
45
51
|
@CachedProperty
|
|
@@ -59,11 +65,11 @@ class MapShape(Shape):
|
|
|
59
65
|
|
|
60
66
|
class StringShape(Shape):
|
|
61
67
|
@CachedProperty
|
|
62
|
-
def enum(self) ->
|
|
68
|
+
def enum(self) -> list[str]: ...
|
|
63
69
|
|
|
64
70
|
class StaticContextParameter(NamedTuple):
|
|
65
71
|
name: str
|
|
66
|
-
value:
|
|
72
|
+
value: bool | str
|
|
67
73
|
|
|
68
74
|
class ContextParameter(NamedTuple):
|
|
69
75
|
name: str
|
|
@@ -76,24 +82,24 @@ class ClientContextParameter(NamedTuple):
|
|
|
76
82
|
|
|
77
83
|
class ServiceModel:
|
|
78
84
|
def __init__(
|
|
79
|
-
self, service_description: Mapping[str, Any], service_name:
|
|
85
|
+
self, service_description: Mapping[str, Any], service_name: str | None = ...
|
|
80
86
|
) -> None:
|
|
81
|
-
self.metadata:
|
|
87
|
+
self.metadata: dict[str, Any]
|
|
82
88
|
|
|
83
89
|
def shape_for(
|
|
84
|
-
self, shape_name: str, member_traits:
|
|
90
|
+
self, shape_name: str, member_traits: Mapping[str, Any] | None = ...
|
|
85
91
|
) -> Shape: ...
|
|
86
92
|
def shape_for_error_code(self, error_code: int) -> Shape: ...
|
|
87
93
|
def resolve_shape_ref(self, shape_ref: str) -> Shape: ...
|
|
88
94
|
@CachedProperty
|
|
89
|
-
def shape_names(self) ->
|
|
95
|
+
def shape_names(self) -> list[str]: ...
|
|
90
96
|
@CachedProperty
|
|
91
|
-
def error_shapes(self) ->
|
|
92
|
-
def operation_model(self, operation_name: str) ->
|
|
97
|
+
def error_shapes(self) -> list[Shape]: ...
|
|
98
|
+
def operation_model(self, operation_name: str) -> OperationModel: ...
|
|
93
99
|
@CachedProperty
|
|
94
100
|
def documentation(self) -> str: ...
|
|
95
101
|
@CachedProperty
|
|
96
|
-
def operation_names(self) ->
|
|
102
|
+
def operation_names(self) -> list[str]: ...
|
|
97
103
|
@CachedProperty
|
|
98
104
|
def service_name(self) -> str: ...
|
|
99
105
|
@CachedProperty
|
|
@@ -107,25 +113,27 @@ class ServiceModel:
|
|
|
107
113
|
@CachedProperty
|
|
108
114
|
def endpoint_prefix(self) -> str: ...
|
|
109
115
|
@CachedProperty
|
|
110
|
-
def endpoint_discovery_operation(self) ->
|
|
116
|
+
def endpoint_discovery_operation(self) -> OperationModel: ...
|
|
111
117
|
@CachedProperty
|
|
112
118
|
def endpoint_discovery_required(self) -> bool: ...
|
|
113
119
|
@CachedProperty
|
|
114
|
-
def client_context_parameters(self) ->
|
|
120
|
+
def client_context_parameters(self) -> list[ClientContextParameter]: ...
|
|
115
121
|
@property
|
|
116
122
|
def signature_version(self) -> str: ...
|
|
117
123
|
@signature_version.setter
|
|
118
124
|
def signature_version(self, value: str) -> None: ...
|
|
125
|
+
@CachedProperty
|
|
126
|
+
def is_query_compatible(self) -> bool: ...
|
|
119
127
|
|
|
120
128
|
class OperationModel:
|
|
121
129
|
def __init__(
|
|
122
130
|
self,
|
|
123
131
|
operation_model: Mapping[str, Any],
|
|
124
132
|
service_model: ServiceModel,
|
|
125
|
-
name:
|
|
133
|
+
name: str | None = ...,
|
|
126
134
|
) -> None:
|
|
127
|
-
self.metadata:
|
|
128
|
-
self.http:
|
|
135
|
+
self.metadata: dict[str, Any]
|
|
136
|
+
self.http: dict[str, Any]
|
|
129
137
|
|
|
130
138
|
@CachedProperty
|
|
131
139
|
def name(self) -> str: ...
|
|
@@ -138,64 +146,72 @@ class OperationModel:
|
|
|
138
146
|
@CachedProperty
|
|
139
147
|
def deprecated(self) -> bool: ...
|
|
140
148
|
@CachedProperty
|
|
141
|
-
def endpoint_discovery(self) ->
|
|
149
|
+
def endpoint_discovery(self) -> OperationModel | None: ...
|
|
142
150
|
@CachedProperty
|
|
143
151
|
def is_endpoint_discovery_operation(self) -> bool: ...
|
|
144
152
|
@CachedProperty
|
|
145
|
-
def input_shape(self) ->
|
|
153
|
+
def input_shape(self) -> StructureShape | None: ...
|
|
154
|
+
@CachedProperty
|
|
155
|
+
def output_shape(self) -> StructureShape | None: ...
|
|
156
|
+
@CachedProperty
|
|
157
|
+
def idempotent_members(self) -> list[str]: ...
|
|
158
|
+
@CachedProperty
|
|
159
|
+
def static_context_parameters(self) -> list[StaticContextParameter]: ...
|
|
160
|
+
@CachedProperty
|
|
161
|
+
def context_parameters(self) -> list[ContextParameter]: ...
|
|
146
162
|
@CachedProperty
|
|
147
|
-
def
|
|
163
|
+
def operation_context_parameters(self) -> list[ContextParameter]: ...
|
|
148
164
|
@CachedProperty
|
|
149
|
-
def
|
|
165
|
+
def request_compression(self) -> dict[str, Any] | None: ...
|
|
150
166
|
@CachedProperty
|
|
151
|
-
def
|
|
167
|
+
def auth(self) -> str | None: ...
|
|
152
168
|
@CachedProperty
|
|
153
|
-
def
|
|
169
|
+
def auth_type(self) -> str | None: ...
|
|
154
170
|
@CachedProperty
|
|
155
|
-
def
|
|
171
|
+
def resolved_auth_type(self) -> str | None: ...
|
|
156
172
|
@CachedProperty
|
|
157
|
-
def
|
|
173
|
+
def unsigned_payload(self) -> Any: ...
|
|
158
174
|
@CachedProperty
|
|
159
|
-
def error_shapes(self) ->
|
|
175
|
+
def error_shapes(self) -> list[Shape]: ...
|
|
160
176
|
@CachedProperty
|
|
161
|
-
def endpoint(self) ->
|
|
177
|
+
def endpoint(self) -> str | None: ...
|
|
162
178
|
@CachedProperty
|
|
163
179
|
def http_checksum_required(self) -> bool: ...
|
|
164
180
|
@CachedProperty
|
|
165
|
-
def http_checksum(self) ->
|
|
181
|
+
def http_checksum(self) -> dict[str, Any]: ...
|
|
166
182
|
@CachedProperty
|
|
167
183
|
def has_event_stream_input(self) -> bool: ...
|
|
168
184
|
@CachedProperty
|
|
169
185
|
def has_event_stream_output(self) -> bool: ...
|
|
170
|
-
def get_event_stream_input(self) ->
|
|
171
|
-
def get_event_stream_output(self) ->
|
|
186
|
+
def get_event_stream_input(self) -> Shape | None: ...
|
|
187
|
+
def get_event_stream_output(self) -> Shape | None: ...
|
|
172
188
|
@CachedProperty
|
|
173
189
|
def has_streaming_input(self) -> bool: ...
|
|
174
190
|
@CachedProperty
|
|
175
191
|
def has_streaming_output(self) -> bool: ...
|
|
176
|
-
def get_streaming_input(self) ->
|
|
177
|
-
def get_streaming_output(self) ->
|
|
192
|
+
def get_streaming_input(self) -> Shape | None: ...
|
|
193
|
+
def get_streaming_output(self) -> Shape | None: ...
|
|
178
194
|
|
|
179
195
|
class ShapeResolver:
|
|
180
|
-
SHAPE_CLASSES:
|
|
196
|
+
SHAPE_CLASSES: dict[str, Shape]
|
|
181
197
|
def __init__(self, shape_map: Mapping[str, Shape]) -> None: ...
|
|
182
198
|
def get_shape_by_name(
|
|
183
|
-
self, shape_name: str, member_traits:
|
|
199
|
+
self, shape_name: str, member_traits: Mapping[str, Any] | None = ...
|
|
184
200
|
) -> Shape: ...
|
|
185
201
|
def resolve_shape_ref(self, shape_ref: Mapping[str, Any]) -> Shape: ...
|
|
186
202
|
|
|
187
203
|
class UnresolvableShapeMap:
|
|
188
204
|
def get_shape_by_name(
|
|
189
|
-
self, shape_name: str, member_traits:
|
|
205
|
+
self, shape_name: str, member_traits: Mapping[str, Any] | None = ...
|
|
190
206
|
) -> Shape: ...
|
|
191
207
|
def resolve_shape_ref(self, shape_ref: Mapping[str, Any]) -> Shape: ...
|
|
192
208
|
|
|
193
209
|
class DenormalizedStructureBuilder:
|
|
194
|
-
SCALAR_TYPES:
|
|
210
|
+
SCALAR_TYPES: tuple[str, ...]
|
|
195
211
|
|
|
196
|
-
def __init__(self, name:
|
|
212
|
+
def __init__(self, name: str | None = ...) -> None:
|
|
197
213
|
self.name: str
|
|
198
|
-
self.members:
|
|
214
|
+
self.members: dict[str, Any]
|
|
199
215
|
|
|
200
216
|
def with_members(self: _R, members: Mapping[str, Any]) -> _R: ...
|
|
201
217
|
def build_model(self) -> StructureShape: ...
|
botocore-stubs/monitoring.pyi
CHANGED
|
@@ -1,25 +1,30 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for botocore.monitoring module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
1
7
|
import socket
|
|
2
8
|
from logging import Logger
|
|
3
|
-
from typing import Any, Callable,
|
|
9
|
+
from typing import Any, Callable, Sequence
|
|
4
10
|
|
|
5
11
|
from botocore.compat import ensure_bytes as ensure_bytes
|
|
6
12
|
from botocore.compat import ensure_unicode as ensure_unicode
|
|
7
13
|
from botocore.compat import urlparse as urlparse
|
|
8
14
|
from botocore.hooks import BaseEventHooks
|
|
9
15
|
from botocore.model import OperationModel
|
|
10
|
-
from botocore.retryhandler import EXCEPTION_MAP as RETRYABLE_EXCEPTIONS
|
|
11
16
|
|
|
12
17
|
logger: Logger = ...
|
|
13
18
|
|
|
14
19
|
class Monitor:
|
|
15
|
-
def __init__(self, adapter:
|
|
20
|
+
def __init__(self, adapter: MonitorEventAdapter, publisher: SocketPublisher) -> None: ...
|
|
16
21
|
def register(self, event_emitter: BaseEventHooks) -> None: ...
|
|
17
22
|
def capture(self, event_name: str, **payload: Any) -> None: ...
|
|
18
23
|
|
|
19
24
|
class MonitorEventAdapter:
|
|
20
25
|
def __init__(self, time: Callable[[], float] = ...) -> None: ...
|
|
21
26
|
def feed(
|
|
22
|
-
self, emitter_event_name: str, emitter_payload:
|
|
27
|
+
self, emitter_event_name: str, emitter_payload: dict[str, Any]
|
|
23
28
|
) -> BaseMonitorEvent: ...
|
|
24
29
|
|
|
25
30
|
class BaseMonitorEvent:
|
|
@@ -28,7 +33,7 @@ class BaseMonitorEvent:
|
|
|
28
33
|
self.operation: str = ...
|
|
29
34
|
self.timestamp: int = ...
|
|
30
35
|
|
|
31
|
-
def __eq__(self, other:
|
|
36
|
+
def __eq__(self, other: object) -> bool: ...
|
|
32
37
|
|
|
33
38
|
class APICallEvent(BaseMonitorEvent):
|
|
34
39
|
def __init__(
|
|
@@ -36,8 +41,8 @@ class APICallEvent(BaseMonitorEvent):
|
|
|
36
41
|
service: str,
|
|
37
42
|
operation: OperationModel,
|
|
38
43
|
timestamp: int,
|
|
39
|
-
latency:
|
|
40
|
-
attempts:
|
|
44
|
+
latency: int | None = ...,
|
|
45
|
+
attempts: Sequence[APICallAttemptEvent] | None = ...,
|
|
41
46
|
retries_exceeded: bool = ...,
|
|
42
47
|
) -> None:
|
|
43
48
|
self.latency: int = ...
|
|
@@ -52,21 +57,21 @@ class APICallAttemptEvent(BaseMonitorEvent):
|
|
|
52
57
|
service: str,
|
|
53
58
|
operation: OperationModel,
|
|
54
59
|
timestamp: int,
|
|
55
|
-
latency:
|
|
56
|
-
url:
|
|
57
|
-
http_status_code:
|
|
58
|
-
request_headers:
|
|
59
|
-
response_headers:
|
|
60
|
-
parsed_error:
|
|
61
|
-
wire_exception:
|
|
60
|
+
latency: int | None = ...,
|
|
61
|
+
url: str | None = ...,
|
|
62
|
+
http_status_code: int | None = ...,
|
|
63
|
+
request_headers: dict[str, Any] | None = ...,
|
|
64
|
+
response_headers: dict[str, Any] | None = ...,
|
|
65
|
+
parsed_error: dict[str, Any] | None = ...,
|
|
66
|
+
wire_exception: Exception | None = ...,
|
|
62
67
|
) -> None:
|
|
63
|
-
self.latency:
|
|
64
|
-
self.url:
|
|
65
|
-
self.http_status_code:
|
|
66
|
-
self.request_headers:
|
|
67
|
-
self.response_headers:
|
|
68
|
-
self.parsed_error:
|
|
69
|
-
self.wire_exception:
|
|
68
|
+
self.latency: int | None = ...
|
|
69
|
+
self.url: str | None = ...
|
|
70
|
+
self.http_status_code: int | None = ...
|
|
71
|
+
self.request_headers: dict[str, Any] | None = ...
|
|
72
|
+
self.response_headers: dict[str, Any] | None = ...
|
|
73
|
+
self.parsed_error: dict[str, Any] | None = ...
|
|
74
|
+
self.wire_exception: Exception | None = ...
|
|
70
75
|
|
|
71
76
|
class CSMSerializer:
|
|
72
77
|
def __init__(self, csm_client_id: str) -> None:
|
|
@@ -75,5 +80,7 @@ class CSMSerializer:
|
|
|
75
80
|
def serialize(self, event: BaseMonitorEvent) -> bytes: ...
|
|
76
81
|
|
|
77
82
|
class SocketPublisher:
|
|
78
|
-
def __init__(
|
|
83
|
+
def __init__(
|
|
84
|
+
self, socket: socket.socket, host: str, port: int, serializer: CSMSerializer
|
|
85
|
+
) -> None: ...
|
|
79
86
|
def publish(self, event: BaseMonitorEvent) -> None: ...
|