1 from typing import Any, Text, Type
3 from boto.connection import AWSAuthConnection
4 from boto.exception import BotoClientError
6 from .bucket import Bucket
8 def check_lowercase_bucketname(n): ...
9 def assert_case_insensitive(f): ...
12 def get_bucket_server(self, server, bucket): ...
13 def build_url_base(self, connection, protocol, server, bucket, key: str = ...): ...
14 def build_host(self, server, bucket): ...
15 def build_auth_path(self, bucket, key: str = ...): ...
16 def build_path_base(self, bucket, key: str = ...): ...
18 class SubdomainCallingFormat(_CallingFormat):
19 def get_bucket_server(self, server, bucket): ...
21 class VHostCallingFormat(_CallingFormat):
22 def get_bucket_server(self, server, bucket): ...
24 class OrdinaryCallingFormat(_CallingFormat):
25 def get_bucket_server(self, server, bucket): ...
26 def build_path_base(self, bucket, key: str = ...): ...
28 class ProtocolIndependentOrdinaryCallingFormat(OrdinaryCallingFormat):
29 def build_url_base(self, connection, protocol, server, bucket, key: str = ...): ...
43 class NoHostProvided: ...
44 class HostRequiredError(BotoClientError): ...
46 class S3Connection(AWSAuthConnection):
48 DefaultCallingFormat: Any
51 bucket_class: Type[Bucket]
55 aws_access_key_id: Any | None = ...,
56 aws_secret_access_key: Any | None = ...,
57 is_secure: bool = ...,
58 port: Any | None = ...,
59 proxy: Any | None = ...,
60 proxy_port: Any | None = ...,
61 proxy_user: Any | None = ...,
62 proxy_pass: Any | None = ...,
65 https_connection_factory: Any | None = ...,
66 calling_format: Any = ...,
69 bucket_class: Type[Bucket] = ...,
70 security_token: Any | None = ...,
71 suppress_consec_slashes: bool = ...,
73 validate_certs: Any | None = ...,
74 profile_name: Any | None = ...,
76 def __iter__(self): ...
77 def __contains__(self, bucket_name): ...
78 def set_bucket_class(self, bucket_class: Type[Bucket]) -> None: ...
79 def build_post_policy(self, expiration_time, conditions): ...
80 def build_post_form_args(
84 expires_in: int = ...,
85 acl: Any | None = ...,
86 success_action_redirect: Any | None = ...,
87 max_content_length: Any | None = ...,
88 http_method: str = ...,
89 fields: Any | None = ...,
90 conditions: Any | None = ...,
91 storage_class: str = ...,
92 server_side_encryption: Any | None = ...,
94 def generate_url_sigv4(
100 headers: dict[Text, Text] | None = ...,
101 force_http: bool = ...,
102 response_headers: dict[Text, Text] | None = ...,
103 version_id: Any | None = ...,
104 iso_date: Any | None = ...,
112 headers: dict[Text, Text] | None = ...,
113 query_auth: bool = ...,
114 force_http: bool = ...,
115 response_headers: dict[Text, Text] | None = ...,
116 expires_in_absolute: bool = ...,
117 version_id: Any | None = ...,
119 def get_all_buckets(self, headers: dict[Text, Text] | None = ...): ...
120 def get_canonical_user_id(self, headers: dict[Text, Text] | None = ...): ...
121 def get_bucket(self, bucket_name: Text, validate: bool = ..., headers: dict[Text, Text] | None = ...) -> Bucket: ...
122 def head_bucket(self, bucket_name, headers: dict[Text, Text] | None = ...): ...
123 def lookup(self, bucket_name, validate: bool = ..., headers: dict[Text, Text] | None = ...): ...
125 self, bucket_name, headers: dict[Text, Text] | None = ..., location: Any = ..., policy: Any | None = ...
127 def delete_bucket(self, bucket, headers: dict[Text, Text] | None = ...): ...
128 def make_request(self, method, bucket: str = ..., key: str = ..., headers: Any | None = ..., data: str = ..., query_args: Any | None = ..., sender: Any | None = ..., override_num_retries: Any | None = ..., retry_handler: Any | None = ..., *args, **kwargs): ... # type: ignore # https://github.com/python/mypy/issues/1237