capo-s3 0.1.0__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.
Files changed (817) hide show
  1. capo_s3/__init__.py +52 -0
  2. capo_s3/_async.py +25 -0
  3. capo_s3/_auth/_identity.py +16 -0
  4. capo_s3/_auth/_providers.py +318 -0
  5. capo_s3/_auth/_signers.py +84 -0
  6. capo_s3/_auth/_sigv4.py +382 -0
  7. capo_s3/_auth/_zapros_handler.py +62 -0
  8. capo_s3/_iter.py +113 -0
  9. capo_s3/_operations/amazon_s3/abort_multipart_upload.py +160 -0
  10. capo_s3/_operations/amazon_s3/complete_multipart_upload.py +245 -0
  11. capo_s3/_operations/amazon_s3/copy_object.py +348 -0
  12. capo_s3/_operations/amazon_s3/create_bucket.py +180 -0
  13. capo_s3/_operations/amazon_s3/create_bucket_metadata_configuration.py +129 -0
  14. capo_s3/_operations/amazon_s3/create_bucket_metadata_table_configuration.py +131 -0
  15. capo_s3/_operations/amazon_s3/create_multipart_upload.py +317 -0
  16. capo_s3/_operations/amazon_s3/create_session.py +194 -0
  17. capo_s3/_operations/amazon_s3/delete_bucket.py +115 -0
  18. capo_s3/_operations/amazon_s3/delete_bucket_analytics_configuration.py +117 -0
  19. capo_s3/_operations/amazon_s3/delete_bucket_cors.py +115 -0
  20. capo_s3/_operations/amazon_s3/delete_bucket_encryption.py +115 -0
  21. capo_s3/_operations/amazon_s3/delete_bucket_intelligent_tiering_configuration.py +117 -0
  22. capo_s3/_operations/amazon_s3/delete_bucket_inventory_configuration.py +117 -0
  23. capo_s3/_operations/amazon_s3/delete_bucket_lifecycle.py +115 -0
  24. capo_s3/_operations/amazon_s3/delete_bucket_metadata_configuration.py +115 -0
  25. capo_s3/_operations/amazon_s3/delete_bucket_metadata_table_configuration.py +115 -0
  26. capo_s3/_operations/amazon_s3/delete_bucket_metrics_configuration.py +117 -0
  27. capo_s3/_operations/amazon_s3/delete_bucket_ownership_controls.py +115 -0
  28. capo_s3/_operations/amazon_s3/delete_bucket_policy.py +115 -0
  29. capo_s3/_operations/amazon_s3/delete_bucket_replication.py +115 -0
  30. capo_s3/_operations/amazon_s3/delete_bucket_tagging.py +115 -0
  31. capo_s3/_operations/amazon_s3/delete_bucket_website.py +115 -0
  32. capo_s3/_operations/amazon_s3/delete_object.py +169 -0
  33. capo_s3/_operations/amazon_s3/delete_object_tagging.py +144 -0
  34. capo_s3/_operations/amazon_s3/delete_objects.py +166 -0
  35. capo_s3/_operations/amazon_s3/delete_public_access_block.py +115 -0
  36. capo_s3/_operations/amazon_s3/get_bucket_abac.py +139 -0
  37. capo_s3/_operations/amazon_s3/get_bucket_accelerate_configuration.py +153 -0
  38. capo_s3/_operations/amazon_s3/get_bucket_acl.py +138 -0
  39. capo_s3/_operations/amazon_s3/get_bucket_analytics_configuration.py +150 -0
  40. capo_s3/_operations/amazon_s3/get_bucket_cors.py +139 -0
  41. capo_s3/_operations/amazon_s3/get_bucket_encryption.py +145 -0
  42. capo_s3/_operations/amazon_s3/get_bucket_intelligent_tiering_configuration.py +150 -0
  43. capo_s3/_operations/amazon_s3/get_bucket_inventory_configuration.py +150 -0
  44. capo_s3/_operations/amazon_s3/get_bucket_lifecycle_configuration.py +154 -0
  45. capo_s3/_operations/amazon_s3/get_bucket_location.py +143 -0
  46. capo_s3/_operations/amazon_s3/get_bucket_logging.py +143 -0
  47. capo_s3/_operations/amazon_s3/get_bucket_metadata_configuration.py +145 -0
  48. capo_s3/_operations/amazon_s3/get_bucket_metadata_table_configuration.py +145 -0
  49. capo_s3/_operations/amazon_s3/get_bucket_metrics_configuration.py +150 -0
  50. capo_s3/_operations/amazon_s3/get_bucket_notification_configuration.py +146 -0
  51. capo_s3/_operations/amazon_s3/get_bucket_ownership_controls.py +149 -0
  52. capo_s3/_operations/amazon_s3/get_bucket_policy.py +138 -0
  53. capo_s3/_operations/amazon_s3/get_bucket_policy_status.py +145 -0
  54. capo_s3/_operations/amazon_s3/get_bucket_replication.py +145 -0
  55. capo_s3/_operations/amazon_s3/get_bucket_request_payment.py +141 -0
  56. capo_s3/_operations/amazon_s3/get_bucket_tagging.py +143 -0
  57. capo_s3/_operations/amazon_s3/get_bucket_versioning.py +146 -0
  58. capo_s3/_operations/amazon_s3/get_bucket_website.py +146 -0
  59. capo_s3/_operations/amazon_s3/get_object.py +431 -0
  60. capo_s3/_operations/amazon_s3/get_object_acl.py +157 -0
  61. capo_s3/_operations/amazon_s3/get_object_attributes.py +199 -0
  62. capo_s3/_operations/amazon_s3/get_object_legal_hold.py +150 -0
  63. capo_s3/_operations/amazon_s3/get_object_lock_configuration.py +149 -0
  64. capo_s3/_operations/amazon_s3/get_object_retention.py +150 -0
  65. capo_s3/_operations/amazon_s3/get_object_tagging.py +154 -0
  66. capo_s3/_operations/amazon_s3/get_object_torrent.py +155 -0
  67. capo_s3/_operations/amazon_s3/get_public_access_block.py +145 -0
  68. capo_s3/_operations/amazon_s3/head_bucket.py +166 -0
  69. capo_s3/_operations/amazon_s3/head_object.py +435 -0
  70. capo_s3/_operations/amazon_s3/list_bucket_analytics_configurations.py +146 -0
  71. capo_s3/_operations/amazon_s3/list_bucket_intelligent_tiering_configurations.py +146 -0
  72. capo_s3/_operations/amazon_s3/list_bucket_inventory_configurations.py +146 -0
  73. capo_s3/_operations/amazon_s3/list_bucket_metrics_configurations.py +146 -0
  74. capo_s3/_operations/amazon_s3/list_buckets.py +142 -0
  75. capo_s3/_operations/amazon_s3/list_directory_buckets.py +145 -0
  76. capo_s3/_operations/amazon_s3/list_multipart_uploads.py +171 -0
  77. capo_s3/_operations/amazon_s3/list_object_versions.py +175 -0
  78. capo_s3/_operations/amazon_s3/list_objects.py +169 -0
  79. capo_s3/_operations/amazon_s3/list_objects_v2.py +175 -0
  80. capo_s3/_operations/amazon_s3/list_parts.py +183 -0
  81. capo_s3/_operations/amazon_s3/put_bucket_abac.py +129 -0
  82. capo_s3/_operations/amazon_s3/put_bucket_accelerate_configuration.py +127 -0
  83. capo_s3/_operations/amazon_s3/put_bucket_acl.py +142 -0
  84. capo_s3/_operations/amazon_s3/put_bucket_analytics_configuration.py +126 -0
  85. capo_s3/_operations/amazon_s3/put_bucket_cors.py +129 -0
  86. capo_s3/_operations/amazon_s3/put_bucket_encryption.py +131 -0
  87. capo_s3/_operations/amazon_s3/put_bucket_intelligent_tiering_configuration.py +128 -0
  88. capo_s3/_operations/amazon_s3/put_bucket_inventory_configuration.py +126 -0
  89. capo_s3/_operations/amazon_s3/put_bucket_lifecycle_configuration.py +165 -0
  90. capo_s3/_operations/amazon_s3/put_bucket_logging.py +129 -0
  91. capo_s3/_operations/amazon_s3/put_bucket_metrics_configuration.py +126 -0
  92. capo_s3/_operations/amazon_s3/put_bucket_notification_configuration.py +130 -0
  93. capo_s3/_operations/amazon_s3/put_bucket_ownership_controls.py +129 -0
  94. capo_s3/_operations/amazon_s3/put_bucket_policy.py +126 -0
  95. capo_s3/_operations/amazon_s3/put_bucket_replication.py +133 -0
  96. capo_s3/_operations/amazon_s3/put_bucket_request_payment.py +131 -0
  97. capo_s3/_operations/amazon_s3/put_bucket_tagging.py +127 -0
  98. capo_s3/_operations/amazon_s3/put_bucket_versioning.py +131 -0
  99. capo_s3/_operations/amazon_s3/put_bucket_website.py +129 -0
  100. capo_s3/_operations/amazon_s3/put_object.py +389 -0
  101. capo_s3/_operations/amazon_s3/put_object_acl.py +176 -0
  102. capo_s3/_operations/amazon_s3/put_object_legal_hold.py +164 -0
  103. capo_s3/_operations/amazon_s3/put_object_lock_configuration.py +168 -0
  104. capo_s3/_operations/amazon_s3/put_object_retention.py +168 -0
  105. capo_s3/_operations/amazon_s3/put_object_tagging.py +157 -0
  106. capo_s3/_operations/amazon_s3/put_public_access_block.py +131 -0
  107. capo_s3/_operations/amazon_s3/rename_object.py +165 -0
  108. capo_s3/_operations/amazon_s3/restore_object.py +167 -0
  109. capo_s3/_operations/amazon_s3/select_object_content.py +201 -0
  110. capo_s3/_operations/amazon_s3/update_bucket_metadata_inventory_table_configuration.py +131 -0
  111. capo_s3/_operations/amazon_s3/update_bucket_metadata_journal_table_configuration.py +131 -0
  112. capo_s3/_operations/amazon_s3/update_object_encryption.py +175 -0
  113. capo_s3/_operations/amazon_s3/upload_part.py +285 -0
  114. capo_s3/_operations/amazon_s3/upload_part_copy.py +260 -0
  115. capo_s3/_operations/amazon_s3/write_get_object_response.py +251 -0
  116. capo_s3/_pagination.py +21 -0
  117. capo_s3/_protocol/__init__.py +1 -0
  118. capo_s3/_protocol/errors.py +59 -0
  119. capo_s3/_protocol/eventstream.py +238 -0
  120. capo_s3/_protocol/xml.py +27 -0
  121. capo_s3/_rule_engine/__init__.py +0 -0
  122. capo_s3/_rule_engine/_aws_partition.py +160 -0
  123. capo_s3/_rule_engine/_endpoint_rule_set.py +8040 -0
  124. capo_s3/_rule_engine/_endpoint_runtime.py +389 -0
  125. capo_s3/_services/_aws_config.py +152 -0
  126. capo_s3/_services/_pipeline.py +224 -0
  127. capo_s3/_services/async_s3.py +9065 -0
  128. capo_s3/_services/s3.py +8931 -0
  129. capo_s3/errors/__init__.py +46 -0
  130. capo_s3/errors/_base.py +94 -0
  131. capo_s3/errors/access_denied.py +36 -0
  132. capo_s3/errors/bucket_already_exists.py +39 -0
  133. capo_s3/errors/bucket_already_owned_by_you.py +39 -0
  134. capo_s3/errors/encryption_type_mismatch.py +39 -0
  135. capo_s3/errors/idempotency_parameter_mismatch.py +41 -0
  136. capo_s3/errors/invalid_object_state.py +76 -0
  137. capo_s3/errors/invalid_request.py +39 -0
  138. capo_s3/errors/invalid_write_offset.py +39 -0
  139. capo_s3/errors/no_such_bucket.py +36 -0
  140. capo_s3/errors/no_such_key.py +36 -0
  141. capo_s3/errors/no_such_upload.py +36 -0
  142. capo_s3/errors/not_found.py +36 -0
  143. capo_s3/errors/object_already_in_active_tier_error.py +41 -0
  144. capo_s3/errors/object_not_in_active_tier_error.py +41 -0
  145. capo_s3/errors/too_many_parts.py +36 -0
  146. capo_s3/py.typed +0 -0
  147. capo_s3/types/_prelude/blob.py +22 -0
  148. capo_s3/types/_prelude/timestamp.py +22 -0
  149. capo_s3/types/abac_status.py +34 -0
  150. capo_s3/types/abort_date.py +25 -0
  151. capo_s3/types/abort_incomplete_multipart_upload.py +34 -0
  152. capo_s3/types/abort_multipart_upload_output.py +24 -0
  153. capo_s3/types/abort_multipart_upload_request.py +43 -0
  154. capo_s3/types/abort_rule_id.py +5 -0
  155. capo_s3/types/accelerate_configuration.py +38 -0
  156. capo_s3/types/accept_ranges.py +5 -0
  157. capo_s3/types/access_control_policy.py +46 -0
  158. capo_s3/types/access_control_translation.py +36 -0
  159. capo_s3/types/access_key_id_value.py +5 -0
  160. capo_s3/types/access_point_alias.py +5 -0
  161. capo_s3/types/access_point_arn.py +5 -0
  162. capo_s3/types/account_id.py +5 -0
  163. capo_s3/types/allow_quoted_record_delimiter.py +5 -0
  164. capo_s3/types/allowed_header.py +5 -0
  165. capo_s3/types/allowed_headers.py +37 -0
  166. capo_s3/types/allowed_method.py +5 -0
  167. capo_s3/types/allowed_methods.py +37 -0
  168. capo_s3/types/allowed_origin.py +5 -0
  169. capo_s3/types/allowed_origins.py +37 -0
  170. capo_s3/types/analytics_and_operator.py +41 -0
  171. capo_s3/types/analytics_configuration.py +65 -0
  172. capo_s3/types/analytics_configuration_list.py +49 -0
  173. capo_s3/types/analytics_export_destination.py +46 -0
  174. capo_s3/types/analytics_filter.py +62 -0
  175. capo_s3/types/analytics_id.py +5 -0
  176. capo_s3/types/analytics_s3_bucket_destination.py +67 -0
  177. capo_s3/types/analytics_s3_export_file_format.py +26 -0
  178. capo_s3/types/archive_status.py +27 -0
  179. capo_s3/types/blocked_encryption_types.py +41 -0
  180. capo_s3/types/body.py +25 -0
  181. capo_s3/types/bucket.py +64 -0
  182. capo_s3/types/bucket_abac_status.py +27 -0
  183. capo_s3/types/bucket_accelerate_status.py +27 -0
  184. capo_s3/types/bucket_canned_acl.py +29 -0
  185. capo_s3/types/bucket_info.py +50 -0
  186. capo_s3/types/bucket_key_enabled.py +5 -0
  187. capo_s3/types/bucket_lifecycle_configuration.py +37 -0
  188. capo_s3/types/bucket_location_constraint.py +63 -0
  189. capo_s3/types/bucket_location_name.py +5 -0
  190. capo_s3/types/bucket_logging_status.py +37 -0
  191. capo_s3/types/bucket_logs_permission.py +28 -0
  192. capo_s3/types/bucket_name.py +5 -0
  193. capo_s3/types/bucket_namespace.py +27 -0
  194. capo_s3/types/bucket_region.py +5 -0
  195. capo_s3/types/bucket_type.py +24 -0
  196. capo_s3/types/bucket_versioning_status.py +27 -0
  197. capo_s3/types/buckets.py +45 -0
  198. capo_s3/types/bypass_governance_retention.py +5 -0
  199. capo_s3/types/bytes_processed.py +5 -0
  200. capo_s3/types/bytes_returned.py +5 -0
  201. capo_s3/types/bytes_scanned.py +5 -0
  202. capo_s3/types/cache_control.py +5 -0
  203. capo_s3/types/checksum.py +122 -0
  204. capo_s3/types/checksum_algorithm.py +35 -0
  205. capo_s3/types/checksum_algorithm_list.py +47 -0
  206. capo_s3/types/checksum_crc32.py +5 -0
  207. capo_s3/types/checksum_crc32_c.py +5 -0
  208. capo_s3/types/checksum_crc64_nvme.py +5 -0
  209. capo_s3/types/checksum_md5.py +5 -0
  210. capo_s3/types/checksum_mode.py +24 -0
  211. capo_s3/types/checksum_sha1.py +5 -0
  212. capo_s3/types/checksum_sha256.py +5 -0
  213. capo_s3/types/checksum_sha512.py +5 -0
  214. capo_s3/types/checksum_type.py +27 -0
  215. capo_s3/types/checksum_xxhash128.py +5 -0
  216. capo_s3/types/checksum_xxhash3.py +5 -0
  217. capo_s3/types/checksum_xxhash64.py +5 -0
  218. capo_s3/types/client_token.py +5 -0
  219. capo_s3/types/code.py +5 -0
  220. capo_s3/types/comments.py +5 -0
  221. capo_s3/types/common_prefix.py +30 -0
  222. capo_s3/types/common_prefix_list.py +45 -0
  223. capo_s3/types/complete_multipart_upload_output.py +175 -0
  224. capo_s3/types/complete_multipart_upload_request.py +117 -0
  225. capo_s3/types/completed_multipart_upload.py +35 -0
  226. capo_s3/types/completed_part.py +122 -0
  227. capo_s3/types/completed_part_list.py +45 -0
  228. capo_s3/types/compression_type.py +28 -0
  229. capo_s3/types/condition.py +44 -0
  230. capo_s3/types/confirm_remove_self_bucket_access.py +5 -0
  231. capo_s3/types/content_disposition.py +5 -0
  232. capo_s3/types/content_encoding.py +5 -0
  233. capo_s3/types/content_language.py +5 -0
  234. capo_s3/types/content_length.py +5 -0
  235. capo_s3/types/content_md5.py +5 -0
  236. capo_s3/types/content_range.py +5 -0
  237. capo_s3/types/content_type.py +5 -0
  238. capo_s3/types/continuation_event.py +33 -0
  239. capo_s3/types/copy_object_output.py +77 -0
  240. capo_s3/types/copy_object_request.py +183 -0
  241. capo_s3/types/copy_object_result.py +146 -0
  242. capo_s3/types/copy_part_result.py +130 -0
  243. capo_s3/types/copy_source.py +5 -0
  244. capo_s3/types/copy_source_if_match.py +5 -0
  245. capo_s3/types/copy_source_if_modified_since.py +25 -0
  246. capo_s3/types/copy_source_if_none_match.py +5 -0
  247. capo_s3/types/copy_source_if_unmodified_since.py +27 -0
  248. capo_s3/types/copy_source_range.py +5 -0
  249. capo_s3/types/copy_source_sse_customer_algorithm.py +5 -0
  250. capo_s3/types/copy_source_sse_customer_key.py +5 -0
  251. capo_s3/types/copy_source_sse_customer_key_md5.py +5 -0
  252. capo_s3/types/copy_source_version_id.py +5 -0
  253. capo_s3/types/cors_configuration.py +37 -0
  254. capo_s3/types/cors_rule.py +101 -0
  255. capo_s3/types/cors_rules.py +45 -0
  256. capo_s3/types/create_bucket_configuration.py +78 -0
  257. capo_s3/types/create_bucket_metadata_configuration_request.py +60 -0
  258. capo_s3/types/create_bucket_metadata_table_configuration_request.py +62 -0
  259. capo_s3/types/create_bucket_output.py +30 -0
  260. capo_s3/types/create_bucket_request.py +73 -0
  261. capo_s3/types/create_multipart_upload_output.py +90 -0
  262. capo_s3/types/create_multipart_upload_request.py +134 -0
  263. capo_s3/types/create_session_output.py +56 -0
  264. capo_s3/types/create_session_request.py +44 -0
  265. capo_s3/types/creation_date.py +25 -0
  266. capo_s3/types/csv_input.py +96 -0
  267. capo_s3/types/csv_output.py +74 -0
  268. capo_s3/types/data_redundancy.py +27 -0
  269. capo_s3/types/date.py +25 -0
  270. capo_s3/types/days.py +5 -0
  271. capo_s3/types/days_after_initiation.py +5 -0
  272. capo_s3/types/default_retention.py +56 -0
  273. capo_s3/types/delete.py +47 -0
  274. capo_s3/types/delete_bucket_analytics_configuration_request.py +33 -0
  275. capo_s3/types/delete_bucket_cors_request.py +28 -0
  276. capo_s3/types/delete_bucket_encryption_request.py +30 -0
  277. capo_s3/types/delete_bucket_intelligent_tiering_configuration_request.py +33 -0
  278. capo_s3/types/delete_bucket_inventory_configuration_request.py +33 -0
  279. capo_s3/types/delete_bucket_lifecycle_request.py +30 -0
  280. capo_s3/types/delete_bucket_metadata_configuration_request.py +30 -0
  281. capo_s3/types/delete_bucket_metadata_table_configuration_request.py +30 -0
  282. capo_s3/types/delete_bucket_metrics_configuration_request.py +33 -0
  283. capo_s3/types/delete_bucket_ownership_controls_request.py +30 -0
  284. capo_s3/types/delete_bucket_policy_request.py +28 -0
  285. capo_s3/types/delete_bucket_replication_request.py +30 -0
  286. capo_s3/types/delete_bucket_request.py +28 -0
  287. capo_s3/types/delete_bucket_tagging_request.py +28 -0
  288. capo_s3/types/delete_bucket_website_request.py +28 -0
  289. capo_s3/types/delete_marker.py +5 -0
  290. capo_s3/types/delete_marker_entry.py +74 -0
  291. capo_s3/types/delete_marker_replication.py +40 -0
  292. capo_s3/types/delete_marker_replication_status.py +29 -0
  293. capo_s3/types/delete_marker_version_id.py +5 -0
  294. capo_s3/types/delete_markers.py +45 -0
  295. capo_s3/types/delete_object_output.py +30 -0
  296. capo_s3/types/delete_object_request.py +55 -0
  297. capo_s3/types/delete_object_tagging_output.py +25 -0
  298. capo_s3/types/delete_object_tagging_request.py +34 -0
  299. capo_s3/types/delete_objects_output.py +50 -0
  300. capo_s3/types/delete_objects_request.py +57 -0
  301. capo_s3/types/delete_public_access_block_request.py +30 -0
  302. capo_s3/types/deleted_object.py +60 -0
  303. capo_s3/types/deleted_objects.py +45 -0
  304. capo_s3/types/delimiter.py +5 -0
  305. capo_s3/types/description.py +5 -0
  306. capo_s3/types/destination.py +124 -0
  307. capo_s3/types/destination_result.py +58 -0
  308. capo_s3/types/directory_bucket_token.py +5 -0
  309. capo_s3/types/display_name.py +5 -0
  310. capo_s3/types/e_tag.py +5 -0
  311. capo_s3/types/email_address.py +5 -0
  312. capo_s3/types/enable_request_progress.py +5 -0
  313. capo_s3/types/encoding_type.py +25 -0
  314. capo_s3/types/encryption.py +56 -0
  315. capo_s3/types/encryption_configuration.py +30 -0
  316. capo_s3/types/encryption_type.py +27 -0
  317. capo_s3/types/encryption_type_list.py +45 -0
  318. capo_s3/types/end.py +5 -0
  319. capo_s3/types/end_event.py +33 -0
  320. capo_s3/types/error.py +54 -0
  321. capo_s3/types/error_code.py +5 -0
  322. capo_s3/types/error_details.py +38 -0
  323. capo_s3/types/error_document.py +32 -0
  324. capo_s3/types/error_message.py +5 -0
  325. capo_s3/types/errors.py +45 -0
  326. capo_s3/types/event.py +53 -0
  327. capo_s3/types/event_bridge_configuration.py +19 -0
  328. capo_s3/types/event_list.py +45 -0
  329. capo_s3/types/existing_object_replication.py +42 -0
  330. capo_s3/types/existing_object_replication_status.py +29 -0
  331. capo_s3/types/expiration.py +5 -0
  332. capo_s3/types/expiration_state.py +27 -0
  333. capo_s3/types/expiration_status.py +27 -0
  334. capo_s3/types/expired_object_delete_marker.py +5 -0
  335. capo_s3/types/expires.py +5 -0
  336. capo_s3/types/expose_header.py +5 -0
  337. capo_s3/types/expose_headers.py +37 -0
  338. capo_s3/types/expression.py +5 -0
  339. capo_s3/types/expression_type.py +24 -0
  340. capo_s3/types/fetch_owner.py +5 -0
  341. capo_s3/types/field_delimiter.py +5 -0
  342. capo_s3/types/file_header_info.py +28 -0
  343. capo_s3/types/filter_rule.py +42 -0
  344. capo_s3/types/filter_rule_list.py +45 -0
  345. capo_s3/types/filter_rule_name.py +27 -0
  346. capo_s3/types/filter_rule_value.py +5 -0
  347. capo_s3/types/get_bucket_abac_output.py +36 -0
  348. capo_s3/types/get_bucket_abac_request.py +28 -0
  349. capo_s3/types/get_bucket_accelerate_configuration_output.py +42 -0
  350. capo_s3/types/get_bucket_accelerate_configuration_request.py +32 -0
  351. capo_s3/types/get_bucket_acl_output.py +46 -0
  352. capo_s3/types/get_bucket_acl_request.py +28 -0
  353. capo_s3/types/get_bucket_analytics_configuration_output.py +44 -0
  354. capo_s3/types/get_bucket_analytics_configuration_request.py +33 -0
  355. capo_s3/types/get_bucket_cors_output.py +35 -0
  356. capo_s3/types/get_bucket_cors_request.py +28 -0
  357. capo_s3/types/get_bucket_encryption_output.py +45 -0
  358. capo_s3/types/get_bucket_encryption_request.py +28 -0
  359. capo_s3/types/get_bucket_intelligent_tiering_configuration_output.py +46 -0
  360. capo_s3/types/get_bucket_intelligent_tiering_configuration_request.py +33 -0
  361. capo_s3/types/get_bucket_inventory_configuration_output.py +44 -0
  362. capo_s3/types/get_bucket_inventory_configuration_request.py +33 -0
  363. capo_s3/types/get_bucket_lifecycle_configuration_output.py +40 -0
  364. capo_s3/types/get_bucket_lifecycle_configuration_request.py +30 -0
  365. capo_s3/types/get_bucket_location_output.py +42 -0
  366. capo_s3/types/get_bucket_location_request.py +28 -0
  367. capo_s3/types/get_bucket_logging_output.py +37 -0
  368. capo_s3/types/get_bucket_logging_request.py +28 -0
  369. capo_s3/types/get_bucket_metadata_configuration_output.py +48 -0
  370. capo_s3/types/get_bucket_metadata_configuration_request.py +30 -0
  371. capo_s3/types/get_bucket_metadata_configuration_result.py +48 -0
  372. capo_s3/types/get_bucket_metadata_table_configuration_output.py +48 -0
  373. capo_s3/types/get_bucket_metadata_table_configuration_request.py +30 -0
  374. capo_s3/types/get_bucket_metadata_table_configuration_result.py +73 -0
  375. capo_s3/types/get_bucket_metrics_configuration_output.py +44 -0
  376. capo_s3/types/get_bucket_metrics_configuration_request.py +33 -0
  377. capo_s3/types/get_bucket_notification_configuration_request.py +30 -0
  378. capo_s3/types/get_bucket_ownership_controls_output.py +42 -0
  379. capo_s3/types/get_bucket_ownership_controls_request.py +30 -0
  380. capo_s3/types/get_bucket_policy_output.py +30 -0
  381. capo_s3/types/get_bucket_policy_request.py +28 -0
  382. capo_s3/types/get_bucket_policy_status_output.py +40 -0
  383. capo_s3/types/get_bucket_policy_status_request.py +30 -0
  384. capo_s3/types/get_bucket_replication_output.py +41 -0
  385. capo_s3/types/get_bucket_replication_request.py +30 -0
  386. capo_s3/types/get_bucket_request_payment_output.py +36 -0
  387. capo_s3/types/get_bucket_request_payment_request.py +30 -0
  388. capo_s3/types/get_bucket_tagging_output.py +36 -0
  389. capo_s3/types/get_bucket_tagging_request.py +28 -0
  390. capo_s3/types/get_bucket_versioning_output.py +54 -0
  391. capo_s3/types/get_bucket_versioning_request.py +28 -0
  392. capo_s3/types/get_bucket_website_output.py +90 -0
  393. capo_s3/types/get_bucket_website_request.py +28 -0
  394. capo_s3/types/get_object_acl_output.py +48 -0
  395. capo_s3/types/get_object_acl_request.py +36 -0
  396. capo_s3/types/get_object_attributes_output.py +95 -0
  397. capo_s3/types/get_object_attributes_parts.py +79 -0
  398. capo_s3/types/get_object_attributes_request.py +58 -0
  399. capo_s3/types/get_object_legal_hold_output.py +38 -0
  400. capo_s3/types/get_object_legal_hold_request.py +36 -0
  401. capo_s3/types/get_object_lock_configuration_output.py +44 -0
  402. capo_s3/types/get_object_lock_configuration_request.py +30 -0
  403. capo_s3/types/get_object_output.py +158 -0
  404. capo_s3/types/get_object_request.py +100 -0
  405. capo_s3/types/get_object_response_status_code.py +5 -0
  406. capo_s3/types/get_object_retention_output.py +38 -0
  407. capo_s3/types/get_object_retention_request.py +36 -0
  408. capo_s3/types/get_object_tagging_output.py +39 -0
  409. capo_s3/types/get_object_tagging_request.py +36 -0
  410. capo_s3/types/get_object_torrent_output.py +15 -0
  411. capo_s3/types/get_object_torrent_request.py +33 -0
  412. capo_s3/types/get_public_access_block_output.py +44 -0
  413. capo_s3/types/get_public_access_block_request.py +30 -0
  414. capo_s3/types/glacier_job_parameters.py +36 -0
  415. capo_s3/types/grant.py +46 -0
  416. capo_s3/types/grant_full_control.py +5 -0
  417. capo_s3/types/grant_read.py +5 -0
  418. capo_s3/types/grant_read_acp.py +5 -0
  419. capo_s3/types/grant_write.py +5 -0
  420. capo_s3/types/grant_write_acp.py +5 -0
  421. capo_s3/types/grantee.py +68 -0
  422. capo_s3/types/grants.py +45 -0
  423. capo_s3/types/head_bucket_output.py +41 -0
  424. capo_s3/types/head_bucket_request.py +28 -0
  425. capo_s3/types/head_object_output.py +170 -0
  426. capo_s3/types/head_object_request.py +100 -0
  427. capo_s3/types/host_name.py +5 -0
  428. capo_s3/types/http_error_code_returned_equals.py +5 -0
  429. capo_s3/types/http_redirect_code.py +5 -0
  430. capo_s3/types/id.py +5 -0
  431. capo_s3/types/if_match.py +5 -0
  432. capo_s3/types/if_match_initiated_time.py +27 -0
  433. capo_s3/types/if_match_last_modified_time.py +27 -0
  434. capo_s3/types/if_match_size.py +5 -0
  435. capo_s3/types/if_modified_since.py +25 -0
  436. capo_s3/types/if_none_match.py +5 -0
  437. capo_s3/types/if_unmodified_since.py +25 -0
  438. capo_s3/types/index_document.py +32 -0
  439. capo_s3/types/initiated.py +25 -0
  440. capo_s3/types/initiator.py +38 -0
  441. capo_s3/types/input_serialization.py +74 -0
  442. capo_s3/types/intelligent_tiering_access_tier.py +29 -0
  443. capo_s3/types/intelligent_tiering_and_operator.py +43 -0
  444. capo_s3/types/intelligent_tiering_configuration.py +81 -0
  445. capo_s3/types/intelligent_tiering_configuration_list.py +59 -0
  446. capo_s3/types/intelligent_tiering_days.py +5 -0
  447. capo_s3/types/intelligent_tiering_filter.py +61 -0
  448. capo_s3/types/intelligent_tiering_id.py +5 -0
  449. capo_s3/types/intelligent_tiering_status.py +27 -0
  450. capo_s3/types/inventory_configuration.py +126 -0
  451. capo_s3/types/inventory_configuration_list.py +49 -0
  452. capo_s3/types/inventory_configuration_state.py +29 -0
  453. capo_s3/types/inventory_destination.py +46 -0
  454. capo_s3/types/inventory_encryption.py +46 -0
  455. capo_s3/types/inventory_filter.py +32 -0
  456. capo_s3/types/inventory_format.py +28 -0
  457. capo_s3/types/inventory_frequency.py +27 -0
  458. capo_s3/types/inventory_id.py +5 -0
  459. capo_s3/types/inventory_included_object_versions.py +29 -0
  460. capo_s3/types/inventory_optional_field.py +41 -0
  461. capo_s3/types/inventory_optional_fields.py +49 -0
  462. capo_s3/types/inventory_s3_bucket_destination.py +79 -0
  463. capo_s3/types/inventory_schedule.py +38 -0
  464. capo_s3/types/inventory_table_configuration.py +68 -0
  465. capo_s3/types/inventory_table_configuration_result.py +83 -0
  466. capo_s3/types/inventory_table_configuration_updates.py +68 -0
  467. capo_s3/types/is_enabled.py +5 -0
  468. capo_s3/types/is_latest.py +5 -0
  469. capo_s3/types/is_public.py +5 -0
  470. capo_s3/types/is_restore_in_progress.py +5 -0
  471. capo_s3/types/is_truncated.py +5 -0
  472. capo_s3/types/journal_table_configuration.py +62 -0
  473. capo_s3/types/journal_table_configuration_result.py +85 -0
  474. capo_s3/types/journal_table_configuration_updates.py +44 -0
  475. capo_s3/types/json_input.py +34 -0
  476. capo_s3/types/json_output.py +30 -0
  477. capo_s3/types/json_type.py +27 -0
  478. capo_s3/types/key_count.py +5 -0
  479. capo_s3/types/key_marker.py +5 -0
  480. capo_s3/types/key_prefix_equals.py +5 -0
  481. capo_s3/types/kms_context.py +5 -0
  482. capo_s3/types/kms_key_arn.py +5 -0
  483. capo_s3/types/lambda_function_arn.py +5 -0
  484. capo_s3/types/lambda_function_configuration.py +72 -0
  485. capo_s3/types/lambda_function_configuration_list.py +51 -0
  486. capo_s3/types/last_modified.py +25 -0
  487. capo_s3/types/last_modified_time.py +27 -0
  488. capo_s3/types/lifecycle_expiration.py +56 -0
  489. capo_s3/types/lifecycle_rule.py +156 -0
  490. capo_s3/types/lifecycle_rule_and_operator.py +63 -0
  491. capo_s3/types/lifecycle_rule_filter.py +79 -0
  492. capo_s3/types/lifecycle_rules.py +45 -0
  493. capo_s3/types/list_bucket_analytics_configurations_output.py +71 -0
  494. capo_s3/types/list_bucket_analytics_configurations_request.py +33 -0
  495. capo_s3/types/list_bucket_intelligent_tiering_configurations_output.py +73 -0
  496. capo_s3/types/list_bucket_intelligent_tiering_configurations_request.py +33 -0
  497. capo_s3/types/list_bucket_inventory_configurations_output.py +71 -0
  498. capo_s3/types/list_bucket_inventory_configurations_request.py +33 -0
  499. capo_s3/types/list_bucket_metrics_configurations_output.py +71 -0
  500. capo_s3/types/list_bucket_metrics_configurations_request.py +33 -0
  501. capo_s3/types/list_buckets_output.py +62 -0
  502. capo_s3/types/list_buckets_request.py +34 -0
  503. capo_s3/types/list_directory_buckets_output.py +44 -0
  504. capo_s3/types/list_directory_buckets_request.py +34 -0
  505. capo_s3/types/list_multipart_uploads_output.py +146 -0
  506. capo_s3/types/list_multipart_uploads_request.py +49 -0
  507. capo_s3/types/list_object_versions_output.py +163 -0
  508. capo_s3/types/list_object_versions_request.py +52 -0
  509. capo_s3/types/list_objects_output.py +124 -0
  510. capo_s3/types/list_objects_request.py +50 -0
  511. capo_s3/types/list_objects_v2_output.py +142 -0
  512. capo_s3/types/list_objects_v2_request.py +57 -0
  513. capo_s3/types/list_parts_output.py +177 -0
  514. capo_s3/types/list_parts_request.py +55 -0
  515. capo_s3/types/location.py +5 -0
  516. capo_s3/types/location_info.py +42 -0
  517. capo_s3/types/location_name_as_string.py +5 -0
  518. capo_s3/types/location_prefix.py +5 -0
  519. capo_s3/types/location_type.py +27 -0
  520. capo_s3/types/logging_enabled.py +77 -0
  521. capo_s3/types/marker.py +5 -0
  522. capo_s3/types/max_age_seconds.py +5 -0
  523. capo_s3/types/max_buckets.py +5 -0
  524. capo_s3/types/max_directory_buckets.py +5 -0
  525. capo_s3/types/max_keys.py +5 -0
  526. capo_s3/types/max_parts.py +5 -0
  527. capo_s3/types/max_uploads.py +5 -0
  528. capo_s3/types/message.py +5 -0
  529. capo_s3/types/metadata.py +56 -0
  530. capo_s3/types/metadata_configuration.py +66 -0
  531. capo_s3/types/metadata_configuration_result.py +92 -0
  532. capo_s3/types/metadata_directive.py +27 -0
  533. capo_s3/types/metadata_entry.py +38 -0
  534. capo_s3/types/metadata_key.py +5 -0
  535. capo_s3/types/metadata_table_configuration.py +44 -0
  536. capo_s3/types/metadata_table_configuration_result.py +48 -0
  537. capo_s3/types/metadata_table_encryption_configuration.py +52 -0
  538. capo_s3/types/metadata_table_status.py +5 -0
  539. capo_s3/types/metadata_value.py +5 -0
  540. capo_s3/types/metrics.py +54 -0
  541. capo_s3/types/metrics_and_operator.py +49 -0
  542. capo_s3/types/metrics_configuration.py +44 -0
  543. capo_s3/types/metrics_configuration_list.py +49 -0
  544. capo_s3/types/metrics_filter.py +74 -0
  545. capo_s3/types/metrics_id.py +5 -0
  546. capo_s3/types/metrics_status.py +27 -0
  547. capo_s3/types/mfa.py +5 -0
  548. capo_s3/types/mfa_delete.py +27 -0
  549. capo_s3/types/mfa_delete_status.py +27 -0
  550. capo_s3/types/minutes.py +5 -0
  551. capo_s3/types/missing_meta.py +5 -0
  552. capo_s3/types/mpu_object_size.py +5 -0
  553. capo_s3/types/multipart_upload.py +124 -0
  554. capo_s3/types/multipart_upload_id.py +5 -0
  555. capo_s3/types/multipart_upload_list.py +45 -0
  556. capo_s3/types/next_key_marker.py +5 -0
  557. capo_s3/types/next_marker.py +5 -0
  558. capo_s3/types/next_part_number_marker.py +5 -0
  559. capo_s3/types/next_token.py +5 -0
  560. capo_s3/types/next_upload_id_marker.py +5 -0
  561. capo_s3/types/next_version_id_marker.py +5 -0
  562. capo_s3/types/non_empty_kms_key_arn_string.py +5 -0
  563. capo_s3/types/noncurrent_version_expiration.py +44 -0
  564. capo_s3/types/noncurrent_version_transition.py +62 -0
  565. capo_s3/types/noncurrent_version_transition_list.py +51 -0
  566. capo_s3/types/notification_configuration.py +99 -0
  567. capo_s3/types/notification_configuration_filter.py +35 -0
  568. capo_s3/types/notification_id.py +6 -0
  569. capo_s3/types/object.py +141 -0
  570. capo_s3/types/object_attributes.py +30 -0
  571. capo_s3/types/object_attributes_list.py +47 -0
  572. capo_s3/types/object_canned_acl.py +32 -0
  573. capo_s3/types/object_encryption.py +38 -0
  574. capo_s3/types/object_identifier.py +72 -0
  575. capo_s3/types/object_identifier_list.py +47 -0
  576. capo_s3/types/object_key.py +5 -0
  577. capo_s3/types/object_list.py +45 -0
  578. capo_s3/types/object_lock_configuration.py +52 -0
  579. capo_s3/types/object_lock_enabled.py +24 -0
  580. capo_s3/types/object_lock_enabled_for_bucket.py +5 -0
  581. capo_s3/types/object_lock_legal_hold.py +40 -0
  582. capo_s3/types/object_lock_legal_hold_status.py +27 -0
  583. capo_s3/types/object_lock_mode.py +27 -0
  584. capo_s3/types/object_lock_retain_until_date.py +25 -0
  585. capo_s3/types/object_lock_retention.py +56 -0
  586. capo_s3/types/object_lock_retention_mode.py +27 -0
  587. capo_s3/types/object_lock_rule.py +38 -0
  588. capo_s3/types/object_lock_token.py +5 -0
  589. capo_s3/types/object_ownership.py +29 -0
  590. capo_s3/types/object_part.py +122 -0
  591. capo_s3/types/object_size.py +5 -0
  592. capo_s3/types/object_size_greater_than_bytes.py +5 -0
  593. capo_s3/types/object_size_less_than_bytes.py +5 -0
  594. capo_s3/types/object_storage_class.py +38 -0
  595. capo_s3/types/object_version.py +161 -0
  596. capo_s3/types/object_version_id.py +5 -0
  597. capo_s3/types/object_version_list.py +45 -0
  598. capo_s3/types/object_version_storage_class.py +24 -0
  599. capo_s3/types/optional_object_attributes.py +24 -0
  600. capo_s3/types/optional_object_attributes_list.py +51 -0
  601. capo_s3/types/output_location.py +34 -0
  602. capo_s3/types/output_serialization.py +46 -0
  603. capo_s3/types/owner.py +38 -0
  604. capo_s3/types/owner_override.py +24 -0
  605. capo_s3/types/ownership_controls.py +39 -0
  606. capo_s3/types/ownership_controls_rule.py +39 -0
  607. capo_s3/types/ownership_controls_rules.py +49 -0
  608. capo_s3/types/parquet_input.py +19 -0
  609. capo_s3/types/part.py +146 -0
  610. capo_s3/types/part_number.py +5 -0
  611. capo_s3/types/part_number_marker.py +5 -0
  612. capo_s3/types/partition_date_source.py +27 -0
  613. capo_s3/types/partitioned_prefix.py +42 -0
  614. capo_s3/types/parts.py +45 -0
  615. capo_s3/types/parts_count.py +5 -0
  616. capo_s3/types/parts_list.py +45 -0
  617. capo_s3/types/payer.py +27 -0
  618. capo_s3/types/permission.py +30 -0
  619. capo_s3/types/policy.py +5 -0
  620. capo_s3/types/policy_status.py +30 -0
  621. capo_s3/types/prefix.py +5 -0
  622. capo_s3/types/priority.py +5 -0
  623. capo_s3/types/progress.py +46 -0
  624. capo_s3/types/progress_event.py +48 -0
  625. capo_s3/types/protocol.py +27 -0
  626. capo_s3/types/public_access_block_configuration.py +69 -0
  627. capo_s3/types/put_bucket_abac_request.py +52 -0
  628. capo_s3/types/put_bucket_accelerate_configuration_request.py +59 -0
  629. capo_s3/types/put_bucket_acl_request.py +74 -0
  630. capo_s3/types/put_bucket_analytics_configuration_request.py +57 -0
  631. capo_s3/types/put_bucket_cors_request.py +54 -0
  632. capo_s3/types/put_bucket_encryption_request.py +61 -0
  633. capo_s3/types/put_bucket_intelligent_tiering_configuration_request.py +57 -0
  634. capo_s3/types/put_bucket_inventory_configuration_request.py +57 -0
  635. capo_s3/types/put_bucket_lifecycle_configuration_output.py +29 -0
  636. capo_s3/types/put_bucket_lifecycle_configuration_request.py +60 -0
  637. capo_s3/types/put_bucket_logging_request.py +58 -0
  638. capo_s3/types/put_bucket_metrics_configuration_request.py +55 -0
  639. capo_s3/types/put_bucket_notification_configuration_request.py +58 -0
  640. capo_s3/types/put_bucket_ownership_controls_request.py +58 -0
  641. capo_s3/types/put_bucket_policy_request.py +51 -0
  642. capo_s3/types/put_bucket_replication_request.py +64 -0
  643. capo_s3/types/put_bucket_request_payment_request.py +62 -0
  644. capo_s3/types/put_bucket_tagging_request.py +50 -0
  645. capo_s3/types/put_bucket_versioning_request.py +63 -0
  646. capo_s3/types/put_bucket_website_request.py +58 -0
  647. capo_s3/types/put_object_acl_output.py +24 -0
  648. capo_s3/types/put_object_acl_request.py +82 -0
  649. capo_s3/types/put_object_legal_hold_output.py +24 -0
  650. capo_s3/types/put_object_legal_hold_request.py +60 -0
  651. capo_s3/types/put_object_lock_configuration_output.py +26 -0
  652. capo_s3/types/put_object_lock_configuration_request.py +63 -0
  653. capo_s3/types/put_object_output.py +99 -0
  654. capo_s3/types/put_object_request.py +169 -0
  655. capo_s3/types/put_object_retention_output.py +24 -0
  656. capo_s3/types/put_object_retention_request.py +65 -0
  657. capo_s3/types/put_object_tagging_output.py +25 -0
  658. capo_s3/types/put_object_tagging_request.py +59 -0
  659. capo_s3/types/put_public_access_block_request.py +62 -0
  660. capo_s3/types/queue_arn.py +5 -0
  661. capo_s3/types/queue_configuration.py +68 -0
  662. capo_s3/types/queue_configuration_list.py +49 -0
  663. capo_s3/types/quiet.py +5 -0
  664. capo_s3/types/quote_character.py +5 -0
  665. capo_s3/types/quote_escape_character.py +5 -0
  666. capo_s3/types/quote_fields.py +27 -0
  667. capo_s3/types/range.py +5 -0
  668. capo_s3/types/record_delimiter.py +5 -0
  669. capo_s3/types/record_expiration.py +46 -0
  670. capo_s3/types/record_expiration_days.py +5 -0
  671. capo_s3/types/records_event.py +42 -0
  672. capo_s3/types/redirect.py +70 -0
  673. capo_s3/types/redirect_all_requests_to.py +44 -0
  674. capo_s3/types/region.py +5 -0
  675. capo_s3/types/rename_object_output.py +19 -0
  676. capo_s3/types/rename_object_request.py +70 -0
  677. capo_s3/types/rename_source.py +5 -0
  678. capo_s3/types/rename_source_if_match.py +5 -0
  679. capo_s3/types/rename_source_if_modified_since.py +29 -0
  680. capo_s3/types/rename_source_if_none_match.py +5 -0
  681. capo_s3/types/rename_source_if_unmodified_since.py +29 -0
  682. capo_s3/types/replace_key_prefix_with.py +5 -0
  683. capo_s3/types/replace_key_with.py +5 -0
  684. capo_s3/types/replica_kms_key_id.py +5 -0
  685. capo_s3/types/replica_modifications.py +40 -0
  686. capo_s3/types/replica_modifications_status.py +27 -0
  687. capo_s3/types/replication_configuration.py +44 -0
  688. capo_s3/types/replication_rule.py +151 -0
  689. capo_s3/types/replication_rule_and_operator.py +41 -0
  690. capo_s3/types/replication_rule_filter.py +61 -0
  691. capo_s3/types/replication_rule_status.py +27 -0
  692. capo_s3/types/replication_rules.py +45 -0
  693. capo_s3/types/replication_status.py +30 -0
  694. capo_s3/types/replication_time.py +51 -0
  695. capo_s3/types/replication_time_status.py +27 -0
  696. capo_s3/types/replication_time_value.py +30 -0
  697. capo_s3/types/request_charged.py +25 -0
  698. capo_s3/types/request_payer.py +25 -0
  699. capo_s3/types/request_payment_configuration.py +38 -0
  700. capo_s3/types/request_progress.py +30 -0
  701. capo_s3/types/request_route.py +5 -0
  702. capo_s3/types/request_token.py +5 -0
  703. capo_s3/types/response_cache_control.py +5 -0
  704. capo_s3/types/response_content_disposition.py +5 -0
  705. capo_s3/types/response_content_encoding.py +5 -0
  706. capo_s3/types/response_content_language.py +5 -0
  707. capo_s3/types/response_content_type.py +5 -0
  708. capo_s3/types/response_expires.py +27 -0
  709. capo_s3/types/restore.py +5 -0
  710. capo_s3/types/restore_expiry_date.py +25 -0
  711. capo_s3/types/restore_object_output.py +29 -0
  712. capo_s3/types/restore_object_request.py +56 -0
  713. capo_s3/types/restore_output_path.py +5 -0
  714. capo_s3/types/restore_request.py +114 -0
  715. capo_s3/types/restore_request_type.py +24 -0
  716. capo_s3/types/restore_status.py +54 -0
  717. capo_s3/types/role.py +5 -0
  718. capo_s3/types/routing_rule.py +48 -0
  719. capo_s3/types/routing_rules.py +45 -0
  720. capo_s3/types/s3_key_filter.py +36 -0
  721. capo_s3/types/s3_location.py +128 -0
  722. capo_s3/types/s3_regional_or_s3_express_bucket_arn_string.py +5 -0
  723. capo_s3/types/s3_tables_arn.py +5 -0
  724. capo_s3/types/s3_tables_bucket_arn.py +5 -0
  725. capo_s3/types/s3_tables_bucket_type.py +27 -0
  726. capo_s3/types/s3_tables_destination.py +41 -0
  727. capo_s3/types/s3_tables_destination_result.py +61 -0
  728. capo_s3/types/s3_tables_name.py +5 -0
  729. capo_s3/types/s3_tables_namespace.py +5 -0
  730. capo_s3/types/scan_range.py +38 -0
  731. capo_s3/types/select_object_content_event_stream.py +110 -0
  732. capo_s3/types/select_object_content_output.py +15 -0
  733. capo_s3/types/select_object_content_request.py +141 -0
  734. capo_s3/types/select_parameters.py +85 -0
  735. capo_s3/types/server_side_encryption.py +29 -0
  736. capo_s3/types/server_side_encryption_by_default.py +52 -0
  737. capo_s3/types/server_side_encryption_configuration.py +41 -0
  738. capo_s3/types/server_side_encryption_rule.py +78 -0
  739. capo_s3/types/server_side_encryption_rules.py +49 -0
  740. capo_s3/types/session_credential_value.py +5 -0
  741. capo_s3/types/session_credentials.py +66 -0
  742. capo_s3/types/session_expiration.py +25 -0
  743. capo_s3/types/session_mode.py +27 -0
  744. capo_s3/types/setting.py +5 -0
  745. capo_s3/types/simple_prefix.py +19 -0
  746. capo_s3/types/size.py +5 -0
  747. capo_s3/types/skip_validation.py +5 -0
  748. capo_s3/types/source_selection_criteria.py +62 -0
  749. capo_s3/types/sse_customer_algorithm.py +5 -0
  750. capo_s3/types/sse_customer_key.py +5 -0
  751. capo_s3/types/sse_customer_key_md5.py +5 -0
  752. capo_s3/types/sse_kms_encrypted_objects.py +42 -0
  753. capo_s3/types/sse_kms_encrypted_objects_status.py +29 -0
  754. capo_s3/types/ssekms.py +32 -0
  755. capo_s3/types/ssekms_encryption.py +44 -0
  756. capo_s3/types/ssekms_encryption_context.py +5 -0
  757. capo_s3/types/ssekms_key_id.py +5 -0
  758. capo_s3/types/sses3.py +19 -0
  759. capo_s3/types/start.py +5 -0
  760. capo_s3/types/start_after.py +5 -0
  761. capo_s3/types/stats.py +46 -0
  762. capo_s3/types/stats_event.py +48 -0
  763. capo_s3/types/storage_class.py +38 -0
  764. capo_s3/types/storage_class_analysis.py +42 -0
  765. capo_s3/types/storage_class_analysis_data_export.py +65 -0
  766. capo_s3/types/storage_class_analysis_schema_version.py +26 -0
  767. capo_s3/types/streaming_blob.py +7 -0
  768. capo_s3/types/suffix.py +5 -0
  769. capo_s3/types/table_sse_algorithm.py +27 -0
  770. capo_s3/types/tag.py +41 -0
  771. capo_s3/types/tag_count.py +5 -0
  772. capo_s3/types/tag_set.py +45 -0
  773. capo_s3/types/tagging.py +36 -0
  774. capo_s3/types/tagging_directive.py +27 -0
  775. capo_s3/types/tagging_header.py +5 -0
  776. capo_s3/types/target_bucket.py +5 -0
  777. capo_s3/types/target_grant.py +50 -0
  778. capo_s3/types/target_grants.py +45 -0
  779. capo_s3/types/target_object_key_format.py +56 -0
  780. capo_s3/types/target_prefix.py +5 -0
  781. capo_s3/types/tier.py +28 -0
  782. capo_s3/types/tiering.py +53 -0
  783. capo_s3/types/tiering_list.py +45 -0
  784. capo_s3/types/token.py +5 -0
  785. capo_s3/types/topic_arn.py +5 -0
  786. capo_s3/types/topic_configuration.py +68 -0
  787. capo_s3/types/topic_configuration_list.py +49 -0
  788. capo_s3/types/transition.py +60 -0
  789. capo_s3/types/transition_default_minimum_object_size.py +29 -0
  790. capo_s3/types/transition_list.py +45 -0
  791. capo_s3/types/transition_storage_class.py +31 -0
  792. capo_s3/types/type.py +28 -0
  793. capo_s3/types/update_bucket_metadata_inventory_table_configuration_request.py +64 -0
  794. capo_s3/types/update_bucket_metadata_journal_table_configuration_request.py +64 -0
  795. capo_s3/types/update_object_encryption_request.py +66 -0
  796. capo_s3/types/update_object_encryption_response.py +26 -0
  797. capo_s3/types/upload_id_marker.py +5 -0
  798. capo_s3/types/upload_part_copy_output.py +66 -0
  799. capo_s3/types/upload_part_copy_request.py +95 -0
  800. capo_s3/types/upload_part_output.py +82 -0
  801. capo_s3/types/upload_part_request.py +88 -0
  802. capo_s3/types/uri.py +5 -0
  803. capo_s3/types/user_metadata.py +45 -0
  804. capo_s3/types/value.py +5 -0
  805. capo_s3/types/version_count.py +5 -0
  806. capo_s3/types/version_id_marker.py +5 -0
  807. capo_s3/types/versioning_configuration.py +50 -0
  808. capo_s3/types/website_configuration.py +90 -0
  809. capo_s3/types/website_redirect_location.py +5 -0
  810. capo_s3/types/write_get_object_response_request.py +167 -0
  811. capo_s3/types/write_offset_bytes.py +5 -0
  812. capo_s3/types/years.py +5 -0
  813. capo_s3-0.1.0.dist-info/METADATA +165 -0
  814. capo_s3-0.1.0.dist-info/RECORD +817 -0
  815. capo_s3-0.1.0.dist-info/WHEEL +5 -0
  816. capo_s3-0.1.0.dist-info/licenses/LICENSE +21 -0
  817. capo_s3-0.1.0.dist-info/top_level.txt +1 -0
capo_s3/__init__.py ADDED
@@ -0,0 +1,52 @@
1
+ from __future__ import annotations
2
+
3
+ from . import _iter as _iter
4
+ from . import _protocol as _protocol
5
+ from ._auth._identity import Credentials as Credentials
6
+ from ._auth._identity import Identity as Identity
7
+ from ._auth._providers import (
8
+ CachedProvider as CachedProvider,
9
+ )
10
+ from ._auth._providers import (
11
+ ChainedProvider as ChainedProvider,
12
+ )
13
+ from ._auth._providers import (
14
+ CredentialsProvider as CredentialsProvider,
15
+ )
16
+ from ._auth._providers import (
17
+ EnvCredentialsProvider as EnvCredentialsProvider,
18
+ )
19
+ from ._auth._providers import (
20
+ IdentityNotFound as IdentityNotFound,
21
+ )
22
+ from ._auth._providers import (
23
+ IdentityProvider as IdentityProvider,
24
+ )
25
+ from ._auth._providers import (
26
+ ProfileCredentialsProvider as ProfileCredentialsProvider,
27
+ )
28
+ from ._auth._providers import (
29
+ StaticAwsCredentialsProvider as StaticAwsCredentialsProvider,
30
+ )
31
+ from ._auth._signers import Signer as Signer
32
+ from ._auth._signers import SigV4Signer as SigV4Signer
33
+ from ._services._pipeline import (
34
+ AsyncOperationOptions as AsyncOperationOptions,
35
+ )
36
+ from ._services._pipeline import (
37
+ AsyncOperationRequest as AsyncOperationRequest,
38
+ )
39
+ from ._services._pipeline import (
40
+ AsyncOperationResponse as AsyncOperationResponse,
41
+ )
42
+ from ._services._pipeline import (
43
+ OperationOptions as OperationOptions,
44
+ )
45
+ from ._services._pipeline import (
46
+ OperationRequest as OperationRequest,
47
+ )
48
+ from ._services._pipeline import (
49
+ OperationResponse as OperationResponse,
50
+ )
51
+ from ._services.async_s3 import AsyncS3Client as AsyncS3Client
52
+ from ._services.s3 import S3Client as S3Client
capo_s3/_async.py ADDED
@@ -0,0 +1,25 @@
1
+ from __future__ import annotations
2
+
3
+ import asyncio
4
+ from typing import TYPE_CHECKING
5
+
6
+ if TYPE_CHECKING:
7
+ import trio
8
+ else:
9
+ try:
10
+ import trio
11
+ except ImportError:
12
+ trio = None
13
+
14
+
15
+ def in_trio_run() -> bool:
16
+ if trio is None:
17
+ return False
18
+ return trio.lowlevel.in_trio_run()
19
+
20
+
21
+ async def anysleep(delay: float) -> None:
22
+ if in_trio_run():
23
+ await trio.sleep(delay)
24
+ else:
25
+ await asyncio.sleep(delay)
@@ -0,0 +1,16 @@
1
+ from __future__ import annotations
2
+
3
+ from datetime import datetime
4
+ from typing import TypedDict
5
+
6
+ from typing_extensions import NotRequired
7
+
8
+
9
+ class Identity(TypedDict):
10
+ expiration: NotRequired[datetime | None]
11
+
12
+
13
+ class Credentials(Identity):
14
+ access_key: str
15
+ secret_key: str
16
+ session_token: NotRequired[str | None]
@@ -0,0 +1,318 @@
1
+ from __future__ import annotations
2
+
3
+ import configparser
4
+ import os
5
+ from abc import abstractmethod
6
+ from datetime import datetime, timezone
7
+ from pathlib import Path
8
+ from typing import Generic, TypeVar
9
+
10
+ from zapros import AsyncClient, Client, ZaprosError
11
+
12
+ from capo_s3._auth._identity import (
13
+ Credentials,
14
+ Identity,
15
+ )
16
+ from capo_s3._services._aws_config import _load_profile
17
+
18
+
19
+ class IdentityNotFound(Exception):
20
+ """Raised when a provider cannot resolve an identity. Chain continues."""
21
+
22
+
23
+ IdentityT = TypeVar("IdentityT", bound="Identity")
24
+
25
+
26
+ class IdentityProvider(Generic[IdentityT]):
27
+ @abstractmethod
28
+ def resolve_identity(self) -> IdentityT:
29
+ raise NotImplementedError
30
+
31
+ async def aresolve_identity(self) -> IdentityT:
32
+ # default: no network I/O, reuse the sync resolution
33
+ return self.resolve_identity()
34
+
35
+
36
+ class ChainedProvider(IdentityProvider[IdentityT]):
37
+ """Try each provider in order; first non-`IdentityNotFound` wins."""
38
+
39
+ def __init__(self, *providers: IdentityProvider[IdentityT]) -> None:
40
+ if not providers:
41
+ raise ValueError("ChainedProvider requires at least one provider")
42
+ self._providers = providers
43
+
44
+ def resolve_identity(self) -> IdentityT:
45
+ errors: list[str] = []
46
+ for p in self._providers:
47
+ try:
48
+ return p.resolve_identity()
49
+ except IdentityNotFound as e:
50
+ errors.append(f"{type(p).__name__}: {e}")
51
+ raise IdentityNotFound("no provider succeeded: " + "; ".join(errors))
52
+
53
+ async def aresolve_identity(self) -> IdentityT:
54
+ errors: list[str] = []
55
+ for p in self._providers:
56
+ try:
57
+ return await p.aresolve_identity()
58
+ except IdentityNotFound as e:
59
+ errors.append(f"{type(p).__name__}: {e}")
60
+ raise IdentityNotFound("no provider succeeded: " + "; ".join(errors))
61
+
62
+
63
+ class CachedProvider(IdentityProvider[IdentityT]):
64
+ """Cache an identity until its `expiration` (minus skew) elapses."""
65
+
66
+ _SKEW_SECONDS = 60
67
+
68
+ def __init__(self, inner: IdentityProvider[IdentityT]) -> None:
69
+ self._inner = inner
70
+ self._cached: IdentityT | None = None
71
+
72
+ def resolve_identity(self) -> IdentityT:
73
+ if self._cached is not None and not self._expired(self._cached):
74
+ return self._cached
75
+ self._cached = self._inner.resolve_identity()
76
+ return self._cached
77
+
78
+ async def aresolve_identity(self) -> IdentityT:
79
+ if self._cached is not None and not self._expired(self._cached):
80
+ return self._cached
81
+ self._cached = await self._inner.aresolve_identity()
82
+ return self._cached
83
+
84
+ @classmethod
85
+ def _expired(cls, ident: Identity) -> bool:
86
+ exp = ident.get("expiration")
87
+ if exp is None:
88
+ return False
89
+ return (exp - datetime.now(timezone.utc)).total_seconds() <= cls._SKEW_SECONDS
90
+
91
+
92
+ class CredentialsProvider(IdentityProvider[Credentials]):
93
+ """Base class for providers that resolve AWS `Credentials`."""
94
+
95
+ @abstractmethod
96
+ def resolve_identity(self) -> Credentials:
97
+ raise NotImplementedError
98
+
99
+
100
+ class StaticAwsCredentialsProvider(CredentialsProvider):
101
+ def __init__(self, credentials: Credentials) -> None:
102
+ self._credentials = credentials
103
+
104
+ def resolve_identity(self) -> Credentials:
105
+ return self._credentials
106
+
107
+
108
+ class EnvCredentialsProvider(CredentialsProvider):
109
+ """Read AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_SESSION_TOKEN."""
110
+
111
+ def resolve_identity(self) -> Credentials:
112
+ ak = os.environ.get("AWS_ACCESS_KEY_ID")
113
+ sk = os.environ.get("AWS_SECRET_ACCESS_KEY")
114
+ if not ak or not sk:
115
+ raise IdentityNotFound("AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY unset")
116
+ out: Credentials = {"access_key": ak, "secret_key": sk}
117
+ token = os.environ.get("AWS_SESSION_TOKEN")
118
+ if token:
119
+ out["session_token"] = token
120
+ return out
121
+
122
+
123
+ class ProfileCredentialsProvider(CredentialsProvider):
124
+ """Read ~/.aws/credentials and ~/.aws/config for the active profile."""
125
+
126
+ def __init__(self, credentials_file: Path | None = None) -> None:
127
+ self._profile = (
128
+ os.environ.get("AWS_PROFILE")
129
+ or os.environ.get("AWS_DEFAULT_PROFILE")
130
+ or "default"
131
+ )
132
+ self._cred_file = credentials_file or Path(
133
+ os.environ.get("AWS_SHARED_CREDENTIALS_FILE")
134
+ or Path.home() / ".aws" / "credentials"
135
+ )
136
+
137
+ def resolve_identity(self) -> Credentials:
138
+ section = self._load_section()
139
+ ak = section.get("aws_access_key_id")
140
+ sk = section.get("aws_secret_access_key")
141
+ if not ak or not sk:
142
+ raise IdentityNotFound(
143
+ f"profile {self._profile!r}: missing aws_access_key_id/aws_secret_access_key"
144
+ )
145
+ out: Credentials = {"access_key": ak, "secret_key": sk}
146
+ token = section.get("aws_session_token")
147
+ if token:
148
+ out["session_token"] = token
149
+ return out
150
+
151
+ def _load_section(self) -> dict[str, str]:
152
+ # config-file profile reuses the loader from _services/_aws_config
153
+ merged, _ = _load_profile()
154
+ if self._cred_file.is_file():
155
+ cfg = configparser.ConfigParser(interpolation=None)
156
+ cfg.read(self._cred_file)
157
+ if cfg.has_section(self._profile):
158
+ merged.update(dict(cfg.items(self._profile)))
159
+ if not merged:
160
+ raise IdentityNotFound(
161
+ f"profile {self._profile!r} not found in credentials/config files"
162
+ )
163
+ return merged
164
+
165
+
166
+ class EcsContainerCredentialsProvider(CredentialsProvider):
167
+ """Resolve credentials from the ECS/EKS container credentials endpoint."""
168
+
169
+ def __init__(self, client: Client | AsyncClient) -> None:
170
+ self._client = client
171
+
172
+ def resolve_identity(self) -> Credentials:
173
+ if isinstance(self._client, AsyncClient):
174
+ raise TypeError(
175
+ "EcsContainerCredentialsProvider configured with AsyncClient; use aresolve_identity"
176
+ )
177
+ url, headers = self._request_args()
178
+ resp = self._client.get(url, headers=headers)
179
+ if resp.status < 200 or resp.status >= 300:
180
+ raise IdentityNotFound(
181
+ f"ECS credentials endpoint returned status {resp.status}"
182
+ )
183
+ return _credentials_from_json(resp.json)
184
+
185
+ async def aresolve_identity(self) -> Credentials:
186
+ if not isinstance(self._client, AsyncClient):
187
+ raise TypeError(
188
+ "EcsContainerCredentialsProvider configured with sync Client; use resolve_identity"
189
+ )
190
+ url, headers = self._request_args()
191
+ resp = await self._client.get(url, headers=headers)
192
+ if resp.status < 200 or resp.status >= 300:
193
+ raise IdentityNotFound(
194
+ f"ECS credentials endpoint returned status {resp.status}"
195
+ )
196
+ return _credentials_from_json(resp.json)
197
+
198
+ def _request_args(self) -> tuple[str, dict[str, str]]:
199
+ relative = os.environ.get("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI")
200
+ full = os.environ.get("AWS_CONTAINER_CREDENTIALS_FULL_URI")
201
+ if relative:
202
+ url = "http://169.254.170.2" + relative
203
+ elif full:
204
+ url = full
205
+ else:
206
+ raise IdentityNotFound("no ECS container credentials env var set")
207
+ headers: dict[str, str] = {}
208
+ token = os.environ.get("AWS_CONTAINER_AUTHORIZATION_TOKEN")
209
+ token_file = os.environ.get("AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE")
210
+ if token_file:
211
+ token = Path(token_file).read_text().strip()
212
+ if token:
213
+ headers["Authorization"] = token
214
+ return url, headers
215
+
216
+
217
+ class Ec2InstanceMetadataProvider(CredentialsProvider):
218
+ """Resolve credentials from the EC2 Instance Metadata Service (IMDSv2)."""
219
+
220
+ _BASE = "http://169.254.169.254"
221
+ _TOKEN_PATH = "/latest/api/token"
222
+ _CREDS_PATH = "/latest/meta-data/iam/security-credentials/"
223
+
224
+ def __init__(self, client: Client | AsyncClient) -> None:
225
+ self._client = client
226
+
227
+ def resolve_identity(self) -> Credentials:
228
+ if isinstance(self._client, AsyncClient):
229
+ raise TypeError(
230
+ "Ec2InstanceMetadataProvider configured with AsyncClient; use aresolve_identity"
231
+ )
232
+ if os.environ.get("AWS_EC2_METADATA_DISABLED", "").strip().lower() in (
233
+ "true",
234
+ "1",
235
+ ):
236
+ raise IdentityNotFound("IMDS disabled via AWS_EC2_METADATA_DISABLED")
237
+ try:
238
+ token_resp = self._client.put(
239
+ self._BASE + self._TOKEN_PATH,
240
+ headers={"X-aws-ec2-metadata-token-ttl-seconds": "21600"},
241
+ body=b"",
242
+ )
243
+ auth = {"X-aws-ec2-metadata-token": token_resp.text}
244
+ role_resp = self._client.get(self._BASE + self._CREDS_PATH, headers=auth)
245
+ role = role_resp.text.strip()
246
+ creds_resp = self._client.get(
247
+ self._BASE + self._CREDS_PATH + role, headers=auth
248
+ )
249
+ except ZaprosError as e:
250
+ raise IdentityNotFound(f"IMDS request failed: {e}")
251
+ if creds_resp.status < 200 or creds_resp.status >= 300:
252
+ raise IdentityNotFound(f"IMDS returned status {creds_resp.status}")
253
+ return _credentials_from_json(creds_resp.json)
254
+
255
+ async def aresolve_identity(self) -> Credentials:
256
+ if not isinstance(self._client, AsyncClient):
257
+ raise TypeError(
258
+ "Ec2InstanceMetadataProvider configured with sync Client; use resolve_identity"
259
+ )
260
+ if os.environ.get("AWS_EC2_METADATA_DISABLED", "").strip().lower() in (
261
+ "true",
262
+ "1",
263
+ ):
264
+ raise IdentityNotFound("IMDS disabled via AWS_EC2_METADATA_DISABLED")
265
+ try:
266
+ token_resp = await self._client.put(
267
+ self._BASE + self._TOKEN_PATH,
268
+ headers={"X-aws-ec2-metadata-token-ttl-seconds": "21600"},
269
+ body=b"",
270
+ )
271
+ auth = {"X-aws-ec2-metadata-token": token_resp.text}
272
+ role_resp = await self._client.get(
273
+ self._BASE + self._CREDS_PATH, headers=auth
274
+ )
275
+ role = role_resp.text.strip()
276
+ creds_resp = await self._client.get(
277
+ self._BASE + self._CREDS_PATH + role, headers=auth
278
+ )
279
+ except ZaprosError as e:
280
+ raise IdentityNotFound(f"IMDS request failed: {e}")
281
+ if creds_resp.status < 200 or creds_resp.status >= 300:
282
+ raise IdentityNotFound(f"IMDS returned status {creds_resp.status}")
283
+ return _credentials_from_json(creds_resp.json)
284
+
285
+
286
+ def _parse_iso8601(value: str) -> datetime:
287
+ # tolerate trailing 'Z'
288
+ return datetime.fromisoformat(value.replace("Z", "+00:00"))
289
+
290
+
291
+ def _credentials_from_json(data: dict[str, object]) -> Credentials:
292
+ ak = data.get("AccessKeyId")
293
+ sk = data.get("SecretAccessKey")
294
+ if not isinstance(ak, str) or not isinstance(sk, str):
295
+ raise IdentityNotFound(
296
+ "credentials response missing AccessKeyId/SecretAccessKey"
297
+ )
298
+ out: Credentials = {"access_key": ak, "secret_key": sk}
299
+ token = data.get("Token")
300
+ if isinstance(token, str):
301
+ out["session_token"] = token
302
+ exp = data.get("Expiration")
303
+ if isinstance(exp, str):
304
+ out["expiration"] = _parse_iso8601(exp)
305
+ return out
306
+
307
+
308
+ def default_aws_credentials_chain(
309
+ client: Client | AsyncClient,
310
+ ) -> IdentityProvider[Credentials]:
311
+ return CachedProvider(
312
+ ChainedProvider(
313
+ EnvCredentialsProvider(),
314
+ ProfileCredentialsProvider(),
315
+ EcsContainerCredentialsProvider(client),
316
+ Ec2InstanceMetadataProvider(client),
317
+ )
318
+ )
@@ -0,0 +1,84 @@
1
+ from __future__ import annotations
2
+
3
+ from abc import ABC, abstractmethod
4
+ from typing import Any, Generic, TypeVar
5
+
6
+ from zapros import Request
7
+
8
+ from capo_s3._auth._identity import Credentials, Identity
9
+ from capo_s3._auth._providers import IdentityProvider
10
+ from capo_s3._auth._sigv4 import SigV4AuthContext, sign_sigv4
11
+
12
+ IdentityT = TypeVar("IdentityT", bound="Identity")
13
+
14
+
15
+ class Signer(ABC, Generic[IdentityT]):
16
+ """Per-request request signer. Holds an IdentityProvider plus static config."""
17
+
18
+ def __init__(self, provider: IdentityProvider[IdentityT]) -> None:
19
+ self.provider = provider
20
+
21
+ @abstractmethod
22
+ async def asign(self, req: Request) -> Request: ...
23
+ @abstractmethod
24
+ def sign(self, req: Request) -> Request: ...
25
+
26
+
27
+ class SigV4Signer(Signer[Credentials]):
28
+ """aws.auth#sigv4 — AWS Signature Version 4.
29
+
30
+ The full auth scheme (``name`` variant, ``signingName``, ``signingRegion``,
31
+ encoding/normalization flags) is provided by the caller — either from the
32
+ endpoint rule-set's ``authSchemes`` property or built by the generated
33
+ ``get_signer`` from operation defaults.
34
+ """
35
+
36
+ def __init__(
37
+ self, provider: IdentityProvider[Credentials], *, auth_scheme: dict[str, Any]
38
+ ) -> None:
39
+ super().__init__(provider)
40
+ self._auth_scheme = auth_scheme
41
+
42
+ async def asign(self, req: Request) -> Request:
43
+ creds = await self.provider.aresolve_identity()
44
+ ctx: SigV4AuthContext = {
45
+ "type": "sig_v4",
46
+ "access_key_id": creds["access_key"],
47
+ "secret_access_key": creds["secret_key"],
48
+ "session_token": creds.get("session_token"),
49
+ "signing_region": self._auth_scheme["signingRegion"],
50
+ "signing_name": self._auth_scheme["signingName"],
51
+ }
52
+ if req.body is None:
53
+ body: bytes | None = b""
54
+ elif isinstance(req.body, bytes):
55
+ body = req.body
56
+ else:
57
+ body = None
58
+ # Strip Accept-Encoding so transports/intermediaries can't transcode
59
+ # the response and so the value never enters the canonical request.
60
+ if "accept-encoding" in req.headers:
61
+ del req.headers["Accept-Encoding"]
62
+ return sign_sigv4(req, ctx, body)
63
+
64
+ def sign(self, req: Request) -> Request:
65
+ creds = self.provider.resolve_identity()
66
+ ctx: SigV4AuthContext = {
67
+ "type": "sig_v4",
68
+ "access_key_id": creds["access_key"],
69
+ "secret_access_key": creds["secret_key"],
70
+ "session_token": creds.get("session_token"),
71
+ "signing_region": self._auth_scheme["signingRegion"],
72
+ "signing_name": self._auth_scheme["signingName"],
73
+ }
74
+ if req.body is None:
75
+ body: bytes | None = b""
76
+ elif isinstance(req.body, bytes):
77
+ body = req.body
78
+ else:
79
+ body = None
80
+ # Strip Accept-Encoding so transports/intermediaries can't transcode
81
+ # the response and so the value never enters the canonical request.
82
+ if "accept-encoding" in req.headers:
83
+ del req.headers["Accept-Encoding"]
84
+ return sign_sigv4(req, ctx, body)