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/config.pyi
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for botocore.config module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Literal, Mapping, TypedDict, TypeVar
|
|
3
8
|
|
|
4
9
|
from botocore.compat import OrderedDict as OrderedDict
|
|
5
10
|
from botocore.endpoint import DEFAULT_TIMEOUT as DEFAULT_TIMEOUT
|
|
@@ -9,11 +14,6 @@ from botocore.exceptions import InvalidRetryConfigurationError as InvalidRetryCo
|
|
|
9
14
|
from botocore.exceptions import InvalidRetryModeError as InvalidRetryModeError
|
|
10
15
|
from botocore.exceptions import InvalidS3AddressingStyleError as InvalidS3AddressingStyleError
|
|
11
16
|
|
|
12
|
-
if sys.version_info >= (3, 9):
|
|
13
|
-
from typing import Literal, TypedDict
|
|
14
|
-
else:
|
|
15
|
-
from typing_extensions import Literal, TypedDict
|
|
16
|
-
|
|
17
17
|
class _RetryDict(TypedDict, total=False):
|
|
18
18
|
total_max_attempts: int
|
|
19
19
|
max_attempts: int
|
|
@@ -27,34 +27,34 @@ class _S3Dict(TypedDict, total=False):
|
|
|
27
27
|
|
|
28
28
|
class _ProxiesConfigDict(TypedDict, total=False):
|
|
29
29
|
proxy_ca_bundle: str
|
|
30
|
-
proxy_client_cert:
|
|
30
|
+
proxy_client_cert: str | tuple[str, str]
|
|
31
31
|
proxy_use_forwarding_for_https: bool
|
|
32
32
|
|
|
33
|
-
_Config = TypeVar("_Config", bound=
|
|
33
|
+
_Config = TypeVar("_Config", bound=Config)
|
|
34
34
|
|
|
35
35
|
class Config:
|
|
36
36
|
OPTION_DEFAULTS: OrderedDict[str, None]
|
|
37
|
-
NON_LEGACY_OPTION_DEFAULTS:
|
|
37
|
+
NON_LEGACY_OPTION_DEFAULTS: dict[str, None]
|
|
38
38
|
def __init__(
|
|
39
39
|
self,
|
|
40
|
-
region_name:
|
|
41
|
-
signature_version:
|
|
42
|
-
user_agent:
|
|
43
|
-
user_agent_extra:
|
|
44
|
-
connect_timeout:
|
|
45
|
-
read_timeout:
|
|
46
|
-
parameter_validation:
|
|
47
|
-
max_pool_connections:
|
|
48
|
-
proxies:
|
|
49
|
-
proxies_config:
|
|
50
|
-
s3:
|
|
51
|
-
retries:
|
|
52
|
-
client_cert:
|
|
53
|
-
inject_host_prefix:
|
|
54
|
-
endpoint_discovery_enabled:
|
|
55
|
-
use_dualstack_endpoint:
|
|
56
|
-
use_fips_endpoint:
|
|
57
|
-
defaults_mode:
|
|
58
|
-
tcp_keepalive:
|
|
40
|
+
region_name: str | None = None,
|
|
41
|
+
signature_version: str | None = None,
|
|
42
|
+
user_agent: str | None = None,
|
|
43
|
+
user_agent_extra: str | None = None,
|
|
44
|
+
connect_timeout: float | None = 60,
|
|
45
|
+
read_timeout: float | None = 60,
|
|
46
|
+
parameter_validation: bool | None = True,
|
|
47
|
+
max_pool_connections: int | None = 10,
|
|
48
|
+
proxies: Mapping[str, str] | None = None,
|
|
49
|
+
proxies_config: _ProxiesConfigDict | None = None,
|
|
50
|
+
s3: _S3Dict | None = None,
|
|
51
|
+
retries: _RetryDict | None = None,
|
|
52
|
+
client_cert: str | tuple[str, str] | None = None,
|
|
53
|
+
inject_host_prefix: bool | None = True,
|
|
54
|
+
endpoint_discovery_enabled: bool | None = None,
|
|
55
|
+
use_dualstack_endpoint: bool | None = None,
|
|
56
|
+
use_fips_endpoint: bool | None = None,
|
|
57
|
+
defaults_mode: bool | None = None,
|
|
58
|
+
tcp_keepalive: bool | None = False,
|
|
59
59
|
) -> None: ...
|
|
60
60
|
def merge(self: _Config, other_config: _Config) -> _Config: ...
|
botocore-stubs/configloader.pyi
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for botocore.configloader module.
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
def multi_file_load_config(*filenames: str) -> dict[str, Any]: ...
|
|
10
|
+
def load_config(config_filename: str) -> dict[str, Any]: ...
|
|
11
|
+
def raw_config_parse(config_filename: str, parse_subsections: bool = ...) -> dict[str, Any]: ...
|
|
12
|
+
def build_profile_map(parsed_ini_config: dict[str, Any]) -> dict[str, Any]: ...
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for botocore.configprovider 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, Sequence, TypeVar
|
|
3
9
|
|
|
10
|
+
from botocore.session import Session
|
|
4
11
|
from botocore.utils import IMDSRegionProvider
|
|
5
12
|
|
|
6
|
-
BOTOCORE_DEFAUT_SESSION_VARIABLES:
|
|
7
|
-
DEFAULT_S3_CONFIG_VARS:
|
|
8
|
-
DEFAULT_PROXIES_CONFIG_VARS:
|
|
13
|
+
BOTOCORE_DEFAUT_SESSION_VARIABLES: dict[str, tuple[Any, ...]]
|
|
14
|
+
DEFAULT_S3_CONFIG_VARS: dict[str, tuple[Any, ...]]
|
|
15
|
+
DEFAULT_PROXIES_CONFIG_VARS: dict[str, tuple[Any, ...]]
|
|
9
16
|
|
|
10
17
|
logger: Logger = ...
|
|
11
18
|
|
|
@@ -15,26 +22,26 @@ def create_botocore_default_config_mapping(session: Any) -> Any: ...
|
|
|
15
22
|
|
|
16
23
|
class DefaultConfigResolver:
|
|
17
24
|
def __init__(self, default_config_data: Mapping[str, Any]) -> None: ...
|
|
18
|
-
def get_default_modes(self) ->
|
|
25
|
+
def get_default_modes(self) -> list[str]: ...
|
|
19
26
|
def get_default_config_values(self, mode: str) -> Any: ...
|
|
20
27
|
|
|
21
28
|
class ConfigChainFactory:
|
|
22
|
-
def __init__(self, session: Any, environ:
|
|
29
|
+
def __init__(self, session: Any, environ: Any | None = ...) -> None: ...
|
|
23
30
|
def create_config_chain(
|
|
24
31
|
self,
|
|
25
|
-
instance_name:
|
|
26
|
-
env_var_names:
|
|
27
|
-
config_property_names:
|
|
28
|
-
default:
|
|
29
|
-
conversion_func:
|
|
30
|
-
) ->
|
|
32
|
+
instance_name: str | None = ...,
|
|
33
|
+
env_var_names: str | list[str] | None = ...,
|
|
34
|
+
config_property_names: str | Sequence[str] | None = ...,
|
|
35
|
+
default: Any | None = ...,
|
|
36
|
+
conversion_func: Callable[..., Any] | None = ...,
|
|
37
|
+
) -> ChainProvider: ...
|
|
31
38
|
|
|
32
39
|
class ConfigValueStore:
|
|
33
|
-
def __init__(self, mapping:
|
|
34
|
-
def __deepcopy__(self: _R, memo:
|
|
40
|
+
def __init__(self, mapping: Mapping[str, Any] | None = ...) -> None: ...
|
|
41
|
+
def __deepcopy__(self: _R, memo: dict[str, Any]) -> _R: ...
|
|
35
42
|
def __copy__(self: _R) -> _R: ...
|
|
36
43
|
def get_config_variable(self, logical_name: str) -> Any: ...
|
|
37
|
-
def get_config_provider(self, logical_name: str) ->
|
|
44
|
+
def get_config_provider(self, logical_name: str) -> BaseProvider: ...
|
|
38
45
|
def set_config_variable(self, logical_name: str, value: Any) -> None: ...
|
|
39
46
|
def clear_config_variable(self, logical_name: str) -> None: ...
|
|
40
47
|
def set_config_provider(self, logical_name: str, provider: Any) -> None: ...
|
|
@@ -51,42 +58,47 @@ class SmartDefaultsConfigStoreFactory:
|
|
|
51
58
|
def resolve_auto_mode(self, region_name: str) -> str: ...
|
|
52
59
|
|
|
53
60
|
class BaseProvider:
|
|
54
|
-
def provide(self) ->
|
|
61
|
+
def provide(self) -> Any: ...
|
|
55
62
|
|
|
56
63
|
class ChainProvider(BaseProvider):
|
|
57
64
|
def __init__(
|
|
58
|
-
self,
|
|
65
|
+
self,
|
|
66
|
+
providers: Sequence[BaseProvider] | None = ...,
|
|
67
|
+
conversion_func: Callable[..., Any] | None = ...,
|
|
59
68
|
) -> None: ...
|
|
60
|
-
def __deepcopy__(self: _R, memo:
|
|
69
|
+
def __deepcopy__(self: _R, memo: dict[str, Any]) -> _R: ...
|
|
61
70
|
def provide(self) -> Any: ...
|
|
62
71
|
def set_default_provider(self, default_provider: BaseProvider) -> None: ...
|
|
63
72
|
|
|
64
73
|
class InstanceVarProvider(BaseProvider):
|
|
65
|
-
def __init__(self, instance_var:
|
|
66
|
-
def __deepcopy__(self: _R, memo:
|
|
74
|
+
def __init__(self, instance_var: str, session: Session) -> None: ...
|
|
75
|
+
def __deepcopy__(self: _R, memo: dict[str, Any]) -> _R: ...
|
|
67
76
|
def provide(self) -> Any: ...
|
|
68
77
|
|
|
69
78
|
class ScopedConfigProvider(BaseProvider):
|
|
70
|
-
def __init__(self, config_var_name:
|
|
71
|
-
def __deepcopy__(self: _R, memo:
|
|
79
|
+
def __init__(self, config_var_name: str, session: Session) -> None: ...
|
|
80
|
+
def __deepcopy__(self: _R, memo: dict[str, Any]) -> _R: ...
|
|
72
81
|
def provide(self) -> Any: ...
|
|
73
82
|
|
|
74
83
|
class EnvironmentProvider(BaseProvider):
|
|
75
|
-
def __init__(self, name:
|
|
76
|
-
def __deepcopy__(self: _R, memo:
|
|
84
|
+
def __init__(self, name: str, env: Mapping[str, str]) -> None: ...
|
|
85
|
+
def __deepcopy__(self: _R, memo: dict[str, Any]) -> _R: ...
|
|
77
86
|
def provide(self) -> Any: ...
|
|
78
87
|
|
|
79
88
|
class SectionConfigProvider(BaseProvider):
|
|
80
89
|
def __init__(
|
|
81
|
-
self,
|
|
90
|
+
self,
|
|
91
|
+
section_name: str,
|
|
92
|
+
session: Session,
|
|
93
|
+
override_providers: dict[str, BaseProvider] | None = ...,
|
|
82
94
|
) -> None: ...
|
|
83
|
-
def __deepcopy__(self: _R, memo:
|
|
95
|
+
def __deepcopy__(self: _R, memo: dict[str, Any]) -> _R: ...
|
|
84
96
|
def provide(self) -> Any: ...
|
|
85
97
|
def set_default_provider(self, key: str, default_provider: BaseProvider) -> None: ...
|
|
86
98
|
|
|
87
99
|
class ConstantProvider(BaseProvider):
|
|
88
100
|
def __init__(self, value: Any) -> None: ...
|
|
89
|
-
def __deepcopy__(self: _R, memo:
|
|
101
|
+
def __deepcopy__(self: _R, memo: dict[str, Any]) -> _R: ...
|
|
90
102
|
def provide(self) -> Any: ...
|
|
91
103
|
|
|
92
104
|
class ConfiguredEndpointProvider(BaseProvider):
|
|
@@ -95,6 +107,6 @@ class ConfiguredEndpointProvider(BaseProvider):
|
|
|
95
107
|
full_config: Mapping[str, Any],
|
|
96
108
|
scoped_config: Mapping[str, Any],
|
|
97
109
|
client_name: str,
|
|
98
|
-
environ:
|
|
110
|
+
environ: Mapping[str, str] | None = ...,
|
|
99
111
|
) -> None: ...
|
|
100
112
|
def provide(self) -> Any: ...
|
botocore-stubs/credentials.pyi
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for botocore.credentials module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
1
7
|
import datetime
|
|
2
8
|
from logging import Logger
|
|
3
|
-
from typing import Any, Callable,
|
|
9
|
+
from typing import Any, Callable, Mapping, NamedTuple, TypeVar
|
|
4
10
|
|
|
5
11
|
from botocore.client import BaseClient
|
|
6
12
|
from botocore.compat import compat_shell_split as compat_shell_split
|
|
@@ -34,21 +40,21 @@ class ReadOnlyCredentials(NamedTuple):
|
|
|
34
40
|
|
|
35
41
|
def create_credential_resolver(
|
|
36
42
|
session: Session,
|
|
37
|
-
cache:
|
|
38
|
-
region_name:
|
|
43
|
+
cache: dict[str, Any] | None = ...,
|
|
44
|
+
region_name: str | None = ...,
|
|
39
45
|
) -> CredentialResolver: ...
|
|
40
46
|
|
|
41
47
|
class ProfileProviderBuilder:
|
|
42
48
|
def __init__(
|
|
43
49
|
self,
|
|
44
50
|
session: Session,
|
|
45
|
-
cache:
|
|
46
|
-
region_name:
|
|
47
|
-
sso_token_cache:
|
|
51
|
+
cache: dict[str, Any] | None = ...,
|
|
52
|
+
region_name: str | None = ...,
|
|
53
|
+
sso_token_cache: dict[str, Any] | None = ...,
|
|
48
54
|
) -> None: ...
|
|
49
55
|
def providers(
|
|
50
56
|
self, profile_name: str, disable_env_vars: bool = ...
|
|
51
|
-
) ->
|
|
57
|
+
) -> list[CredentialProvider]: ...
|
|
52
58
|
|
|
53
59
|
def get_credentials(session: Session) -> Any: ...
|
|
54
60
|
def create_assume_role_refresher(client: BaseClient, params: Any) -> Any: ...
|
|
@@ -59,12 +65,12 @@ class Credentials:
|
|
|
59
65
|
self,
|
|
60
66
|
access_key: str,
|
|
61
67
|
secret_key: str,
|
|
62
|
-
token:
|
|
63
|
-
method:
|
|
68
|
+
token: str | None = ...,
|
|
69
|
+
method: str | None = ...,
|
|
64
70
|
) -> None:
|
|
65
71
|
self.access_key: str = ...
|
|
66
72
|
self.secret_key: str = ...
|
|
67
|
-
self.token:
|
|
73
|
+
self.token: str | None = ...
|
|
68
74
|
self.method: str = ...
|
|
69
75
|
|
|
70
76
|
def get_frozen_credentials(self) -> ReadOnlyCredentials: ...
|
|
@@ -79,18 +85,18 @@ class RefreshableCredentials(Credentials):
|
|
|
79
85
|
expiry_time: datetime.datetime,
|
|
80
86
|
refresh_using: Callable[[], Any],
|
|
81
87
|
method: str,
|
|
82
|
-
time_fetcher:
|
|
83
|
-
advisory_timeout:
|
|
84
|
-
mandatory_timeout:
|
|
88
|
+
time_fetcher: Callable[[], datetime.datetime] | None = ...,
|
|
89
|
+
advisory_timeout: int | None = ...,
|
|
90
|
+
mandatory_timeout: int | None = ...,
|
|
85
91
|
) -> None: ...
|
|
86
92
|
@classmethod
|
|
87
93
|
def create_from_metadata(
|
|
88
|
-
cls:
|
|
89
|
-
metadata:
|
|
94
|
+
cls: type[_R],
|
|
95
|
+
metadata: dict[str, Any],
|
|
90
96
|
refresh_using: Callable[[], Any],
|
|
91
97
|
method: Any,
|
|
92
|
-
advisory_timeout:
|
|
93
|
-
mandatory_timeout:
|
|
98
|
+
advisory_timeout: int | None = ...,
|
|
99
|
+
mandatory_timeout: int | None = ...,
|
|
94
100
|
) -> _R: ...
|
|
95
101
|
@property # type: ignore [override]
|
|
96
102
|
def access_key(self) -> str: ... # type: ignore [override]
|
|
@@ -104,7 +110,7 @@ class RefreshableCredentials(Credentials):
|
|
|
104
110
|
def token(self) -> str: ... # type: ignore [override]
|
|
105
111
|
@token.setter
|
|
106
112
|
def token(self, value: str) -> None: ...
|
|
107
|
-
def refresh_needed(self, refresh_in:
|
|
113
|
+
def refresh_needed(self, refresh_in: int | None = ...) -> bool: ...
|
|
108
114
|
def get_frozen_credentials(self) -> ReadOnlyCredentials: ...
|
|
109
115
|
|
|
110
116
|
class DeferredRefreshableCredentials(RefreshableCredentials):
|
|
@@ -112,27 +118,27 @@ class DeferredRefreshableCredentials(RefreshableCredentials):
|
|
|
112
118
|
self,
|
|
113
119
|
refresh_using: Callable[[], Any],
|
|
114
120
|
method: Any,
|
|
115
|
-
time_fetcher:
|
|
121
|
+
time_fetcher: Callable[[], datetime.datetime] | None = ...,
|
|
116
122
|
) -> None:
|
|
117
123
|
self.method: Any = ...
|
|
118
124
|
|
|
119
|
-
def refresh_needed(self, refresh_in:
|
|
125
|
+
def refresh_needed(self, refresh_in: int | None = ...) -> bool: ...
|
|
120
126
|
|
|
121
127
|
class CachedCredentialFetcher:
|
|
122
128
|
DEFAULT_EXPIRY_WINDOW_SECONDS: int = ...
|
|
123
129
|
def __init__(
|
|
124
|
-
self, cache:
|
|
130
|
+
self, cache: Any | None = ..., expiry_window_seconds: int | None = ...
|
|
125
131
|
) -> None: ...
|
|
126
|
-
def fetch_credentials(self) ->
|
|
132
|
+
def fetch_credentials(self) -> dict[str, Any]: ...
|
|
127
133
|
|
|
128
134
|
class BaseAssumeRoleCredentialFetcher(CachedCredentialFetcher):
|
|
129
135
|
def __init__(
|
|
130
136
|
self,
|
|
131
137
|
client_creator: Callable[[], BaseClient],
|
|
132
138
|
role_arn: str,
|
|
133
|
-
extra_args:
|
|
134
|
-
cache:
|
|
135
|
-
expiry_window_seconds:
|
|
139
|
+
extra_args: Any | None = ...,
|
|
140
|
+
cache: Any | None = ...,
|
|
141
|
+
expiry_window_seconds: Any | None = ...,
|
|
136
142
|
) -> None: ...
|
|
137
143
|
|
|
138
144
|
class AssumeRoleCredentialFetcher(BaseAssumeRoleCredentialFetcher):
|
|
@@ -141,55 +147,57 @@ class AssumeRoleCredentialFetcher(BaseAssumeRoleCredentialFetcher):
|
|
|
141
147
|
client_creator: Callable[[], BaseClient],
|
|
142
148
|
source_credentials: Any,
|
|
143
149
|
role_arn: str,
|
|
144
|
-
extra_args:
|
|
145
|
-
mfa_prompter:
|
|
146
|
-
cache:
|
|
147
|
-
expiry_window_seconds:
|
|
150
|
+
extra_args: dict[str, Any] | None = ...,
|
|
151
|
+
mfa_prompter: Callable[..., Any] | None = ...,
|
|
152
|
+
cache: dict[str, Any] | None = ...,
|
|
153
|
+
expiry_window_seconds: int | None = ...,
|
|
148
154
|
) -> None: ...
|
|
149
155
|
|
|
150
156
|
class AssumeRoleWithWebIdentityCredentialFetcher(BaseAssumeRoleCredentialFetcher):
|
|
151
157
|
def __init__(
|
|
152
158
|
self,
|
|
153
159
|
client_creator: Callable[[], BaseClient],
|
|
154
|
-
web_identity_token_loader:
|
|
160
|
+
web_identity_token_loader: Callable[[], str],
|
|
155
161
|
role_arn: str,
|
|
156
|
-
extra_args:
|
|
157
|
-
cache:
|
|
158
|
-
expiry_window_seconds:
|
|
162
|
+
extra_args: Any | None = ...,
|
|
163
|
+
cache: dict[str, Any] | None = ...,
|
|
164
|
+
expiry_window_seconds: int | None = ...,
|
|
159
165
|
) -> None: ...
|
|
160
166
|
|
|
161
167
|
class CredentialProvider:
|
|
162
|
-
METHOD:
|
|
163
|
-
CANONICAL_NAME:
|
|
164
|
-
def __init__(self, session:
|
|
168
|
+
METHOD: str | None = ...
|
|
169
|
+
CANONICAL_NAME: str | None = ...
|
|
170
|
+
def __init__(self, session: Session | None = ...) -> None:
|
|
165
171
|
self.session: Session = ...
|
|
166
172
|
|
|
167
173
|
def load(self) -> Any: ...
|
|
168
174
|
|
|
169
175
|
class ProcessProvider(CredentialProvider):
|
|
170
176
|
METHOD: str = ...
|
|
171
|
-
def __init__(
|
|
172
|
-
|
|
177
|
+
def __init__(
|
|
178
|
+
self, profile_name: str, load_config: Callable[..., Any], popen: Callable[..., Any] = ...
|
|
179
|
+
) -> None: ...
|
|
180
|
+
def load(self) -> Credentials | None: ...
|
|
173
181
|
|
|
174
182
|
class InstanceMetadataProvider(CredentialProvider):
|
|
175
183
|
METHOD: str = ...
|
|
176
184
|
CANONICAL_NAME: str = ...
|
|
177
|
-
def __init__(self, iam_role_fetcher:
|
|
178
|
-
def load(self) ->
|
|
185
|
+
def __init__(self, iam_role_fetcher: InstanceMetadataFetcher) -> None: ...
|
|
186
|
+
def load(self) -> Credentials | None: ...
|
|
179
187
|
|
|
180
188
|
class EnvProvider(CredentialProvider):
|
|
181
189
|
METHOD: str = ...
|
|
182
190
|
CANONICAL_NAME: str = ...
|
|
183
191
|
ACCESS_KEY: str = ...
|
|
184
192
|
SECRET_KEY: str = ...
|
|
185
|
-
TOKENS:
|
|
193
|
+
TOKENS: list[str] = ...
|
|
186
194
|
EXPIRY_TIME: str = ...
|
|
187
195
|
def __init__(
|
|
188
|
-
self, environ:
|
|
196
|
+
self, environ: Mapping[str, Any] | None = ..., mapping: Mapping[str, Any] | None = ...
|
|
189
197
|
) -> None:
|
|
190
198
|
self.environ: Mapping[str, Any] = ...
|
|
191
199
|
|
|
192
|
-
def load(self) ->
|
|
200
|
+
def load(self) -> Credentials | None: ...
|
|
193
201
|
|
|
194
202
|
class OriginalEC2Provider(CredentialProvider):
|
|
195
203
|
METHOD: str = ...
|
|
@@ -197,83 +205,85 @@ class OriginalEC2Provider(CredentialProvider):
|
|
|
197
205
|
CRED_FILE_ENV: str = ...
|
|
198
206
|
ACCESS_KEY: str = ...
|
|
199
207
|
SECRET_KEY: str = ...
|
|
200
|
-
def __init__(
|
|
201
|
-
|
|
208
|
+
def __init__(
|
|
209
|
+
self, environ: Mapping[str, str] | None = ..., parser: Callable[..., Any] | None = ...
|
|
210
|
+
) -> None: ...
|
|
211
|
+
def load(self) -> Credentials | None: ...
|
|
202
212
|
|
|
203
213
|
class SharedCredentialProvider(CredentialProvider):
|
|
204
214
|
METHOD: str = ...
|
|
205
215
|
CANONICAL_NAME: str = ...
|
|
206
216
|
ACCESS_KEY: str = ...
|
|
207
217
|
SECRET_KEY: str = ...
|
|
208
|
-
TOKENS:
|
|
218
|
+
TOKENS: list[str] = ...
|
|
209
219
|
def __init__(
|
|
210
220
|
self,
|
|
211
221
|
creds_filename: str,
|
|
212
|
-
profile_name:
|
|
213
|
-
ini_parser:
|
|
222
|
+
profile_name: str | None = ...,
|
|
223
|
+
ini_parser: Any | None = ...,
|
|
214
224
|
) -> None: ...
|
|
215
|
-
def load(self) ->
|
|
225
|
+
def load(self) -> Credentials | None: ...
|
|
216
226
|
|
|
217
227
|
class ConfigProvider(CredentialProvider):
|
|
218
228
|
METHOD: str = ...
|
|
219
229
|
CANONICAL_NAME: str = ...
|
|
220
230
|
ACCESS_KEY: str = ...
|
|
221
231
|
SECRET_KEY: str = ...
|
|
222
|
-
TOKENS:
|
|
232
|
+
TOKENS: list[str] = ...
|
|
223
233
|
def __init__(
|
|
224
234
|
self,
|
|
225
235
|
config_filename: str,
|
|
226
236
|
profile_name: str,
|
|
227
|
-
config_parser:
|
|
237
|
+
config_parser: Any | None = ...,
|
|
228
238
|
) -> None: ...
|
|
229
|
-
def load(self) ->
|
|
239
|
+
def load(self) -> Credentials | None: ...
|
|
230
240
|
|
|
231
241
|
class BotoProvider(CredentialProvider):
|
|
232
242
|
METHOD: str = ...
|
|
233
243
|
CANONICAL_NAME: str = ...
|
|
234
244
|
BOTO_CONFIG_ENV: str = ...
|
|
235
|
-
DEFAULT_CONFIG_FILENAMES:
|
|
245
|
+
DEFAULT_CONFIG_FILENAMES: list[str] = ...
|
|
236
246
|
ACCESS_KEY: str = ...
|
|
237
247
|
SECRET_KEY: str = ...
|
|
238
|
-
def __init__(self, environ:
|
|
239
|
-
def load(self) ->
|
|
248
|
+
def __init__(self, environ: Any | None = ..., ini_parser: Any | None = ...) -> None: ...
|
|
249
|
+
def load(self) -> Credentials | None: ...
|
|
240
250
|
|
|
241
251
|
class AssumeRoleProvider(CredentialProvider):
|
|
242
252
|
METHOD: str = ...
|
|
243
|
-
CANONICAL_NAME:
|
|
253
|
+
CANONICAL_NAME: None = ...
|
|
244
254
|
ROLE_CONFIG_VAR: str = ...
|
|
245
255
|
WEB_IDENTITY_TOKE_FILE_VAR: str = ...
|
|
246
|
-
EXPIRY_WINDOW_SECONDS:
|
|
247
|
-
cache: Any = ...
|
|
256
|
+
EXPIRY_WINDOW_SECONDS: int = ...
|
|
248
257
|
def __init__(
|
|
249
258
|
self,
|
|
250
259
|
load_config: Callable[[], Mapping[str, Any]],
|
|
251
260
|
client_creator: Callable[..., Any],
|
|
252
|
-
cache:
|
|
261
|
+
cache: dict[str, Any],
|
|
253
262
|
profile_name: str,
|
|
254
263
|
prompter: Callable[..., Any] = ...,
|
|
255
|
-
credential_sourcer:
|
|
256
|
-
profile_provider_builder:
|
|
257
|
-
) -> None:
|
|
258
|
-
|
|
264
|
+
credential_sourcer: CanonicalNameCredentialSourcer | None = ...,
|
|
265
|
+
profile_provider_builder: Any | None = ...,
|
|
266
|
+
) -> None:
|
|
267
|
+
self.cache: dict[str, Any] = ...
|
|
268
|
+
def load(self) -> DeferredRefreshableCredentials | None: ...
|
|
259
269
|
|
|
260
270
|
class AssumeRoleWithWebIdentityProvider(CredentialProvider):
|
|
261
271
|
METHOD: str = ...
|
|
262
|
-
CANONICAL_NAME:
|
|
263
|
-
cache: Any = ...
|
|
272
|
+
CANONICAL_NAME: None = ...
|
|
264
273
|
def __init__(
|
|
265
274
|
self,
|
|
266
|
-
load_config: Any,
|
|
267
|
-
client_creator: Any,
|
|
275
|
+
load_config: Callable[[], Mapping[str, Any]],
|
|
276
|
+
client_creator: Callable[..., Any],
|
|
268
277
|
profile_name: str,
|
|
269
|
-
cache:
|
|
278
|
+
cache: dict[str, Any] | None = ...,
|
|
270
279
|
disable_env_vars: bool = ...,
|
|
271
|
-
token_loader_cls:
|
|
272
|
-
) -> None:
|
|
273
|
-
|
|
280
|
+
token_loader_cls: type[FileWebIdentityTokenLoader] | None = ...,
|
|
281
|
+
) -> None:
|
|
282
|
+
self.cache: dict[str, Any] = ...
|
|
283
|
+
def load(self) -> DeferredRefreshableCredentials | None: ...
|
|
274
284
|
|
|
275
285
|
class CanonicalNameCredentialSourcer:
|
|
276
|
-
def __init__(self, providers:
|
|
286
|
+
def __init__(self, providers: list[CredentialProvider]) -> None: ...
|
|
277
287
|
def is_supported(self, source_name: str) -> bool: ...
|
|
278
288
|
def source_credentials(self, source_name: str) -> Credentials: ...
|
|
279
289
|
|
|
@@ -285,44 +295,46 @@ class ContainerProvider(CredentialProvider):
|
|
|
285
295
|
ENV_VAR_AUTH_TOKEN: str = ...
|
|
286
296
|
ENV_VAR_AUTH_TOKEN_FILE: str = ...
|
|
287
297
|
def __init__(
|
|
288
|
-
self,
|
|
298
|
+
self,
|
|
299
|
+
environ: Mapping[str, str] | None = ...,
|
|
300
|
+
fetcher: AssumeRoleCredentialFetcher | None = ...,
|
|
289
301
|
) -> None: ...
|
|
290
302
|
def load(self) -> RefreshableCredentials: ...
|
|
291
303
|
|
|
292
304
|
class CredentialResolver:
|
|
293
|
-
providers:
|
|
294
|
-
def __init__(self, providers:
|
|
305
|
+
providers: list[CredentialProvider]
|
|
306
|
+
def __init__(self, providers: list[CredentialProvider]) -> None: ...
|
|
295
307
|
def insert_before(self, name: str, credential_provider: CredentialProvider) -> None: ...
|
|
296
308
|
def insert_after(self, name: str, credential_provider: CredentialProvider) -> None: ...
|
|
297
309
|
def remove(self, name: str) -> None: ...
|
|
298
310
|
def get_provider(self, name: str) -> CredentialProvider: ...
|
|
299
|
-
def load_credentials(self) ->
|
|
311
|
+
def load_credentials(self) -> Credentials | None: ...
|
|
300
312
|
|
|
301
313
|
class SSOCredentialFetcher(CachedCredentialFetcher):
|
|
302
314
|
def __init__(
|
|
303
315
|
self,
|
|
304
|
-
start_url:
|
|
305
|
-
sso_region:
|
|
306
|
-
role_name:
|
|
307
|
-
account_id:
|
|
308
|
-
client_creator: Any,
|
|
309
|
-
token_loader:
|
|
310
|
-
cache:
|
|
311
|
-
expiry_window_seconds:
|
|
312
|
-
token_provider:
|
|
313
|
-
sso_session_name:
|
|
316
|
+
start_url: str,
|
|
317
|
+
sso_region: str,
|
|
318
|
+
role_name: str,
|
|
319
|
+
account_id: str,
|
|
320
|
+
client_creator: Callable[..., Any],
|
|
321
|
+
token_loader: Callable[[], str] | None = ...,
|
|
322
|
+
cache: dict[str, Any] | None = ...,
|
|
323
|
+
expiry_window_seconds: float | None = ...,
|
|
324
|
+
token_provider: SSOTokenProvider | None = ...,
|
|
325
|
+
sso_session_name: str | None = ...,
|
|
314
326
|
) -> None: ...
|
|
315
327
|
|
|
316
328
|
class SSOProvider(CredentialProvider):
|
|
317
329
|
METHOD: str = ...
|
|
318
|
-
cache: Any = ...
|
|
319
330
|
def __init__(
|
|
320
331
|
self,
|
|
321
|
-
load_config: Any,
|
|
322
|
-
client_creator: Any,
|
|
332
|
+
load_config: Callable[[], Any],
|
|
333
|
+
client_creator: Callable[..., Any],
|
|
323
334
|
profile_name: str,
|
|
324
|
-
cache:
|
|
325
|
-
token_cache:
|
|
326
|
-
token_provider:
|
|
327
|
-
) -> None:
|
|
335
|
+
cache: dict[str, Any] | None = ...,
|
|
336
|
+
token_cache: dict[str, Any] | None = ...,
|
|
337
|
+
token_provider: SSOTokenProvider | None = ...,
|
|
338
|
+
) -> None:
|
|
339
|
+
self.cache: dict[str, Any] = ...
|
|
328
340
|
def load(self) -> DeferredRefreshableCredentials: ...
|
botocore-stubs/crt/__init__.pyi
CHANGED
botocore-stubs/crt/auth.pyi
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for botocore.crt.auth module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
2
6
|
|
|
3
7
|
from awscrt.auth import AwsCredentials
|
|
4
8
|
from botocore.auth import SIGNED_HEADERS_BLACKLIST as SIGNED_HEADERS_BLACKLIST
|
|
@@ -68,4 +72,4 @@ class CrtSigV4QueryAuth(CrtSigV4Auth):
|
|
|
68
72
|
|
|
69
73
|
class CrtS3SigV4QueryAuth(CrtSigV4QueryAuth): ...
|
|
70
74
|
|
|
71
|
-
CRT_AUTH_TYPE_MAPS:
|
|
75
|
+
CRT_AUTH_TYPE_MAPS: dict[str, type[BaseSigner]] = ...
|