capo-lambda 0.5.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 (681) hide show
  1. capo_lambda/__init__.py +52 -0
  2. capo_lambda/_async.py +25 -0
  3. capo_lambda/_auth/_identity.py +16 -0
  4. capo_lambda/_auth/_providers.py +318 -0
  5. capo_lambda/_auth/_signers.py +84 -0
  6. capo_lambda/_auth/_sigv4.py +382 -0
  7. capo_lambda/_auth/_zapros_handler.py +62 -0
  8. capo_lambda/_iter.py +113 -0
  9. capo_lambda/_operations/aws_gir_api_service/add_layer_version_permission.py +169 -0
  10. capo_lambda/_operations/aws_gir_api_service/add_permission.py +168 -0
  11. capo_lambda/_operations/aws_gir_api_service/checkpoint_durable_execution.py +150 -0
  12. capo_lambda/_operations/aws_gir_api_service/create_alias.py +152 -0
  13. capo_lambda/_operations/aws_gir_api_service/create_capacity_provider.py +157 -0
  14. capo_lambda/_operations/aws_gir_api_service/create_code_signing_config.py +140 -0
  15. capo_lambda/_operations/aws_gir_api_service/create_event_source_mapping.py +173 -0
  16. capo_lambda/_operations/aws_gir_api_service/create_function.py +208 -0
  17. capo_lambda/_operations/aws_gir_api_service/create_function_url_config.py +158 -0
  18. capo_lambda/_operations/aws_gir_api_service/delete_alias.py +123 -0
  19. capo_lambda/_operations/aws_gir_api_service/delete_capacity_provider.py +156 -0
  20. capo_lambda/_operations/aws_gir_api_service/delete_code_signing_config.py +146 -0
  21. capo_lambda/_operations/aws_gir_api_service/delete_event_source_mapping.py +176 -0
  22. capo_lambda/_operations/aws_gir_api_service/delete_function.py +148 -0
  23. capo_lambda/_operations/aws_gir_api_service/delete_function_code_signing_config.py +133 -0
  24. capo_lambda/_operations/aws_gir_api_service/delete_function_concurrency.py +125 -0
  25. capo_lambda/_operations/aws_gir_api_service/delete_function_event_invoke_config.py +130 -0
  26. capo_lambda/_operations/aws_gir_api_service/delete_function_url_config.py +122 -0
  27. capo_lambda/_operations/aws_gir_api_service/delete_layer_version.py +114 -0
  28. capo_lambda/_operations/aws_gir_api_service/delete_provisioned_concurrency_config.py +130 -0
  29. capo_lambda/_operations/aws_gir_api_service/get_account_settings.py +139 -0
  30. capo_lambda/_operations/aws_gir_api_service/get_alias.py +147 -0
  31. capo_lambda/_operations/aws_gir_api_service/get_capacity_provider.py +151 -0
  32. capo_lambda/_operations/aws_gir_api_service/get_code_signing_config.py +146 -0
  33. capo_lambda/_operations/aws_gir_api_service/get_durable_execution.py +154 -0
  34. capo_lambda/_operations/aws_gir_api_service/get_durable_execution_history.py +158 -0
  35. capo_lambda/_operations/aws_gir_api_service/get_durable_execution_state.py +151 -0
  36. capo_lambda/_operations/aws_gir_api_service/get_event_source_mapping.py +166 -0
  37. capo_lambda/_operations/aws_gir_api_service/get_function.py +154 -0
  38. capo_lambda/_operations/aws_gir_api_service/get_function_code_signing_config.py +148 -0
  39. capo_lambda/_operations/aws_gir_api_service/get_function_concurrency.py +145 -0
  40. capo_lambda/_operations/aws_gir_api_service/get_function_configuration.py +172 -0
  41. capo_lambda/_operations/aws_gir_api_service/get_function_event_invoke_config.py +156 -0
  42. capo_lambda/_operations/aws_gir_api_service/get_function_recursion_config.py +149 -0
  43. capo_lambda/_operations/aws_gir_api_service/get_function_scaling_config.py +151 -0
  44. capo_lambda/_operations/aws_gir_api_service/get_function_url_config.py +150 -0
  45. capo_lambda/_operations/aws_gir_api_service/get_layer_version.py +156 -0
  46. capo_lambda/_operations/aws_gir_api_service/get_layer_version_by_arn.py +152 -0
  47. capo_lambda/_operations/aws_gir_api_service/get_layer_version_policy.py +149 -0
  48. capo_lambda/_operations/aws_gir_api_service/get_policy.py +145 -0
  49. capo_lambda/_operations/aws_gir_api_service/get_provisioned_concurrency_config.py +156 -0
  50. capo_lambda/_operations/aws_gir_api_service/get_runtime_management_config.py +151 -0
  51. capo_lambda/_operations/aws_gir_api_service/invoke.py +342 -0
  52. capo_lambda/_operations/aws_gir_api_service/invoke_async.py +153 -0
  53. capo_lambda/_operations/aws_gir_api_service/invoke_with_response_stream.py +346 -0
  54. capo_lambda/_operations/aws_gir_api_service/list_aliases.py +154 -0
  55. capo_lambda/_operations/aws_gir_api_service/list_capacity_providers.py +146 -0
  56. capo_lambda/_operations/aws_gir_api_service/list_code_signing_configs.py +142 -0
  57. capo_lambda/_operations/aws_gir_api_service/list_durable_executions_by_function.py +166 -0
  58. capo_lambda/_operations/aws_gir_api_service/list_event_source_mappings.py +152 -0
  59. capo_lambda/_operations/aws_gir_api_service/list_function_event_invoke_configs.py +153 -0
  60. capo_lambda/_operations/aws_gir_api_service/list_function_url_configs.py +154 -0
  61. capo_lambda/_operations/aws_gir_api_service/list_function_versions_by_capacity_provider.py +155 -0
  62. capo_lambda/_operations/aws_gir_api_service/list_functions.py +150 -0
  63. capo_lambda/_operations/aws_gir_api_service/list_functions_by_code_signing_config.py +150 -0
  64. capo_lambda/_operations/aws_gir_api_service/list_layer_versions.py +160 -0
  65. capo_lambda/_operations/aws_gir_api_service/list_layers.py +147 -0
  66. capo_lambda/_operations/aws_gir_api_service/list_provisioned_concurrency_configs.py +153 -0
  67. capo_lambda/_operations/aws_gir_api_service/list_tags.py +144 -0
  68. capo_lambda/_operations/aws_gir_api_service/list_versions_by_function.py +154 -0
  69. capo_lambda/_operations/aws_gir_api_service/publish_layer_version.py +157 -0
  70. capo_lambda/_operations/aws_gir_api_service/publish_version.py +192 -0
  71. capo_lambda/_operations/aws_gir_api_service/put_function_code_signing_config.py +163 -0
  72. capo_lambda/_operations/aws_gir_api_service/put_function_concurrency.py +149 -0
  73. capo_lambda/_operations/aws_gir_api_service/put_function_event_invoke_config.py +166 -0
  74. capo_lambda/_operations/aws_gir_api_service/put_function_recursion_config.py +157 -0
  75. capo_lambda/_operations/aws_gir_api_service/put_function_scaling_config.py +160 -0
  76. capo_lambda/_operations/aws_gir_api_service/put_provisioned_concurrency_config.py +161 -0
  77. capo_lambda/_operations/aws_gir_api_service/put_runtime_management_config.py +159 -0
  78. capo_lambda/_operations/aws_gir_api_service/remove_layer_version_permission.py +132 -0
  79. capo_lambda/_operations/aws_gir_api_service/remove_permission.py +133 -0
  80. capo_lambda/_operations/aws_gir_api_service/send_durable_execution_callback_failure.py +151 -0
  81. capo_lambda/_operations/aws_gir_api_service/send_durable_execution_callback_heartbeat.py +144 -0
  82. capo_lambda/_operations/aws_gir_api_service/send_durable_execution_callback_success.py +151 -0
  83. capo_lambda/_operations/aws_gir_api_service/stop_durable_execution.py +158 -0
  84. capo_lambda/_operations/aws_gir_api_service/tag_resource.py +129 -0
  85. capo_lambda/_operations/aws_gir_api_service/untag_resource.py +128 -0
  86. capo_lambda/_operations/aws_gir_api_service/update_alias.py +160 -0
  87. capo_lambda/_operations/aws_gir_api_service/update_capacity_provider.py +160 -0
  88. capo_lambda/_operations/aws_gir_api_service/update_code_signing_config.py +151 -0
  89. capo_lambda/_operations/aws_gir_api_service/update_event_source_mapping.py +179 -0
  90. capo_lambda/_operations/aws_gir_api_service/update_function_code.py +203 -0
  91. capo_lambda/_operations/aws_gir_api_service/update_function_configuration.py +204 -0
  92. capo_lambda/_operations/aws_gir_api_service/update_function_event_invoke_config.py +166 -0
  93. capo_lambda/_operations/aws_gir_api_service/update_function_url_config.py +158 -0
  94. capo_lambda/_pagination.py +21 -0
  95. capo_lambda/_protocol/__init__.py +1 -0
  96. capo_lambda/_protocol/errors.py +59 -0
  97. capo_lambda/_protocol/eventstream.py +238 -0
  98. capo_lambda/_protocol/xml.py +27 -0
  99. capo_lambda/_resources/aws_gir_api_service/capacity_provider_resource.py +713 -0
  100. capo_lambda/_resources/aws_gir_api_service/code_signing_config_resource.py +656 -0
  101. capo_lambda/_resources/aws_gir_api_service/event_source_mapping.py +1163 -0
  102. capo_lambda/_resources/aws_gir_api_service/function.py +3923 -0
  103. capo_lambda/_resources/aws_gir_api_service/function_alias.py +670 -0
  104. capo_lambda/_resources/aws_gir_api_service/function_version_resource.py +303 -0
  105. capo_lambda/_resources/aws_gir_api_service/layer_resource.py +170 -0
  106. capo_lambda/_resources/aws_gir_api_service/layer_version.py +1022 -0
  107. capo_lambda/_resources/aws_gir_api_service/permission.py +389 -0
  108. capo_lambda/_resources/aws_gir_api_service/provisioned_concurrency_config.py +376 -0
  109. capo_lambda/_resources/aws_gir_api_service/resource_policy.py +19 -0
  110. capo_lambda/_rule_engine/__init__.py +0 -0
  111. capo_lambda/_rule_engine/_aws_partition.py +160 -0
  112. capo_lambda/_rule_engine/_endpoint_rule_set.py +136 -0
  113. capo_lambda/_rule_engine/_endpoint_runtime.py +389 -0
  114. capo_lambda/_services/_aws_config.py +152 -0
  115. capo_lambda/_services/_lambda.py +1388 -0
  116. capo_lambda/_services/_pipeline.py +198 -0
  117. capo_lambda/_services/async__lambda.py +1411 -0
  118. capo_lambda/errors/__init__.py +148 -0
  119. capo_lambda/errors/_base.py +94 -0
  120. capo_lambda/errors/callback_timeout_exception.py +54 -0
  121. capo_lambda/errors/capacity_provider_limit_exceeded_exception.py +54 -0
  122. capo_lambda/errors/code_signing_config_not_found_exception.py +53 -0
  123. capo_lambda/errors/code_storage_exceeded_exception.py +54 -0
  124. capo_lambda/errors/code_verification_failed_exception.py +53 -0
  125. capo_lambda/errors/durable_execution_already_started_exception.py +54 -0
  126. capo_lambda/errors/ec2_access_denied_exception.py +53 -0
  127. capo_lambda/errors/ec2_throttled_exception.py +53 -0
  128. capo_lambda/errors/ec2_unexpected_exception.py +58 -0
  129. capo_lambda/errors/efs_mount_connectivity_exception.py +53 -0
  130. capo_lambda/errors/efs_mount_failure_exception.py +53 -0
  131. capo_lambda/errors/efs_mount_timeout_exception.py +53 -0
  132. capo_lambda/errors/efsio_exception.py +53 -0
  133. capo_lambda/errors/eni_limit_reached_exception.py +53 -0
  134. capo_lambda/errors/function_versions_per_capacity_provider_limit_exceeded_exception.py +64 -0
  135. capo_lambda/errors/invalid_code_signature_exception.py +53 -0
  136. capo_lambda/errors/invalid_parameter_value_exception.py +55 -0
  137. capo_lambda/errors/invalid_request_content_exception.py +55 -0
  138. capo_lambda/errors/invalid_runtime_exception.py +53 -0
  139. capo_lambda/errors/invalid_security_group_id_exception.py +53 -0
  140. capo_lambda/errors/invalid_subnet_id_exception.py +53 -0
  141. capo_lambda/errors/invalid_zip_file_exception.py +53 -0
  142. capo_lambda/errors/kms_access_denied_exception.py +53 -0
  143. capo_lambda/errors/kms_disabled_exception.py +53 -0
  144. capo_lambda/errors/kms_invalid_state_exception.py +53 -0
  145. capo_lambda/errors/kms_not_found_exception.py +53 -0
  146. capo_lambda/errors/no_published_version_exception.py +54 -0
  147. capo_lambda/errors/policy_length_exceeded_exception.py +53 -0
  148. capo_lambda/errors/precondition_failed_exception.py +55 -0
  149. capo_lambda/errors/provisioned_concurrency_config_not_found_exception.py +53 -0
  150. capo_lambda/errors/recursive_invocation_exception.py +55 -0
  151. capo_lambda/errors/request_too_large_exception.py +53 -0
  152. capo_lambda/errors/resource_conflict_exception.py +55 -0
  153. capo_lambda/errors/resource_in_use_exception.py +53 -0
  154. capo_lambda/errors/resource_not_found_exception.py +53 -0
  155. capo_lambda/errors/resource_not_ready_exception.py +55 -0
  156. capo_lambda/errors/s3_files_mount_connectivity_exception.py +55 -0
  157. capo_lambda/errors/s3_files_mount_failure_exception.py +55 -0
  158. capo_lambda/errors/s3_files_mount_timeout_exception.py +55 -0
  159. capo_lambda/errors/serialized_request_entity_too_large_exception.py +54 -0
  160. capo_lambda/errors/service_exception.py +53 -0
  161. capo_lambda/errors/snap_start_exception.py +53 -0
  162. capo_lambda/errors/snap_start_not_ready_exception.py +53 -0
  163. capo_lambda/errors/snap_start_timeout_exception.py +53 -0
  164. capo_lambda/errors/subnet_ip_address_limit_reached_exception.py +53 -0
  165. capo_lambda/errors/too_many_requests_exception.py +69 -0
  166. capo_lambda/errors/unsupported_media_type_exception.py +53 -0
  167. capo_lambda/py.typed +0 -0
  168. capo_lambda/types/_prelude/blob.py +12 -0
  169. capo_lambda/types/_prelude/timestamp.py +12 -0
  170. capo_lambda/types/account_limit.py +62 -0
  171. capo_lambda/types/account_usage.py +36 -0
  172. capo_lambda/types/action.py +5 -0
  173. capo_lambda/types/add_layer_version_permission_request.py +69 -0
  174. capo_lambda/types/add_layer_version_permission_response.py +34 -0
  175. capo_lambda/types/add_permission_request.py +122 -0
  176. capo_lambda/types/add_permission_response.py +28 -0
  177. capo_lambda/types/additional_version.py +5 -0
  178. capo_lambda/types/additional_version_weights.py +27 -0
  179. capo_lambda/types/alias.py +5 -0
  180. capo_lambda/types/alias_configuration.py +77 -0
  181. capo_lambda/types/alias_list.py +27 -0
  182. capo_lambda/types/alias_routing_configuration.py +42 -0
  183. capo_lambda/types/allow_credentials.py +5 -0
  184. capo_lambda/types/allow_methods_list.py +17 -0
  185. capo_lambda/types/allow_origins_list.py +17 -0
  186. capo_lambda/types/allowed_publishers.py +47 -0
  187. capo_lambda/types/amazon_managed_kafka_event_source_config.py +49 -0
  188. capo_lambda/types/application_log_level.py +21 -0
  189. capo_lambda/types/architecture.py +17 -0
  190. capo_lambda/types/architectures_list.py +27 -0
  191. capo_lambda/types/arn.py +5 -0
  192. capo_lambda/types/attempt_count.py +5 -0
  193. capo_lambda/types/batch_size.py +5 -0
  194. capo_lambda/types/binary_operation_payload.py +15 -0
  195. capo_lambda/types/bisect_batch_on_function_error.py +5 -0
  196. capo_lambda/types/blob.py +15 -0
  197. capo_lambda/types/blob_stream.py +7 -0
  198. capo_lambda/types/boolean.py +5 -0
  199. capo_lambda/types/callback_details.py +46 -0
  200. capo_lambda/types/callback_failed_details.py +35 -0
  201. capo_lambda/types/callback_id.py +5 -0
  202. capo_lambda/types/callback_options.py +36 -0
  203. capo_lambda/types/callback_started_details.py +44 -0
  204. capo_lambda/types/callback_succeeded_details.py +35 -0
  205. capo_lambda/types/callback_timed_out_details.py +35 -0
  206. capo_lambda/types/capacity_provider.py +143 -0
  207. capo_lambda/types/capacity_provider_arn.py +5 -0
  208. capo_lambda/types/capacity_provider_config.py +45 -0
  209. capo_lambda/types/capacity_provider_max_v_cpu_count.py +5 -0
  210. capo_lambda/types/capacity_provider_name.py +5 -0
  211. capo_lambda/types/capacity_provider_permissions_config.py +37 -0
  212. capo_lambda/types/capacity_provider_predefined_metric_type.py +16 -0
  213. capo_lambda/types/capacity_provider_scaling_config.py +72 -0
  214. capo_lambda/types/capacity_provider_scaling_mode.py +17 -0
  215. capo_lambda/types/capacity_provider_scaling_policies_list.py +33 -0
  216. capo_lambda/types/capacity_provider_security_group_ids.py +19 -0
  217. capo_lambda/types/capacity_provider_state.py +19 -0
  218. capo_lambda/types/capacity_provider_subnet_ids.py +17 -0
  219. capo_lambda/types/capacity_provider_vpc_config.py +65 -0
  220. capo_lambda/types/capacity_providers_list.py +29 -0
  221. capo_lambda/types/chained_invoke_details.py +39 -0
  222. capo_lambda/types/chained_invoke_failed_details.py +35 -0
  223. capo_lambda/types/chained_invoke_options.py +38 -0
  224. capo_lambda/types/chained_invoke_started_details.py +67 -0
  225. capo_lambda/types/chained_invoke_stopped_details.py +35 -0
  226. capo_lambda/types/chained_invoke_succeeded_details.py +35 -0
  227. capo_lambda/types/chained_invoke_timed_out_details.py +35 -0
  228. capo_lambda/types/checkpoint_durable_execution_request.py +58 -0
  229. capo_lambda/types/checkpoint_durable_execution_response.py +52 -0
  230. capo_lambda/types/checkpoint_token.py +5 -0
  231. capo_lambda/types/checkpoint_updated_execution_state.py +43 -0
  232. capo_lambda/types/client_token.py +5 -0
  233. capo_lambda/types/code_signing_config.py +94 -0
  234. capo_lambda/types/code_signing_config_arn.py +5 -0
  235. capo_lambda/types/code_signing_config_id.py +5 -0
  236. capo_lambda/types/code_signing_config_list.py +29 -0
  237. capo_lambda/types/code_signing_policies.py +42 -0
  238. capo_lambda/types/code_signing_policy.py +17 -0
  239. capo_lambda/types/collection_name.py +5 -0
  240. capo_lambda/types/compatible_architectures.py +27 -0
  241. capo_lambda/types/compatible_runtimes.py +27 -0
  242. capo_lambda/types/concurrency.py +30 -0
  243. capo_lambda/types/context_details.py +46 -0
  244. capo_lambda/types/context_failed_details.py +35 -0
  245. capo_lambda/types/context_options.py +28 -0
  246. capo_lambda/types/context_started_details.py +18 -0
  247. capo_lambda/types/context_succeeded_details.py +35 -0
  248. capo_lambda/types/cors.py +96 -0
  249. capo_lambda/types/create_alias_request.py +72 -0
  250. capo_lambda/types/create_capacity_provider_request.py +139 -0
  251. capo_lambda/types/create_capacity_provider_response.py +41 -0
  252. capo_lambda/types/create_code_signing_config_request.py +82 -0
  253. capo_lambda/types/create_code_signing_config_response.py +43 -0
  254. capo_lambda/types/create_event_source_mapping_request.py +426 -0
  255. capo_lambda/types/create_function_request.py +385 -0
  256. capo_lambda/types/create_function_url_config_request.py +73 -0
  257. capo_lambda/types/create_function_url_config_response.py +95 -0
  258. capo_lambda/types/database_name.py +5 -0
  259. capo_lambda/types/date.py +15 -0
  260. capo_lambda/types/dead_letter_config.py +28 -0
  261. capo_lambda/types/delete_alias_request.py +27 -0
  262. capo_lambda/types/delete_capacity_provider_request.py +26 -0
  263. capo_lambda/types/delete_capacity_provider_response.py +41 -0
  264. capo_lambda/types/delete_code_signing_config_request.py +26 -0
  265. capo_lambda/types/delete_code_signing_config_response.py +18 -0
  266. capo_lambda/types/delete_event_source_mapping_request.py +24 -0
  267. capo_lambda/types/delete_function_code_signing_config_request.py +24 -0
  268. capo_lambda/types/delete_function_concurrency_request.py +24 -0
  269. capo_lambda/types/delete_function_event_invoke_config_request.py +29 -0
  270. capo_lambda/types/delete_function_request.py +29 -0
  271. capo_lambda/types/delete_function_response.py +24 -0
  272. capo_lambda/types/delete_function_url_config_request.py +29 -0
  273. capo_lambda/types/delete_layer_version_request.py +27 -0
  274. capo_lambda/types/delete_provisioned_concurrency_config_request.py +27 -0
  275. capo_lambda/types/description.py +5 -0
  276. capo_lambda/types/destination_arn.py +5 -0
  277. capo_lambda/types/destination_config.py +51 -0
  278. capo_lambda/types/document_db_event_source_config.py +50 -0
  279. capo_lambda/types/durable_config.py +39 -0
  280. capo_lambda/types/durable_execution_arn.py +5 -0
  281. capo_lambda/types/durable_execution_name.py +5 -0
  282. capo_lambda/types/durable_executions.py +27 -0
  283. capo_lambda/types/duration_seconds.py +5 -0
  284. capo_lambda/types/enabled.py +5 -0
  285. capo_lambda/types/end_point_type.py +14 -0
  286. capo_lambda/types/endpoint.py +5 -0
  287. capo_lambda/types/endpoint_lists.py +17 -0
  288. capo_lambda/types/endpoints.py +37 -0
  289. capo_lambda/types/environment.py +38 -0
  290. capo_lambda/types/environment_error.py +35 -0
  291. capo_lambda/types/environment_response.py +53 -0
  292. capo_lambda/types/environment_variable_name.py +5 -0
  293. capo_lambda/types/environment_variable_value.py +5 -0
  294. capo_lambda/types/environment_variables.py +27 -0
  295. capo_lambda/types/ephemeral_storage.py +31 -0
  296. capo_lambda/types/ephemeral_storage_size.py +5 -0
  297. capo_lambda/types/error_data.py +5 -0
  298. capo_lambda/types/error_message.py +5 -0
  299. capo_lambda/types/error_object.py +57 -0
  300. capo_lambda/types/error_type.py +5 -0
  301. capo_lambda/types/event.py +584 -0
  302. capo_lambda/types/event_error.py +41 -0
  303. capo_lambda/types/event_id.py +5 -0
  304. capo_lambda/types/event_input.py +35 -0
  305. capo_lambda/types/event_result.py +35 -0
  306. capo_lambda/types/event_source_mapping_arn.py +5 -0
  307. capo_lambda/types/event_source_mapping_configuration.py +472 -0
  308. capo_lambda/types/event_source_mapping_logging_config.py +42 -0
  309. capo_lambda/types/event_source_mapping_metric.py +18 -0
  310. capo_lambda/types/event_source_mapping_metric_list.py +29 -0
  311. capo_lambda/types/event_source_mapping_metrics_config.py +42 -0
  312. capo_lambda/types/event_source_mapping_system_log_level.py +18 -0
  313. capo_lambda/types/event_source_mappings_list.py +33 -0
  314. capo_lambda/types/event_source_position.py +18 -0
  315. capo_lambda/types/event_source_token.py +5 -0
  316. capo_lambda/types/event_type.py +39 -0
  317. capo_lambda/types/events.py +27 -0
  318. capo_lambda/types/execution.py +95 -0
  319. capo_lambda/types/execution_details.py +28 -0
  320. capo_lambda/types/execution_environment_memory_gi_b_per_v_cpu.py +5 -0
  321. capo_lambda/types/execution_failed_details.py +35 -0
  322. capo_lambda/types/execution_started_details.py +43 -0
  323. capo_lambda/types/execution_status.py +20 -0
  324. capo_lambda/types/execution_status_list.py +29 -0
  325. capo_lambda/types/execution_stopped_details.py +35 -0
  326. capo_lambda/types/execution_succeeded_details.py +35 -0
  327. capo_lambda/types/execution_timed_out_details.py +32 -0
  328. capo_lambda/types/execution_timeout.py +5 -0
  329. capo_lambda/types/execution_timestamp.py +15 -0
  330. capo_lambda/types/file_system_arn.py +5 -0
  331. capo_lambda/types/file_system_config.py +39 -0
  332. capo_lambda/types/file_system_config_list.py +29 -0
  333. capo_lambda/types/filter.py +28 -0
  334. capo_lambda/types/filter_criteria.py +32 -0
  335. capo_lambda/types/filter_criteria_error.py +39 -0
  336. capo_lambda/types/filter_criteria_error_code.py +5 -0
  337. capo_lambda/types/filter_criteria_error_message.py +5 -0
  338. capo_lambda/types/filter_list.py +27 -0
  339. capo_lambda/types/full_document.py +17 -0
  340. capo_lambda/types/function_arn.py +5 -0
  341. capo_lambda/types/function_arn_list.py +17 -0
  342. capo_lambda/types/function_code.py +69 -0
  343. capo_lambda/types/function_code_location.py +52 -0
  344. capo_lambda/types/function_configuration.py +513 -0
  345. capo_lambda/types/function_event_invoke_config.py +80 -0
  346. capo_lambda/types/function_event_invoke_config_list.py +31 -0
  347. capo_lambda/types/function_list.py +29 -0
  348. capo_lambda/types/function_name.py +5 -0
  349. capo_lambda/types/function_response_type.py +14 -0
  350. capo_lambda/types/function_response_type_list.py +29 -0
  351. capo_lambda/types/function_scaling_config.py +38 -0
  352. capo_lambda/types/function_scaling_config_execution_environments.py +5 -0
  353. capo_lambda/types/function_url.py +5 -0
  354. capo_lambda/types/function_url_auth_type.py +17 -0
  355. capo_lambda/types/function_url_config.py +96 -0
  356. capo_lambda/types/function_url_config_list.py +29 -0
  357. capo_lambda/types/function_url_qualifier.py +5 -0
  358. capo_lambda/types/function_version.py +14 -0
  359. capo_lambda/types/function_version_latest_published.py +14 -0
  360. capo_lambda/types/function_versions_by_capacity_provider_list.py +37 -0
  361. capo_lambda/types/function_versions_by_capacity_provider_list_item.py +47 -0
  362. capo_lambda/types/get_account_settings_request.py +18 -0
  363. capo_lambda/types/get_account_settings_response.py +51 -0
  364. capo_lambda/types/get_alias_request.py +27 -0
  365. capo_lambda/types/get_capacity_provider_request.py +26 -0
  366. capo_lambda/types/get_capacity_provider_response.py +41 -0
  367. capo_lambda/types/get_code_signing_config_request.py +26 -0
  368. capo_lambda/types/get_code_signing_config_response.py +43 -0
  369. capo_lambda/types/get_durable_execution_history_request.py +38 -0
  370. capo_lambda/types/get_durable_execution_history_response.py +42 -0
  371. capo_lambda/types/get_durable_execution_request.py +24 -0
  372. capo_lambda/types/get_durable_execution_response.py +150 -0
  373. capo_lambda/types/get_durable_execution_state_request.py +33 -0
  374. capo_lambda/types/get_durable_execution_state_response.py +46 -0
  375. capo_lambda/types/get_event_source_mapping_request.py +24 -0
  376. capo_lambda/types/get_function_code_signing_config_request.py +24 -0
  377. capo_lambda/types/get_function_code_signing_config_response.py +45 -0
  378. capo_lambda/types/get_function_concurrency_request.py +24 -0
  379. capo_lambda/types/get_function_concurrency_response.py +30 -0
  380. capo_lambda/types/get_function_configuration_request.py +29 -0
  381. capo_lambda/types/get_function_event_invoke_config_request.py +29 -0
  382. capo_lambda/types/get_function_recursion_config_request.py +24 -0
  383. capo_lambda/types/get_function_recursion_config_response.py +36 -0
  384. capo_lambda/types/get_function_request.py +29 -0
  385. capo_lambda/types/get_function_response.py +96 -0
  386. capo_lambda/types/get_function_scaling_config_request.py +29 -0
  387. capo_lambda/types/get_function_scaling_config_response.py +69 -0
  388. capo_lambda/types/get_function_url_config_request.py +29 -0
  389. capo_lambda/types/get_function_url_config_response.py +100 -0
  390. capo_lambda/types/get_layer_version_by_arn_request.py +24 -0
  391. capo_lambda/types/get_layer_version_policy_request.py +27 -0
  392. capo_lambda/types/get_layer_version_policy_response.py +34 -0
  393. capo_lambda/types/get_layer_version_request.py +27 -0
  394. capo_lambda/types/get_layer_version_response.py +127 -0
  395. capo_lambda/types/get_policy_request.py +29 -0
  396. capo_lambda/types/get_policy_response.py +34 -0
  397. capo_lambda/types/get_provisioned_concurrency_config_request.py +27 -0
  398. capo_lambda/types/get_provisioned_concurrency_config_response.py +94 -0
  399. capo_lambda/types/get_runtime_management_config_request.py +29 -0
  400. capo_lambda/types/get_runtime_management_config_response.py +56 -0
  401. capo_lambda/types/handler.py +5 -0
  402. capo_lambda/types/header.py +5 -0
  403. capo_lambda/types/headers_list.py +17 -0
  404. capo_lambda/types/http_status.py +5 -0
  405. capo_lambda/types/image_config.py +55 -0
  406. capo_lambda/types/image_config_error.py +35 -0
  407. capo_lambda/types/image_config_response.py +51 -0
  408. capo_lambda/types/include_execution_data.py +5 -0
  409. capo_lambda/types/input_payload.py +5 -0
  410. capo_lambda/types/instance_requirements.py +77 -0
  411. capo_lambda/types/instance_type.py +5 -0
  412. capo_lambda/types/instance_type_set.py +17 -0
  413. capo_lambda/types/integer.py +5 -0
  414. capo_lambda/types/invocation_completed_details.py +75 -0
  415. capo_lambda/types/invocation_request.py +57 -0
  416. capo_lambda/types/invocation_response.py +48 -0
  417. capo_lambda/types/invocation_type.py +18 -0
  418. capo_lambda/types/invoke_async_request.py +16 -0
  419. capo_lambda/types/invoke_async_response.py +24 -0
  420. capo_lambda/types/invoke_mode.py +17 -0
  421. capo_lambda/types/invoke_response_stream_update.py +42 -0
  422. capo_lambda/types/invoke_with_response_stream_complete_event.py +55 -0
  423. capo_lambda/types/invoke_with_response_stream_request.py +54 -0
  424. capo_lambda/types/invoke_with_response_stream_response.py +24 -0
  425. capo_lambda/types/invoke_with_response_stream_response_event.py +78 -0
  426. capo_lambda/types/invoked_via_function_url.py +5 -0
  427. capo_lambda/types/item_count.py +5 -0
  428. capo_lambda/types/kafka_schema_registry_access_config.py +47 -0
  429. capo_lambda/types/kafka_schema_registry_access_config_list.py +33 -0
  430. capo_lambda/types/kafka_schema_registry_auth_type.py +18 -0
  431. capo_lambda/types/kafka_schema_registry_config.py +93 -0
  432. capo_lambda/types/kafka_schema_validation_attribute.py +17 -0
  433. capo_lambda/types/kafka_schema_validation_config.py +42 -0
  434. capo_lambda/types/kafka_schema_validation_config_list.py +33 -0
  435. capo_lambda/types/kms_key_arn.py +5 -0
  436. capo_lambda/types/kms_key_arn_non_empty.py +5 -0
  437. capo_lambda/types/lambda_managed_instances_capacity_provider_config.py +59 -0
  438. capo_lambda/types/last_update_status.py +18 -0
  439. capo_lambda/types/last_update_status_reason.py +5 -0
  440. capo_lambda/types/last_update_status_reason_code.py +49 -0
  441. capo_lambda/types/layer.py +49 -0
  442. capo_lambda/types/layer_arn.py +5 -0
  443. capo_lambda/types/layer_list.py +17 -0
  444. capo_lambda/types/layer_name.py +5 -0
  445. capo_lambda/types/layer_permission_allowed_action.py +5 -0
  446. capo_lambda/types/layer_permission_allowed_principal.py +5 -0
  447. capo_lambda/types/layer_version_arn.py +5 -0
  448. capo_lambda/types/layer_version_content_input.py +55 -0
  449. capo_lambda/types/layer_version_content_output.py +54 -0
  450. capo_lambda/types/layer_version_number.py +5 -0
  451. capo_lambda/types/layer_versions_list.py +29 -0
  452. capo_lambda/types/layer_versions_list_item.py +101 -0
  453. capo_lambda/types/layers_list.py +27 -0
  454. capo_lambda/types/layers_list_item.py +56 -0
  455. capo_lambda/types/layers_reference_list.py +27 -0
  456. capo_lambda/types/license_info.py +5 -0
  457. capo_lambda/types/list_aliases_request.py +35 -0
  458. capo_lambda/types/list_aliases_response.py +39 -0
  459. capo_lambda/types/list_capacity_providers_request.py +32 -0
  460. capo_lambda/types/list_capacity_providers_response.py +52 -0
  461. capo_lambda/types/list_code_signing_configs_request.py +27 -0
  462. capo_lambda/types/list_code_signing_configs_response.py +49 -0
  463. capo_lambda/types/list_durable_executions_by_function_request.py +55 -0
  464. capo_lambda/types/list_durable_executions_by_function_response.py +47 -0
  465. capo_lambda/types/list_event_source_mappings_request.py +35 -0
  466. capo_lambda/types/list_event_source_mappings_response.py +49 -0
  467. capo_lambda/types/list_function_event_invoke_configs_request.py +32 -0
  468. capo_lambda/types/list_function_event_invoke_configs_response.py +49 -0
  469. capo_lambda/types/list_function_url_configs_request.py +30 -0
  470. capo_lambda/types/list_function_url_configs_response.py +54 -0
  471. capo_lambda/types/list_function_versions_by_capacity_provider_request.py +32 -0
  472. capo_lambda/types/list_function_versions_by_capacity_provider_response.py +62 -0
  473. capo_lambda/types/list_functions_by_code_signing_config_request.py +32 -0
  474. capo_lambda/types/list_functions_by_code_signing_config_response.py +43 -0
  475. capo_lambda/types/list_functions_request.py +33 -0
  476. capo_lambda/types/list_functions_response.py +43 -0
  477. capo_lambda/types/list_layer_versions_request.py +36 -0
  478. capo_lambda/types/list_layer_versions_response.py +45 -0
  479. capo_lambda/types/list_layers_request.py +33 -0
  480. capo_lambda/types/list_layers_response.py +39 -0
  481. capo_lambda/types/list_provisioned_concurrency_configs_request.py +32 -0
  482. capo_lambda/types/list_provisioned_concurrency_configs_response.py +49 -0
  483. capo_lambda/types/list_tags_request.py +24 -0
  484. capo_lambda/types/list_tags_response.py +32 -0
  485. capo_lambda/types/list_versions_by_function_request.py +30 -0
  486. capo_lambda/types/list_versions_by_function_response.py +43 -0
  487. capo_lambda/types/local_mount_path.py +5 -0
  488. capo_lambda/types/log_format.py +17 -0
  489. capo_lambda/types/log_group.py +5 -0
  490. capo_lambda/types/log_type.py +17 -0
  491. capo_lambda/types/logging_config.py +79 -0
  492. capo_lambda/types/long.py +5 -0
  493. capo_lambda/types/master_region.py +5 -0
  494. capo_lambda/types/max_age.py +5 -0
  495. capo_lambda/types/max_fifty_list_items.py +5 -0
  496. capo_lambda/types/max_function_event_invoke_config_list_items.py +5 -0
  497. capo_lambda/types/max_items.py +5 -0
  498. capo_lambda/types/max_layer_list_items.py +5 -0
  499. capo_lambda/types/max_list_items.py +5 -0
  500. capo_lambda/types/max_provisioned_concurrency_config_list_items.py +5 -0
  501. capo_lambda/types/maximum_batching_window_in_seconds.py +5 -0
  502. capo_lambda/types/maximum_concurrency.py +5 -0
  503. capo_lambda/types/maximum_event_age_in_seconds.py +5 -0
  504. capo_lambda/types/maximum_number_of_pollers.py +5 -0
  505. capo_lambda/types/maximum_record_age_in_seconds.py +5 -0
  506. capo_lambda/types/maximum_retry_attempts.py +5 -0
  507. capo_lambda/types/maximum_retry_attempts_event_source_mapping.py +5 -0
  508. capo_lambda/types/memory_size.py +5 -0
  509. capo_lambda/types/method.py +5 -0
  510. capo_lambda/types/metric_target_value.py +5 -0
  511. capo_lambda/types/minimum_number_of_pollers.py +5 -0
  512. capo_lambda/types/name_spaced_function_arn.py +5 -0
  513. capo_lambda/types/namespaced_function_name.py +5 -0
  514. capo_lambda/types/namespaced_statement_id.py +5 -0
  515. capo_lambda/types/non_negative_integer.py +5 -0
  516. capo_lambda/types/nullable_boolean.py +5 -0
  517. capo_lambda/types/numeric_latest_published_or_alias_qualifier.py +5 -0
  518. capo_lambda/types/on_failure.py +28 -0
  519. capo_lambda/types/on_success.py +28 -0
  520. capo_lambda/types/operation.py +205 -0
  521. capo_lambda/types/operation_action.py +20 -0
  522. capo_lambda/types/operation_id.py +5 -0
  523. capo_lambda/types/operation_name.py +5 -0
  524. capo_lambda/types/operation_payload.py +5 -0
  525. capo_lambda/types/operation_status.py +23 -0
  526. capo_lambda/types/operation_sub_type.py +5 -0
  527. capo_lambda/types/operation_type.py +21 -0
  528. capo_lambda/types/operation_update.py +174 -0
  529. capo_lambda/types/operation_updates.py +27 -0
  530. capo_lambda/types/operations.py +27 -0
  531. capo_lambda/types/organization_id.py +5 -0
  532. capo_lambda/types/origin.py +5 -0
  533. capo_lambda/types/output_payload.py +5 -0
  534. capo_lambda/types/package_type.py +17 -0
  535. capo_lambda/types/parallelization_factor.py +5 -0
  536. capo_lambda/types/pattern.py +5 -0
  537. capo_lambda/types/per_execution_environment_max_concurrency.py +5 -0
  538. capo_lambda/types/positive_integer.py +5 -0
  539. capo_lambda/types/principal.py +5 -0
  540. capo_lambda/types/principal_org_id.py +5 -0
  541. capo_lambda/types/provisioned_concurrency_config_list.py +37 -0
  542. capo_lambda/types/provisioned_concurrency_config_list_item.py +101 -0
  543. capo_lambda/types/provisioned_concurrency_status_enum.py +18 -0
  544. capo_lambda/types/provisioned_poller_config.py +48 -0
  545. capo_lambda/types/provisioned_poller_group_name.py +5 -0
  546. capo_lambda/types/publish_layer_version_request.py +98 -0
  547. capo_lambda/types/publish_layer_version_response.py +127 -0
  548. capo_lambda/types/publish_version_request.py +65 -0
  549. capo_lambda/types/published_function_qualifier.py +5 -0
  550. capo_lambda/types/put_function_code_signing_config_request.py +38 -0
  551. capo_lambda/types/put_function_code_signing_config_response.py +45 -0
  552. capo_lambda/types/put_function_concurrency_request.py +38 -0
  553. capo_lambda/types/put_function_event_invoke_config_request.py +66 -0
  554. capo_lambda/types/put_function_recursion_config_request.py +44 -0
  555. capo_lambda/types/put_function_recursion_config_response.py +36 -0
  556. capo_lambda/types/put_function_scaling_config_request.py +50 -0
  557. capo_lambda/types/put_function_scaling_config_response.py +36 -0
  558. capo_lambda/types/put_provisioned_concurrency_config_request.py +43 -0
  559. capo_lambda/types/put_provisioned_concurrency_config_response.py +94 -0
  560. capo_lambda/types/put_runtime_management_config_request.py +58 -0
  561. capo_lambda/types/put_runtime_management_config_response.py +60 -0
  562. capo_lambda/types/qualifier.py +5 -0
  563. capo_lambda/types/queue.py +5 -0
  564. capo_lambda/types/queues.py +17 -0
  565. capo_lambda/types/recursive_loop.py +17 -0
  566. capo_lambda/types/remove_layer_version_permission_request.py +33 -0
  567. capo_lambda/types/remove_permission_request.py +35 -0
  568. capo_lambda/types/replay_children.py +5 -0
  569. capo_lambda/types/reserved_concurrent_executions.py +5 -0
  570. capo_lambda/types/resource_arn.py +5 -0
  571. capo_lambda/types/response_streaming_invocation_type.py +17 -0
  572. capo_lambda/types/retention_period_in_days.py +5 -0
  573. capo_lambda/types/retry_details.py +38 -0
  574. capo_lambda/types/reverse_order.py +5 -0
  575. capo_lambda/types/role_arn.py +5 -0
  576. capo_lambda/types/runtime.py +61 -0
  577. capo_lambda/types/runtime_version_arn.py +5 -0
  578. capo_lambda/types/runtime_version_config.py +45 -0
  579. capo_lambda/types/runtime_version_error.py +35 -0
  580. capo_lambda/types/s3_bucket.py +5 -0
  581. capo_lambda/types/s3_key.py +5 -0
  582. capo_lambda/types/s3_object_version.py +5 -0
  583. capo_lambda/types/scaling_config.py +30 -0
  584. capo_lambda/types/schema_registry_event_record_format.py +17 -0
  585. capo_lambda/types/schema_registry_uri.py +5 -0
  586. capo_lambda/types/security_group_id.py +5 -0
  587. capo_lambda/types/security_group_ids.py +19 -0
  588. capo_lambda/types/self_managed_event_source.py +36 -0
  589. capo_lambda/types/self_managed_kafka_event_source_config.py +49 -0
  590. capo_lambda/types/send_durable_execution_callback_failure_request.py +35 -0
  591. capo_lambda/types/send_durable_execution_callback_failure_response.py +18 -0
  592. capo_lambda/types/send_durable_execution_callback_heartbeat_request.py +24 -0
  593. capo_lambda/types/send_durable_execution_callback_heartbeat_response.py +18 -0
  594. capo_lambda/types/send_durable_execution_callback_success_request.py +41 -0
  595. capo_lambda/types/send_durable_execution_callback_success_response.py +18 -0
  596. capo_lambda/types/sensitive_string.py +5 -0
  597. capo_lambda/types/signing_profile_version_arns.py +17 -0
  598. capo_lambda/types/snap_start.py +36 -0
  599. capo_lambda/types/snap_start_apply_on.py +17 -0
  600. capo_lambda/types/snap_start_optimization_status.py +17 -0
  601. capo_lambda/types/snap_start_response.py +57 -0
  602. capo_lambda/types/source_access_configuration.py +41 -0
  603. capo_lambda/types/source_access_configurations.py +29 -0
  604. capo_lambda/types/source_access_type.py +23 -0
  605. capo_lambda/types/source_owner.py +5 -0
  606. capo_lambda/types/stack_trace_entries.py +19 -0
  607. capo_lambda/types/stack_trace_entry.py +5 -0
  608. capo_lambda/types/state.py +23 -0
  609. capo_lambda/types/state_reason.py +5 -0
  610. capo_lambda/types/state_reason_code.py +53 -0
  611. capo_lambda/types/statement_id.py +5 -0
  612. capo_lambda/types/step_details.py +68 -0
  613. capo_lambda/types/step_failed_details.py +51 -0
  614. capo_lambda/types/step_options.py +30 -0
  615. capo_lambda/types/step_started_details.py +18 -0
  616. capo_lambda/types/step_succeeded_details.py +51 -0
  617. capo_lambda/types/stop_durable_execution_request.py +35 -0
  618. capo_lambda/types/stop_durable_execution_response.py +41 -0
  619. capo_lambda/types/string.py +5 -0
  620. capo_lambda/types/string_list.py +17 -0
  621. capo_lambda/types/subnet_id.py +5 -0
  622. capo_lambda/types/subnet_ids.py +17 -0
  623. capo_lambda/types/system_log_level.py +18 -0
  624. capo_lambda/types/tag_key.py +5 -0
  625. capo_lambda/types/tag_key_list.py +17 -0
  626. capo_lambda/types/tag_resource_request.py +38 -0
  627. capo_lambda/types/tag_value.py +5 -0
  628. capo_lambda/types/taggable_resource.py +5 -0
  629. capo_lambda/types/tags.py +26 -0
  630. capo_lambda/types/tags_error.py +39 -0
  631. capo_lambda/types/tags_error_code.py +5 -0
  632. capo_lambda/types/tags_error_message.py +5 -0
  633. capo_lambda/types/target_tracking_scaling_policy.py +53 -0
  634. capo_lambda/types/tenancy_config.py +41 -0
  635. capo_lambda/types/tenant_id.py +5 -0
  636. capo_lambda/types/tenant_isolation_mode.py +14 -0
  637. capo_lambda/types/throttle_reason.py +21 -0
  638. capo_lambda/types/timeout.py +5 -0
  639. capo_lambda/types/timestamp.py +5 -0
  640. capo_lambda/types/topic.py +5 -0
  641. capo_lambda/types/topics.py +17 -0
  642. capo_lambda/types/trace_header.py +28 -0
  643. capo_lambda/types/tracing_config.py +32 -0
  644. capo_lambda/types/tracing_config_response.py +32 -0
  645. capo_lambda/types/tracing_mode.py +17 -0
  646. capo_lambda/types/truncated.py +5 -0
  647. capo_lambda/types/tumbling_window_in_seconds.py +5 -0
  648. capo_lambda/types/unqualified_function_name.py +5 -0
  649. capo_lambda/types/unreserved_concurrent_executions.py +5 -0
  650. capo_lambda/types/untag_resource_request.py +27 -0
  651. capo_lambda/types/update_alias_request.py +71 -0
  652. capo_lambda/types/update_capacity_provider_request.py +47 -0
  653. capo_lambda/types/update_capacity_provider_response.py +41 -0
  654. capo_lambda/types/update_code_signing_config_request.py +73 -0
  655. capo_lambda/types/update_code_signing_config_response.py +43 -0
  656. capo_lambda/types/update_event_source_mapping_request.py +326 -0
  657. capo_lambda/types/update_function_code_request.py +129 -0
  658. capo_lambda/types/update_function_configuration_request.py +278 -0
  659. capo_lambda/types/update_function_event_invoke_config_request.py +66 -0
  660. capo_lambda/types/update_function_url_config_request.py +72 -0
  661. capo_lambda/types/update_function_url_config_response.py +104 -0
  662. capo_lambda/types/update_runtime_on.py +18 -0
  663. capo_lambda/types/uri.py +5 -0
  664. capo_lambda/types/version.py +5 -0
  665. capo_lambda/types/version_with_latest_published.py +5 -0
  666. capo_lambda/types/vpc_config.py +64 -0
  667. capo_lambda/types/vpc_config_response.py +71 -0
  668. capo_lambda/types/vpc_id.py +5 -0
  669. capo_lambda/types/wait_cancelled_details.py +32 -0
  670. capo_lambda/types/wait_details.py +42 -0
  671. capo_lambda/types/wait_options.py +28 -0
  672. capo_lambda/types/wait_started_details.py +51 -0
  673. capo_lambda/types/wait_succeeded_details.py +28 -0
  674. capo_lambda/types/weight.py +5 -0
  675. capo_lambda/types/working_directory.py +5 -0
  676. capo_lambda/types/x_amzn_trace_id.py +5 -0
  677. capo_lambda-0.5.0.dist-info/METADATA +97 -0
  678. capo_lambda-0.5.0.dist-info/RECORD +681 -0
  679. capo_lambda-0.5.0.dist-info/WHEEL +5 -0
  680. capo_lambda-0.5.0.dist-info/licenses/LICENSE +21 -0
  681. capo_lambda-0.5.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1163 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import TYPE_CHECKING, Optional
4
+
5
+ import capo_lambda._auth._signers
6
+ import capo_lambda._auth._sigv4
7
+ from capo_lambda._services._pipeline import (
8
+ AsyncOperationRequest,
9
+ AsyncOperationResponse,
10
+ OperationRequest,
11
+ OperationResponse,
12
+ aexecute_pipeline,
13
+ execute_pipeline,
14
+ )
15
+
16
+ if TYPE_CHECKING:
17
+ import capo_lambda.types.amazon_managed_kafka_event_source_config
18
+ import capo_lambda.types.arn
19
+ import capo_lambda.types.batch_size
20
+ import capo_lambda.types.bisect_batch_on_function_error
21
+ import capo_lambda.types.create_event_source_mapping_request
22
+ import capo_lambda.types.date
23
+ import capo_lambda.types.delete_event_source_mapping_request
24
+ import capo_lambda.types.destination_config
25
+ import capo_lambda.types.document_db_event_source_config
26
+ import capo_lambda.types.enabled
27
+ import capo_lambda.types.event_source_mapping_configuration
28
+ import capo_lambda.types.event_source_mapping_logging_config
29
+ import capo_lambda.types.event_source_mapping_metrics_config
30
+ import capo_lambda.types.event_source_position
31
+ import capo_lambda.types.filter_criteria
32
+ import capo_lambda.types.function_response_type_list
33
+ import capo_lambda.types.get_event_source_mapping_request
34
+ import capo_lambda.types.kms_key_arn
35
+ import capo_lambda.types.list_event_source_mappings_request
36
+ import capo_lambda.types.list_event_source_mappings_response
37
+ import capo_lambda.types.max_list_items
38
+ import capo_lambda.types.maximum_batching_window_in_seconds
39
+ import capo_lambda.types.maximum_record_age_in_seconds
40
+ import capo_lambda.types.maximum_retry_attempts_event_source_mapping
41
+ import capo_lambda.types.namespaced_function_name
42
+ import capo_lambda.types.parallelization_factor
43
+ import capo_lambda.types.provisioned_poller_config
44
+ import capo_lambda.types.queues
45
+ import capo_lambda.types.scaling_config
46
+ import capo_lambda.types.self_managed_event_source
47
+ import capo_lambda.types.self_managed_kafka_event_source_config
48
+ import capo_lambda.types.source_access_configurations
49
+ import capo_lambda.types.string
50
+ import capo_lambda.types.tags
51
+ import capo_lambda.types.topics
52
+ import capo_lambda.types.tumbling_window_in_seconds
53
+ import capo_lambda.types.update_event_source_mapping_request
54
+ from capo_lambda._services._lambda import LambdaClient, LambdaClientConfig
55
+ from capo_lambda._services.async__lambda import (
56
+ AsyncLambdaClient,
57
+ AsyncLambdaClientConfig,
58
+ )
59
+
60
+
61
+ class EventSourceMapping:
62
+ def __init__(self, service: LambdaClient) -> None:
63
+ self._service = service
64
+
65
+ def create(
66
+ self,
67
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
68
+ *,
69
+ config_overrides: Optional[LambdaClientConfig] = None,
70
+ event_source_arn: Optional["capo_lambda.types.arn.Arn"] = None,
71
+ enabled: Optional["capo_lambda.types.enabled.Enabled"] = None,
72
+ batch_size: Optional["capo_lambda.types.batch_size.BatchSize"] = None,
73
+ filter_criteria: Optional[
74
+ "capo_lambda.types.filter_criteria.FilterCriteria"
75
+ ] = None,
76
+ maximum_batching_window_in_seconds: Optional[
77
+ "capo_lambda.types.maximum_batching_window_in_seconds.MaximumBatchingWindowInSeconds"
78
+ ] = None,
79
+ parallelization_factor: Optional[
80
+ "capo_lambda.types.parallelization_factor.ParallelizationFactor"
81
+ ] = None,
82
+ starting_position: Optional[
83
+ "capo_lambda.types.event_source_position.EventSourcePosition"
84
+ ] = None,
85
+ starting_position_timestamp: Optional["capo_lambda.types.date.Date"] = None,
86
+ destination_config: Optional[
87
+ "capo_lambda.types.destination_config.DestinationConfig"
88
+ ] = None,
89
+ maximum_record_age_in_seconds: Optional[
90
+ "capo_lambda.types.maximum_record_age_in_seconds.MaximumRecordAgeInSeconds"
91
+ ] = None,
92
+ bisect_batch_on_function_error: Optional[
93
+ "capo_lambda.types.bisect_batch_on_function_error.BisectBatchOnFunctionError"
94
+ ] = None,
95
+ maximum_retry_attempts: Optional[
96
+ "capo_lambda.types.maximum_retry_attempts_event_source_mapping.MaximumRetryAttemptsEventSourceMapping"
97
+ ] = None,
98
+ tags: Optional["capo_lambda.types.tags.Tags"] = None,
99
+ tumbling_window_in_seconds: Optional[
100
+ "capo_lambda.types.tumbling_window_in_seconds.TumblingWindowInSeconds"
101
+ ] = None,
102
+ topics: Optional["capo_lambda.types.topics.Topics"] = None,
103
+ queues: Optional["capo_lambda.types.queues.Queues"] = None,
104
+ source_access_configurations: Optional[
105
+ "capo_lambda.types.source_access_configurations.SourceAccessConfigurations"
106
+ ] = None,
107
+ self_managed_event_source: Optional[
108
+ "capo_lambda.types.self_managed_event_source.SelfManagedEventSource"
109
+ ] = None,
110
+ function_response_types: Optional[
111
+ "capo_lambda.types.function_response_type_list.FunctionResponseTypeList"
112
+ ] = None,
113
+ amazon_managed_kafka_event_source_config: Optional[
114
+ "capo_lambda.types.amazon_managed_kafka_event_source_config.AmazonManagedKafkaEventSourceConfig"
115
+ ] = None,
116
+ self_managed_kafka_event_source_config: Optional[
117
+ "capo_lambda.types.self_managed_kafka_event_source_config.SelfManagedKafkaEventSourceConfig"
118
+ ] = None,
119
+ scaling_config: Optional[
120
+ "capo_lambda.types.scaling_config.ScalingConfig"
121
+ ] = None,
122
+ document_db_event_source_config: Optional[
123
+ "capo_lambda.types.document_db_event_source_config.DocumentDBEventSourceConfig"
124
+ ] = None,
125
+ kms_key_arn: Optional["capo_lambda.types.kms_key_arn.KMSKeyArn"] = None,
126
+ metrics_config: Optional[
127
+ "capo_lambda.types.event_source_mapping_metrics_config.EventSourceMappingMetricsConfig"
128
+ ] = None,
129
+ logging_config: Optional[
130
+ "capo_lambda.types.event_source_mapping_logging_config.EventSourceMappingLoggingConfig"
131
+ ] = None,
132
+ provisioned_poller_config: Optional[
133
+ "capo_lambda.types.provisioned_poller_config.ProvisionedPollerConfig"
134
+ ] = None,
135
+ ) -> "capo_lambda.types.event_source_mapping_configuration.EventSourceMappingConfiguration":
136
+ r"""<p>Creates a mapping between an event source and an Lambda function. Lambda reads items from the event source and invokes the function.</p> <p>For details about how to configure different event sources, see the following topics. </p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-dynamodb-eventsourcemapping\"> Amazon DynamoDB Streams</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-eventsourcemapping\"> Amazon Kinesis</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-eventsource\"> Amazon SQS</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-eventsourcemapping\"> Amazon MQ and RabbitMQ</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html\"> Amazon MSK</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/kafka-smaa.html\"> Apache Kafka</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html\"> Amazon DocumentDB</a> </p> </li> </ul> <p>The following error handling options are available for stream sources (DynamoDB, Kinesis, Amazon MSK, and self-managed Apache Kafka):</p> <ul> <li> <p> <code>BisectBatchOnFunctionError</code> – If the function returns an error, split the batch in two and retry.</p> </li> <li> <p> <code>MaximumRecordAgeInSeconds</code> – Discard records older than the specified age. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires</p> </li> <li> <p> <code>MaximumRetryAttempts</code> – Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.</p> </li> <li> <p> <code>OnFailure</code> – Send discarded records to an Amazon SQS queue, Amazon SNS topic, Kafka topic, or Amazon S3 bucket. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations\">Adding a destination</a>.</p> </li> </ul> <p>The following option is available only for DynamoDB and Kinesis event sources:</p> <ul> <li> <p> <code>ParallelizationFactor</code> – Process multiple batches from each shard concurrently.</p> </li> </ul> <p>For information about which configuration parameters apply to each event source, see the following topics.</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-params\"> Amazon DynamoDB Streams</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-params\"> Amazon Kinesis</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-params\"> Amazon SQS</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-params\"> Amazon MQ and RabbitMQ</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-parms\"> Amazon MSK</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-kafka-parms\"> Apache Kafka</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html#docdb-configuration\"> Amazon DocumentDB</a> </p> </li> </ul>
137
+
138
+ Args:
139
+ event_source_arn: <p>The Amazon Resource Name (ARN) of the event source.</p> <ul> <li> <p> <b>Amazon Kinesis</b> – The ARN of the data stream or a stream consumer.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> – The ARN of the stream.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> – The ARN of the queue.</p> </li> <li> <p> <b>Amazon Managed Streaming for Apache Kafka</b> – The ARN of the cluster or the ARN of the VPC connection (for <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#msk-multi-vpc\">cross-account event source mappings</a>).</p> </li> <li> <p> <b>Amazon MQ</b> – The ARN of the broker.</p> </li> <li> <p> <b>Amazon DocumentDB</b> – The ARN of the DocumentDB change stream.</p> </li> </ul>
140
+ function_name: <p>The name or ARN of the Lambda function.</p> <p class=\"title\"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> – <code>MyFunction</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p> </li> <li> <p> <b>Version or Alias ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:MyFunction</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.</p>
141
+ enabled: <p>When true, the event source mapping is active. When false, Lambda pauses polling and invocation.</p> <p>Default: True</p>
142
+ batch_size: <p>The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).</p> <ul> <li> <p> <b>Amazon Kinesis</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.</p> </li> <li> <p> <b>Amazon Managed Streaming for Apache Kafka</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Self-managed Apache Kafka</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon MQ (ActiveMQ and RabbitMQ)</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>DocumentDB</b> – Default 100. Max 10,000.</p> </li> </ul>
143
+ filter_criteria: <p>An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html\">Lambda event filtering</a>.</p>
144
+ maximum_batching_window_in_seconds: <p>The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure <code>MaximumBatchingWindowInSeconds</code> to any value from 0 seconds to 300 seconds in increments of seconds.</p> <p>For Kinesis, DynamoDB, and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, the default batching window is 500 ms. Note that because you can only change <code>MaximumBatchingWindowInSeconds</code> in increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.</p> <p>Related setting: For Kinesis, DynamoDB, and Amazon SQS event sources, when you set <code>BatchSize</code> to a value greater than 10, you must set <code>MaximumBatchingWindowInSeconds</code> to at least 1.</p>
145
+ parallelization_factor: <p>(Kinesis and DynamoDB Streams only) The number of batches to process from each shard concurrently.</p>
146
+ starting_position: <p>The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Stream event sources. <code>AT_TIMESTAMP</code> is supported only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed Apache Kafka.</p>
147
+ starting_position_timestamp: <p>With <code>StartingPosition</code> set to <code>AT_TIMESTAMP</code>, the time from which to start reading. <code>StartingPositionTimestamp</code> cannot be in the future.</p>
148
+ destination_config: <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) A configuration object that specifies the destination of an event after Lambda processes it.</p>
149
+ maximum_record_age_in_seconds: <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records older than the specified age. The default value is infinite (-1).</p>
150
+ bisect_batch_on_function_error: <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) If the function returns an error, split the batch in two and retry.</p>
151
+ maximum_retry_attempts: <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.</p>
152
+ tags: <p>A list of tags to apply to the event source mapping.</p>
153
+ tumbling_window_in_seconds: <p>(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.</p>
154
+ topics: <p>The name of the Kafka topic.</p>
155
+ queues: <p> (MQ) The name of the Amazon MQ broker destination queue to consume. </p>
156
+ source_access_configurations: <p>An array of authentication protocols or VPC components required to secure your event source.</p>
157
+ self_managed_event_source: <p>The self-managed Apache Kafka cluster to receive records from.</p>
158
+ function_response_types: <p>(Kinesis, DynamoDB Streams, Amazon MSK, self-managed Apache Kafka, and Amazon SQS) A list of current response type enums applied to the event source mapping.</p>
159
+ amazon_managed_kafka_event_source_config: <p>Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.</p>
160
+ self_managed_kafka_event_source_config: <p>Specific configuration settings for a self-managed Apache Kafka event source.</p>
161
+ scaling_config: <p>(Amazon SQS only) The scaling configuration for the event source. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency\">Configuring maximum concurrency for Amazon SQS event sources</a>.</p>
162
+ document_db_event_source_config: <p>Specific configuration settings for a DocumentDB event source.</p>
163
+ kms_key_arn: <p> The ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics\">filter criteria</a>. By default, Lambda does not encrypt your filter criteria object. Specify this property to encrypt data using your own customer managed key. </p>
164
+ metrics_config: <p>The metrics configuration for your event source. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics\">Event source mapping metrics</a>.</p>
165
+ logging_config: <p>(Amazon MSK, and self-managed Apache Kafka only) The logging configuration for your event source. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/esm-logging.html\">Event source mapping logging</a>.</p>
166
+ provisioned_poller_config: <p>(Amazon SQS, Amazon MSK, and self-managed Apache Kafka only) The provisioned mode configuration for the event source. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode\">provisioned mode</a>.</p>
167
+
168
+ Raises:
169
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
170
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
171
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
172
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
173
+ capo_lambda.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests\">Lambda quotas</a>.</p>
174
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
175
+
176
+ Examples:
177
+ To create a mapping between an event source and an AWS Lambda function
178
+ The following example creates a mapping between an SQS queue and the my-function Lambda function.
179
+
180
+ >>> client.create(event_source_arn='arn:aws:sqs:us-west-2:123456789012:my-queue', function_name='my-function', batch_size=5)
181
+ """
182
+
183
+ def _handler(
184
+ req: "OperationRequest[capo_lambda.types.create_event_source_mapping_request.CreateEventSourceMappingRequest]",
185
+ ) -> OperationResponse[
186
+ "capo_lambda.types.event_source_mapping_configuration.EventSourceMappingConfiguration"
187
+ ]:
188
+ import capo_lambda._operations.aws_gir_api_service.create_event_source_mapping
189
+
190
+ output, http_response = (
191
+ capo_lambda._operations.aws_gir_api_service.create_event_source_mapping.create_event_source_mapping(
192
+ req.options, req.input
193
+ )
194
+ )
195
+ return OperationResponse(output=output, response=http_response)
196
+
197
+ interceptors_, options_ = self._service.operation_options(config_overrides)
198
+ input_: capo_lambda.types.create_event_source_mapping_request.CreateEventSourceMappingRequest = {} # type: ignore[typeddict-item]
199
+ if event_source_arn is not None:
200
+ input_["event_source_arn"] = event_source_arn
201
+ input_["function_name"] = function_name
202
+ if enabled is not None:
203
+ input_["enabled"] = enabled
204
+ if batch_size is not None:
205
+ input_["batch_size"] = batch_size
206
+ if filter_criteria is not None:
207
+ input_["filter_criteria"] = filter_criteria
208
+ if maximum_batching_window_in_seconds is not None:
209
+ input_["maximum_batching_window_in_seconds"] = (
210
+ maximum_batching_window_in_seconds
211
+ )
212
+ if parallelization_factor is not None:
213
+ input_["parallelization_factor"] = parallelization_factor
214
+ if starting_position is not None:
215
+ input_["starting_position"] = starting_position
216
+ if starting_position_timestamp is not None:
217
+ input_["starting_position_timestamp"] = starting_position_timestamp
218
+ if destination_config is not None:
219
+ input_["destination_config"] = destination_config
220
+ if maximum_record_age_in_seconds is not None:
221
+ input_["maximum_record_age_in_seconds"] = maximum_record_age_in_seconds
222
+ if bisect_batch_on_function_error is not None:
223
+ input_["bisect_batch_on_function_error"] = bisect_batch_on_function_error
224
+ if maximum_retry_attempts is not None:
225
+ input_["maximum_retry_attempts"] = maximum_retry_attempts
226
+ if tags is not None:
227
+ input_["tags"] = tags
228
+ if tumbling_window_in_seconds is not None:
229
+ input_["tumbling_window_in_seconds"] = tumbling_window_in_seconds
230
+ if topics is not None:
231
+ input_["topics"] = topics
232
+ if queues is not None:
233
+ input_["queues"] = queues
234
+ if source_access_configurations is not None:
235
+ input_["source_access_configurations"] = source_access_configurations
236
+ if self_managed_event_source is not None:
237
+ input_["self_managed_event_source"] = self_managed_event_source
238
+ if function_response_types is not None:
239
+ input_["function_response_types"] = function_response_types
240
+ if amazon_managed_kafka_event_source_config is not None:
241
+ input_["amazon_managed_kafka_event_source_config"] = (
242
+ amazon_managed_kafka_event_source_config
243
+ )
244
+ if self_managed_kafka_event_source_config is not None:
245
+ input_["self_managed_kafka_event_source_config"] = (
246
+ self_managed_kafka_event_source_config
247
+ )
248
+ if scaling_config is not None:
249
+ input_["scaling_config"] = scaling_config
250
+ if document_db_event_source_config is not None:
251
+ input_["document_db_event_source_config"] = document_db_event_source_config
252
+ if kms_key_arn is not None:
253
+ input_["kms_key_arn"] = kms_key_arn
254
+ if metrics_config is not None:
255
+ input_["metrics_config"] = metrics_config
256
+ if logging_config is not None:
257
+ input_["logging_config"] = logging_config
258
+ if provisioned_poller_config is not None:
259
+ input_["provisioned_poller_config"] = provisioned_poller_config
260
+
261
+ response = execute_pipeline(
262
+ OperationRequest(input=input_, options=options_),
263
+ handler=_handler,
264
+ interceptors=list(interceptors_),
265
+ )
266
+ return response.output
267
+
268
+ def read(
269
+ self,
270
+ uuid: "capo_lambda.types.string.String",
271
+ *,
272
+ config_overrides: Optional[LambdaClientConfig] = None,
273
+ ) -> "capo_lambda.types.event_source_mapping_configuration.EventSourceMappingConfiguration":
274
+ """<p>Returns details about an event source mapping. You can get the identifier of a mapping from the output of <a>ListEventSourceMappings</a>.</p>
275
+
276
+ Args:
277
+ uuid: <p>The identifier of the event source mapping.</p>
278
+
279
+ Raises:
280
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
281
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
282
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
283
+ capo_lambda.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests\">Lambda quotas</a>.</p>
284
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
285
+
286
+ Examples:
287
+ To get a Lambda function's event source mapping
288
+ The following example returns details about an event source mapping. To get a mapping's UUID, use ListEventSourceMappings.
289
+
290
+ >>> client.read(uuid='14e0db71-xmpl-4eb5-b481-8945cf9d10c2')
291
+ """
292
+
293
+ def _handler(
294
+ req: "OperationRequest[capo_lambda.types.get_event_source_mapping_request.GetEventSourceMappingRequest]",
295
+ ) -> OperationResponse[
296
+ "capo_lambda.types.event_source_mapping_configuration.EventSourceMappingConfiguration"
297
+ ]:
298
+ import capo_lambda._operations.aws_gir_api_service.get_event_source_mapping
299
+
300
+ output, http_response = (
301
+ capo_lambda._operations.aws_gir_api_service.get_event_source_mapping.get_event_source_mapping(
302
+ req.options, req.input
303
+ )
304
+ )
305
+ return OperationResponse(output=output, response=http_response)
306
+
307
+ interceptors_, options_ = self._service.operation_options(config_overrides)
308
+ input_: capo_lambda.types.get_event_source_mapping_request.GetEventSourceMappingRequest = {} # type: ignore[typeddict-item]
309
+ input_["uuid"] = uuid
310
+
311
+ response = execute_pipeline(
312
+ OperationRequest(input=input_, options=options_),
313
+ handler=_handler,
314
+ interceptors=list(interceptors_),
315
+ )
316
+ return response.output
317
+
318
+ def update(
319
+ self,
320
+ uuid: "capo_lambda.types.string.String",
321
+ *,
322
+ config_overrides: Optional[LambdaClientConfig] = None,
323
+ function_name: Optional[
324
+ "capo_lambda.types.namespaced_function_name.NamespacedFunctionName"
325
+ ] = None,
326
+ enabled: Optional["capo_lambda.types.enabled.Enabled"] = None,
327
+ batch_size: Optional["capo_lambda.types.batch_size.BatchSize"] = None,
328
+ filter_criteria: Optional[
329
+ "capo_lambda.types.filter_criteria.FilterCriteria"
330
+ ] = None,
331
+ maximum_batching_window_in_seconds: Optional[
332
+ "capo_lambda.types.maximum_batching_window_in_seconds.MaximumBatchingWindowInSeconds"
333
+ ] = None,
334
+ destination_config: Optional[
335
+ "capo_lambda.types.destination_config.DestinationConfig"
336
+ ] = None,
337
+ maximum_record_age_in_seconds: Optional[
338
+ "capo_lambda.types.maximum_record_age_in_seconds.MaximumRecordAgeInSeconds"
339
+ ] = None,
340
+ bisect_batch_on_function_error: Optional[
341
+ "capo_lambda.types.bisect_batch_on_function_error.BisectBatchOnFunctionError"
342
+ ] = None,
343
+ maximum_retry_attempts: Optional[
344
+ "capo_lambda.types.maximum_retry_attempts_event_source_mapping.MaximumRetryAttemptsEventSourceMapping"
345
+ ] = None,
346
+ parallelization_factor: Optional[
347
+ "capo_lambda.types.parallelization_factor.ParallelizationFactor"
348
+ ] = None,
349
+ source_access_configurations: Optional[
350
+ "capo_lambda.types.source_access_configurations.SourceAccessConfigurations"
351
+ ] = None,
352
+ tumbling_window_in_seconds: Optional[
353
+ "capo_lambda.types.tumbling_window_in_seconds.TumblingWindowInSeconds"
354
+ ] = None,
355
+ function_response_types: Optional[
356
+ "capo_lambda.types.function_response_type_list.FunctionResponseTypeList"
357
+ ] = None,
358
+ scaling_config: Optional[
359
+ "capo_lambda.types.scaling_config.ScalingConfig"
360
+ ] = None,
361
+ amazon_managed_kafka_event_source_config: Optional[
362
+ "capo_lambda.types.amazon_managed_kafka_event_source_config.AmazonManagedKafkaEventSourceConfig"
363
+ ] = None,
364
+ self_managed_kafka_event_source_config: Optional[
365
+ "capo_lambda.types.self_managed_kafka_event_source_config.SelfManagedKafkaEventSourceConfig"
366
+ ] = None,
367
+ document_db_event_source_config: Optional[
368
+ "capo_lambda.types.document_db_event_source_config.DocumentDBEventSourceConfig"
369
+ ] = None,
370
+ kms_key_arn: Optional["capo_lambda.types.kms_key_arn.KMSKeyArn"] = None,
371
+ metrics_config: Optional[
372
+ "capo_lambda.types.event_source_mapping_metrics_config.EventSourceMappingMetricsConfig"
373
+ ] = None,
374
+ logging_config: Optional[
375
+ "capo_lambda.types.event_source_mapping_logging_config.EventSourceMappingLoggingConfig"
376
+ ] = None,
377
+ provisioned_poller_config: Optional[
378
+ "capo_lambda.types.provisioned_poller_config.ProvisionedPollerConfig"
379
+ ] = None,
380
+ ) -> "capo_lambda.types.event_source_mapping_configuration.EventSourceMappingConfiguration":
381
+ r"""<p>Updates an event source mapping. You can change the function that Lambda invokes, or pause invocation and resume later from the same location.</p> <p>For details about how to configure different event sources, see the following topics. </p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-dynamodb-eventsourcemapping\"> Amazon DynamoDB Streams</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-eventsourcemapping\"> Amazon Kinesis</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-eventsource\"> Amazon SQS</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-eventsourcemapping\"> Amazon MQ and RabbitMQ</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html\"> Amazon MSK</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/kafka-smaa.html\"> Apache Kafka</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html\"> Amazon DocumentDB</a> </p> </li> </ul> <p>The following error handling options are available for stream sources (DynamoDB, Kinesis, Amazon MSK, and self-managed Apache Kafka):</p> <ul> <li> <p> <code>BisectBatchOnFunctionError</code> – If the function returns an error, split the batch in two and retry.</p> </li> <li> <p> <code>MaximumRecordAgeInSeconds</code> – Discard records older than the specified age. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires</p> </li> <li> <p> <code>MaximumRetryAttempts</code> – Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.</p> </li> <li> <p> <code>OnFailure</code> – Send discarded records to an Amazon SQS queue, Amazon SNS topic, Kafka topic, or Amazon S3 bucket. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations\">Adding a destination</a>.</p> </li> </ul> <p>The following option is available only for DynamoDB and Kinesis event sources:</p> <ul> <li> <p> <code>ParallelizationFactor</code> – Process multiple batches from each shard concurrently.</p> </li> </ul> <p>For information about which configuration parameters apply to each event source, see the following topics.</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-params\"> Amazon DynamoDB Streams</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-params\"> Amazon Kinesis</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-params\"> Amazon SQS</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-params\"> Amazon MQ and RabbitMQ</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-parms\"> Amazon MSK</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-kafka-parms\"> Apache Kafka</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html#docdb-configuration\"> Amazon DocumentDB</a> </p> </li> </ul>
382
+
383
+ Args:
384
+ uuid: <p>The identifier of the event source mapping.</p>
385
+ function_name: <p>The name or ARN of the Lambda function.</p> <p class=\"title\"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> – <code>MyFunction</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p> </li> <li> <p> <b>Version or Alias ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:MyFunction</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.</p>
386
+ enabled: <p>When true, the event source mapping is active. When false, Lambda pauses polling and invocation.</p> <p>Default: True</p>
387
+ batch_size: <p>The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).</p> <ul> <li> <p> <b>Amazon Kinesis</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.</p> </li> <li> <p> <b>Amazon Managed Streaming for Apache Kafka</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Self-managed Apache Kafka</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon MQ (ActiveMQ and RabbitMQ)</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>DocumentDB</b> – Default 100. Max 10,000.</p> </li> </ul>
388
+ filter_criteria: <p>An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html\">Lambda event filtering</a>.</p>
389
+ maximum_batching_window_in_seconds: <p>The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure <code>MaximumBatchingWindowInSeconds</code> to any value from 0 seconds to 300 seconds in increments of seconds.</p> <p>For Kinesis, DynamoDB, and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, the default batching window is 500 ms. Note that because you can only change <code>MaximumBatchingWindowInSeconds</code> in increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.</p> <p>Related setting: For Kinesis, DynamoDB, and Amazon SQS event sources, when you set <code>BatchSize</code> to a value greater than 10, you must set <code>MaximumBatchingWindowInSeconds</code> to at least 1.</p>
390
+ destination_config: <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) A configuration object that specifies the destination of an event after Lambda processes it.</p>
391
+ maximum_record_age_in_seconds: <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records older than the specified age. The default value is infinite (-1).</p>
392
+ bisect_batch_on_function_error: <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) If the function returns an error, split the batch in two and retry.</p>
393
+ maximum_retry_attempts: <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.</p>
394
+ parallelization_factor: <p>(Kinesis and DynamoDB Streams only) The number of batches to process from each shard concurrently.</p>
395
+ source_access_configurations: <p>An array of authentication protocols or VPC components required to secure your event source.</p>
396
+ tumbling_window_in_seconds: <p>(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.</p>
397
+ function_response_types: <p>(Kinesis, DynamoDB Streams, Amazon MSK, self-managed Apache Kafka, and Amazon SQS) A list of current response type enums applied to the event source mapping.</p>
398
+ scaling_config: <p>(Amazon SQS only) The scaling configuration for the event source. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency\">Configuring maximum concurrency for Amazon SQS event sources</a>.</p>
399
+ document_db_event_source_config: <p>Specific configuration settings for a DocumentDB event source.</p>
400
+ kms_key_arn: <p> The ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics\">filter criteria</a>. By default, Lambda does not encrypt your filter criteria object. Specify this property to encrypt data using your own customer managed key. </p>
401
+ metrics_config: <p>The metrics configuration for your event source. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics\">Event source mapping metrics</a>.</p>
402
+ provisioned_poller_config: <p>(Amazon SQS, Amazon MSK, and self-managed Apache Kafka only) The provisioned mode configuration for the event source. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode\">provisioned mode</a>.</p>
403
+
404
+ Raises:
405
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
406
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
407
+ capo_lambda.errors.resource_in_use_exception.ResourceInUseException: <p>The operation conflicts with the resource's availability. For example, you tried to update an event source mapping in the CREATING state, or you tried to delete an event source mapping currently UPDATING.</p>
408
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
409
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
410
+ capo_lambda.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests\">Lambda quotas</a>.</p>
411
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
412
+
413
+ Examples:
414
+ To update a Lambda function event source mapping
415
+ This operation updates a Lambda function event source mapping
416
+
417
+ >>> client.update(uuid='1234xCy789012', function_name='myFunction', enabled=True, batch_size=123)
418
+ """
419
+
420
+ def _handler(
421
+ req: "OperationRequest[capo_lambda.types.update_event_source_mapping_request.UpdateEventSourceMappingRequest]",
422
+ ) -> OperationResponse[
423
+ "capo_lambda.types.event_source_mapping_configuration.EventSourceMappingConfiguration"
424
+ ]:
425
+ import capo_lambda._operations.aws_gir_api_service.update_event_source_mapping
426
+
427
+ output, http_response = (
428
+ capo_lambda._operations.aws_gir_api_service.update_event_source_mapping.update_event_source_mapping(
429
+ req.options, req.input
430
+ )
431
+ )
432
+ return OperationResponse(output=output, response=http_response)
433
+
434
+ interceptors_, options_ = self._service.operation_options(config_overrides)
435
+ input_: capo_lambda.types.update_event_source_mapping_request.UpdateEventSourceMappingRequest = {} # type: ignore[typeddict-item]
436
+ input_["uuid"] = uuid
437
+ if function_name is not None:
438
+ input_["function_name"] = function_name
439
+ if enabled is not None:
440
+ input_["enabled"] = enabled
441
+ if batch_size is not None:
442
+ input_["batch_size"] = batch_size
443
+ if filter_criteria is not None:
444
+ input_["filter_criteria"] = filter_criteria
445
+ if maximum_batching_window_in_seconds is not None:
446
+ input_["maximum_batching_window_in_seconds"] = (
447
+ maximum_batching_window_in_seconds
448
+ )
449
+ if destination_config is not None:
450
+ input_["destination_config"] = destination_config
451
+ if maximum_record_age_in_seconds is not None:
452
+ input_["maximum_record_age_in_seconds"] = maximum_record_age_in_seconds
453
+ if bisect_batch_on_function_error is not None:
454
+ input_["bisect_batch_on_function_error"] = bisect_batch_on_function_error
455
+ if maximum_retry_attempts is not None:
456
+ input_["maximum_retry_attempts"] = maximum_retry_attempts
457
+ if parallelization_factor is not None:
458
+ input_["parallelization_factor"] = parallelization_factor
459
+ if source_access_configurations is not None:
460
+ input_["source_access_configurations"] = source_access_configurations
461
+ if tumbling_window_in_seconds is not None:
462
+ input_["tumbling_window_in_seconds"] = tumbling_window_in_seconds
463
+ if function_response_types is not None:
464
+ input_["function_response_types"] = function_response_types
465
+ if scaling_config is not None:
466
+ input_["scaling_config"] = scaling_config
467
+ if amazon_managed_kafka_event_source_config is not None:
468
+ input_["amazon_managed_kafka_event_source_config"] = (
469
+ amazon_managed_kafka_event_source_config
470
+ )
471
+ if self_managed_kafka_event_source_config is not None:
472
+ input_["self_managed_kafka_event_source_config"] = (
473
+ self_managed_kafka_event_source_config
474
+ )
475
+ if document_db_event_source_config is not None:
476
+ input_["document_db_event_source_config"] = document_db_event_source_config
477
+ if kms_key_arn is not None:
478
+ input_["kms_key_arn"] = kms_key_arn
479
+ if metrics_config is not None:
480
+ input_["metrics_config"] = metrics_config
481
+ if logging_config is not None:
482
+ input_["logging_config"] = logging_config
483
+ if provisioned_poller_config is not None:
484
+ input_["provisioned_poller_config"] = provisioned_poller_config
485
+
486
+ response = execute_pipeline(
487
+ OperationRequest(input=input_, options=options_),
488
+ handler=_handler,
489
+ interceptors=list(interceptors_),
490
+ )
491
+ return response.output
492
+
493
+ def delete(
494
+ self,
495
+ uuid: "capo_lambda.types.string.String",
496
+ *,
497
+ config_overrides: Optional[LambdaClientConfig] = None,
498
+ ) -> "capo_lambda.types.event_source_mapping_configuration.EventSourceMappingConfiguration":
499
+ r"""<p>Deletes an <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/intro-invocation-modes.html\">event source mapping</a>. You can get the identifier of a mapping from the output of <a>ListEventSourceMappings</a>.</p> <p>When you delete an event source mapping, it enters a <code>Deleting</code> state and might not be completely deleted for several seconds.</p>
500
+
501
+ Args:
502
+ uuid: <p>The identifier of the event source mapping.</p>
503
+
504
+ Raises:
505
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
506
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
507
+ capo_lambda.errors.resource_in_use_exception.ResourceInUseException: <p>The operation conflicts with the resource's availability. For example, you tried to update an event source mapping in the CREATING state, or you tried to delete an event source mapping currently UPDATING.</p>
508
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
509
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
510
+ capo_lambda.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests\">Lambda quotas</a>.</p>
511
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
512
+
513
+ Examples:
514
+ To delete a Lambda function event source mapping
515
+ The following example deletes an event source mapping. To get a mapping's UUID, use ListEventSourceMappings.
516
+
517
+ >>> client.delete(uuid='14e0db71-xmpl-4eb5-b481-8945cf9d10c2')
518
+ """
519
+
520
+ def _handler(
521
+ req: "OperationRequest[capo_lambda.types.delete_event_source_mapping_request.DeleteEventSourceMappingRequest]",
522
+ ) -> OperationResponse[
523
+ "capo_lambda.types.event_source_mapping_configuration.EventSourceMappingConfiguration"
524
+ ]:
525
+ import capo_lambda._operations.aws_gir_api_service.delete_event_source_mapping
526
+
527
+ output, http_response = (
528
+ capo_lambda._operations.aws_gir_api_service.delete_event_source_mapping.delete_event_source_mapping(
529
+ req.options, req.input
530
+ )
531
+ )
532
+ return OperationResponse(output=output, response=http_response)
533
+
534
+ interceptors_, options_ = self._service.operation_options(config_overrides)
535
+ input_: capo_lambda.types.delete_event_source_mapping_request.DeleteEventSourceMappingRequest = {} # type: ignore[typeddict-item]
536
+ input_["uuid"] = uuid
537
+
538
+ response = execute_pipeline(
539
+ OperationRequest(input=input_, options=options_),
540
+ handler=_handler,
541
+ interceptors=list(interceptors_),
542
+ )
543
+ return response.output
544
+
545
+ def list(
546
+ self,
547
+ *,
548
+ config_overrides: Optional[LambdaClientConfig] = None,
549
+ event_source_arn: Optional["capo_lambda.types.arn.Arn"] = None,
550
+ function_name: Optional[
551
+ "capo_lambda.types.namespaced_function_name.NamespacedFunctionName"
552
+ ] = None,
553
+ marker: Optional["capo_lambda.types.string.String"] = None,
554
+ max_items: Optional["capo_lambda.types.max_list_items.MaxListItems"] = None,
555
+ ) -> "capo_lambda.types.list_event_source_mappings_response.ListEventSourceMappingsResponse":
556
+ r"""<p>Lists event source mappings. Specify an <code>EventSourceArn</code> to show only event source mappings for a single event source.</p>
557
+
558
+ Args:
559
+ event_source_arn: <p>The Amazon Resource Name (ARN) of the event source.</p> <ul> <li> <p> <b>Amazon Kinesis</b> – The ARN of the data stream or a stream consumer.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> – The ARN of the stream.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> – The ARN of the queue.</p> </li> <li> <p> <b>Amazon Managed Streaming for Apache Kafka</b> – The ARN of the cluster or the ARN of the VPC connection (for <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#msk-multi-vpc\">cross-account event source mappings</a>).</p> </li> <li> <p> <b>Amazon MQ</b> – The ARN of the broker.</p> </li> <li> <p> <b>Amazon DocumentDB</b> – The ARN of the DocumentDB change stream.</p> </li> </ul>
560
+ function_name: <p>The name or ARN of the Lambda function.</p> <p class=\"title\"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> – <code>MyFunction</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p> </li> <li> <p> <b>Version or Alias ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:MyFunction</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.</p>
561
+ marker: <p>A pagination token returned by a previous call.</p>
562
+ max_items: <p>The maximum number of event source mappings to return. Note that ListEventSourceMappings returns a maximum of 100 items in each response, even if you set the number higher.</p>
563
+
564
+ Raises:
565
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
566
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
567
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
568
+ capo_lambda.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests\">Lambda quotas</a>.</p>
569
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
570
+
571
+ Examples:
572
+ To list the event source mappings for a function
573
+ The following example returns a list of the event source mappings for a function named my-function.
574
+
575
+ >>> client.list(function_name='my-function')
576
+ """
577
+
578
+ def _handler(
579
+ req: "OperationRequest[capo_lambda.types.list_event_source_mappings_request.ListEventSourceMappingsRequest]",
580
+ ) -> OperationResponse[
581
+ "capo_lambda.types.list_event_source_mappings_response.ListEventSourceMappingsResponse"
582
+ ]:
583
+ import capo_lambda._operations.aws_gir_api_service.list_event_source_mappings
584
+
585
+ output, http_response = (
586
+ capo_lambda._operations.aws_gir_api_service.list_event_source_mappings.list_event_source_mappings(
587
+ req.options, req.input
588
+ )
589
+ )
590
+ return OperationResponse(output=output, response=http_response)
591
+
592
+ interceptors_, options_ = self._service.operation_options(config_overrides)
593
+ input_: capo_lambda.types.list_event_source_mappings_request.ListEventSourceMappingsRequest = {} # type: ignore[typeddict-item]
594
+ if event_source_arn is not None:
595
+ input_["event_source_arn"] = event_source_arn
596
+ if function_name is not None:
597
+ input_["function_name"] = function_name
598
+ if marker is not None:
599
+ input_["marker"] = marker
600
+ if max_items is not None:
601
+ input_["max_items"] = max_items
602
+
603
+ response = execute_pipeline(
604
+ OperationRequest(input=input_, options=options_),
605
+ handler=_handler,
606
+ interceptors=list(interceptors_),
607
+ )
608
+ return response.output
609
+
610
+
611
+ class AsyncEventSourceMapping:
612
+ def __init__(self, service: AsyncLambdaClient) -> None:
613
+ self._service = service
614
+
615
+ async def create(
616
+ self,
617
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
618
+ *,
619
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
620
+ event_source_arn: Optional["capo_lambda.types.arn.Arn"] = None,
621
+ enabled: Optional["capo_lambda.types.enabled.Enabled"] = None,
622
+ batch_size: Optional["capo_lambda.types.batch_size.BatchSize"] = None,
623
+ filter_criteria: Optional[
624
+ "capo_lambda.types.filter_criteria.FilterCriteria"
625
+ ] = None,
626
+ maximum_batching_window_in_seconds: Optional[
627
+ "capo_lambda.types.maximum_batching_window_in_seconds.MaximumBatchingWindowInSeconds"
628
+ ] = None,
629
+ parallelization_factor: Optional[
630
+ "capo_lambda.types.parallelization_factor.ParallelizationFactor"
631
+ ] = None,
632
+ starting_position: Optional[
633
+ "capo_lambda.types.event_source_position.EventSourcePosition"
634
+ ] = None,
635
+ starting_position_timestamp: Optional["capo_lambda.types.date.Date"] = None,
636
+ destination_config: Optional[
637
+ "capo_lambda.types.destination_config.DestinationConfig"
638
+ ] = None,
639
+ maximum_record_age_in_seconds: Optional[
640
+ "capo_lambda.types.maximum_record_age_in_seconds.MaximumRecordAgeInSeconds"
641
+ ] = None,
642
+ bisect_batch_on_function_error: Optional[
643
+ "capo_lambda.types.bisect_batch_on_function_error.BisectBatchOnFunctionError"
644
+ ] = None,
645
+ maximum_retry_attempts: Optional[
646
+ "capo_lambda.types.maximum_retry_attempts_event_source_mapping.MaximumRetryAttemptsEventSourceMapping"
647
+ ] = None,
648
+ tags: Optional["capo_lambda.types.tags.Tags"] = None,
649
+ tumbling_window_in_seconds: Optional[
650
+ "capo_lambda.types.tumbling_window_in_seconds.TumblingWindowInSeconds"
651
+ ] = None,
652
+ topics: Optional["capo_lambda.types.topics.Topics"] = None,
653
+ queues: Optional["capo_lambda.types.queues.Queues"] = None,
654
+ source_access_configurations: Optional[
655
+ "capo_lambda.types.source_access_configurations.SourceAccessConfigurations"
656
+ ] = None,
657
+ self_managed_event_source: Optional[
658
+ "capo_lambda.types.self_managed_event_source.SelfManagedEventSource"
659
+ ] = None,
660
+ function_response_types: Optional[
661
+ "capo_lambda.types.function_response_type_list.FunctionResponseTypeList"
662
+ ] = None,
663
+ amazon_managed_kafka_event_source_config: Optional[
664
+ "capo_lambda.types.amazon_managed_kafka_event_source_config.AmazonManagedKafkaEventSourceConfig"
665
+ ] = None,
666
+ self_managed_kafka_event_source_config: Optional[
667
+ "capo_lambda.types.self_managed_kafka_event_source_config.SelfManagedKafkaEventSourceConfig"
668
+ ] = None,
669
+ scaling_config: Optional[
670
+ "capo_lambda.types.scaling_config.ScalingConfig"
671
+ ] = None,
672
+ document_db_event_source_config: Optional[
673
+ "capo_lambda.types.document_db_event_source_config.DocumentDBEventSourceConfig"
674
+ ] = None,
675
+ kms_key_arn: Optional["capo_lambda.types.kms_key_arn.KMSKeyArn"] = None,
676
+ metrics_config: Optional[
677
+ "capo_lambda.types.event_source_mapping_metrics_config.EventSourceMappingMetricsConfig"
678
+ ] = None,
679
+ logging_config: Optional[
680
+ "capo_lambda.types.event_source_mapping_logging_config.EventSourceMappingLoggingConfig"
681
+ ] = None,
682
+ provisioned_poller_config: Optional[
683
+ "capo_lambda.types.provisioned_poller_config.ProvisionedPollerConfig"
684
+ ] = None,
685
+ ) -> "capo_lambda.types.event_source_mapping_configuration.EventSourceMappingConfiguration":
686
+ r"""<p>Creates a mapping between an event source and an Lambda function. Lambda reads items from the event source and invokes the function.</p> <p>For details about how to configure different event sources, see the following topics. </p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-dynamodb-eventsourcemapping\"> Amazon DynamoDB Streams</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-eventsourcemapping\"> Amazon Kinesis</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-eventsource\"> Amazon SQS</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-eventsourcemapping\"> Amazon MQ and RabbitMQ</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html\"> Amazon MSK</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/kafka-smaa.html\"> Apache Kafka</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html\"> Amazon DocumentDB</a> </p> </li> </ul> <p>The following error handling options are available for stream sources (DynamoDB, Kinesis, Amazon MSK, and self-managed Apache Kafka):</p> <ul> <li> <p> <code>BisectBatchOnFunctionError</code> – If the function returns an error, split the batch in two and retry.</p> </li> <li> <p> <code>MaximumRecordAgeInSeconds</code> – Discard records older than the specified age. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires</p> </li> <li> <p> <code>MaximumRetryAttempts</code> – Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.</p> </li> <li> <p> <code>OnFailure</code> – Send discarded records to an Amazon SQS queue, Amazon SNS topic, Kafka topic, or Amazon S3 bucket. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations\">Adding a destination</a>.</p> </li> </ul> <p>The following option is available only for DynamoDB and Kinesis event sources:</p> <ul> <li> <p> <code>ParallelizationFactor</code> – Process multiple batches from each shard concurrently.</p> </li> </ul> <p>For information about which configuration parameters apply to each event source, see the following topics.</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-params\"> Amazon DynamoDB Streams</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-params\"> Amazon Kinesis</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-params\"> Amazon SQS</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-params\"> Amazon MQ and RabbitMQ</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-parms\"> Amazon MSK</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-kafka-parms\"> Apache Kafka</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html#docdb-configuration\"> Amazon DocumentDB</a> </p> </li> </ul>
687
+
688
+ Args:
689
+ event_source_arn: <p>The Amazon Resource Name (ARN) of the event source.</p> <ul> <li> <p> <b>Amazon Kinesis</b> – The ARN of the data stream or a stream consumer.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> – The ARN of the stream.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> – The ARN of the queue.</p> </li> <li> <p> <b>Amazon Managed Streaming for Apache Kafka</b> – The ARN of the cluster or the ARN of the VPC connection (for <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#msk-multi-vpc\">cross-account event source mappings</a>).</p> </li> <li> <p> <b>Amazon MQ</b> – The ARN of the broker.</p> </li> <li> <p> <b>Amazon DocumentDB</b> – The ARN of the DocumentDB change stream.</p> </li> </ul>
690
+ function_name: <p>The name or ARN of the Lambda function.</p> <p class=\"title\"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> – <code>MyFunction</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p> </li> <li> <p> <b>Version or Alias ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:MyFunction</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.</p>
691
+ enabled: <p>When true, the event source mapping is active. When false, Lambda pauses polling and invocation.</p> <p>Default: True</p>
692
+ batch_size: <p>The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).</p> <ul> <li> <p> <b>Amazon Kinesis</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.</p> </li> <li> <p> <b>Amazon Managed Streaming for Apache Kafka</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Self-managed Apache Kafka</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon MQ (ActiveMQ and RabbitMQ)</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>DocumentDB</b> – Default 100. Max 10,000.</p> </li> </ul>
693
+ filter_criteria: <p>An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html\">Lambda event filtering</a>.</p>
694
+ maximum_batching_window_in_seconds: <p>The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure <code>MaximumBatchingWindowInSeconds</code> to any value from 0 seconds to 300 seconds in increments of seconds.</p> <p>For Kinesis, DynamoDB, and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, the default batching window is 500 ms. Note that because you can only change <code>MaximumBatchingWindowInSeconds</code> in increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.</p> <p>Related setting: For Kinesis, DynamoDB, and Amazon SQS event sources, when you set <code>BatchSize</code> to a value greater than 10, you must set <code>MaximumBatchingWindowInSeconds</code> to at least 1.</p>
695
+ parallelization_factor: <p>(Kinesis and DynamoDB Streams only) The number of batches to process from each shard concurrently.</p>
696
+ starting_position: <p>The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Stream event sources. <code>AT_TIMESTAMP</code> is supported only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed Apache Kafka.</p>
697
+ starting_position_timestamp: <p>With <code>StartingPosition</code> set to <code>AT_TIMESTAMP</code>, the time from which to start reading. <code>StartingPositionTimestamp</code> cannot be in the future.</p>
698
+ destination_config: <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) A configuration object that specifies the destination of an event after Lambda processes it.</p>
699
+ maximum_record_age_in_seconds: <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records older than the specified age. The default value is infinite (-1).</p>
700
+ bisect_batch_on_function_error: <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) If the function returns an error, split the batch in two and retry.</p>
701
+ maximum_retry_attempts: <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.</p>
702
+ tags: <p>A list of tags to apply to the event source mapping.</p>
703
+ tumbling_window_in_seconds: <p>(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.</p>
704
+ topics: <p>The name of the Kafka topic.</p>
705
+ queues: <p> (MQ) The name of the Amazon MQ broker destination queue to consume. </p>
706
+ source_access_configurations: <p>An array of authentication protocols or VPC components required to secure your event source.</p>
707
+ self_managed_event_source: <p>The self-managed Apache Kafka cluster to receive records from.</p>
708
+ function_response_types: <p>(Kinesis, DynamoDB Streams, Amazon MSK, self-managed Apache Kafka, and Amazon SQS) A list of current response type enums applied to the event source mapping.</p>
709
+ amazon_managed_kafka_event_source_config: <p>Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.</p>
710
+ self_managed_kafka_event_source_config: <p>Specific configuration settings for a self-managed Apache Kafka event source.</p>
711
+ scaling_config: <p>(Amazon SQS only) The scaling configuration for the event source. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency\">Configuring maximum concurrency for Amazon SQS event sources</a>.</p>
712
+ document_db_event_source_config: <p>Specific configuration settings for a DocumentDB event source.</p>
713
+ kms_key_arn: <p> The ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics\">filter criteria</a>. By default, Lambda does not encrypt your filter criteria object. Specify this property to encrypt data using your own customer managed key. </p>
714
+ metrics_config: <p>The metrics configuration for your event source. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics\">Event source mapping metrics</a>.</p>
715
+ logging_config: <p>(Amazon MSK, and self-managed Apache Kafka only) The logging configuration for your event source. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/esm-logging.html\">Event source mapping logging</a>.</p>
716
+ provisioned_poller_config: <p>(Amazon SQS, Amazon MSK, and self-managed Apache Kafka only) The provisioned mode configuration for the event source. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode\">provisioned mode</a>.</p>
717
+
718
+ Raises:
719
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
720
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
721
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
722
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
723
+ capo_lambda.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests\">Lambda quotas</a>.</p>
724
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
725
+
726
+ Examples:
727
+ To create a mapping between an event source and an AWS Lambda function
728
+ The following example creates a mapping between an SQS queue and the my-function Lambda function.
729
+
730
+ >>> await client.create(event_source_arn='arn:aws:sqs:us-west-2:123456789012:my-queue', function_name='my-function', batch_size=5)
731
+ """
732
+
733
+ async def _handler(
734
+ req: "AsyncOperationRequest[capo_lambda.types.create_event_source_mapping_request.CreateEventSourceMappingRequest]",
735
+ ) -> AsyncOperationResponse[
736
+ "capo_lambda.types.event_source_mapping_configuration.EventSourceMappingConfiguration"
737
+ ]:
738
+ import capo_lambda._operations.aws_gir_api_service.create_event_source_mapping
739
+
740
+ (
741
+ output,
742
+ http_response,
743
+ ) = await capo_lambda._operations.aws_gir_api_service.create_event_source_mapping.async_create_event_source_mapping(
744
+ req.options, req.input
745
+ )
746
+ return AsyncOperationResponse(output=output, response=http_response)
747
+
748
+ interceptors_, options_ = self._service.operation_options(config_overrides)
749
+ input_: capo_lambda.types.create_event_source_mapping_request.CreateEventSourceMappingRequest = {} # type: ignore[typeddict-item]
750
+ if event_source_arn is not None:
751
+ input_["event_source_arn"] = event_source_arn
752
+ input_["function_name"] = function_name
753
+ if enabled is not None:
754
+ input_["enabled"] = enabled
755
+ if batch_size is not None:
756
+ input_["batch_size"] = batch_size
757
+ if filter_criteria is not None:
758
+ input_["filter_criteria"] = filter_criteria
759
+ if maximum_batching_window_in_seconds is not None:
760
+ input_["maximum_batching_window_in_seconds"] = (
761
+ maximum_batching_window_in_seconds
762
+ )
763
+ if parallelization_factor is not None:
764
+ input_["parallelization_factor"] = parallelization_factor
765
+ if starting_position is not None:
766
+ input_["starting_position"] = starting_position
767
+ if starting_position_timestamp is not None:
768
+ input_["starting_position_timestamp"] = starting_position_timestamp
769
+ if destination_config is not None:
770
+ input_["destination_config"] = destination_config
771
+ if maximum_record_age_in_seconds is not None:
772
+ input_["maximum_record_age_in_seconds"] = maximum_record_age_in_seconds
773
+ if bisect_batch_on_function_error is not None:
774
+ input_["bisect_batch_on_function_error"] = bisect_batch_on_function_error
775
+ if maximum_retry_attempts is not None:
776
+ input_["maximum_retry_attempts"] = maximum_retry_attempts
777
+ if tags is not None:
778
+ input_["tags"] = tags
779
+ if tumbling_window_in_seconds is not None:
780
+ input_["tumbling_window_in_seconds"] = tumbling_window_in_seconds
781
+ if topics is not None:
782
+ input_["topics"] = topics
783
+ if queues is not None:
784
+ input_["queues"] = queues
785
+ if source_access_configurations is not None:
786
+ input_["source_access_configurations"] = source_access_configurations
787
+ if self_managed_event_source is not None:
788
+ input_["self_managed_event_source"] = self_managed_event_source
789
+ if function_response_types is not None:
790
+ input_["function_response_types"] = function_response_types
791
+ if amazon_managed_kafka_event_source_config is not None:
792
+ input_["amazon_managed_kafka_event_source_config"] = (
793
+ amazon_managed_kafka_event_source_config
794
+ )
795
+ if self_managed_kafka_event_source_config is not None:
796
+ input_["self_managed_kafka_event_source_config"] = (
797
+ self_managed_kafka_event_source_config
798
+ )
799
+ if scaling_config is not None:
800
+ input_["scaling_config"] = scaling_config
801
+ if document_db_event_source_config is not None:
802
+ input_["document_db_event_source_config"] = document_db_event_source_config
803
+ if kms_key_arn is not None:
804
+ input_["kms_key_arn"] = kms_key_arn
805
+ if metrics_config is not None:
806
+ input_["metrics_config"] = metrics_config
807
+ if logging_config is not None:
808
+ input_["logging_config"] = logging_config
809
+ if provisioned_poller_config is not None:
810
+ input_["provisioned_poller_config"] = provisioned_poller_config
811
+
812
+ response = await aexecute_pipeline(
813
+ AsyncOperationRequest(input=input_, options=options_),
814
+ handler=_handler,
815
+ interceptors=list(interceptors_),
816
+ )
817
+ return response.output
818
+
819
+ async def read(
820
+ self,
821
+ uuid: "capo_lambda.types.string.String",
822
+ *,
823
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
824
+ ) -> "capo_lambda.types.event_source_mapping_configuration.EventSourceMappingConfiguration":
825
+ """<p>Returns details about an event source mapping. You can get the identifier of a mapping from the output of <a>ListEventSourceMappings</a>.</p>
826
+
827
+ Args:
828
+ uuid: <p>The identifier of the event source mapping.</p>
829
+
830
+ Raises:
831
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
832
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
833
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
834
+ capo_lambda.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests\">Lambda quotas</a>.</p>
835
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
836
+
837
+ Examples:
838
+ To get a Lambda function's event source mapping
839
+ The following example returns details about an event source mapping. To get a mapping's UUID, use ListEventSourceMappings.
840
+
841
+ >>> await client.read(uuid='14e0db71-xmpl-4eb5-b481-8945cf9d10c2')
842
+ """
843
+
844
+ async def _handler(
845
+ req: "AsyncOperationRequest[capo_lambda.types.get_event_source_mapping_request.GetEventSourceMappingRequest]",
846
+ ) -> AsyncOperationResponse[
847
+ "capo_lambda.types.event_source_mapping_configuration.EventSourceMappingConfiguration"
848
+ ]:
849
+ import capo_lambda._operations.aws_gir_api_service.get_event_source_mapping
850
+
851
+ (
852
+ output,
853
+ http_response,
854
+ ) = await capo_lambda._operations.aws_gir_api_service.get_event_source_mapping.async_get_event_source_mapping(
855
+ req.options, req.input
856
+ )
857
+ return AsyncOperationResponse(output=output, response=http_response)
858
+
859
+ interceptors_, options_ = self._service.operation_options(config_overrides)
860
+ input_: capo_lambda.types.get_event_source_mapping_request.GetEventSourceMappingRequest = {} # type: ignore[typeddict-item]
861
+ input_["uuid"] = uuid
862
+
863
+ response = await aexecute_pipeline(
864
+ AsyncOperationRequest(input=input_, options=options_),
865
+ handler=_handler,
866
+ interceptors=list(interceptors_),
867
+ )
868
+ return response.output
869
+
870
+ async def update(
871
+ self,
872
+ uuid: "capo_lambda.types.string.String",
873
+ *,
874
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
875
+ function_name: Optional[
876
+ "capo_lambda.types.namespaced_function_name.NamespacedFunctionName"
877
+ ] = None,
878
+ enabled: Optional["capo_lambda.types.enabled.Enabled"] = None,
879
+ batch_size: Optional["capo_lambda.types.batch_size.BatchSize"] = None,
880
+ filter_criteria: Optional[
881
+ "capo_lambda.types.filter_criteria.FilterCriteria"
882
+ ] = None,
883
+ maximum_batching_window_in_seconds: Optional[
884
+ "capo_lambda.types.maximum_batching_window_in_seconds.MaximumBatchingWindowInSeconds"
885
+ ] = None,
886
+ destination_config: Optional[
887
+ "capo_lambda.types.destination_config.DestinationConfig"
888
+ ] = None,
889
+ maximum_record_age_in_seconds: Optional[
890
+ "capo_lambda.types.maximum_record_age_in_seconds.MaximumRecordAgeInSeconds"
891
+ ] = None,
892
+ bisect_batch_on_function_error: Optional[
893
+ "capo_lambda.types.bisect_batch_on_function_error.BisectBatchOnFunctionError"
894
+ ] = None,
895
+ maximum_retry_attempts: Optional[
896
+ "capo_lambda.types.maximum_retry_attempts_event_source_mapping.MaximumRetryAttemptsEventSourceMapping"
897
+ ] = None,
898
+ parallelization_factor: Optional[
899
+ "capo_lambda.types.parallelization_factor.ParallelizationFactor"
900
+ ] = None,
901
+ source_access_configurations: Optional[
902
+ "capo_lambda.types.source_access_configurations.SourceAccessConfigurations"
903
+ ] = None,
904
+ tumbling_window_in_seconds: Optional[
905
+ "capo_lambda.types.tumbling_window_in_seconds.TumblingWindowInSeconds"
906
+ ] = None,
907
+ function_response_types: Optional[
908
+ "capo_lambda.types.function_response_type_list.FunctionResponseTypeList"
909
+ ] = None,
910
+ scaling_config: Optional[
911
+ "capo_lambda.types.scaling_config.ScalingConfig"
912
+ ] = None,
913
+ amazon_managed_kafka_event_source_config: Optional[
914
+ "capo_lambda.types.amazon_managed_kafka_event_source_config.AmazonManagedKafkaEventSourceConfig"
915
+ ] = None,
916
+ self_managed_kafka_event_source_config: Optional[
917
+ "capo_lambda.types.self_managed_kafka_event_source_config.SelfManagedKafkaEventSourceConfig"
918
+ ] = None,
919
+ document_db_event_source_config: Optional[
920
+ "capo_lambda.types.document_db_event_source_config.DocumentDBEventSourceConfig"
921
+ ] = None,
922
+ kms_key_arn: Optional["capo_lambda.types.kms_key_arn.KMSKeyArn"] = None,
923
+ metrics_config: Optional[
924
+ "capo_lambda.types.event_source_mapping_metrics_config.EventSourceMappingMetricsConfig"
925
+ ] = None,
926
+ logging_config: Optional[
927
+ "capo_lambda.types.event_source_mapping_logging_config.EventSourceMappingLoggingConfig"
928
+ ] = None,
929
+ provisioned_poller_config: Optional[
930
+ "capo_lambda.types.provisioned_poller_config.ProvisionedPollerConfig"
931
+ ] = None,
932
+ ) -> "capo_lambda.types.event_source_mapping_configuration.EventSourceMappingConfiguration":
933
+ r"""<p>Updates an event source mapping. You can change the function that Lambda invokes, or pause invocation and resume later from the same location.</p> <p>For details about how to configure different event sources, see the following topics. </p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-dynamodb-eventsourcemapping\"> Amazon DynamoDB Streams</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-eventsourcemapping\"> Amazon Kinesis</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-eventsource\"> Amazon SQS</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-eventsourcemapping\"> Amazon MQ and RabbitMQ</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html\"> Amazon MSK</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/kafka-smaa.html\"> Apache Kafka</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html\"> Amazon DocumentDB</a> </p> </li> </ul> <p>The following error handling options are available for stream sources (DynamoDB, Kinesis, Amazon MSK, and self-managed Apache Kafka):</p> <ul> <li> <p> <code>BisectBatchOnFunctionError</code> – If the function returns an error, split the batch in two and retry.</p> </li> <li> <p> <code>MaximumRecordAgeInSeconds</code> – Discard records older than the specified age. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires</p> </li> <li> <p> <code>MaximumRetryAttempts</code> – Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.</p> </li> <li> <p> <code>OnFailure</code> – Send discarded records to an Amazon SQS queue, Amazon SNS topic, Kafka topic, or Amazon S3 bucket. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations\">Adding a destination</a>.</p> </li> </ul> <p>The following option is available only for DynamoDB and Kinesis event sources:</p> <ul> <li> <p> <code>ParallelizationFactor</code> – Process multiple batches from each shard concurrently.</p> </li> </ul> <p>For information about which configuration parameters apply to each event source, see the following topics.</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-params\"> Amazon DynamoDB Streams</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-params\"> Amazon Kinesis</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-params\"> Amazon SQS</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-params\"> Amazon MQ and RabbitMQ</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-parms\"> Amazon MSK</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-kafka-parms\"> Apache Kafka</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html#docdb-configuration\"> Amazon DocumentDB</a> </p> </li> </ul>
934
+
935
+ Args:
936
+ uuid: <p>The identifier of the event source mapping.</p>
937
+ function_name: <p>The name or ARN of the Lambda function.</p> <p class=\"title\"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> – <code>MyFunction</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p> </li> <li> <p> <b>Version or Alias ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:MyFunction</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.</p>
938
+ enabled: <p>When true, the event source mapping is active. When false, Lambda pauses polling and invocation.</p> <p>Default: True</p>
939
+ batch_size: <p>The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).</p> <ul> <li> <p> <b>Amazon Kinesis</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.</p> </li> <li> <p> <b>Amazon Managed Streaming for Apache Kafka</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Self-managed Apache Kafka</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon MQ (ActiveMQ and RabbitMQ)</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>DocumentDB</b> – Default 100. Max 10,000.</p> </li> </ul>
940
+ filter_criteria: <p>An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html\">Lambda event filtering</a>.</p>
941
+ maximum_batching_window_in_seconds: <p>The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure <code>MaximumBatchingWindowInSeconds</code> to any value from 0 seconds to 300 seconds in increments of seconds.</p> <p>For Kinesis, DynamoDB, and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, the default batching window is 500 ms. Note that because you can only change <code>MaximumBatchingWindowInSeconds</code> in increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.</p> <p>Related setting: For Kinesis, DynamoDB, and Amazon SQS event sources, when you set <code>BatchSize</code> to a value greater than 10, you must set <code>MaximumBatchingWindowInSeconds</code> to at least 1.</p>
942
+ destination_config: <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) A configuration object that specifies the destination of an event after Lambda processes it.</p>
943
+ maximum_record_age_in_seconds: <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records older than the specified age. The default value is infinite (-1).</p>
944
+ bisect_batch_on_function_error: <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) If the function returns an error, split the batch in two and retry.</p>
945
+ maximum_retry_attempts: <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.</p>
946
+ parallelization_factor: <p>(Kinesis and DynamoDB Streams only) The number of batches to process from each shard concurrently.</p>
947
+ source_access_configurations: <p>An array of authentication protocols or VPC components required to secure your event source.</p>
948
+ tumbling_window_in_seconds: <p>(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.</p>
949
+ function_response_types: <p>(Kinesis, DynamoDB Streams, Amazon MSK, self-managed Apache Kafka, and Amazon SQS) A list of current response type enums applied to the event source mapping.</p>
950
+ scaling_config: <p>(Amazon SQS only) The scaling configuration for the event source. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency\">Configuring maximum concurrency for Amazon SQS event sources</a>.</p>
951
+ document_db_event_source_config: <p>Specific configuration settings for a DocumentDB event source.</p>
952
+ kms_key_arn: <p> The ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics\">filter criteria</a>. By default, Lambda does not encrypt your filter criteria object. Specify this property to encrypt data using your own customer managed key. </p>
953
+ metrics_config: <p>The metrics configuration for your event source. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics\">Event source mapping metrics</a>.</p>
954
+ provisioned_poller_config: <p>(Amazon SQS, Amazon MSK, and self-managed Apache Kafka only) The provisioned mode configuration for the event source. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode\">provisioned mode</a>.</p>
955
+
956
+ Raises:
957
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
958
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
959
+ capo_lambda.errors.resource_in_use_exception.ResourceInUseException: <p>The operation conflicts with the resource's availability. For example, you tried to update an event source mapping in the CREATING state, or you tried to delete an event source mapping currently UPDATING.</p>
960
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
961
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
962
+ capo_lambda.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests\">Lambda quotas</a>.</p>
963
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
964
+
965
+ Examples:
966
+ To update a Lambda function event source mapping
967
+ This operation updates a Lambda function event source mapping
968
+
969
+ >>> await client.update(uuid='1234xCy789012', function_name='myFunction', enabled=True, batch_size=123)
970
+ """
971
+
972
+ async def _handler(
973
+ req: "AsyncOperationRequest[capo_lambda.types.update_event_source_mapping_request.UpdateEventSourceMappingRequest]",
974
+ ) -> AsyncOperationResponse[
975
+ "capo_lambda.types.event_source_mapping_configuration.EventSourceMappingConfiguration"
976
+ ]:
977
+ import capo_lambda._operations.aws_gir_api_service.update_event_source_mapping
978
+
979
+ (
980
+ output,
981
+ http_response,
982
+ ) = await capo_lambda._operations.aws_gir_api_service.update_event_source_mapping.async_update_event_source_mapping(
983
+ req.options, req.input
984
+ )
985
+ return AsyncOperationResponse(output=output, response=http_response)
986
+
987
+ interceptors_, options_ = self._service.operation_options(config_overrides)
988
+ input_: capo_lambda.types.update_event_source_mapping_request.UpdateEventSourceMappingRequest = {} # type: ignore[typeddict-item]
989
+ input_["uuid"] = uuid
990
+ if function_name is not None:
991
+ input_["function_name"] = function_name
992
+ if enabled is not None:
993
+ input_["enabled"] = enabled
994
+ if batch_size is not None:
995
+ input_["batch_size"] = batch_size
996
+ if filter_criteria is not None:
997
+ input_["filter_criteria"] = filter_criteria
998
+ if maximum_batching_window_in_seconds is not None:
999
+ input_["maximum_batching_window_in_seconds"] = (
1000
+ maximum_batching_window_in_seconds
1001
+ )
1002
+ if destination_config is not None:
1003
+ input_["destination_config"] = destination_config
1004
+ if maximum_record_age_in_seconds is not None:
1005
+ input_["maximum_record_age_in_seconds"] = maximum_record_age_in_seconds
1006
+ if bisect_batch_on_function_error is not None:
1007
+ input_["bisect_batch_on_function_error"] = bisect_batch_on_function_error
1008
+ if maximum_retry_attempts is not None:
1009
+ input_["maximum_retry_attempts"] = maximum_retry_attempts
1010
+ if parallelization_factor is not None:
1011
+ input_["parallelization_factor"] = parallelization_factor
1012
+ if source_access_configurations is not None:
1013
+ input_["source_access_configurations"] = source_access_configurations
1014
+ if tumbling_window_in_seconds is not None:
1015
+ input_["tumbling_window_in_seconds"] = tumbling_window_in_seconds
1016
+ if function_response_types is not None:
1017
+ input_["function_response_types"] = function_response_types
1018
+ if scaling_config is not None:
1019
+ input_["scaling_config"] = scaling_config
1020
+ if amazon_managed_kafka_event_source_config is not None:
1021
+ input_["amazon_managed_kafka_event_source_config"] = (
1022
+ amazon_managed_kafka_event_source_config
1023
+ )
1024
+ if self_managed_kafka_event_source_config is not None:
1025
+ input_["self_managed_kafka_event_source_config"] = (
1026
+ self_managed_kafka_event_source_config
1027
+ )
1028
+ if document_db_event_source_config is not None:
1029
+ input_["document_db_event_source_config"] = document_db_event_source_config
1030
+ if kms_key_arn is not None:
1031
+ input_["kms_key_arn"] = kms_key_arn
1032
+ if metrics_config is not None:
1033
+ input_["metrics_config"] = metrics_config
1034
+ if logging_config is not None:
1035
+ input_["logging_config"] = logging_config
1036
+ if provisioned_poller_config is not None:
1037
+ input_["provisioned_poller_config"] = provisioned_poller_config
1038
+
1039
+ response = await aexecute_pipeline(
1040
+ AsyncOperationRequest(input=input_, options=options_),
1041
+ handler=_handler,
1042
+ interceptors=list(interceptors_),
1043
+ )
1044
+ return response.output
1045
+
1046
+ async def delete(
1047
+ self,
1048
+ uuid: "capo_lambda.types.string.String",
1049
+ *,
1050
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
1051
+ ) -> "capo_lambda.types.event_source_mapping_configuration.EventSourceMappingConfiguration":
1052
+ r"""<p>Deletes an <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/intro-invocation-modes.html\">event source mapping</a>. You can get the identifier of a mapping from the output of <a>ListEventSourceMappings</a>.</p> <p>When you delete an event source mapping, it enters a <code>Deleting</code> state and might not be completely deleted for several seconds.</p>
1053
+
1054
+ Args:
1055
+ uuid: <p>The identifier of the event source mapping.</p>
1056
+
1057
+ Raises:
1058
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
1059
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
1060
+ capo_lambda.errors.resource_in_use_exception.ResourceInUseException: <p>The operation conflicts with the resource's availability. For example, you tried to update an event source mapping in the CREATING state, or you tried to delete an event source mapping currently UPDATING.</p>
1061
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
1062
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
1063
+ capo_lambda.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests\">Lambda quotas</a>.</p>
1064
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
1065
+
1066
+ Examples:
1067
+ To delete a Lambda function event source mapping
1068
+ The following example deletes an event source mapping. To get a mapping's UUID, use ListEventSourceMappings.
1069
+
1070
+ >>> await client.delete(uuid='14e0db71-xmpl-4eb5-b481-8945cf9d10c2')
1071
+ """
1072
+
1073
+ async def _handler(
1074
+ req: "AsyncOperationRequest[capo_lambda.types.delete_event_source_mapping_request.DeleteEventSourceMappingRequest]",
1075
+ ) -> AsyncOperationResponse[
1076
+ "capo_lambda.types.event_source_mapping_configuration.EventSourceMappingConfiguration"
1077
+ ]:
1078
+ import capo_lambda._operations.aws_gir_api_service.delete_event_source_mapping
1079
+
1080
+ (
1081
+ output,
1082
+ http_response,
1083
+ ) = await capo_lambda._operations.aws_gir_api_service.delete_event_source_mapping.async_delete_event_source_mapping(
1084
+ req.options, req.input
1085
+ )
1086
+ return AsyncOperationResponse(output=output, response=http_response)
1087
+
1088
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1089
+ input_: capo_lambda.types.delete_event_source_mapping_request.DeleteEventSourceMappingRequest = {} # type: ignore[typeddict-item]
1090
+ input_["uuid"] = uuid
1091
+
1092
+ response = await aexecute_pipeline(
1093
+ AsyncOperationRequest(input=input_, options=options_),
1094
+ handler=_handler,
1095
+ interceptors=list(interceptors_),
1096
+ )
1097
+ return response.output
1098
+
1099
+ async def list(
1100
+ self,
1101
+ *,
1102
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
1103
+ event_source_arn: Optional["capo_lambda.types.arn.Arn"] = None,
1104
+ function_name: Optional[
1105
+ "capo_lambda.types.namespaced_function_name.NamespacedFunctionName"
1106
+ ] = None,
1107
+ marker: Optional["capo_lambda.types.string.String"] = None,
1108
+ max_items: Optional["capo_lambda.types.max_list_items.MaxListItems"] = None,
1109
+ ) -> "capo_lambda.types.list_event_source_mappings_response.ListEventSourceMappingsResponse":
1110
+ r"""<p>Lists event source mappings. Specify an <code>EventSourceArn</code> to show only event source mappings for a single event source.</p>
1111
+
1112
+ Args:
1113
+ event_source_arn: <p>The Amazon Resource Name (ARN) of the event source.</p> <ul> <li> <p> <b>Amazon Kinesis</b> – The ARN of the data stream or a stream consumer.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> – The ARN of the stream.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> – The ARN of the queue.</p> </li> <li> <p> <b>Amazon Managed Streaming for Apache Kafka</b> – The ARN of the cluster or the ARN of the VPC connection (for <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#msk-multi-vpc\">cross-account event source mappings</a>).</p> </li> <li> <p> <b>Amazon MQ</b> – The ARN of the broker.</p> </li> <li> <p> <b>Amazon DocumentDB</b> – The ARN of the DocumentDB change stream.</p> </li> </ul>
1114
+ function_name: <p>The name or ARN of the Lambda function.</p> <p class=\"title\"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> – <code>MyFunction</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p> </li> <li> <p> <b>Version or Alias ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:MyFunction</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.</p>
1115
+ marker: <p>A pagination token returned by a previous call.</p>
1116
+ max_items: <p>The maximum number of event source mappings to return. Note that ListEventSourceMappings returns a maximum of 100 items in each response, even if you set the number higher.</p>
1117
+
1118
+ Raises:
1119
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
1120
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
1121
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
1122
+ capo_lambda.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests\">Lambda quotas</a>.</p>
1123
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
1124
+
1125
+ Examples:
1126
+ To list the event source mappings for a function
1127
+ The following example returns a list of the event source mappings for a function named my-function.
1128
+
1129
+ >>> await client.list(function_name='my-function')
1130
+ """
1131
+
1132
+ async def _handler(
1133
+ req: "AsyncOperationRequest[capo_lambda.types.list_event_source_mappings_request.ListEventSourceMappingsRequest]",
1134
+ ) -> AsyncOperationResponse[
1135
+ "capo_lambda.types.list_event_source_mappings_response.ListEventSourceMappingsResponse"
1136
+ ]:
1137
+ import capo_lambda._operations.aws_gir_api_service.list_event_source_mappings
1138
+
1139
+ (
1140
+ output,
1141
+ http_response,
1142
+ ) = await capo_lambda._operations.aws_gir_api_service.list_event_source_mappings.async_list_event_source_mappings(
1143
+ req.options, req.input
1144
+ )
1145
+ return AsyncOperationResponse(output=output, response=http_response)
1146
+
1147
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1148
+ input_: capo_lambda.types.list_event_source_mappings_request.ListEventSourceMappingsRequest = {} # type: ignore[typeddict-item]
1149
+ if event_source_arn is not None:
1150
+ input_["event_source_arn"] = event_source_arn
1151
+ if function_name is not None:
1152
+ input_["function_name"] = function_name
1153
+ if marker is not None:
1154
+ input_["marker"] = marker
1155
+ if max_items is not None:
1156
+ input_["max_items"] = max_items
1157
+
1158
+ response = await aexecute_pipeline(
1159
+ AsyncOperationRequest(input=input_, options=options_),
1160
+ handler=_handler,
1161
+ interceptors=list(interceptors_),
1162
+ )
1163
+ return response.output