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,3923 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import AsyncGenerator, AsyncIterator, Generator, Iterator
4
+ from contextlib import asynccontextmanager, contextmanager
5
+ from typing import TYPE_CHECKING, Optional
6
+
7
+ import capo_lambda._auth._signers
8
+ import capo_lambda._auth._sigv4
9
+ from capo_lambda._iter import ensure_async_iterator, ensure_sync_iterator
10
+ from capo_lambda._services._pipeline import (
11
+ AsyncOperationRequest,
12
+ AsyncOperationResponse,
13
+ OperationRequest,
14
+ OperationResponse,
15
+ aexecute_pipeline,
16
+ execute_pipeline,
17
+ )
18
+
19
+ if TYPE_CHECKING:
20
+ import capo_lambda.types.architectures_list
21
+ import capo_lambda.types.blob
22
+ import capo_lambda.types.blob_stream
23
+ import capo_lambda.types.boolean
24
+ import capo_lambda.types.capacity_provider_config
25
+ import capo_lambda.types.code_signing_config_arn
26
+ import capo_lambda.types.concurrency
27
+ import capo_lambda.types.cors
28
+ import capo_lambda.types.create_function_request
29
+ import capo_lambda.types.create_function_url_config_request
30
+ import capo_lambda.types.create_function_url_config_response
31
+ import capo_lambda.types.dead_letter_config
32
+ import capo_lambda.types.delete_function_code_signing_config_request
33
+ import capo_lambda.types.delete_function_concurrency_request
34
+ import capo_lambda.types.delete_function_url_config_request
35
+ import capo_lambda.types.description
36
+ import capo_lambda.types.durable_config
37
+ import capo_lambda.types.durable_execution_name
38
+ import capo_lambda.types.environment
39
+ import capo_lambda.types.ephemeral_storage
40
+ import capo_lambda.types.file_system_config_list
41
+ import capo_lambda.types.function_code
42
+ import capo_lambda.types.function_configuration
43
+ import capo_lambda.types.function_name
44
+ import capo_lambda.types.function_scaling_config
45
+ import capo_lambda.types.function_url_auth_type
46
+ import capo_lambda.types.function_url_qualifier
47
+ import capo_lambda.types.function_version
48
+ import capo_lambda.types.function_version_latest_published
49
+ import capo_lambda.types.get_function_code_signing_config_request
50
+ import capo_lambda.types.get_function_code_signing_config_response
51
+ import capo_lambda.types.get_function_concurrency_request
52
+ import capo_lambda.types.get_function_concurrency_response
53
+ import capo_lambda.types.get_function_configuration_request
54
+ import capo_lambda.types.get_function_recursion_config_request
55
+ import capo_lambda.types.get_function_recursion_config_response
56
+ import capo_lambda.types.get_function_request
57
+ import capo_lambda.types.get_function_response
58
+ import capo_lambda.types.get_function_scaling_config_request
59
+ import capo_lambda.types.get_function_scaling_config_response
60
+ import capo_lambda.types.get_function_url_config_request
61
+ import capo_lambda.types.get_function_url_config_response
62
+ import capo_lambda.types.get_policy_request
63
+ import capo_lambda.types.get_policy_response
64
+ import capo_lambda.types.get_runtime_management_config_request
65
+ import capo_lambda.types.get_runtime_management_config_response
66
+ import capo_lambda.types.handler
67
+ import capo_lambda.types.image_config
68
+ import capo_lambda.types.invocation_request
69
+ import capo_lambda.types.invocation_response
70
+ import capo_lambda.types.invocation_type
71
+ import capo_lambda.types.invoke_async_request
72
+ import capo_lambda.types.invoke_async_response
73
+ import capo_lambda.types.invoke_mode
74
+ import capo_lambda.types.invoke_with_response_stream_request
75
+ import capo_lambda.types.invoke_with_response_stream_response
76
+ import capo_lambda.types.kms_key_arn
77
+ import capo_lambda.types.layer_list
78
+ import capo_lambda.types.list_function_url_configs_request
79
+ import capo_lambda.types.list_function_url_configs_response
80
+ import capo_lambda.types.list_functions_request
81
+ import capo_lambda.types.list_functions_response
82
+ import capo_lambda.types.list_provisioned_concurrency_configs_request
83
+ import capo_lambda.types.list_provisioned_concurrency_configs_response
84
+ import capo_lambda.types.log_type
85
+ import capo_lambda.types.logging_config
86
+ import capo_lambda.types.master_region
87
+ import capo_lambda.types.max_items
88
+ import capo_lambda.types.max_list_items
89
+ import capo_lambda.types.max_provisioned_concurrency_config_list_items
90
+ import capo_lambda.types.memory_size
91
+ import capo_lambda.types.namespaced_function_name
92
+ import capo_lambda.types.numeric_latest_published_or_alias_qualifier
93
+ import capo_lambda.types.package_type
94
+ import capo_lambda.types.published_function_qualifier
95
+ import capo_lambda.types.put_function_code_signing_config_request
96
+ import capo_lambda.types.put_function_code_signing_config_response
97
+ import capo_lambda.types.put_function_concurrency_request
98
+ import capo_lambda.types.put_function_recursion_config_request
99
+ import capo_lambda.types.put_function_recursion_config_response
100
+ import capo_lambda.types.put_function_scaling_config_request
101
+ import capo_lambda.types.put_function_scaling_config_response
102
+ import capo_lambda.types.put_runtime_management_config_request
103
+ import capo_lambda.types.put_runtime_management_config_response
104
+ import capo_lambda.types.recursive_loop
105
+ import capo_lambda.types.reserved_concurrent_executions
106
+ import capo_lambda.types.response_streaming_invocation_type
107
+ import capo_lambda.types.role_arn
108
+ import capo_lambda.types.runtime
109
+ import capo_lambda.types.runtime_version_arn
110
+ import capo_lambda.types.s3_bucket
111
+ import capo_lambda.types.s3_key
112
+ import capo_lambda.types.s3_object_version
113
+ import capo_lambda.types.snap_start
114
+ import capo_lambda.types.string
115
+ import capo_lambda.types.tags
116
+ import capo_lambda.types.tenancy_config
117
+ import capo_lambda.types.tenant_id
118
+ import capo_lambda.types.timeout
119
+ import capo_lambda.types.tracing_config
120
+ import capo_lambda.types.unqualified_function_name
121
+ import capo_lambda.types.update_function_code_request
122
+ import capo_lambda.types.update_function_configuration_request
123
+ import capo_lambda.types.update_function_url_config_request
124
+ import capo_lambda.types.update_function_url_config_response
125
+ import capo_lambda.types.update_runtime_on
126
+ import capo_lambda.types.vpc_config
127
+ from capo_lambda._services._lambda import LambdaClient, LambdaClientConfig
128
+ from capo_lambda._services.async__lambda import (
129
+ AsyncLambdaClient,
130
+ AsyncLambdaClientConfig,
131
+ )
132
+
133
+
134
+ class Function:
135
+ def __init__(self, service: LambdaClient) -> None:
136
+ self._service = service
137
+
138
+ def put(
139
+ self,
140
+ function_name: "capo_lambda.types.function_name.FunctionName",
141
+ role: "capo_lambda.types.role_arn.RoleArn",
142
+ code: "capo_lambda.types.function_code.FunctionCode",
143
+ *,
144
+ config_overrides: Optional[LambdaClientConfig] = None,
145
+ runtime: Optional["capo_lambda.types.runtime.Runtime"] = None,
146
+ handler: Optional["capo_lambda.types.handler.Handler"] = None,
147
+ description: Optional["capo_lambda.types.description.Description"] = None,
148
+ timeout: Optional["capo_lambda.types.timeout.Timeout"] = None,
149
+ memory_size: Optional["capo_lambda.types.memory_size.MemorySize"] = None,
150
+ publish: Optional["capo_lambda.types.boolean.Boolean"] = None,
151
+ vpc_config: Optional["capo_lambda.types.vpc_config.VpcConfig"] = None,
152
+ package_type: Optional["capo_lambda.types.package_type.PackageType"] = None,
153
+ dead_letter_config: Optional[
154
+ "capo_lambda.types.dead_letter_config.DeadLetterConfig"
155
+ ] = None,
156
+ environment: Optional["capo_lambda.types.environment.Environment"] = None,
157
+ kms_key_arn: Optional["capo_lambda.types.kms_key_arn.KMSKeyArn"] = None,
158
+ tracing_config: Optional[
159
+ "capo_lambda.types.tracing_config.TracingConfig"
160
+ ] = None,
161
+ tags: Optional["capo_lambda.types.tags.Tags"] = None,
162
+ layers: Optional["capo_lambda.types.layer_list.LayerList"] = None,
163
+ file_system_configs: Optional[
164
+ "capo_lambda.types.file_system_config_list.FileSystemConfigList"
165
+ ] = None,
166
+ image_config: Optional["capo_lambda.types.image_config.ImageConfig"] = None,
167
+ code_signing_config_arn: Optional[
168
+ "capo_lambda.types.code_signing_config_arn.CodeSigningConfigArn"
169
+ ] = None,
170
+ architectures: Optional[
171
+ "capo_lambda.types.architectures_list.ArchitecturesList"
172
+ ] = None,
173
+ ephemeral_storage: Optional[
174
+ "capo_lambda.types.ephemeral_storage.EphemeralStorage"
175
+ ] = None,
176
+ snap_start: Optional["capo_lambda.types.snap_start.SnapStart"] = None,
177
+ logging_config: Optional[
178
+ "capo_lambda.types.logging_config.LoggingConfig"
179
+ ] = None,
180
+ capacity_provider_config: Optional[
181
+ "capo_lambda.types.capacity_provider_config.CapacityProviderConfig"
182
+ ] = None,
183
+ publish_to: Optional[
184
+ "capo_lambda.types.function_version_latest_published.FunctionVersionLatestPublished"
185
+ ] = None,
186
+ durable_config: Optional[
187
+ "capo_lambda.types.durable_config.DurableConfig"
188
+ ] = None,
189
+ tenancy_config: Optional[
190
+ "capo_lambda.types.tenancy_config.TenancyConfig"
191
+ ] = None,
192
+ ) -> "capo_lambda.types.function_configuration.FunctionConfiguration":
193
+ r"""<p>Creates a Lambda function. To create a function, you need a <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html\">deployment package</a> and an <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role\">execution role</a>. The deployment package is a .zip file archive or container image that contains your function code. The execution role grants the function permission to use Amazon Web Services services, such as Amazon CloudWatch Logs for log streaming and X-Ray for request tracing.</p> <p>If the deployment package is a <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html\">container image</a>, then you set the package type to <code>Image</code>. For a container image, the code property must include the URI of a container image in the Amazon ECR registry. You do not need to specify the handler and runtime properties.</p> <p>If the deployment package is a <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html#gettingstarted-package-zip\">.zip file archive</a>, then you set the package type to <code>Zip</code>. For a .zip file archive, the code property specifies the location of the .zip file. You must also specify the handler and runtime properties. The code in the deployment package must be compatible with the target instruction set architecture of the function (<code>x86-64</code> or <code>arm64</code>). If you do not specify the architecture, then the default value is <code>x86-64</code>.</p> <p>When you create a function, Lambda provisions an instance of the function and its supporting resources. If your function connects to a VPC, this process can take a minute or so. During this time, you can't invoke or modify the function. The <code>State</code>, <code>StateReason</code>, and <code>StateReasonCode</code> fields in the response from <a>GetFunctionConfiguration</a> indicate when the function is ready to invoke. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html\">Lambda function states</a>.</p> <p>A function has an unpublished version, and can have published versions and aliases. The unpublished version changes when you update your function's code and configuration. A published version is a snapshot of your function code and configuration that can't be changed. An alias is a named resource that maps to a version, and can be changed to map to a different version. Use the <code>Publish</code> parameter to create version <code>1</code> of your function from its initial configuration.</p> <p>The other parameters let you configure version-specific and function-level settings. You can modify version-specific settings later with <a>UpdateFunctionConfiguration</a>. Function-level settings apply to both the unpublished and published versions of the function, and include tags (<a>TagResource</a>) and per-function concurrency limits (<a>PutFunctionConcurrency</a>).</p> <p>You can use code signing if your deployment package is a .zip file archive. To enable code signing for this function, specify the ARN of a code-signing configuration. When a user attempts to deploy a code package with <a>UpdateFunctionCode</a>, Lambda checks that the code package has a valid signature from a trusted publisher. The code-signing configuration includes set of signing profiles, which define the trusted publishers for this function.</p> <p>If another Amazon Web Services account or an Amazon Web Services service invokes your function, use <a>AddPermission</a> to grant permission by creating a resource-based Identity and Access Management (IAM) policy. You can grant permissions at the function level, on a version, or on an alias.</p> <p>To invoke your function directly, use <a>Invoke</a>. To invoke your function in response to events in other Amazon Web Services services, create an event source mapping (<a>CreateEventSourceMapping</a>), or configure a function trigger in the other service. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-invocation.html\">Invoking Lambda functions</a>.</p>
194
+
195
+ Args:
196
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
197
+ runtime: <p>The identifier of the function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html\"> runtime</a>. Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.</p> <p>The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing functions shortly after each runtime is deprecated. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels\">Runtime use after deprecation</a>.</p> <p>For a list of all currently supported runtimes, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported\">Supported runtimes</a>.</p>
198
+ role: <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
199
+ handler: <p>The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html\">Lambda programming model</a>.</p>
200
+ code: <p>The code for the function.</p>
201
+ description: <p>A description of the function.</p>
202
+ timeout: <p>The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html\">Lambda execution environment</a>.</p>
203
+ memory_size: <p>The amount of <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console\">memory available to the function</a> at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB.</p>
204
+ publish: <p>Set to true to publish the first version of the function during creation.</p>
205
+ vpc_config: <p>For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html\">Configuring a Lambda function to access resources in a VPC</a>.</p>
206
+ package_type: <p>The type of deployment package. Set to <code>Image</code> for container image and set to <code>Zip</code> for .zip file archive.</p>
207
+ dead_letter_config: <p>A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq\">Dead-letter queues</a>.</p>
208
+ environment: <p>Environment variables that are accessible from function code during execution.</p>
209
+ kms_key_arn: <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p> <ul> <li> <p>The function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption\">environment variables</a>.</p> </li> <li> <p>The function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html\">Lambda SnapStart</a> snapshots.</p> </li> <li> <p>When used with <code>SourceKMSKeyArn</code>, the unzipped version of the .zip deployment package that's used for function invocations. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption\"> Specifying a customer managed key for Lambda</a>.</p> </li> <li> <p>The optimized version of the container image that's used for function invocations. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle\">Function lifecycle</a>.</p> </li> </ul> <p>If you don't provide a customer managed key, Lambda uses an <a href=\"https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk\">Amazon Web Services owned key</a> or an <a href=\"https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk\">Amazon Web Services managed key</a>.</p>
210
+ tracing_config: <p>Set <code>Mode</code> to <code>Active</code> to sample and trace a subset of incoming requests with <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html\">X-Ray</a>.</p>
211
+ tags: <p>A list of <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/tagging.html\">tags</a> to apply to the function.</p>
212
+ layers: <p>A list of <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html\">function layers</a> to add to the function's execution environment. Specify each layer by its ARN, including the version.</p>
213
+ file_system_configs: <p>Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.</p>
214
+ image_config: <p>Container image <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms\">configuration values</a> that override the values in the container image Dockerfile.</p>
215
+ code_signing_config_arn: <p>To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.</p>
216
+ architectures: <p>The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is <code>x86_64</code>.</p>
217
+ ephemeral_storage: <p>The size of the function's <code>/tmp</code> directory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage\">Configuring ephemeral storage (console)</a>.</p>
218
+ snap_start: <p>The function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html\">SnapStart</a> setting.</p>
219
+ logging_config: <p>The function's Amazon CloudWatch Logs configuration settings.</p>
220
+ capacity_provider_config: <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
221
+ publish_to: <p>Specifies where to publish the function version or configuration.</p>
222
+ durable_config: <p>Configuration settings for durable functions. Enables creating functions with durability that can remember their state and continue execution even after interruptions.</p>
223
+ tenancy_config: <p>Configuration for multi-tenant applications that use Lambda functions. Defines tenant isolation settings and resource allocations. Required for functions supporting multiple tenants.</p>
224
+
225
+ Raises:
226
+ capo_lambda.errors.code_signing_config_not_found_exception.CodeSigningConfigNotFoundException: <p>The specified code signing configuration does not exist.</p>
227
+ capo_lambda.errors.code_storage_exceeded_exception.CodeStorageExceededException: <p>Your Amazon Web Services account has exceeded its maximum total code size. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html\">Lambda quotas</a>.</p>
228
+ capo_lambda.errors.code_verification_failed_exception.CodeVerificationFailedException: <p>The code signature failed one or more of the validation checks for signature mismatch or expiry, and the code signing policy is set to ENFORCE. Lambda blocks the deployment.</p>
229
+ capo_lambda.errors.function_versions_per_capacity_provider_limit_exceeded_exception.FunctionVersionsPerCapacityProviderLimitExceededException: <p>The maximum number of function versions that can be associated with a single capacity provider has been exceeded. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html\">Lambda quotas</a>.</p>
230
+ capo_lambda.errors.invalid_code_signature_exception.InvalidCodeSignatureException: <p>The code signature failed the integrity check. If the integrity check fails, then Lambda blocks deployment, even if the code signing policy is set to WARN.</p>
231
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
232
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
233
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
234
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
235
+ 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>
236
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
237
+
238
+ Examples:
239
+ To create a function
240
+ The following example creates a function with a deployment package in Amazon S3 and enables X-Ray tracing and environment variable encryption.
241
+
242
+ >>> client.put(function_name='my-function', runtime='nodejs12.x', role='arn:aws:iam::123456789012:role/lambda-role', handler='index.handler', code={'S3Bucket': 'my-bucket-1xpuxmplzrlbh', 'S3Key': 'function.zip'}, description='Process image objects from Amazon S3.', timeout=15, memory_size=256, publish=True, environment={'Variables': {'BUCKET': 'my-bucket-1xpuxmplzrlbh', 'PREFIX': 'inbound'}}, kms_key_arn='arn:aws:kms:us-west-2:123456789012:key/b0844d6c-xmpl-4463-97a4-d49f50839966', tracing_config={'Mode': 'Active'}, durable_config={'ExecutionTimeout': 31622400, 'RetentionPeriodInDays': 30}, tags={'DEPARTMENT': 'Assets'})
243
+ """
244
+
245
+ def _handler(
246
+ req: "OperationRequest[capo_lambda.types.create_function_request.CreateFunctionRequest]",
247
+ ) -> OperationResponse[
248
+ "capo_lambda.types.function_configuration.FunctionConfiguration"
249
+ ]:
250
+ import capo_lambda._operations.aws_gir_api_service.create_function
251
+
252
+ output, http_response = (
253
+ capo_lambda._operations.aws_gir_api_service.create_function.create_function(
254
+ req.options, req.input
255
+ )
256
+ )
257
+ return OperationResponse(output=output, response=http_response)
258
+
259
+ interceptors_, options_ = self._service.operation_options(config_overrides)
260
+ input_: capo_lambda.types.create_function_request.CreateFunctionRequest = {} # type: ignore[typeddict-item]
261
+ input_["function_name"] = function_name
262
+ if runtime is not None:
263
+ input_["runtime"] = runtime
264
+ input_["role"] = role
265
+ if handler is not None:
266
+ input_["handler"] = handler
267
+ input_["code"] = code
268
+ if description is not None:
269
+ input_["description"] = description
270
+ if timeout is not None:
271
+ input_["timeout"] = timeout
272
+ if memory_size is not None:
273
+ input_["memory_size"] = memory_size
274
+ if publish is not None:
275
+ input_["publish"] = publish
276
+ if vpc_config is not None:
277
+ input_["vpc_config"] = vpc_config
278
+ if package_type is not None:
279
+ input_["package_type"] = package_type
280
+ if dead_letter_config is not None:
281
+ input_["dead_letter_config"] = dead_letter_config
282
+ if environment is not None:
283
+ input_["environment"] = environment
284
+ if kms_key_arn is not None:
285
+ input_["kms_key_arn"] = kms_key_arn
286
+ if tracing_config is not None:
287
+ input_["tracing_config"] = tracing_config
288
+ if tags is not None:
289
+ input_["tags"] = tags
290
+ if layers is not None:
291
+ input_["layers"] = layers
292
+ if file_system_configs is not None:
293
+ input_["file_system_configs"] = file_system_configs
294
+ if image_config is not None:
295
+ input_["image_config"] = image_config
296
+ if code_signing_config_arn is not None:
297
+ input_["code_signing_config_arn"] = code_signing_config_arn
298
+ if architectures is not None:
299
+ input_["architectures"] = architectures
300
+ if ephemeral_storage is not None:
301
+ input_["ephemeral_storage"] = ephemeral_storage
302
+ if snap_start is not None:
303
+ input_["snap_start"] = snap_start
304
+ if logging_config is not None:
305
+ input_["logging_config"] = logging_config
306
+ if capacity_provider_config is not None:
307
+ input_["capacity_provider_config"] = capacity_provider_config
308
+ if publish_to is not None:
309
+ input_["publish_to"] = publish_to
310
+ if durable_config is not None:
311
+ input_["durable_config"] = durable_config
312
+ if tenancy_config is not None:
313
+ input_["tenancy_config"] = tenancy_config
314
+
315
+ response = execute_pipeline(
316
+ OperationRequest(input=input_, options=options_),
317
+ handler=_handler,
318
+ interceptors=list(interceptors_),
319
+ )
320
+ return response.output
321
+
322
+ def list(
323
+ self,
324
+ *,
325
+ config_overrides: Optional[LambdaClientConfig] = None,
326
+ master_region: Optional["capo_lambda.types.master_region.MasterRegion"] = None,
327
+ function_version: Optional[
328
+ "capo_lambda.types.function_version.FunctionVersion"
329
+ ] = None,
330
+ marker: Optional["capo_lambda.types.string.String"] = None,
331
+ max_items: Optional["capo_lambda.types.max_list_items.MaxListItems"] = None,
332
+ ) -> "capo_lambda.types.list_functions_response.ListFunctionsResponse":
333
+ """<p>Returns a list of Lambda functions, with the version-specific configuration of each. Lambda returns up to 50 functions per call.</p> <p>Set <code>FunctionVersion</code> to <code>ALL</code> to include all published versions of each function in addition to the unpublished version.</p> <note> <p>The <code>ListFunctions</code> operation returns a subset of the <a>FunctionConfiguration</a> fields. To get the additional fields (State, StateReasonCode, StateReason, LastUpdateStatus, LastUpdateStatusReason, LastUpdateStatusReasonCode, RuntimeVersionConfig) for a function or version, use <a>GetFunction</a>.</p> </note>
334
+
335
+ Args:
336
+ master_region: <p>For Lambda@Edge functions, the Amazon Web Services Region of the master function. For example, <code>us-east-1</code> filters the list of functions to include only Lambda@Edge functions replicated from a master function in US East (N. Virginia). If specified, you must set <code>FunctionVersion</code> to <code>ALL</code>.</p>
337
+ function_version: <p>Set to <code>ALL</code> to include entries for all published versions of each function.</p>
338
+ marker: <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
339
+ max_items: <p>The maximum number of functions to return in the response. Note that <code>ListFunctions</code> returns a maximum of 50 items in each response, even if you set the number higher.</p>
340
+
341
+ Raises:
342
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
343
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
344
+ 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>
345
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
346
+
347
+ Examples:
348
+ To get a list of Lambda functions
349
+ This operation returns a list of Lambda functions.
350
+
351
+ >>> client.list()
352
+ """
353
+
354
+ def _handler(
355
+ req: "OperationRequest[capo_lambda.types.list_functions_request.ListFunctionsRequest]",
356
+ ) -> OperationResponse[
357
+ "capo_lambda.types.list_functions_response.ListFunctionsResponse"
358
+ ]:
359
+ import capo_lambda._operations.aws_gir_api_service.list_functions
360
+
361
+ output, http_response = (
362
+ capo_lambda._operations.aws_gir_api_service.list_functions.list_functions(
363
+ req.options, req.input
364
+ )
365
+ )
366
+ return OperationResponse(output=output, response=http_response)
367
+
368
+ interceptors_, options_ = self._service.operation_options(config_overrides)
369
+ input_: capo_lambda.types.list_functions_request.ListFunctionsRequest = {} # type: ignore[typeddict-item]
370
+ if master_region is not None:
371
+ input_["master_region"] = master_region
372
+ if function_version is not None:
373
+ input_["function_version"] = function_version
374
+ if marker is not None:
375
+ input_["marker"] = marker
376
+ if max_items is not None:
377
+ input_["max_items"] = max_items
378
+
379
+ response = execute_pipeline(
380
+ OperationRequest(input=input_, options=options_),
381
+ handler=_handler,
382
+ interceptors=list(interceptors_),
383
+ )
384
+ return response.output
385
+
386
+ def create_function_url_config(
387
+ self,
388
+ function_name: "capo_lambda.types.function_name.FunctionName",
389
+ auth_type: "capo_lambda.types.function_url_auth_type.FunctionUrlAuthType",
390
+ *,
391
+ config_overrides: Optional[LambdaClientConfig] = None,
392
+ qualifier: Optional[
393
+ "capo_lambda.types.function_url_qualifier.FunctionUrlQualifier"
394
+ ] = None,
395
+ cors: Optional["capo_lambda.types.cors.Cors"] = None,
396
+ invoke_mode: Optional["capo_lambda.types.invoke_mode.InvokeMode"] = None,
397
+ ) -> "capo_lambda.types.create_function_url_config_response.CreateFunctionUrlConfigResponse":
398
+ r"""<p>Creates a Lambda function URL with the specified configuration parameters. A function URL is a dedicated HTTP(S) endpoint that you can use to invoke your function.</p>
399
+
400
+ Args:
401
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
402
+ qualifier: <p>The alias name.</p>
403
+ auth_type: <p>The type of authentication that your function URL uses. Set to <code>AWS_IAM</code> if you want to restrict access to authenticated users only. Set to <code>NONE</code> if you want to bypass IAM authentication to create a public endpoint. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html\">Control access to Lambda function URLs</a>.</p>
404
+ cors: <p>The <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS\">cross-origin resource sharing (CORS)</a> settings for your function URL.</p>
405
+ invoke_mode: <p>Use one of the following options:</p> <ul> <li> <p> <code>BUFFERED</code> – This is the default option. Lambda invokes your function using the <code>Invoke</code> API operation. Invocation results are available when the payload is complete. The maximum payload size is 6 MB.</p> </li> <li> <p> <code>RESPONSE_STREAM</code> – Your function streams payload results as they become available. Lambda invokes your function using the <code>InvokeWithResponseStream</code> API operation. The maximum response payload size is 200 MB.</p> </li> </ul>
406
+
407
+ Raises:
408
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
409
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
410
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
411
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
412
+ 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>
413
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
414
+ """
415
+
416
+ def _handler(
417
+ req: "OperationRequest[capo_lambda.types.create_function_url_config_request.CreateFunctionUrlConfigRequest]",
418
+ ) -> OperationResponse[
419
+ "capo_lambda.types.create_function_url_config_response.CreateFunctionUrlConfigResponse"
420
+ ]:
421
+ import capo_lambda._operations.aws_gir_api_service.create_function_url_config
422
+
423
+ output, http_response = (
424
+ capo_lambda._operations.aws_gir_api_service.create_function_url_config.create_function_url_config(
425
+ req.options, req.input
426
+ )
427
+ )
428
+ return OperationResponse(output=output, response=http_response)
429
+
430
+ interceptors_, options_ = self._service.operation_options(config_overrides)
431
+ input_: capo_lambda.types.create_function_url_config_request.CreateFunctionUrlConfigRequest = {} # type: ignore[typeddict-item]
432
+ input_["function_name"] = function_name
433
+ if qualifier is not None:
434
+ input_["qualifier"] = qualifier
435
+ input_["auth_type"] = auth_type
436
+ if cors is not None:
437
+ input_["cors"] = cors
438
+ if invoke_mode is not None:
439
+ input_["invoke_mode"] = invoke_mode
440
+
441
+ response = execute_pipeline(
442
+ OperationRequest(input=input_, options=options_),
443
+ handler=_handler,
444
+ interceptors=list(interceptors_),
445
+ )
446
+ return response.output
447
+
448
+ def delete_function_concurrency(
449
+ self,
450
+ function_name: "capo_lambda.types.function_name.FunctionName",
451
+ *,
452
+ config_overrides: Optional[LambdaClientConfig] = None,
453
+ ) -> None:
454
+ r"""<p>Removes a concurrent execution limit from a function.</p>
455
+
456
+ Args:
457
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
458
+
459
+ Raises:
460
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
461
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
462
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
463
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
464
+ 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>
465
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
466
+
467
+ Examples:
468
+ To remove the reserved concurrent execution limit from a function
469
+ The following example deletes the reserved concurrent execution limit from a function named my-function.
470
+
471
+ >>> client.delete_function_concurrency(function_name='my-function')
472
+ """
473
+
474
+ def _handler(
475
+ req: "OperationRequest[capo_lambda.types.delete_function_concurrency_request.DeleteFunctionConcurrencyRequest]",
476
+ ) -> OperationResponse[None]:
477
+ import capo_lambda._operations.aws_gir_api_service.delete_function_concurrency
478
+
479
+ output, http_response = (
480
+ capo_lambda._operations.aws_gir_api_service.delete_function_concurrency.delete_function_concurrency(
481
+ req.options, req.input
482
+ )
483
+ )
484
+ return OperationResponse(output=output, response=http_response)
485
+
486
+ interceptors_, options_ = self._service.operation_options(config_overrides)
487
+ input_: capo_lambda.types.delete_function_concurrency_request.DeleteFunctionConcurrencyRequest = {} # type: ignore[typeddict-item]
488
+ input_["function_name"] = function_name
489
+
490
+ response = execute_pipeline(
491
+ OperationRequest(input=input_, options=options_),
492
+ handler=_handler,
493
+ interceptors=list(interceptors_),
494
+ )
495
+ return response.output
496
+
497
+ def delete_function_url_config(
498
+ self,
499
+ function_name: "capo_lambda.types.function_name.FunctionName",
500
+ *,
501
+ config_overrides: Optional[LambdaClientConfig] = None,
502
+ qualifier: Optional[
503
+ "capo_lambda.types.function_url_qualifier.FunctionUrlQualifier"
504
+ ] = None,
505
+ ) -> None:
506
+ r"""<p>Deletes a Lambda function URL. When you delete a function URL, you can't recover it. Creating a new function URL results in a different URL address.</p>
507
+
508
+ Args:
509
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
510
+ qualifier: <p>The alias name.</p>
511
+
512
+ Raises:
513
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
514
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
515
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
516
+ 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>
517
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
518
+ """
519
+
520
+ def _handler(
521
+ req: "OperationRequest[capo_lambda.types.delete_function_url_config_request.DeleteFunctionUrlConfigRequest]",
522
+ ) -> OperationResponse[None]:
523
+ import capo_lambda._operations.aws_gir_api_service.delete_function_url_config
524
+
525
+ output, http_response = (
526
+ capo_lambda._operations.aws_gir_api_service.delete_function_url_config.delete_function_url_config(
527
+ req.options, req.input
528
+ )
529
+ )
530
+ return OperationResponse(output=output, response=http_response)
531
+
532
+ interceptors_, options_ = self._service.operation_options(config_overrides)
533
+ input_: capo_lambda.types.delete_function_url_config_request.DeleteFunctionUrlConfigRequest = {} # type: ignore[typeddict-item]
534
+ input_["function_name"] = function_name
535
+ if qualifier is not None:
536
+ input_["qualifier"] = qualifier
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 get_function_concurrency(
546
+ self,
547
+ function_name: "capo_lambda.types.function_name.FunctionName",
548
+ *,
549
+ config_overrides: Optional[LambdaClientConfig] = None,
550
+ ) -> "capo_lambda.types.get_function_concurrency_response.GetFunctionConcurrencyResponse":
551
+ r"""<p>Returns details about the reserved concurrency configuration for a function. To set a concurrency limit for a function, use <a>PutFunctionConcurrency</a>.</p>
552
+
553
+ Args:
554
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
555
+
556
+ Raises:
557
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
558
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
559
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
560
+ 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>
561
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
562
+
563
+ Examples:
564
+ To get the reserved concurrency setting for a function
565
+ The following example returns the reserved concurrency setting for a function named my-function.
566
+
567
+ >>> client.get_function_concurrency(function_name='my-function')
568
+ """
569
+
570
+ def _handler(
571
+ req: "OperationRequest[capo_lambda.types.get_function_concurrency_request.GetFunctionConcurrencyRequest]",
572
+ ) -> OperationResponse[
573
+ "capo_lambda.types.get_function_concurrency_response.GetFunctionConcurrencyResponse"
574
+ ]:
575
+ import capo_lambda._operations.aws_gir_api_service.get_function_concurrency
576
+
577
+ output, http_response = (
578
+ capo_lambda._operations.aws_gir_api_service.get_function_concurrency.get_function_concurrency(
579
+ req.options, req.input
580
+ )
581
+ )
582
+ return OperationResponse(output=output, response=http_response)
583
+
584
+ interceptors_, options_ = self._service.operation_options(config_overrides)
585
+ input_: capo_lambda.types.get_function_concurrency_request.GetFunctionConcurrencyRequest = {} # type: ignore[typeddict-item]
586
+ input_["function_name"] = function_name
587
+
588
+ response = execute_pipeline(
589
+ OperationRequest(input=input_, options=options_),
590
+ handler=_handler,
591
+ interceptors=list(interceptors_),
592
+ )
593
+ return response.output
594
+
595
+ def get_function_url_config(
596
+ self,
597
+ function_name: "capo_lambda.types.function_name.FunctionName",
598
+ *,
599
+ config_overrides: Optional[LambdaClientConfig] = None,
600
+ qualifier: Optional[
601
+ "capo_lambda.types.function_url_qualifier.FunctionUrlQualifier"
602
+ ] = None,
603
+ ) -> "capo_lambda.types.get_function_url_config_response.GetFunctionUrlConfigResponse":
604
+ r"""<p>Returns details about a Lambda function URL.</p>
605
+
606
+ Args:
607
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
608
+ qualifier: <p>The alias name.</p>
609
+
610
+ Raises:
611
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
612
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
613
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
614
+ 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>
615
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
616
+ """
617
+
618
+ def _handler(
619
+ req: "OperationRequest[capo_lambda.types.get_function_url_config_request.GetFunctionUrlConfigRequest]",
620
+ ) -> OperationResponse[
621
+ "capo_lambda.types.get_function_url_config_response.GetFunctionUrlConfigResponse"
622
+ ]:
623
+ import capo_lambda._operations.aws_gir_api_service.get_function_url_config
624
+
625
+ output, http_response = (
626
+ capo_lambda._operations.aws_gir_api_service.get_function_url_config.get_function_url_config(
627
+ req.options, req.input
628
+ )
629
+ )
630
+ return OperationResponse(output=output, response=http_response)
631
+
632
+ interceptors_, options_ = self._service.operation_options(config_overrides)
633
+ input_: capo_lambda.types.get_function_url_config_request.GetFunctionUrlConfigRequest = {} # type: ignore[typeddict-item]
634
+ input_["function_name"] = function_name
635
+ if qualifier is not None:
636
+ input_["qualifier"] = qualifier
637
+
638
+ response = execute_pipeline(
639
+ OperationRequest(input=input_, options=options_),
640
+ handler=_handler,
641
+ interceptors=list(interceptors_),
642
+ )
643
+ return response.output
644
+
645
+ def list_function_url_configs(
646
+ self,
647
+ function_name: "capo_lambda.types.function_name.FunctionName",
648
+ *,
649
+ config_overrides: Optional[LambdaClientConfig] = None,
650
+ marker: Optional["capo_lambda.types.string.String"] = None,
651
+ max_items: Optional["capo_lambda.types.max_items.MaxItems"] = None,
652
+ ) -> "capo_lambda.types.list_function_url_configs_response.ListFunctionUrlConfigsResponse":
653
+ r"""<p>Returns a list of Lambda function URLs for the specified function.</p>
654
+
655
+ Args:
656
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
657
+ marker: <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
658
+ max_items: <p>The maximum number of function URLs to return in the response. Note that <code>ListFunctionUrlConfigs</code> returns a maximum of 50 items in each response, even if you set the number higher.</p>
659
+
660
+ Raises:
661
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
662
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
663
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
664
+ 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>
665
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
666
+ """
667
+
668
+ def _handler(
669
+ req: "OperationRequest[capo_lambda.types.list_function_url_configs_request.ListFunctionUrlConfigsRequest]",
670
+ ) -> OperationResponse[
671
+ "capo_lambda.types.list_function_url_configs_response.ListFunctionUrlConfigsResponse"
672
+ ]:
673
+ import capo_lambda._operations.aws_gir_api_service.list_function_url_configs
674
+
675
+ output, http_response = (
676
+ capo_lambda._operations.aws_gir_api_service.list_function_url_configs.list_function_url_configs(
677
+ req.options, req.input
678
+ )
679
+ )
680
+ return OperationResponse(output=output, response=http_response)
681
+
682
+ interceptors_, options_ = self._service.operation_options(config_overrides)
683
+ input_: capo_lambda.types.list_function_url_configs_request.ListFunctionUrlConfigsRequest = {} # type: ignore[typeddict-item]
684
+ input_["function_name"] = function_name
685
+ if marker is not None:
686
+ input_["marker"] = marker
687
+ if max_items is not None:
688
+ input_["max_items"] = max_items
689
+
690
+ response = execute_pipeline(
691
+ OperationRequest(input=input_, options=options_),
692
+ handler=_handler,
693
+ interceptors=list(interceptors_),
694
+ )
695
+ return response.output
696
+
697
+ def list_provisioned_concurrency_configs(
698
+ self,
699
+ function_name: "capo_lambda.types.function_name.FunctionName",
700
+ *,
701
+ config_overrides: Optional[LambdaClientConfig] = None,
702
+ marker: Optional["capo_lambda.types.string.String"] = None,
703
+ max_items: Optional[
704
+ "capo_lambda.types.max_provisioned_concurrency_config_list_items.MaxProvisionedConcurrencyConfigListItems"
705
+ ] = None,
706
+ ) -> "capo_lambda.types.list_provisioned_concurrency_configs_response.ListProvisionedConcurrencyConfigsResponse":
707
+ r"""<p>Retrieves a list of provisioned concurrency configurations for a function.</p>
708
+
709
+ Args:
710
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
711
+ marker: <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
712
+ max_items: <p>Specify a number to limit the number of configurations returned.</p>
713
+
714
+ Raises:
715
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
716
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
717
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
718
+ 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>
719
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
720
+
721
+ Examples:
722
+ To get a list of provisioned concurrency configurations
723
+ The following example returns a list of provisioned concurrency configurations for a function named my-function.
724
+
725
+ >>> client.list_provisioned_concurrency_configs(function_name='my-function')
726
+ """
727
+
728
+ def _handler(
729
+ req: "OperationRequest[capo_lambda.types.list_provisioned_concurrency_configs_request.ListProvisionedConcurrencyConfigsRequest]",
730
+ ) -> OperationResponse[
731
+ "capo_lambda.types.list_provisioned_concurrency_configs_response.ListProvisionedConcurrencyConfigsResponse"
732
+ ]:
733
+ import capo_lambda._operations.aws_gir_api_service.list_provisioned_concurrency_configs
734
+
735
+ output, http_response = (
736
+ capo_lambda._operations.aws_gir_api_service.list_provisioned_concurrency_configs.list_provisioned_concurrency_configs(
737
+ req.options, req.input
738
+ )
739
+ )
740
+ return OperationResponse(output=output, response=http_response)
741
+
742
+ interceptors_, options_ = self._service.operation_options(config_overrides)
743
+ input_: capo_lambda.types.list_provisioned_concurrency_configs_request.ListProvisionedConcurrencyConfigsRequest = {} # type: ignore[typeddict-item]
744
+ input_["function_name"] = function_name
745
+ if marker is not None:
746
+ input_["marker"] = marker
747
+ if max_items is not None:
748
+ input_["max_items"] = max_items
749
+
750
+ response = execute_pipeline(
751
+ OperationRequest(input=input_, options=options_),
752
+ handler=_handler,
753
+ interceptors=list(interceptors_),
754
+ )
755
+ return response.output
756
+
757
+ def put_function_concurrency(
758
+ self,
759
+ function_name: "capo_lambda.types.function_name.FunctionName",
760
+ reserved_concurrent_executions: "capo_lambda.types.reserved_concurrent_executions.ReservedConcurrentExecutions",
761
+ *,
762
+ config_overrides: Optional[LambdaClientConfig] = None,
763
+ ) -> "capo_lambda.types.concurrency.Concurrency":
764
+ r"""<p>Sets the maximum number of simultaneous executions for a function, and reserves capacity for that concurrency level.</p> <p>Concurrency settings apply to the function as a whole, including all published versions and the unpublished version. Reserving concurrency both ensures that your function has capacity to process the specified number of events simultaneously, and prevents it from scaling beyond that level. Use <a>GetFunction</a> to see the current setting for a function.</p> <p>Use <a>GetAccountSettings</a> to see your Regional concurrency limit. You can reserve concurrency for as many functions as you like, as long as you leave at least 100 simultaneous executions unreserved for functions that aren't configured with a per-function limit. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-scaling.html\">Lambda function scaling</a>.</p>
765
+
766
+ Args:
767
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
768
+ reserved_concurrent_executions: <p>The number of simultaneous executions to reserve for the function.</p>
769
+
770
+ Raises:
771
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
772
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
773
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
774
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
775
+ 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>
776
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
777
+
778
+ Examples:
779
+ To configure a reserved concurrency limit for a function
780
+ The following example configures 100 reserved concurrent executions for the my-function function.
781
+
782
+ >>> client.put_function_concurrency(function_name='my-function', reserved_concurrent_executions=100)
783
+ """
784
+
785
+ def _handler(
786
+ req: "OperationRequest[capo_lambda.types.put_function_concurrency_request.PutFunctionConcurrencyRequest]",
787
+ ) -> OperationResponse["capo_lambda.types.concurrency.Concurrency"]:
788
+ import capo_lambda._operations.aws_gir_api_service.put_function_concurrency
789
+
790
+ output, http_response = (
791
+ capo_lambda._operations.aws_gir_api_service.put_function_concurrency.put_function_concurrency(
792
+ req.options, req.input
793
+ )
794
+ )
795
+ return OperationResponse(output=output, response=http_response)
796
+
797
+ interceptors_, options_ = self._service.operation_options(config_overrides)
798
+ input_: capo_lambda.types.put_function_concurrency_request.PutFunctionConcurrencyRequest = {} # type: ignore[typeddict-item]
799
+ input_["function_name"] = function_name
800
+ input_["reserved_concurrent_executions"] = reserved_concurrent_executions
801
+
802
+ response = execute_pipeline(
803
+ OperationRequest(input=input_, options=options_),
804
+ handler=_handler,
805
+ interceptors=list(interceptors_),
806
+ )
807
+ return response.output
808
+
809
+ def update_function_code(
810
+ self,
811
+ function_name: "capo_lambda.types.function_name.FunctionName",
812
+ *,
813
+ config_overrides: Optional[LambdaClientConfig] = None,
814
+ zip_file: Optional["capo_lambda.types.blob.Blob"] = None,
815
+ s3_bucket: Optional["capo_lambda.types.s3_bucket.S3Bucket"] = None,
816
+ s3_key: Optional["capo_lambda.types.s3_key.S3Key"] = None,
817
+ s3_object_version: Optional[
818
+ "capo_lambda.types.s3_object_version.S3ObjectVersion"
819
+ ] = None,
820
+ image_uri: Optional["capo_lambda.types.string.String"] = None,
821
+ publish: Optional["capo_lambda.types.boolean.Boolean"] = None,
822
+ dry_run: Optional["capo_lambda.types.boolean.Boolean"] = None,
823
+ revision_id: Optional["capo_lambda.types.string.String"] = None,
824
+ architectures: Optional[
825
+ "capo_lambda.types.architectures_list.ArchitecturesList"
826
+ ] = None,
827
+ source_kms_key_arn: Optional["capo_lambda.types.kms_key_arn.KMSKeyArn"] = None,
828
+ publish_to: Optional[
829
+ "capo_lambda.types.function_version_latest_published.FunctionVersionLatestPublished"
830
+ ] = None,
831
+ ) -> "capo_lambda.types.function_configuration.FunctionConfiguration":
832
+ r"""<p>Updates a Lambda function's code. If code signing is enabled for the function, the code package must be signed by a trusted publisher. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html\">Configuring code signing for Lambda</a>.</p> <p>If the function's package type is <code>Image</code>, then you must specify the code package in <code>ImageUri</code> as the URI of a <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html\">container image</a> in the Amazon ECR registry.</p> <p>If the function's package type is <code>Zip</code>, then you must specify the deployment package as a <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html#gettingstarted-package-zip\">.zip file archive</a>. Enter the Amazon S3 bucket and key of the code .zip file location. You can also provide the function code inline using the <code>ZipFile</code> field.</p> <p>The code in the deployment package must be compatible with the target instruction set architecture of the function (<code>x86-64</code> or <code>arm64</code>).</p> <p>The function's code is locked when you publish a version. You can't modify the code of a published version, only the unpublished version.</p> <note> <p>For a function defined as a container image, Lambda resolves the image tag to an image digest. In Amazon ECR, if you update the image tag to a new image, Lambda does not automatically update the function.</p> </note>
833
+
834
+ Args:
835
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
836
+ zip_file: <p>The base64-encoded contents of the deployment package. Amazon Web Services SDK and CLI clients handle the encoding for you. Use only with a function defined with a .zip file archive deployment package.</p>
837
+ s3_bucket: <p>An Amazon S3 bucket in the same Amazon Web Services Region as your function. The bucket can be in a different Amazon Web Services account. Use only with a function defined with a .zip file archive deployment package.</p>
838
+ s3_key: <p>The Amazon S3 key of the deployment package. Use only with a function defined with a .zip file archive deployment package.</p>
839
+ s3_object_version: <p>For versioned objects, the version of the deployment package object to use.</p>
840
+ image_uri: <p>URI of a container image in the Amazon ECR registry. Do not use for a function defined with a .zip file archive.</p>
841
+ publish: <p>Set to true to publish a new version of the function after updating the code. This has the same effect as calling <a>PublishVersion</a> separately.</p>
842
+ dry_run: <p>Set to true to validate the request parameters and access permissions without modifying the function code.</p>
843
+ revision_id: <p>Update the function only if the revision ID matches the ID that's specified. Use this option to avoid modifying a function that has changed since you last read it.</p>
844
+ architectures: <p>The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is <code>x86_64</code>.</p>
845
+ source_kms_key_arn: <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt your function's .zip deployment package. If you don't provide a customer managed key, Lambda uses an Amazon Web Services managed key.</p>
846
+ publish_to: <p>Specifies where to publish the function version or configuration.</p>
847
+
848
+ Raises:
849
+ capo_lambda.errors.code_signing_config_not_found_exception.CodeSigningConfigNotFoundException: <p>The specified code signing configuration does not exist.</p>
850
+ capo_lambda.errors.code_storage_exceeded_exception.CodeStorageExceededException: <p>Your Amazon Web Services account has exceeded its maximum total code size. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html\">Lambda quotas</a>.</p>
851
+ capo_lambda.errors.code_verification_failed_exception.CodeVerificationFailedException: <p>The code signature failed one or more of the validation checks for signature mismatch or expiry, and the code signing policy is set to ENFORCE. Lambda blocks the deployment.</p>
852
+ capo_lambda.errors.invalid_code_signature_exception.InvalidCodeSignatureException: <p>The code signature failed the integrity check. If the integrity check fails, then Lambda blocks deployment, even if the code signing policy is set to WARN.</p>
853
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
854
+ capo_lambda.errors.precondition_failed_exception.PreconditionFailedException: <p>The RevisionId provided does not match the latest RevisionId for the Lambda function or alias.</p> <ul> <li> <p> <b>For AddPermission and RemovePermission API operations:</b> Call <code>GetPolicy</code> to retrieve the latest RevisionId for your resource.</p> </li> <li> <p> <b>For all other API operations:</b> Call <code>GetFunction</code> or <code>GetAlias</code> to retrieve the latest RevisionId for your resource.</p> </li> </ul>
855
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
856
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
857
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
858
+ 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>
859
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
860
+
861
+ Examples:
862
+ To update a Lambda function's code
863
+ The following example replaces the code of the unpublished ($LATEST) version of a function named my-function with the contents of the specified zip file in Amazon S3.
864
+
865
+ >>> client.update_function_code(function_name='my-function', s3_bucket='my-bucket-1xpuxmplzrlbh', s3_key='function.zip')
866
+ """
867
+
868
+ def _handler(
869
+ req: "OperationRequest[capo_lambda.types.update_function_code_request.UpdateFunctionCodeRequest]",
870
+ ) -> OperationResponse[
871
+ "capo_lambda.types.function_configuration.FunctionConfiguration"
872
+ ]:
873
+ import capo_lambda._operations.aws_gir_api_service.update_function_code
874
+
875
+ output, http_response = (
876
+ capo_lambda._operations.aws_gir_api_service.update_function_code.update_function_code(
877
+ req.options, req.input
878
+ )
879
+ )
880
+ return OperationResponse(output=output, response=http_response)
881
+
882
+ interceptors_, options_ = self._service.operation_options(config_overrides)
883
+ input_: capo_lambda.types.update_function_code_request.UpdateFunctionCodeRequest = {} # type: ignore[typeddict-item]
884
+ input_["function_name"] = function_name
885
+ if zip_file is not None:
886
+ input_["zip_file"] = zip_file
887
+ if s3_bucket is not None:
888
+ input_["s3_bucket"] = s3_bucket
889
+ if s3_key is not None:
890
+ input_["s3_key"] = s3_key
891
+ if s3_object_version is not None:
892
+ input_["s3_object_version"] = s3_object_version
893
+ if image_uri is not None:
894
+ input_["image_uri"] = image_uri
895
+ if publish is not None:
896
+ input_["publish"] = publish
897
+ if dry_run is not None:
898
+ input_["dry_run"] = dry_run
899
+ if revision_id is not None:
900
+ input_["revision_id"] = revision_id
901
+ if architectures is not None:
902
+ input_["architectures"] = architectures
903
+ if source_kms_key_arn is not None:
904
+ input_["source_kms_key_arn"] = source_kms_key_arn
905
+ if publish_to is not None:
906
+ input_["publish_to"] = publish_to
907
+
908
+ response = execute_pipeline(
909
+ OperationRequest(input=input_, options=options_),
910
+ handler=_handler,
911
+ interceptors=list(interceptors_),
912
+ )
913
+ return response.output
914
+
915
+ def update_function_configuration(
916
+ self,
917
+ function_name: "capo_lambda.types.function_name.FunctionName",
918
+ *,
919
+ config_overrides: Optional[LambdaClientConfig] = None,
920
+ role: Optional["capo_lambda.types.role_arn.RoleArn"] = None,
921
+ handler: Optional["capo_lambda.types.handler.Handler"] = None,
922
+ description: Optional["capo_lambda.types.description.Description"] = None,
923
+ timeout: Optional["capo_lambda.types.timeout.Timeout"] = None,
924
+ memory_size: Optional["capo_lambda.types.memory_size.MemorySize"] = None,
925
+ vpc_config: Optional["capo_lambda.types.vpc_config.VpcConfig"] = None,
926
+ environment: Optional["capo_lambda.types.environment.Environment"] = None,
927
+ runtime: Optional["capo_lambda.types.runtime.Runtime"] = None,
928
+ dead_letter_config: Optional[
929
+ "capo_lambda.types.dead_letter_config.DeadLetterConfig"
930
+ ] = None,
931
+ kms_key_arn: Optional["capo_lambda.types.kms_key_arn.KMSKeyArn"] = None,
932
+ tracing_config: Optional[
933
+ "capo_lambda.types.tracing_config.TracingConfig"
934
+ ] = None,
935
+ revision_id: Optional["capo_lambda.types.string.String"] = None,
936
+ layers: Optional["capo_lambda.types.layer_list.LayerList"] = None,
937
+ file_system_configs: Optional[
938
+ "capo_lambda.types.file_system_config_list.FileSystemConfigList"
939
+ ] = None,
940
+ image_config: Optional["capo_lambda.types.image_config.ImageConfig"] = None,
941
+ ephemeral_storage: Optional[
942
+ "capo_lambda.types.ephemeral_storage.EphemeralStorage"
943
+ ] = None,
944
+ snap_start: Optional["capo_lambda.types.snap_start.SnapStart"] = None,
945
+ logging_config: Optional[
946
+ "capo_lambda.types.logging_config.LoggingConfig"
947
+ ] = None,
948
+ capacity_provider_config: Optional[
949
+ "capo_lambda.types.capacity_provider_config.CapacityProviderConfig"
950
+ ] = None,
951
+ durable_config: Optional[
952
+ "capo_lambda.types.durable_config.DurableConfig"
953
+ ] = None,
954
+ ) -> "capo_lambda.types.function_configuration.FunctionConfiguration":
955
+ r"""<p>Modify the version-specific settings of a Lambda function.</p> <p>When you update a function, Lambda provisions an instance of the function and its supporting resources. If your function connects to a VPC, this process can take a minute. During this time, you can't modify the function, but you can still invoke it. The <code>LastUpdateStatus</code>, <code>LastUpdateStatusReason</code>, and <code>LastUpdateStatusReasonCode</code> fields in the response from <a>GetFunctionConfiguration</a> indicate when the update is complete and the function is processing events with the new configuration. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html\">Lambda function states</a>.</p> <p>These settings can vary between versions of a function and are locked when you publish a version. You can't modify the configuration of a published version, only the unpublished version.</p> <p>To configure function concurrency, use <a>PutFunctionConcurrency</a>. To grant invoke permissions to an Amazon Web Services account or Amazon Web Services service, use <a>AddPermission</a>.</p>
956
+
957
+ Args:
958
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
959
+ role: <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
960
+ handler: <p>The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html\">Lambda programming model</a>.</p>
961
+ description: <p>A description of the function.</p>
962
+ timeout: <p>The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html\">Lambda execution environment</a>.</p>
963
+ memory_size: <p>The amount of <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console\">memory available to the function</a> at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB.</p>
964
+ vpc_config: <p>For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html\">Configuring a Lambda function to access resources in a VPC</a>.</p>
965
+ environment: <p>Environment variables that are accessible from function code during execution.</p>
966
+ runtime: <p>The identifier of the function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html\"> runtime</a>. Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.</p> <p>The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing functions shortly after each runtime is deprecated. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels\">Runtime use after deprecation</a>.</p> <p>For a list of all currently supported runtimes, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported\">Supported runtimes</a>.</p>
967
+ dead_letter_config: <p>A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq\">Dead-letter queues</a>.</p>
968
+ kms_key_arn: <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p> <ul> <li> <p>The function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption\">environment variables</a>.</p> </li> <li> <p>The function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html\">Lambda SnapStart</a> snapshots.</p> </li> <li> <p>When used with <code>SourceKMSKeyArn</code>, the unzipped version of the .zip deployment package that's used for function invocations. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption\"> Specifying a customer managed key for Lambda</a>.</p> </li> <li> <p>The optimized version of the container image that's used for function invocations. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle\">Function lifecycle</a>.</p> </li> </ul> <p>If you don't provide a customer managed key, Lambda uses an <a href=\"https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk\">Amazon Web Services owned key</a> or an <a href=\"https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk\">Amazon Web Services managed key</a>.</p>
969
+ tracing_config: <p>Set <code>Mode</code> to <code>Active</code> to sample and trace a subset of incoming requests with <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html\">X-Ray</a>.</p>
970
+ revision_id: <p>Update the function only if the revision ID matches the ID that's specified. Use this option to avoid modifying a function that has changed since you last read it.</p>
971
+ layers: <p>A list of <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html\">function layers</a> to add to the function's execution environment. Specify each layer by its ARN, including the version.</p>
972
+ file_system_configs: <p>Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.</p>
973
+ image_config: <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms\">Container image configuration values</a> that override the values in the container image Docker file.</p>
974
+ ephemeral_storage: <p>The size of the function's <code>/tmp</code> directory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage\">Configuring ephemeral storage (console)</a>.</p>
975
+ snap_start: <p>The function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html\">SnapStart</a> setting.</p>
976
+ logging_config: <p>The function's Amazon CloudWatch Logs configuration settings.</p>
977
+ capacity_provider_config: <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
978
+ durable_config: <p>Configuration settings for durable functions. Allows updating execution timeout and retention period for functions with durability enabled.</p>
979
+
980
+ Raises:
981
+ capo_lambda.errors.code_signing_config_not_found_exception.CodeSigningConfigNotFoundException: <p>The specified code signing configuration does not exist.</p>
982
+ capo_lambda.errors.code_verification_failed_exception.CodeVerificationFailedException: <p>The code signature failed one or more of the validation checks for signature mismatch or expiry, and the code signing policy is set to ENFORCE. Lambda blocks the deployment.</p>
983
+ capo_lambda.errors.invalid_code_signature_exception.InvalidCodeSignatureException: <p>The code signature failed the integrity check. If the integrity check fails, then Lambda blocks deployment, even if the code signing policy is set to WARN.</p>
984
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
985
+ capo_lambda.errors.precondition_failed_exception.PreconditionFailedException: <p>The RevisionId provided does not match the latest RevisionId for the Lambda function or alias.</p> <ul> <li> <p> <b>For AddPermission and RemovePermission API operations:</b> Call <code>GetPolicy</code> to retrieve the latest RevisionId for your resource.</p> </li> <li> <p> <b>For all other API operations:</b> Call <code>GetFunction</code> or <code>GetAlias</code> to retrieve the latest RevisionId for your resource.</p> </li> </ul>
986
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
987
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
988
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
989
+ 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>
990
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
991
+
992
+ Examples:
993
+ To update a Lambda function's configuration
994
+ The following example modifies the memory size to be 256 MB for the unpublished ($LATEST) version of a function named my-function.
995
+
996
+ >>> client.update_function_configuration(function_name='my-function', memory_size=256, durable_config={'ExecutionTimeout': 3600, 'RetentionPeriodInDays': 45})
997
+ """
998
+
999
+ def _handler(
1000
+ req: "OperationRequest[capo_lambda.types.update_function_configuration_request.UpdateFunctionConfigurationRequest]",
1001
+ ) -> OperationResponse[
1002
+ "capo_lambda.types.function_configuration.FunctionConfiguration"
1003
+ ]:
1004
+ import capo_lambda._operations.aws_gir_api_service.update_function_configuration
1005
+
1006
+ output, http_response = (
1007
+ capo_lambda._operations.aws_gir_api_service.update_function_configuration.update_function_configuration(
1008
+ req.options, req.input
1009
+ )
1010
+ )
1011
+ return OperationResponse(output=output, response=http_response)
1012
+
1013
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1014
+ input_: capo_lambda.types.update_function_configuration_request.UpdateFunctionConfigurationRequest = {} # type: ignore[typeddict-item]
1015
+ input_["function_name"] = function_name
1016
+ if role is not None:
1017
+ input_["role"] = role
1018
+ if handler is not None:
1019
+ input_["handler"] = handler
1020
+ if description is not None:
1021
+ input_["description"] = description
1022
+ if timeout is not None:
1023
+ input_["timeout"] = timeout
1024
+ if memory_size is not None:
1025
+ input_["memory_size"] = memory_size
1026
+ if vpc_config is not None:
1027
+ input_["vpc_config"] = vpc_config
1028
+ if environment is not None:
1029
+ input_["environment"] = environment
1030
+ if runtime is not None:
1031
+ input_["runtime"] = runtime
1032
+ if dead_letter_config is not None:
1033
+ input_["dead_letter_config"] = dead_letter_config
1034
+ if kms_key_arn is not None:
1035
+ input_["kms_key_arn"] = kms_key_arn
1036
+ if tracing_config is not None:
1037
+ input_["tracing_config"] = tracing_config
1038
+ if revision_id is not None:
1039
+ input_["revision_id"] = revision_id
1040
+ if layers is not None:
1041
+ input_["layers"] = layers
1042
+ if file_system_configs is not None:
1043
+ input_["file_system_configs"] = file_system_configs
1044
+ if image_config is not None:
1045
+ input_["image_config"] = image_config
1046
+ if ephemeral_storage is not None:
1047
+ input_["ephemeral_storage"] = ephemeral_storage
1048
+ if snap_start is not None:
1049
+ input_["snap_start"] = snap_start
1050
+ if logging_config is not None:
1051
+ input_["logging_config"] = logging_config
1052
+ if capacity_provider_config is not None:
1053
+ input_["capacity_provider_config"] = capacity_provider_config
1054
+ if durable_config is not None:
1055
+ input_["durable_config"] = durable_config
1056
+
1057
+ response = execute_pipeline(
1058
+ OperationRequest(input=input_, options=options_),
1059
+ handler=_handler,
1060
+ interceptors=list(interceptors_),
1061
+ )
1062
+ return response.output
1063
+
1064
+ def update_function_url_config(
1065
+ self,
1066
+ function_name: "capo_lambda.types.function_name.FunctionName",
1067
+ *,
1068
+ config_overrides: Optional[LambdaClientConfig] = None,
1069
+ qualifier: Optional[
1070
+ "capo_lambda.types.function_url_qualifier.FunctionUrlQualifier"
1071
+ ] = None,
1072
+ auth_type: Optional[
1073
+ "capo_lambda.types.function_url_auth_type.FunctionUrlAuthType"
1074
+ ] = None,
1075
+ cors: Optional["capo_lambda.types.cors.Cors"] = None,
1076
+ invoke_mode: Optional["capo_lambda.types.invoke_mode.InvokeMode"] = None,
1077
+ ) -> "capo_lambda.types.update_function_url_config_response.UpdateFunctionUrlConfigResponse":
1078
+ r"""<p>Updates the configuration for a Lambda function URL.</p>
1079
+
1080
+ Args:
1081
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1082
+ qualifier: <p>The alias name.</p>
1083
+ auth_type: <p>The type of authentication that your function URL uses. Set to <code>AWS_IAM</code> if you want to restrict access to authenticated users only. Set to <code>NONE</code> if you want to bypass IAM authentication to create a public endpoint. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html\">Control access to Lambda function URLs</a>.</p>
1084
+ cors: <p>The <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS\">cross-origin resource sharing (CORS)</a> settings for your function URL.</p>
1085
+ invoke_mode: <p>Use one of the following options:</p> <ul> <li> <p> <code>BUFFERED</code> – This is the default option. Lambda invokes your function using the <code>Invoke</code> API operation. Invocation results are available when the payload is complete. The maximum payload size is 6 MB.</p> </li> <li> <p> <code>RESPONSE_STREAM</code> – Your function streams payload results as they become available. Lambda invokes your function using the <code>InvokeWithResponseStream</code> API operation. The maximum response payload size is 200 MB.</p> </li> </ul>
1086
+
1087
+ Raises:
1088
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
1089
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
1090
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
1091
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
1092
+ 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>
1093
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
1094
+ """
1095
+
1096
+ def _handler(
1097
+ req: "OperationRequest[capo_lambda.types.update_function_url_config_request.UpdateFunctionUrlConfigRequest]",
1098
+ ) -> OperationResponse[
1099
+ "capo_lambda.types.update_function_url_config_response.UpdateFunctionUrlConfigResponse"
1100
+ ]:
1101
+ import capo_lambda._operations.aws_gir_api_service.update_function_url_config
1102
+
1103
+ output, http_response = (
1104
+ capo_lambda._operations.aws_gir_api_service.update_function_url_config.update_function_url_config(
1105
+ req.options, req.input
1106
+ )
1107
+ )
1108
+ return OperationResponse(output=output, response=http_response)
1109
+
1110
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1111
+ input_: capo_lambda.types.update_function_url_config_request.UpdateFunctionUrlConfigRequest = {} # type: ignore[typeddict-item]
1112
+ input_["function_name"] = function_name
1113
+ if qualifier is not None:
1114
+ input_["qualifier"] = qualifier
1115
+ if auth_type is not None:
1116
+ input_["auth_type"] = auth_type
1117
+ if cors is not None:
1118
+ input_["cors"] = cors
1119
+ if invoke_mode is not None:
1120
+ input_["invoke_mode"] = invoke_mode
1121
+
1122
+ response = execute_pipeline(
1123
+ OperationRequest(input=input_, options=options_),
1124
+ handler=_handler,
1125
+ interceptors=list(interceptors_),
1126
+ )
1127
+ return response.output
1128
+
1129
+ def delete_function_code_signing_config(
1130
+ self,
1131
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
1132
+ *,
1133
+ config_overrides: Optional[LambdaClientConfig] = None,
1134
+ ) -> None:
1135
+ r"""<p>Removes the code signing configuration from the function.</p>
1136
+
1137
+ Args:
1138
+ 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>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 is limited to 64 characters in length.</p>
1139
+
1140
+ Raises:
1141
+ capo_lambda.errors.code_signing_config_not_found_exception.CodeSigningConfigNotFoundException: <p>The specified code signing configuration does not exist.</p>
1142
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
1143
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
1144
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
1145
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
1146
+ 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>
1147
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
1148
+ """
1149
+
1150
+ def _handler(
1151
+ req: "OperationRequest[capo_lambda.types.delete_function_code_signing_config_request.DeleteFunctionCodeSigningConfigRequest]",
1152
+ ) -> OperationResponse[None]:
1153
+ import capo_lambda._operations.aws_gir_api_service.delete_function_code_signing_config
1154
+
1155
+ output, http_response = (
1156
+ capo_lambda._operations.aws_gir_api_service.delete_function_code_signing_config.delete_function_code_signing_config(
1157
+ req.options, req.input
1158
+ )
1159
+ )
1160
+ return OperationResponse(output=output, response=http_response)
1161
+
1162
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1163
+ input_: capo_lambda.types.delete_function_code_signing_config_request.DeleteFunctionCodeSigningConfigRequest = {} # type: ignore[typeddict-item]
1164
+ input_["function_name"] = function_name
1165
+
1166
+ response = execute_pipeline(
1167
+ OperationRequest(input=input_, options=options_),
1168
+ handler=_handler,
1169
+ interceptors=list(interceptors_),
1170
+ )
1171
+ return response.output
1172
+
1173
+ def get_function(
1174
+ self,
1175
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
1176
+ *,
1177
+ config_overrides: Optional[LambdaClientConfig] = None,
1178
+ qualifier: Optional[
1179
+ "capo_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
1180
+ ] = None,
1181
+ ) -> "capo_lambda.types.get_function_response.GetFunctionResponse":
1182
+ r"""<p>Returns information about the function or function version, with a link to download the deployment package that's valid for 10 minutes. If you specify a function version, only details that are specific to that version are returned.</p>
1183
+
1184
+ Args:
1185
+ function_name: <p>The name or ARN of the Lambda function, version, or alias.</p> <p class=\"title\"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> – <code>my-function</code> (name-only), <code>my-function:v1</code> (with alias).</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1186
+ qualifier: <p>Specify a version or alias to get details about a published version of the function.</p>
1187
+
1188
+ Raises:
1189
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
1190
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
1191
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
1192
+ 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>
1193
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
1194
+
1195
+ Examples:
1196
+ To get a Lambda function
1197
+ The following example returns code and configuration details for version 1 of a function named my-function.
1198
+
1199
+ >>> client.get_function(function_name='my-function', qualifier='1')
1200
+ """
1201
+
1202
+ def _handler(
1203
+ req: "OperationRequest[capo_lambda.types.get_function_request.GetFunctionRequest]",
1204
+ ) -> OperationResponse[
1205
+ "capo_lambda.types.get_function_response.GetFunctionResponse"
1206
+ ]:
1207
+ import capo_lambda._operations.aws_gir_api_service.get_function
1208
+
1209
+ output, http_response = (
1210
+ capo_lambda._operations.aws_gir_api_service.get_function.get_function(
1211
+ req.options, req.input
1212
+ )
1213
+ )
1214
+ return OperationResponse(output=output, response=http_response)
1215
+
1216
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1217
+ input_: capo_lambda.types.get_function_request.GetFunctionRequest = {} # type: ignore[typeddict-item]
1218
+ input_["function_name"] = function_name
1219
+ if qualifier is not None:
1220
+ input_["qualifier"] = qualifier
1221
+
1222
+ response = execute_pipeline(
1223
+ OperationRequest(input=input_, options=options_),
1224
+ handler=_handler,
1225
+ interceptors=list(interceptors_),
1226
+ )
1227
+ return response.output
1228
+
1229
+ def get_function_code_signing_config(
1230
+ self,
1231
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
1232
+ *,
1233
+ config_overrides: Optional[LambdaClientConfig] = None,
1234
+ ) -> "capo_lambda.types.get_function_code_signing_config_response.GetFunctionCodeSigningConfigResponse":
1235
+ r"""<p>Returns the code signing configuration for the specified function.</p>
1236
+
1237
+ Args:
1238
+ 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>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 is limited to 64 characters in length.</p>
1239
+
1240
+ Raises:
1241
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
1242
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
1243
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
1244
+ 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>
1245
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
1246
+ """
1247
+
1248
+ def _handler(
1249
+ req: "OperationRequest[capo_lambda.types.get_function_code_signing_config_request.GetFunctionCodeSigningConfigRequest]",
1250
+ ) -> OperationResponse[
1251
+ "capo_lambda.types.get_function_code_signing_config_response.GetFunctionCodeSigningConfigResponse"
1252
+ ]:
1253
+ import capo_lambda._operations.aws_gir_api_service.get_function_code_signing_config
1254
+
1255
+ output, http_response = (
1256
+ capo_lambda._operations.aws_gir_api_service.get_function_code_signing_config.get_function_code_signing_config(
1257
+ req.options, req.input
1258
+ )
1259
+ )
1260
+ return OperationResponse(output=output, response=http_response)
1261
+
1262
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1263
+ input_: capo_lambda.types.get_function_code_signing_config_request.GetFunctionCodeSigningConfigRequest = {} # type: ignore[typeddict-item]
1264
+ input_["function_name"] = function_name
1265
+
1266
+ response = execute_pipeline(
1267
+ OperationRequest(input=input_, options=options_),
1268
+ handler=_handler,
1269
+ interceptors=list(interceptors_),
1270
+ )
1271
+ return response.output
1272
+
1273
+ def get_function_configuration(
1274
+ self,
1275
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
1276
+ *,
1277
+ config_overrides: Optional[LambdaClientConfig] = None,
1278
+ qualifier: Optional[
1279
+ "capo_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
1280
+ ] = None,
1281
+ ) -> "capo_lambda.types.function_configuration.FunctionConfiguration":
1282
+ r"""<p>Returns the version-specific settings of a Lambda function or version. The output includes only options that can vary between versions of a function. To modify these settings, use <a>UpdateFunctionConfiguration</a>.</p> <p>To get all of a function's details, including function-level settings, use <a>GetFunction</a>.</p>
1283
+
1284
+ Args:
1285
+ function_name: <p>The name or ARN of the Lambda function, version, or alias.</p> <p class=\"title\"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> – <code>my-function</code> (name-only), <code>my-function:v1</code> (with alias).</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1286
+ qualifier: <p>Specify a version or alias to get details about a published version of the function.</p>
1287
+
1288
+ Raises:
1289
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
1290
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
1291
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
1292
+ 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>
1293
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
1294
+
1295
+ Examples:
1296
+ To get a Lambda function's event source mapping
1297
+ The following example returns and configuration details for version 1 of a function named my-function.
1298
+
1299
+ >>> client.get_function_configuration(function_name='my-function', qualifier='1')
1300
+ """
1301
+
1302
+ def _handler(
1303
+ req: "OperationRequest[capo_lambda.types.get_function_configuration_request.GetFunctionConfigurationRequest]",
1304
+ ) -> OperationResponse[
1305
+ "capo_lambda.types.function_configuration.FunctionConfiguration"
1306
+ ]:
1307
+ import capo_lambda._operations.aws_gir_api_service.get_function_configuration
1308
+
1309
+ output, http_response = (
1310
+ capo_lambda._operations.aws_gir_api_service.get_function_configuration.get_function_configuration(
1311
+ req.options, req.input
1312
+ )
1313
+ )
1314
+ return OperationResponse(output=output, response=http_response)
1315
+
1316
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1317
+ input_: capo_lambda.types.get_function_configuration_request.GetFunctionConfigurationRequest = {} # type: ignore[typeddict-item]
1318
+ input_["function_name"] = function_name
1319
+ if qualifier is not None:
1320
+ input_["qualifier"] = qualifier
1321
+
1322
+ response = execute_pipeline(
1323
+ OperationRequest(input=input_, options=options_),
1324
+ handler=_handler,
1325
+ interceptors=list(interceptors_),
1326
+ )
1327
+ return response.output
1328
+
1329
+ def get_function_recursion_config(
1330
+ self,
1331
+ function_name: "capo_lambda.types.unqualified_function_name.UnqualifiedFunctionName",
1332
+ *,
1333
+ config_overrides: Optional[LambdaClientConfig] = None,
1334
+ ) -> "capo_lambda.types.get_function_recursion_config_response.GetFunctionRecursionConfigResponse":
1335
+ r"""<p>Returns your function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-recursion.html\">recursive loop detection</a> configuration. </p>
1336
+
1337
+ Args:
1338
+ function_name: <p>The name of the function.</p>
1339
+
1340
+ Raises:
1341
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
1342
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
1343
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
1344
+ 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>
1345
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
1346
+ """
1347
+
1348
+ def _handler(
1349
+ req: "OperationRequest[capo_lambda.types.get_function_recursion_config_request.GetFunctionRecursionConfigRequest]",
1350
+ ) -> OperationResponse[
1351
+ "capo_lambda.types.get_function_recursion_config_response.GetFunctionRecursionConfigResponse"
1352
+ ]:
1353
+ import capo_lambda._operations.aws_gir_api_service.get_function_recursion_config
1354
+
1355
+ output, http_response = (
1356
+ capo_lambda._operations.aws_gir_api_service.get_function_recursion_config.get_function_recursion_config(
1357
+ req.options, req.input
1358
+ )
1359
+ )
1360
+ return OperationResponse(output=output, response=http_response)
1361
+
1362
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1363
+ input_: capo_lambda.types.get_function_recursion_config_request.GetFunctionRecursionConfigRequest = {} # type: ignore[typeddict-item]
1364
+ input_["function_name"] = function_name
1365
+
1366
+ response = execute_pipeline(
1367
+ OperationRequest(input=input_, options=options_),
1368
+ handler=_handler,
1369
+ interceptors=list(interceptors_),
1370
+ )
1371
+ return response.output
1372
+
1373
+ def get_function_scaling_config(
1374
+ self,
1375
+ function_name: "capo_lambda.types.unqualified_function_name.UnqualifiedFunctionName",
1376
+ qualifier: "capo_lambda.types.published_function_qualifier.PublishedFunctionQualifier",
1377
+ *,
1378
+ config_overrides: Optional[LambdaClientConfig] = None,
1379
+ ) -> "capo_lambda.types.get_function_scaling_config_response.GetFunctionScalingConfigResponse":
1380
+ """<p>Retrieves the scaling configuration for a Lambda Managed Instances function.</p>
1381
+
1382
+ Args:
1383
+ function_name: <p>The name or ARN of the Lambda function.</p>
1384
+ qualifier: <p>Specify a version or alias to get the scaling configuration for a published version of the function.</p>
1385
+
1386
+ Raises:
1387
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
1388
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
1389
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
1390
+ 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>
1391
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
1392
+ """
1393
+
1394
+ def _handler(
1395
+ req: "OperationRequest[capo_lambda.types.get_function_scaling_config_request.GetFunctionScalingConfigRequest]",
1396
+ ) -> OperationResponse[
1397
+ "capo_lambda.types.get_function_scaling_config_response.GetFunctionScalingConfigResponse"
1398
+ ]:
1399
+ import capo_lambda._operations.aws_gir_api_service.get_function_scaling_config
1400
+
1401
+ output, http_response = (
1402
+ capo_lambda._operations.aws_gir_api_service.get_function_scaling_config.get_function_scaling_config(
1403
+ req.options, req.input
1404
+ )
1405
+ )
1406
+ return OperationResponse(output=output, response=http_response)
1407
+
1408
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1409
+ input_: capo_lambda.types.get_function_scaling_config_request.GetFunctionScalingConfigRequest = {} # type: ignore[typeddict-item]
1410
+ input_["function_name"] = function_name
1411
+ input_["qualifier"] = qualifier
1412
+
1413
+ response = execute_pipeline(
1414
+ OperationRequest(input=input_, options=options_),
1415
+ handler=_handler,
1416
+ interceptors=list(interceptors_),
1417
+ )
1418
+ return response.output
1419
+
1420
+ def get_policy(
1421
+ self,
1422
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
1423
+ *,
1424
+ config_overrides: Optional[LambdaClientConfig] = None,
1425
+ qualifier: Optional[
1426
+ "capo_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
1427
+ ] = None,
1428
+ ) -> "capo_lambda.types.get_policy_response.GetPolicyResponse":
1429
+ r"""<p>Returns the <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html\">resource-based IAM policy</a> for a function, version, or alias.</p>
1430
+
1431
+ Args:
1432
+ function_name: <p>The name or ARN of the Lambda function, version, or alias.</p> <p class=\"title\"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> – <code>my-function</code> (name-only), <code>my-function:v1</code> (with alias).</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1433
+ qualifier: <p>Specify a version or alias to get the policy for that resource.</p>
1434
+
1435
+ Raises:
1436
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
1437
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
1438
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
1439
+ 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>
1440
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
1441
+
1442
+ Examples:
1443
+ To retrieve a Lambda function policy
1444
+ The following example returns the resource-based policy for version 1 of a Lambda function named my-function.
1445
+
1446
+ >>> client.get_policy(function_name='my-function', qualifier='1')
1447
+ """
1448
+
1449
+ def _handler(
1450
+ req: "OperationRequest[capo_lambda.types.get_policy_request.GetPolicyRequest]",
1451
+ ) -> OperationResponse[
1452
+ "capo_lambda.types.get_policy_response.GetPolicyResponse"
1453
+ ]:
1454
+ import capo_lambda._operations.aws_gir_api_service.get_policy
1455
+
1456
+ output, http_response = (
1457
+ capo_lambda._operations.aws_gir_api_service.get_policy.get_policy(
1458
+ req.options, req.input
1459
+ )
1460
+ )
1461
+ return OperationResponse(output=output, response=http_response)
1462
+
1463
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1464
+ input_: capo_lambda.types.get_policy_request.GetPolicyRequest = {} # type: ignore[typeddict-item]
1465
+ input_["function_name"] = function_name
1466
+ if qualifier is not None:
1467
+ input_["qualifier"] = qualifier
1468
+
1469
+ response = execute_pipeline(
1470
+ OperationRequest(input=input_, options=options_),
1471
+ handler=_handler,
1472
+ interceptors=list(interceptors_),
1473
+ )
1474
+ return response.output
1475
+
1476
+ def get_runtime_management_config(
1477
+ self,
1478
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
1479
+ *,
1480
+ config_overrides: Optional[LambdaClientConfig] = None,
1481
+ qualifier: Optional[
1482
+ "capo_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
1483
+ ] = None,
1484
+ ) -> "capo_lambda.types.get_runtime_management_config_response.GetRuntimeManagementConfigResponse":
1485
+ r"""<p>Retrieves the runtime management configuration for a function's version. If the runtime update mode is <b>Manual</b>, this includes the ARN of the runtime version and the runtime update mode. If the runtime update mode is <b>Auto</b> or <b>Function update</b>, this includes the runtime update mode and <code>null</code> is returned for the ARN. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html\">Runtime updates</a>.</p>
1486
+
1487
+ Args:
1488
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1489
+ qualifier: <p>Specify a version of the function. This can be <code>$LATEST</code> or a published version number. If no value is specified, the configuration for the <code>$LATEST</code> version is returned.</p>
1490
+
1491
+ Raises:
1492
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
1493
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
1494
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
1495
+ 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>
1496
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
1497
+ """
1498
+
1499
+ def _handler(
1500
+ req: "OperationRequest[capo_lambda.types.get_runtime_management_config_request.GetRuntimeManagementConfigRequest]",
1501
+ ) -> OperationResponse[
1502
+ "capo_lambda.types.get_runtime_management_config_response.GetRuntimeManagementConfigResponse"
1503
+ ]:
1504
+ import capo_lambda._operations.aws_gir_api_service.get_runtime_management_config
1505
+
1506
+ output, http_response = (
1507
+ capo_lambda._operations.aws_gir_api_service.get_runtime_management_config.get_runtime_management_config(
1508
+ req.options, req.input
1509
+ )
1510
+ )
1511
+ return OperationResponse(output=output, response=http_response)
1512
+
1513
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1514
+ input_: capo_lambda.types.get_runtime_management_config_request.GetRuntimeManagementConfigRequest = {} # type: ignore[typeddict-item]
1515
+ input_["function_name"] = function_name
1516
+ if qualifier is not None:
1517
+ input_["qualifier"] = qualifier
1518
+
1519
+ response = execute_pipeline(
1520
+ OperationRequest(input=input_, options=options_),
1521
+ handler=_handler,
1522
+ interceptors=list(interceptors_),
1523
+ )
1524
+ return response.output
1525
+
1526
+ def invoke(
1527
+ self,
1528
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
1529
+ *,
1530
+ config_overrides: Optional[LambdaClientConfig] = None,
1531
+ invocation_type: Optional[
1532
+ "capo_lambda.types.invocation_type.InvocationType"
1533
+ ] = None,
1534
+ log_type: Optional["capo_lambda.types.log_type.LogType"] = None,
1535
+ client_context: Optional["capo_lambda.types.string.String"] = None,
1536
+ durable_execution_name: Optional[
1537
+ "capo_lambda.types.durable_execution_name.DurableExecutionName"
1538
+ ] = None,
1539
+ payload: Optional["capo_lambda.types.blob.Blob"] = None,
1540
+ qualifier: Optional[
1541
+ "capo_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
1542
+ ] = None,
1543
+ tenant_id: Optional["capo_lambda.types.tenant_id.TenantId"] = None,
1544
+ ) -> "capo_lambda.types.invocation_response.InvocationResponse":
1545
+ r"""<p>Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. By default, Lambda invokes your function synchronously (i.e. the<code>InvocationType</code> is <code>RequestResponse</code>). To invoke a function asynchronously, set <code>InvocationType</code> to <code>Event</code>. Lambda passes the <code>ClientContext</code> object to your function for synchronous invocations only.</p> <p>For synchronous invocations, the maximum payload size is 6 MB. For asynchronous invocations, the maximum payload size is 1 MB.</p> <p>For <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-sync.html\">synchronous invocation</a>, details about the function response, including errors, are included in the response body and headers. For either invocation type, you can find more information in the <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions.html\">execution log</a> and <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html\">trace</a>.</p> <p>When an error occurs, your function may be invoked multiple times. Retry behavior varies by error type, client, event source, and invocation type. For example, if you invoke a function asynchronously and it returns an error, Lambda executes the function up to two more times. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-retries.html\">Error handling and automatic retries in Lambda</a>.</p> <p>For <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html\">asynchronous invocation</a>, Lambda adds events to a queue before sending them to your function. If your function does not have enough capacity to keep up with the queue, events may be lost. Occasionally, your function may receive the same event multiple times, even if no error occurs. To retain events that were not processed, configure your function with a <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq\">dead-letter queue</a>.</p> <p>The status code in the API response doesn't reflect function errors. Error codes are reserved for errors that prevent your function from executing, such as permissions errors, <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html\">quota</a> errors, or issues with your function's code and configuration. For example, Lambda returns <code>TooManyRequestsException</code> if running the function would cause you to exceed a concurrency limit at either the account level (<code>ConcurrentInvocationLimitExceeded</code>) or function level (<code>ReservedFunctionConcurrentInvocationLimitExceeded</code>).</p> <p>For functions with a long timeout, your client might disconnect during synchronous invocation while it waits for a response. Configure your HTTP client, SDK, firewall, proxy, or operating system to allow for long connections with timeout or keep-alive settings.</p> <p>This operation requires permission for the <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awslambda.html\">lambda:InvokeFunction</a> action. For details on how to set up permissions for cross-account invocations, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html#permissions-resource-xaccountinvoke\">Granting function access to other accounts</a>.</p>
1546
+
1547
+ Args:
1548
+ function_name: <p>The name or ARN of the Lambda function, version, or alias.</p> <p class=\"title\"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> – <code>my-function</code> (name-only), <code>my-function:v1</code> (with alias).</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1549
+ invocation_type: <p>Choose from the following options.</p> <ul> <li> <p> <code>RequestResponse</code> (default) – Invoke the function synchronously. Keep the connection open until the function returns a response or times out. The API response includes the function response and additional data.</p> </li> <li> <p> <code>Event</code> – Invoke the function asynchronously. Send events that fail multiple times to the function's dead-letter queue (if one is configured). The API response only includes a status code.</p> </li> <li> <p> <code>DryRun</code> – Validate parameter values and verify that the user or role has permission to invoke the function.</p> </li> </ul>
1550
+ log_type: <p>Set to <code>Tail</code> to include the execution log in the response. Applies to synchronously invoked functions only.</p>
1551
+ client_context: <p>Up to 3,583 bytes of base64-encoded data about the invoking client to pass to the function in the context object. Lambda passes the <code>ClientContext</code> object to your function for synchronous invocations only.</p>
1552
+ durable_execution_name: <p>Optional unique name for the durable execution. When you start your special function, you can give it a unique name to identify this specific execution. It's like giving a nickname to a task.</p>
1553
+ payload: <p>The JSON that you want to provide to your Lambda function as input. The maximum payload size is 6 MB for synchronous invocations and 1 MB for asynchronous invocations.</p> <p>You can enter the JSON directly. For example, <code>--payload '{ \"key\": \"value\" }'</code>. You can also specify a file path. For example, <code>--payload file://payload.json</code>.</p>
1554
+ qualifier: <p>Specify a version or alias to invoke a published version of the function.</p>
1555
+ tenant_id: <p>The identifier of the tenant in a multi-tenant Lambda function.</p>
1556
+
1557
+ Raises:
1558
+ capo_lambda.errors.durable_execution_already_started_exception.DurableExecutionAlreadyStartedException: <p>The durable execution with the specified name has already been started. Each durable execution name must be unique within the function. Use a different name or check the status of the existing execution.</p>
1559
+ capo_lambda.errors.ec2_access_denied_exception.EC2AccessDeniedException: <p>Need additional permissions to configure VPC settings.</p>
1560
+ capo_lambda.errors.ec2_throttled_exception.EC2ThrottledException: <p>Amazon EC2 throttled Lambda during Lambda function initialization using the execution role provided for the function.</p>
1561
+ capo_lambda.errors.ec2_unexpected_exception.EC2UnexpectedException: <p>Lambda received an unexpected Amazon EC2 client exception while setting up for the Lambda function.</p>
1562
+ capo_lambda.errors.efsio_exception.EFSIOException: <p>An error occurred when reading from or writing to a connected file system.</p>
1563
+ capo_lambda.errors.efs_mount_connectivity_exception.EFSMountConnectivityException: <p>The Lambda function couldn't make a network connection to the configured file system.</p>
1564
+ capo_lambda.errors.efs_mount_failure_exception.EFSMountFailureException: <p>The Lambda function couldn't mount the configured file system due to a permission or configuration issue.</p>
1565
+ capo_lambda.errors.efs_mount_timeout_exception.EFSMountTimeoutException: <p>The Lambda function made a network connection to the configured file system, but the mount operation timed out.</p>
1566
+ capo_lambda.errors.eni_limit_reached_exception.ENILimitReachedException: <p>Lambda couldn't create an elastic network interface in the VPC, specified as part of Lambda function configuration, because the limit for network interfaces has been reached. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html\">Lambda quotas</a>.</p>
1567
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
1568
+ capo_lambda.errors.invalid_request_content_exception.InvalidRequestContentException: <p>The request body could not be parsed as JSON, or a request header is invalid. For example, the 'x-amzn-RequestId' header is not a valid UUID string.</p>
1569
+ capo_lambda.errors.invalid_runtime_exception.InvalidRuntimeException: <p>The runtime or runtime version specified is not supported.</p>
1570
+ capo_lambda.errors.invalid_security_group_id_exception.InvalidSecurityGroupIDException: <p>The security group ID provided in the Lambda function VPC configuration is not valid.</p>
1571
+ capo_lambda.errors.invalid_subnet_id_exception.InvalidSubnetIDException: <p>The subnet ID provided in the Lambda function VPC configuration is not valid.</p>
1572
+ capo_lambda.errors.invalid_zip_file_exception.InvalidZipFileException: <p>Lambda could not unzip the deployment package.</p>
1573
+ capo_lambda.errors.kms_access_denied_exception.KMSAccessDeniedException: <p>Lambda couldn't decrypt the environment variables because KMS access was denied. Check the Lambda function's KMS permissions.</p>
1574
+ capo_lambda.errors.kms_disabled_exception.KMSDisabledException: <p>Lambda couldn't decrypt the environment variables because the KMS key used is disabled. Check the Lambda function's KMS key settings.</p>
1575
+ capo_lambda.errors.kms_invalid_state_exception.KMSInvalidStateException: <p>Lambda couldn't decrypt the environment variables because the state of the KMS key used is not valid for Decrypt. Check the function's KMS key settings.</p>
1576
+ capo_lambda.errors.kms_not_found_exception.KMSNotFoundException: <p>Lambda couldn't decrypt the environment variables because the KMS key was not found. Check the function's KMS key settings.</p>
1577
+ capo_lambda.errors.no_published_version_exception.NoPublishedVersionException: <p>The function has no published versions available.</p>
1578
+ capo_lambda.errors.recursive_invocation_exception.RecursiveInvocationException: <p>Lambda has detected your function being invoked in a recursive loop with other Amazon Web Services resources and stopped your function's invocation.</p>
1579
+ capo_lambda.errors.request_too_large_exception.RequestTooLargeException: <p>The request payload exceeded the <code>Invoke</code> request body JSON input quota. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html\">Lambda quotas</a>.</p>
1580
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
1581
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
1582
+ capo_lambda.errors.resource_not_ready_exception.ResourceNotReadyException: <p>The function is inactive and its VPC connection is no longer available. Wait for the VPC connection to reestablish and try again.</p>
1583
+ capo_lambda.errors.s3_files_mount_connectivity_exception.S3FilesMountConnectivityException: <p>The Lambda function couldn't make a network connection to the configured S3 Files access point.</p>
1584
+ capo_lambda.errors.s3_files_mount_failure_exception.S3FilesMountFailureException: <p>The Lambda function couldn't mount the configured S3 Files access point due to a permission or configuration issue.</p>
1585
+ capo_lambda.errors.s3_files_mount_timeout_exception.S3FilesMountTimeoutException: <p>The Lambda function made a network connection to the configured S3 Files access point, but the mount operation timed out.</p>
1586
+ capo_lambda.errors.serialized_request_entity_too_large_exception.SerializedRequestEntityTooLargeException: <p>The request payload exceeded the maximum allowed size for serialized request entities.</p>
1587
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
1588
+ capo_lambda.errors.snap_start_exception.SnapStartException: <p>The <code>afterRestore()</code> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/snapstart-runtime-hooks.html\">runtime hook</a> encountered an error. For more information, check the Amazon CloudWatch logs.</p>
1589
+ capo_lambda.errors.snap_start_not_ready_exception.SnapStartNotReadyException: <p>Lambda is initializing your function. You can invoke the function when the <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html\">function state</a> becomes <code>Active</code>.</p>
1590
+ capo_lambda.errors.snap_start_timeout_exception.SnapStartTimeoutException: <p>Lambda couldn't restore the snapshot within the timeout limit.</p>
1591
+ capo_lambda.errors.subnet_ip_address_limit_reached_exception.SubnetIPAddressLimitReachedException: <p>Lambda couldn't set up VPC access for the Lambda function because one or more configured subnets has no available IP addresses.</p>
1592
+ 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>
1593
+ capo_lambda.errors.unsupported_media_type_exception.UnsupportedMediaTypeException: <p>The content type of the <code>Invoke</code> request body is not JSON.</p>
1594
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
1595
+
1596
+ Examples:
1597
+ To invoke a Lambda function
1598
+ The following example invokes version 1 of a function named my-function with an empty event payload.
1599
+
1600
+ >>> client.invoke(function_name='my-function', invocation_type='Event', durable_execution_name='myExecution', payload='{}', qualifier='1')
1601
+ To invoke a Lambda function asynchronously
1602
+ The following example invokes version 1 of a function named my-function asynchronously.
1603
+
1604
+ >>> client.invoke(function_name='my-function', payload='{}', invocation_type='Event', qualifier='1')
1605
+ """
1606
+
1607
+ def _handler(
1608
+ req: "OperationRequest[capo_lambda.types.invocation_request.InvocationRequest]",
1609
+ ) -> OperationResponse[
1610
+ "capo_lambda.types.invocation_response.InvocationResponse"
1611
+ ]:
1612
+ import capo_lambda._operations.aws_gir_api_service.invoke
1613
+
1614
+ output, http_response = (
1615
+ capo_lambda._operations.aws_gir_api_service.invoke.invoke(
1616
+ req.options, req.input
1617
+ )
1618
+ )
1619
+ return OperationResponse(output=output, response=http_response)
1620
+
1621
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1622
+ input_: capo_lambda.types.invocation_request.InvocationRequest = {} # type: ignore[typeddict-item]
1623
+ input_["function_name"] = function_name
1624
+ if invocation_type is not None:
1625
+ input_["invocation_type"] = invocation_type
1626
+ if log_type is not None:
1627
+ input_["log_type"] = log_type
1628
+ if client_context is not None:
1629
+ input_["client_context"] = client_context
1630
+ if durable_execution_name is not None:
1631
+ input_["durable_execution_name"] = durable_execution_name
1632
+ if payload is not None:
1633
+ input_["payload"] = payload
1634
+ if qualifier is not None:
1635
+ input_["qualifier"] = qualifier
1636
+ if tenant_id is not None:
1637
+ input_["tenant_id"] = tenant_id
1638
+
1639
+ response = execute_pipeline(
1640
+ OperationRequest(input=input_, options=options_),
1641
+ handler=_handler,
1642
+ interceptors=list(interceptors_),
1643
+ )
1644
+ return response.output
1645
+
1646
+ def invoke_async(
1647
+ self,
1648
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
1649
+ invoke_args: Iterator[bytes] | bytes,
1650
+ *,
1651
+ config_overrides: Optional[LambdaClientConfig] = None,
1652
+ ) -> "capo_lambda.types.invoke_async_response.InvokeAsyncResponse":
1653
+ r"""<note> <p>For asynchronous function invocation, use <a>Invoke</a>.</p> </note> <p>Invokes a function asynchronously.</p> <note> <p>The payload limit is 256KB. For larger payloads, for up to 1MB, use <a>Invoke</a>.</p> </note> <note> <p>If you do use the InvokeAsync action, note that it doesn't support the use of X-Ray active tracing. Trace ID is not propagated to the function, even if X-Ray active tracing is turned on.</p> </note>
1654
+
1655
+ Args:
1656
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1657
+ invoke_args: <p>The JSON that you want to provide to your Lambda function as input.</p>
1658
+
1659
+ Raises:
1660
+ capo_lambda.errors.invalid_request_content_exception.InvalidRequestContentException: <p>The request body could not be parsed as JSON, or a request header is invalid. For example, the 'x-amzn-RequestId' header is not a valid UUID string.</p>
1661
+ capo_lambda.errors.invalid_runtime_exception.InvalidRuntimeException: <p>The runtime or runtime version specified is not supported.</p>
1662
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
1663
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
1664
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
1665
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
1666
+
1667
+ Examples:
1668
+ To invoke a Lambda function asynchronously
1669
+ The following example invokes a Lambda function asynchronously
1670
+
1671
+ >>> client.invoke_async(function_name='my-function', invoke_args='{}')
1672
+ """
1673
+
1674
+ def _handler(
1675
+ req: "OperationRequest[capo_lambda.types.invoke_async_request.InvokeAsyncRequest]",
1676
+ ) -> OperationResponse[
1677
+ "capo_lambda.types.invoke_async_response.InvokeAsyncResponse"
1678
+ ]:
1679
+ import capo_lambda._operations.aws_gir_api_service.invoke_async
1680
+
1681
+ output, http_response = (
1682
+ capo_lambda._operations.aws_gir_api_service.invoke_async.invoke_async(
1683
+ req.options, req.input
1684
+ )
1685
+ )
1686
+ return OperationResponse(output=output, response=http_response)
1687
+
1688
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1689
+ input_: capo_lambda.types.invoke_async_request.InvokeAsyncRequest = {} # type: ignore[typeddict-item]
1690
+ input_["function_name"] = function_name
1691
+ input_["invoke_args"] = ensure_sync_iterator(invoke_args)
1692
+
1693
+ response = execute_pipeline(
1694
+ OperationRequest(input=input_, options=options_),
1695
+ handler=_handler,
1696
+ interceptors=list(interceptors_),
1697
+ )
1698
+ return response.output
1699
+
1700
+ @contextmanager
1701
+ def invoke_with_response_stream(
1702
+ self,
1703
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
1704
+ *,
1705
+ config_overrides: Optional[LambdaClientConfig] = None,
1706
+ invocation_type: Optional[
1707
+ "capo_lambda.types.response_streaming_invocation_type.ResponseStreamingInvocationType"
1708
+ ] = None,
1709
+ log_type: Optional["capo_lambda.types.log_type.LogType"] = None,
1710
+ client_context: Optional["capo_lambda.types.string.String"] = None,
1711
+ qualifier: Optional[
1712
+ "capo_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
1713
+ ] = None,
1714
+ payload: Optional["capo_lambda.types.blob.Blob"] = None,
1715
+ tenant_id: Optional["capo_lambda.types.tenant_id.TenantId"] = None,
1716
+ ) -> "Generator[capo_lambda.types.invoke_with_response_stream_response.InvokeWithResponseStreamResponse]":
1717
+ r"""<p>Configure your Lambda functions to stream response payloads back to clients. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-response-streaming.html\">Configuring a Lambda function to stream responses</a>.</p> <p>This operation requires permission for the <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awslambda.html\">lambda:InvokeFunction</a> action. For details on how to set up permissions for cross-account invocations, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html#permissions-resource-xaccountinvoke\">Granting function access to other accounts</a>.</p>
1718
+
1719
+ Args:
1720
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1721
+ invocation_type: <p>Use one of the following options:</p> <ul> <li> <p> <code>RequestResponse</code> (default) – Invoke the function synchronously. Keep the connection open until the function returns a response or times out. The API operation response includes the function response and additional data.</p> </li> <li> <p> <code>DryRun</code> – Validate parameter values and verify that the IAM user or role has permission to invoke the function.</p> </li> </ul>
1722
+ log_type: <p>Set to <code>Tail</code> to include the execution log in the response. Applies to synchronously invoked functions only.</p>
1723
+ client_context: <p>Up to 3,583 bytes of base64-encoded data about the invoking client to pass to the function in the context object.</p>
1724
+ qualifier: <p>The alias name.</p>
1725
+ payload: <p>The JSON that you want to provide to your Lambda function as input.</p> <p>You can enter the JSON directly. For example, <code>--payload '{ \"key\": \"value\" }'</code>. You can also specify a file path. For example, <code>--payload file://payload.json</code>.</p>
1726
+ tenant_id: <p>The identifier of the tenant in a multi-tenant Lambda function.</p>
1727
+
1728
+ Raises:
1729
+ capo_lambda.errors.ec2_access_denied_exception.EC2AccessDeniedException: <p>Need additional permissions to configure VPC settings.</p>
1730
+ capo_lambda.errors.ec2_throttled_exception.EC2ThrottledException: <p>Amazon EC2 throttled Lambda during Lambda function initialization using the execution role provided for the function.</p>
1731
+ capo_lambda.errors.ec2_unexpected_exception.EC2UnexpectedException: <p>Lambda received an unexpected Amazon EC2 client exception while setting up for the Lambda function.</p>
1732
+ capo_lambda.errors.efsio_exception.EFSIOException: <p>An error occurred when reading from or writing to a connected file system.</p>
1733
+ capo_lambda.errors.efs_mount_connectivity_exception.EFSMountConnectivityException: <p>The Lambda function couldn't make a network connection to the configured file system.</p>
1734
+ capo_lambda.errors.efs_mount_failure_exception.EFSMountFailureException: <p>The Lambda function couldn't mount the configured file system due to a permission or configuration issue.</p>
1735
+ capo_lambda.errors.efs_mount_timeout_exception.EFSMountTimeoutException: <p>The Lambda function made a network connection to the configured file system, but the mount operation timed out.</p>
1736
+ capo_lambda.errors.eni_limit_reached_exception.ENILimitReachedException: <p>Lambda couldn't create an elastic network interface in the VPC, specified as part of Lambda function configuration, because the limit for network interfaces has been reached. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html\">Lambda quotas</a>.</p>
1737
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
1738
+ capo_lambda.errors.invalid_request_content_exception.InvalidRequestContentException: <p>The request body could not be parsed as JSON, or a request header is invalid. For example, the 'x-amzn-RequestId' header is not a valid UUID string.</p>
1739
+ capo_lambda.errors.invalid_runtime_exception.InvalidRuntimeException: <p>The runtime or runtime version specified is not supported.</p>
1740
+ capo_lambda.errors.invalid_security_group_id_exception.InvalidSecurityGroupIDException: <p>The security group ID provided in the Lambda function VPC configuration is not valid.</p>
1741
+ capo_lambda.errors.invalid_subnet_id_exception.InvalidSubnetIDException: <p>The subnet ID provided in the Lambda function VPC configuration is not valid.</p>
1742
+ capo_lambda.errors.invalid_zip_file_exception.InvalidZipFileException: <p>Lambda could not unzip the deployment package.</p>
1743
+ capo_lambda.errors.kms_access_denied_exception.KMSAccessDeniedException: <p>Lambda couldn't decrypt the environment variables because KMS access was denied. Check the Lambda function's KMS permissions.</p>
1744
+ capo_lambda.errors.kms_disabled_exception.KMSDisabledException: <p>Lambda couldn't decrypt the environment variables because the KMS key used is disabled. Check the Lambda function's KMS key settings.</p>
1745
+ capo_lambda.errors.kms_invalid_state_exception.KMSInvalidStateException: <p>Lambda couldn't decrypt the environment variables because the state of the KMS key used is not valid for Decrypt. Check the function's KMS key settings.</p>
1746
+ capo_lambda.errors.kms_not_found_exception.KMSNotFoundException: <p>Lambda couldn't decrypt the environment variables because the KMS key was not found. Check the function's KMS key settings.</p>
1747
+ capo_lambda.errors.no_published_version_exception.NoPublishedVersionException: <p>The function has no published versions available.</p>
1748
+ capo_lambda.errors.recursive_invocation_exception.RecursiveInvocationException: <p>Lambda has detected your function being invoked in a recursive loop with other Amazon Web Services resources and stopped your function's invocation.</p>
1749
+ capo_lambda.errors.request_too_large_exception.RequestTooLargeException: <p>The request payload exceeded the <code>Invoke</code> request body JSON input quota. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html\">Lambda quotas</a>.</p>
1750
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
1751
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
1752
+ capo_lambda.errors.resource_not_ready_exception.ResourceNotReadyException: <p>The function is inactive and its VPC connection is no longer available. Wait for the VPC connection to reestablish and try again.</p>
1753
+ capo_lambda.errors.s3_files_mount_connectivity_exception.S3FilesMountConnectivityException: <p>The Lambda function couldn't make a network connection to the configured S3 Files access point.</p>
1754
+ capo_lambda.errors.s3_files_mount_failure_exception.S3FilesMountFailureException: <p>The Lambda function couldn't mount the configured S3 Files access point due to a permission or configuration issue.</p>
1755
+ capo_lambda.errors.s3_files_mount_timeout_exception.S3FilesMountTimeoutException: <p>The Lambda function made a network connection to the configured S3 Files access point, but the mount operation timed out.</p>
1756
+ capo_lambda.errors.serialized_request_entity_too_large_exception.SerializedRequestEntityTooLargeException: <p>The request payload exceeded the maximum allowed size for serialized request entities.</p>
1757
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
1758
+ capo_lambda.errors.snap_start_exception.SnapStartException: <p>The <code>afterRestore()</code> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/snapstart-runtime-hooks.html\">runtime hook</a> encountered an error. For more information, check the Amazon CloudWatch logs.</p>
1759
+ capo_lambda.errors.snap_start_not_ready_exception.SnapStartNotReadyException: <p>Lambda is initializing your function. You can invoke the function when the <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html\">function state</a> becomes <code>Active</code>.</p>
1760
+ capo_lambda.errors.snap_start_timeout_exception.SnapStartTimeoutException: <p>Lambda couldn't restore the snapshot within the timeout limit.</p>
1761
+ capo_lambda.errors.subnet_ip_address_limit_reached_exception.SubnetIPAddressLimitReachedException: <p>Lambda couldn't set up VPC access for the Lambda function because one or more configured subnets has no available IP addresses.</p>
1762
+ 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>
1763
+ capo_lambda.errors.unsupported_media_type_exception.UnsupportedMediaTypeException: <p>The content type of the <code>Invoke</code> request body is not JSON.</p>
1764
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
1765
+ """
1766
+
1767
+ def _handler(
1768
+ req: "OperationRequest[capo_lambda.types.invoke_with_response_stream_request.InvokeWithResponseStreamRequest]",
1769
+ ) -> OperationResponse[
1770
+ "capo_lambda.types.invoke_with_response_stream_response.InvokeWithResponseStreamResponse"
1771
+ ]:
1772
+ import capo_lambda._operations.aws_gir_api_service.invoke_with_response_stream
1773
+
1774
+ output, http_response = (
1775
+ capo_lambda._operations.aws_gir_api_service.invoke_with_response_stream.invoke_with_response_stream(
1776
+ req.options, req.input
1777
+ )
1778
+ )
1779
+ return OperationResponse(output=output, response=http_response)
1780
+
1781
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1782
+ input_: capo_lambda.types.invoke_with_response_stream_request.InvokeWithResponseStreamRequest = {} # type: ignore[typeddict-item]
1783
+ input_["function_name"] = function_name
1784
+ if invocation_type is not None:
1785
+ input_["invocation_type"] = invocation_type
1786
+ if log_type is not None:
1787
+ input_["log_type"] = log_type
1788
+ if client_context is not None:
1789
+ input_["client_context"] = client_context
1790
+ if qualifier is not None:
1791
+ input_["qualifier"] = qualifier
1792
+ if payload is not None:
1793
+ input_["payload"] = payload
1794
+ if tenant_id is not None:
1795
+ input_["tenant_id"] = tenant_id
1796
+
1797
+ response = execute_pipeline(
1798
+ OperationRequest(input=input_, options=options_),
1799
+ handler=_handler,
1800
+ interceptors=list(interceptors_),
1801
+ )
1802
+ yield response.output
1803
+
1804
+ def put_function_code_signing_config(
1805
+ self,
1806
+ code_signing_config_arn: "capo_lambda.types.code_signing_config_arn.CodeSigningConfigArn",
1807
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
1808
+ *,
1809
+ config_overrides: Optional[LambdaClientConfig] = None,
1810
+ ) -> "capo_lambda.types.put_function_code_signing_config_response.PutFunctionCodeSigningConfigResponse":
1811
+ r"""<p>Update the code signing configuration for the function. Changes to the code signing configuration take effect the next time a user tries to deploy a code package to the function. </p>
1812
+
1813
+ Args:
1814
+ code_signing_config_arn: <p>The The Amazon Resource Name (ARN) of the code signing configuration.</p>
1815
+ 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>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 is limited to 64 characters in length.</p>
1816
+
1817
+ Raises:
1818
+ capo_lambda.errors.code_signing_config_not_found_exception.CodeSigningConfigNotFoundException: <p>The specified code signing configuration does not exist.</p>
1819
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
1820
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
1821
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
1822
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
1823
+ 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>
1824
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
1825
+ """
1826
+
1827
+ def _handler(
1828
+ req: "OperationRequest[capo_lambda.types.put_function_code_signing_config_request.PutFunctionCodeSigningConfigRequest]",
1829
+ ) -> OperationResponse[
1830
+ "capo_lambda.types.put_function_code_signing_config_response.PutFunctionCodeSigningConfigResponse"
1831
+ ]:
1832
+ import capo_lambda._operations.aws_gir_api_service.put_function_code_signing_config
1833
+
1834
+ output, http_response = (
1835
+ capo_lambda._operations.aws_gir_api_service.put_function_code_signing_config.put_function_code_signing_config(
1836
+ req.options, req.input
1837
+ )
1838
+ )
1839
+ return OperationResponse(output=output, response=http_response)
1840
+
1841
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1842
+ input_: capo_lambda.types.put_function_code_signing_config_request.PutFunctionCodeSigningConfigRequest = {} # type: ignore[typeddict-item]
1843
+ input_["code_signing_config_arn"] = code_signing_config_arn
1844
+ input_["function_name"] = function_name
1845
+
1846
+ response = execute_pipeline(
1847
+ OperationRequest(input=input_, options=options_),
1848
+ handler=_handler,
1849
+ interceptors=list(interceptors_),
1850
+ )
1851
+ return response.output
1852
+
1853
+ def put_function_recursion_config(
1854
+ self,
1855
+ function_name: "capo_lambda.types.unqualified_function_name.UnqualifiedFunctionName",
1856
+ recursive_loop: "capo_lambda.types.recursive_loop.RecursiveLoop",
1857
+ *,
1858
+ config_overrides: Optional[LambdaClientConfig] = None,
1859
+ ) -> "capo_lambda.types.put_function_recursion_config_response.PutFunctionRecursionConfigResponse":
1860
+ r"""<p>Sets your function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-recursion.html\">recursive loop detection</a> configuration.</p> <p>When you configure a Lambda function to output to the same service or resource that invokes the function, it's possible to create an infinite recursive loop. For example, a Lambda function might write a message to an Amazon Simple Queue Service (Amazon SQS) queue, which then invokes the same function. This invocation causes the function to write another message to the queue, which in turn invokes the function again.</p> <p>Lambda can detect certain types of recursive loops shortly after they occur. When Lambda detects a recursive loop and your function's recursive loop detection configuration is set to <code>Terminate</code>, it stops your function being invoked and notifies you.</p>
1861
+
1862
+ Args:
1863
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1864
+ recursive_loop: <p>If you set your function's recursive loop detection configuration to <code>Allow</code>, Lambda doesn't take any action when it detects your function being invoked as part of a recursive loop. We recommend that you only use this setting if your design intentionally uses a Lambda function to write data back to the same Amazon Web Services resource that invokes it.</p> <p>If you set your function's recursive loop detection configuration to <code>Terminate</code>, Lambda stops your function being invoked and notifies you when it detects your function being invoked as part of a recursive loop.</p> <p>By default, Lambda sets your function's configuration to <code>Terminate</code>.</p> <important> <p>If your design intentionally uses a Lambda function to write data back to the same Amazon Web Services resource that invokes the function, then use caution and implement suitable guard rails to prevent unexpected charges being billed to your Amazon Web Services account. To learn more about best practices for using recursive invocation patterns, see <a href=\"https://serverlessland.com/content/service/lambda/guides/aws-lambda-operator-guide/recursive-runaway\">Recursive patterns that cause run-away Lambda functions</a> in Serverless Land.</p> </important>
1865
+
1866
+ Raises:
1867
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
1868
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
1869
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
1870
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
1871
+ 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>
1872
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
1873
+ """
1874
+
1875
+ def _handler(
1876
+ req: "OperationRequest[capo_lambda.types.put_function_recursion_config_request.PutFunctionRecursionConfigRequest]",
1877
+ ) -> OperationResponse[
1878
+ "capo_lambda.types.put_function_recursion_config_response.PutFunctionRecursionConfigResponse"
1879
+ ]:
1880
+ import capo_lambda._operations.aws_gir_api_service.put_function_recursion_config
1881
+
1882
+ output, http_response = (
1883
+ capo_lambda._operations.aws_gir_api_service.put_function_recursion_config.put_function_recursion_config(
1884
+ req.options, req.input
1885
+ )
1886
+ )
1887
+ return OperationResponse(output=output, response=http_response)
1888
+
1889
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1890
+ input_: capo_lambda.types.put_function_recursion_config_request.PutFunctionRecursionConfigRequest = {} # type: ignore[typeddict-item]
1891
+ input_["function_name"] = function_name
1892
+ input_["recursive_loop"] = recursive_loop
1893
+
1894
+ response = execute_pipeline(
1895
+ OperationRequest(input=input_, options=options_),
1896
+ handler=_handler,
1897
+ interceptors=list(interceptors_),
1898
+ )
1899
+ return response.output
1900
+
1901
+ def put_function_scaling_config(
1902
+ self,
1903
+ function_name: "capo_lambda.types.unqualified_function_name.UnqualifiedFunctionName",
1904
+ qualifier: "capo_lambda.types.published_function_qualifier.PublishedFunctionQualifier",
1905
+ *,
1906
+ config_overrides: Optional[LambdaClientConfig] = None,
1907
+ function_scaling_config: Optional[
1908
+ "capo_lambda.types.function_scaling_config.FunctionScalingConfig"
1909
+ ] = None,
1910
+ ) -> "capo_lambda.types.put_function_scaling_config_response.PutFunctionScalingConfigResponse":
1911
+ """<p>Sets the scaling configuration for a Lambda Managed Instances function. The scaling configuration defines the minimum and maximum number of execution environments that can be provisioned for the function, allowing you to control scaling behavior and resource allocation.</p>
1912
+
1913
+ Args:
1914
+ function_name: <p>The name or ARN of the Lambda function.</p>
1915
+ qualifier: <p>Specify a version or alias to set the scaling configuration for a published version of the function.</p>
1916
+ function_scaling_config: <p>The scaling configuration to apply to the function, including minimum and maximum execution environment limits.</p>
1917
+
1918
+ Raises:
1919
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
1920
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
1921
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
1922
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
1923
+ 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>
1924
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
1925
+ """
1926
+
1927
+ def _handler(
1928
+ req: "OperationRequest[capo_lambda.types.put_function_scaling_config_request.PutFunctionScalingConfigRequest]",
1929
+ ) -> OperationResponse[
1930
+ "capo_lambda.types.put_function_scaling_config_response.PutFunctionScalingConfigResponse"
1931
+ ]:
1932
+ import capo_lambda._operations.aws_gir_api_service.put_function_scaling_config
1933
+
1934
+ output, http_response = (
1935
+ capo_lambda._operations.aws_gir_api_service.put_function_scaling_config.put_function_scaling_config(
1936
+ req.options, req.input
1937
+ )
1938
+ )
1939
+ return OperationResponse(output=output, response=http_response)
1940
+
1941
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1942
+ input_: capo_lambda.types.put_function_scaling_config_request.PutFunctionScalingConfigRequest = {} # type: ignore[typeddict-item]
1943
+ input_["function_name"] = function_name
1944
+ input_["qualifier"] = qualifier
1945
+ if function_scaling_config is not None:
1946
+ input_["function_scaling_config"] = function_scaling_config
1947
+
1948
+ response = execute_pipeline(
1949
+ OperationRequest(input=input_, options=options_),
1950
+ handler=_handler,
1951
+ interceptors=list(interceptors_),
1952
+ )
1953
+ return response.output
1954
+
1955
+ def put_runtime_management_config(
1956
+ self,
1957
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
1958
+ update_runtime_on: "capo_lambda.types.update_runtime_on.UpdateRuntimeOn",
1959
+ *,
1960
+ config_overrides: Optional[LambdaClientConfig] = None,
1961
+ qualifier: Optional[
1962
+ "capo_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
1963
+ ] = None,
1964
+ runtime_version_arn: Optional[
1965
+ "capo_lambda.types.runtime_version_arn.RuntimeVersionArn"
1966
+ ] = None,
1967
+ ) -> "capo_lambda.types.put_runtime_management_config_response.PutRuntimeManagementConfigResponse":
1968
+ r"""<p>Sets the runtime management configuration for a function's version. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html\">Runtime updates</a>.</p>
1969
+
1970
+ Args:
1971
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
1972
+ qualifier: <p>Specify a version of the function. This can be <code>$LATEST</code> or a published version number. If no value is specified, the configuration for the <code>$LATEST</code> version is returned.</p>
1973
+ update_runtime_on: <p>Specify the runtime update mode.</p> <ul> <li> <p> <b>Auto (default)</b> - Automatically update to the most recent and secure runtime version using a <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-two-phase\">Two-phase runtime version rollout</a>. This is the best choice for most customers to ensure they always benefit from runtime updates.</p> </li> <li> <p> <b>Function update</b> - Lambda updates the runtime of your function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.</p> </li> <li> <p> <b>Manual</b> - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-rollback\">Roll back a runtime version</a>.</p> </li> </ul>
1974
+ runtime_version_arn: <p>The ARN of the runtime version you want the function to use.</p> <note> <p>This is only required if you're using the <b>Manual</b> runtime update mode.</p> </note>
1975
+
1976
+ Raises:
1977
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
1978
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
1979
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
1980
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
1981
+ 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>
1982
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
1983
+ """
1984
+
1985
+ def _handler(
1986
+ req: "OperationRequest[capo_lambda.types.put_runtime_management_config_request.PutRuntimeManagementConfigRequest]",
1987
+ ) -> OperationResponse[
1988
+ "capo_lambda.types.put_runtime_management_config_response.PutRuntimeManagementConfigResponse"
1989
+ ]:
1990
+ import capo_lambda._operations.aws_gir_api_service.put_runtime_management_config
1991
+
1992
+ output, http_response = (
1993
+ capo_lambda._operations.aws_gir_api_service.put_runtime_management_config.put_runtime_management_config(
1994
+ req.options, req.input
1995
+ )
1996
+ )
1997
+ return OperationResponse(output=output, response=http_response)
1998
+
1999
+ interceptors_, options_ = self._service.operation_options(config_overrides)
2000
+ input_: capo_lambda.types.put_runtime_management_config_request.PutRuntimeManagementConfigRequest = {} # type: ignore[typeddict-item]
2001
+ input_["function_name"] = function_name
2002
+ if qualifier is not None:
2003
+ input_["qualifier"] = qualifier
2004
+ input_["update_runtime_on"] = update_runtime_on
2005
+ if runtime_version_arn is not None:
2006
+ input_["runtime_version_arn"] = runtime_version_arn
2007
+
2008
+ response = execute_pipeline(
2009
+ OperationRequest(input=input_, options=options_),
2010
+ handler=_handler,
2011
+ interceptors=list(interceptors_),
2012
+ )
2013
+ return response.output
2014
+
2015
+
2016
+ class AsyncFunction:
2017
+ def __init__(self, service: AsyncLambdaClient) -> None:
2018
+ self._service = service
2019
+
2020
+ async def put(
2021
+ self,
2022
+ function_name: "capo_lambda.types.function_name.FunctionName",
2023
+ role: "capo_lambda.types.role_arn.RoleArn",
2024
+ code: "capo_lambda.types.function_code.FunctionCode",
2025
+ *,
2026
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
2027
+ runtime: Optional["capo_lambda.types.runtime.Runtime"] = None,
2028
+ handler: Optional["capo_lambda.types.handler.Handler"] = None,
2029
+ description: Optional["capo_lambda.types.description.Description"] = None,
2030
+ timeout: Optional["capo_lambda.types.timeout.Timeout"] = None,
2031
+ memory_size: Optional["capo_lambda.types.memory_size.MemorySize"] = None,
2032
+ publish: Optional["capo_lambda.types.boolean.Boolean"] = None,
2033
+ vpc_config: Optional["capo_lambda.types.vpc_config.VpcConfig"] = None,
2034
+ package_type: Optional["capo_lambda.types.package_type.PackageType"] = None,
2035
+ dead_letter_config: Optional[
2036
+ "capo_lambda.types.dead_letter_config.DeadLetterConfig"
2037
+ ] = None,
2038
+ environment: Optional["capo_lambda.types.environment.Environment"] = None,
2039
+ kms_key_arn: Optional["capo_lambda.types.kms_key_arn.KMSKeyArn"] = None,
2040
+ tracing_config: Optional[
2041
+ "capo_lambda.types.tracing_config.TracingConfig"
2042
+ ] = None,
2043
+ tags: Optional["capo_lambda.types.tags.Tags"] = None,
2044
+ layers: Optional["capo_lambda.types.layer_list.LayerList"] = None,
2045
+ file_system_configs: Optional[
2046
+ "capo_lambda.types.file_system_config_list.FileSystemConfigList"
2047
+ ] = None,
2048
+ image_config: Optional["capo_lambda.types.image_config.ImageConfig"] = None,
2049
+ code_signing_config_arn: Optional[
2050
+ "capo_lambda.types.code_signing_config_arn.CodeSigningConfigArn"
2051
+ ] = None,
2052
+ architectures: Optional[
2053
+ "capo_lambda.types.architectures_list.ArchitecturesList"
2054
+ ] = None,
2055
+ ephemeral_storage: Optional[
2056
+ "capo_lambda.types.ephemeral_storage.EphemeralStorage"
2057
+ ] = None,
2058
+ snap_start: Optional["capo_lambda.types.snap_start.SnapStart"] = None,
2059
+ logging_config: Optional[
2060
+ "capo_lambda.types.logging_config.LoggingConfig"
2061
+ ] = None,
2062
+ capacity_provider_config: Optional[
2063
+ "capo_lambda.types.capacity_provider_config.CapacityProviderConfig"
2064
+ ] = None,
2065
+ publish_to: Optional[
2066
+ "capo_lambda.types.function_version_latest_published.FunctionVersionLatestPublished"
2067
+ ] = None,
2068
+ durable_config: Optional[
2069
+ "capo_lambda.types.durable_config.DurableConfig"
2070
+ ] = None,
2071
+ tenancy_config: Optional[
2072
+ "capo_lambda.types.tenancy_config.TenancyConfig"
2073
+ ] = None,
2074
+ ) -> "capo_lambda.types.function_configuration.FunctionConfiguration":
2075
+ r"""<p>Creates a Lambda function. To create a function, you need a <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html\">deployment package</a> and an <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role\">execution role</a>. The deployment package is a .zip file archive or container image that contains your function code. The execution role grants the function permission to use Amazon Web Services services, such as Amazon CloudWatch Logs for log streaming and X-Ray for request tracing.</p> <p>If the deployment package is a <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html\">container image</a>, then you set the package type to <code>Image</code>. For a container image, the code property must include the URI of a container image in the Amazon ECR registry. You do not need to specify the handler and runtime properties.</p> <p>If the deployment package is a <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html#gettingstarted-package-zip\">.zip file archive</a>, then you set the package type to <code>Zip</code>. For a .zip file archive, the code property specifies the location of the .zip file. You must also specify the handler and runtime properties. The code in the deployment package must be compatible with the target instruction set architecture of the function (<code>x86-64</code> or <code>arm64</code>). If you do not specify the architecture, then the default value is <code>x86-64</code>.</p> <p>When you create a function, Lambda provisions an instance of the function and its supporting resources. If your function connects to a VPC, this process can take a minute or so. During this time, you can't invoke or modify the function. The <code>State</code>, <code>StateReason</code>, and <code>StateReasonCode</code> fields in the response from <a>GetFunctionConfiguration</a> indicate when the function is ready to invoke. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html\">Lambda function states</a>.</p> <p>A function has an unpublished version, and can have published versions and aliases. The unpublished version changes when you update your function's code and configuration. A published version is a snapshot of your function code and configuration that can't be changed. An alias is a named resource that maps to a version, and can be changed to map to a different version. Use the <code>Publish</code> parameter to create version <code>1</code> of your function from its initial configuration.</p> <p>The other parameters let you configure version-specific and function-level settings. You can modify version-specific settings later with <a>UpdateFunctionConfiguration</a>. Function-level settings apply to both the unpublished and published versions of the function, and include tags (<a>TagResource</a>) and per-function concurrency limits (<a>PutFunctionConcurrency</a>).</p> <p>You can use code signing if your deployment package is a .zip file archive. To enable code signing for this function, specify the ARN of a code-signing configuration. When a user attempts to deploy a code package with <a>UpdateFunctionCode</a>, Lambda checks that the code package has a valid signature from a trusted publisher. The code-signing configuration includes set of signing profiles, which define the trusted publishers for this function.</p> <p>If another Amazon Web Services account or an Amazon Web Services service invokes your function, use <a>AddPermission</a> to grant permission by creating a resource-based Identity and Access Management (IAM) policy. You can grant permissions at the function level, on a version, or on an alias.</p> <p>To invoke your function directly, use <a>Invoke</a>. To invoke your function in response to events in other Amazon Web Services services, create an event source mapping (<a>CreateEventSourceMapping</a>), or configure a function trigger in the other service. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-invocation.html\">Invoking Lambda functions</a>.</p>
2076
+
2077
+ Args:
2078
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
2079
+ runtime: <p>The identifier of the function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html\"> runtime</a>. Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.</p> <p>The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing functions shortly after each runtime is deprecated. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels\">Runtime use after deprecation</a>.</p> <p>For a list of all currently supported runtimes, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported\">Supported runtimes</a>.</p>
2080
+ role: <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
2081
+ handler: <p>The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html\">Lambda programming model</a>.</p>
2082
+ code: <p>The code for the function.</p>
2083
+ description: <p>A description of the function.</p>
2084
+ timeout: <p>The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html\">Lambda execution environment</a>.</p>
2085
+ memory_size: <p>The amount of <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console\">memory available to the function</a> at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB.</p>
2086
+ publish: <p>Set to true to publish the first version of the function during creation.</p>
2087
+ vpc_config: <p>For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html\">Configuring a Lambda function to access resources in a VPC</a>.</p>
2088
+ package_type: <p>The type of deployment package. Set to <code>Image</code> for container image and set to <code>Zip</code> for .zip file archive.</p>
2089
+ dead_letter_config: <p>A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq\">Dead-letter queues</a>.</p>
2090
+ environment: <p>Environment variables that are accessible from function code during execution.</p>
2091
+ kms_key_arn: <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p> <ul> <li> <p>The function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption\">environment variables</a>.</p> </li> <li> <p>The function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html\">Lambda SnapStart</a> snapshots.</p> </li> <li> <p>When used with <code>SourceKMSKeyArn</code>, the unzipped version of the .zip deployment package that's used for function invocations. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption\"> Specifying a customer managed key for Lambda</a>.</p> </li> <li> <p>The optimized version of the container image that's used for function invocations. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle\">Function lifecycle</a>.</p> </li> </ul> <p>If you don't provide a customer managed key, Lambda uses an <a href=\"https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk\">Amazon Web Services owned key</a> or an <a href=\"https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk\">Amazon Web Services managed key</a>.</p>
2092
+ tracing_config: <p>Set <code>Mode</code> to <code>Active</code> to sample and trace a subset of incoming requests with <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html\">X-Ray</a>.</p>
2093
+ tags: <p>A list of <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/tagging.html\">tags</a> to apply to the function.</p>
2094
+ layers: <p>A list of <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html\">function layers</a> to add to the function's execution environment. Specify each layer by its ARN, including the version.</p>
2095
+ file_system_configs: <p>Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.</p>
2096
+ image_config: <p>Container image <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms\">configuration values</a> that override the values in the container image Dockerfile.</p>
2097
+ code_signing_config_arn: <p>To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.</p>
2098
+ architectures: <p>The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is <code>x86_64</code>.</p>
2099
+ ephemeral_storage: <p>The size of the function's <code>/tmp</code> directory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage\">Configuring ephemeral storage (console)</a>.</p>
2100
+ snap_start: <p>The function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html\">SnapStart</a> setting.</p>
2101
+ logging_config: <p>The function's Amazon CloudWatch Logs configuration settings.</p>
2102
+ capacity_provider_config: <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
2103
+ publish_to: <p>Specifies where to publish the function version or configuration.</p>
2104
+ durable_config: <p>Configuration settings for durable functions. Enables creating functions with durability that can remember their state and continue execution even after interruptions.</p>
2105
+ tenancy_config: <p>Configuration for multi-tenant applications that use Lambda functions. Defines tenant isolation settings and resource allocations. Required for functions supporting multiple tenants.</p>
2106
+
2107
+ Raises:
2108
+ capo_lambda.errors.code_signing_config_not_found_exception.CodeSigningConfigNotFoundException: <p>The specified code signing configuration does not exist.</p>
2109
+ capo_lambda.errors.code_storage_exceeded_exception.CodeStorageExceededException: <p>Your Amazon Web Services account has exceeded its maximum total code size. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html\">Lambda quotas</a>.</p>
2110
+ capo_lambda.errors.code_verification_failed_exception.CodeVerificationFailedException: <p>The code signature failed one or more of the validation checks for signature mismatch or expiry, and the code signing policy is set to ENFORCE. Lambda blocks the deployment.</p>
2111
+ capo_lambda.errors.function_versions_per_capacity_provider_limit_exceeded_exception.FunctionVersionsPerCapacityProviderLimitExceededException: <p>The maximum number of function versions that can be associated with a single capacity provider has been exceeded. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html\">Lambda quotas</a>.</p>
2112
+ capo_lambda.errors.invalid_code_signature_exception.InvalidCodeSignatureException: <p>The code signature failed the integrity check. If the integrity check fails, then Lambda blocks deployment, even if the code signing policy is set to WARN.</p>
2113
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
2114
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
2115
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
2116
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
2117
+ 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>
2118
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
2119
+
2120
+ Examples:
2121
+ To create a function
2122
+ The following example creates a function with a deployment package in Amazon S3 and enables X-Ray tracing and environment variable encryption.
2123
+
2124
+ >>> await client.put(function_name='my-function', runtime='nodejs12.x', role='arn:aws:iam::123456789012:role/lambda-role', handler='index.handler', code={'S3Bucket': 'my-bucket-1xpuxmplzrlbh', 'S3Key': 'function.zip'}, description='Process image objects from Amazon S3.', timeout=15, memory_size=256, publish=True, environment={'Variables': {'BUCKET': 'my-bucket-1xpuxmplzrlbh', 'PREFIX': 'inbound'}}, kms_key_arn='arn:aws:kms:us-west-2:123456789012:key/b0844d6c-xmpl-4463-97a4-d49f50839966', tracing_config={'Mode': 'Active'}, durable_config={'ExecutionTimeout': 31622400, 'RetentionPeriodInDays': 30}, tags={'DEPARTMENT': 'Assets'})
2125
+ """
2126
+
2127
+ async def _handler(
2128
+ req: "AsyncOperationRequest[capo_lambda.types.create_function_request.CreateFunctionRequest]",
2129
+ ) -> AsyncOperationResponse[
2130
+ "capo_lambda.types.function_configuration.FunctionConfiguration"
2131
+ ]:
2132
+ import capo_lambda._operations.aws_gir_api_service.create_function
2133
+
2134
+ (
2135
+ output,
2136
+ http_response,
2137
+ ) = await capo_lambda._operations.aws_gir_api_service.create_function.async_create_function(
2138
+ req.options, req.input
2139
+ )
2140
+ return AsyncOperationResponse(output=output, response=http_response)
2141
+
2142
+ interceptors_, options_ = self._service.operation_options(config_overrides)
2143
+ input_: capo_lambda.types.create_function_request.CreateFunctionRequest = {} # type: ignore[typeddict-item]
2144
+ input_["function_name"] = function_name
2145
+ if runtime is not None:
2146
+ input_["runtime"] = runtime
2147
+ input_["role"] = role
2148
+ if handler is not None:
2149
+ input_["handler"] = handler
2150
+ input_["code"] = code
2151
+ if description is not None:
2152
+ input_["description"] = description
2153
+ if timeout is not None:
2154
+ input_["timeout"] = timeout
2155
+ if memory_size is not None:
2156
+ input_["memory_size"] = memory_size
2157
+ if publish is not None:
2158
+ input_["publish"] = publish
2159
+ if vpc_config is not None:
2160
+ input_["vpc_config"] = vpc_config
2161
+ if package_type is not None:
2162
+ input_["package_type"] = package_type
2163
+ if dead_letter_config is not None:
2164
+ input_["dead_letter_config"] = dead_letter_config
2165
+ if environment is not None:
2166
+ input_["environment"] = environment
2167
+ if kms_key_arn is not None:
2168
+ input_["kms_key_arn"] = kms_key_arn
2169
+ if tracing_config is not None:
2170
+ input_["tracing_config"] = tracing_config
2171
+ if tags is not None:
2172
+ input_["tags"] = tags
2173
+ if layers is not None:
2174
+ input_["layers"] = layers
2175
+ if file_system_configs is not None:
2176
+ input_["file_system_configs"] = file_system_configs
2177
+ if image_config is not None:
2178
+ input_["image_config"] = image_config
2179
+ if code_signing_config_arn is not None:
2180
+ input_["code_signing_config_arn"] = code_signing_config_arn
2181
+ if architectures is not None:
2182
+ input_["architectures"] = architectures
2183
+ if ephemeral_storage is not None:
2184
+ input_["ephemeral_storage"] = ephemeral_storage
2185
+ if snap_start is not None:
2186
+ input_["snap_start"] = snap_start
2187
+ if logging_config is not None:
2188
+ input_["logging_config"] = logging_config
2189
+ if capacity_provider_config is not None:
2190
+ input_["capacity_provider_config"] = capacity_provider_config
2191
+ if publish_to is not None:
2192
+ input_["publish_to"] = publish_to
2193
+ if durable_config is not None:
2194
+ input_["durable_config"] = durable_config
2195
+ if tenancy_config is not None:
2196
+ input_["tenancy_config"] = tenancy_config
2197
+
2198
+ response = await aexecute_pipeline(
2199
+ AsyncOperationRequest(input=input_, options=options_),
2200
+ handler=_handler,
2201
+ interceptors=list(interceptors_),
2202
+ )
2203
+ return response.output
2204
+
2205
+ async def list(
2206
+ self,
2207
+ *,
2208
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
2209
+ master_region: Optional["capo_lambda.types.master_region.MasterRegion"] = None,
2210
+ function_version: Optional[
2211
+ "capo_lambda.types.function_version.FunctionVersion"
2212
+ ] = None,
2213
+ marker: Optional["capo_lambda.types.string.String"] = None,
2214
+ max_items: Optional["capo_lambda.types.max_list_items.MaxListItems"] = None,
2215
+ ) -> "capo_lambda.types.list_functions_response.ListFunctionsResponse":
2216
+ """<p>Returns a list of Lambda functions, with the version-specific configuration of each. Lambda returns up to 50 functions per call.</p> <p>Set <code>FunctionVersion</code> to <code>ALL</code> to include all published versions of each function in addition to the unpublished version.</p> <note> <p>The <code>ListFunctions</code> operation returns a subset of the <a>FunctionConfiguration</a> fields. To get the additional fields (State, StateReasonCode, StateReason, LastUpdateStatus, LastUpdateStatusReason, LastUpdateStatusReasonCode, RuntimeVersionConfig) for a function or version, use <a>GetFunction</a>.</p> </note>
2217
+
2218
+ Args:
2219
+ master_region: <p>For Lambda@Edge functions, the Amazon Web Services Region of the master function. For example, <code>us-east-1</code> filters the list of functions to include only Lambda@Edge functions replicated from a master function in US East (N. Virginia). If specified, you must set <code>FunctionVersion</code> to <code>ALL</code>.</p>
2220
+ function_version: <p>Set to <code>ALL</code> to include entries for all published versions of each function.</p>
2221
+ marker: <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
2222
+ max_items: <p>The maximum number of functions to return in the response. Note that <code>ListFunctions</code> returns a maximum of 50 items in each response, even if you set the number higher.</p>
2223
+
2224
+ Raises:
2225
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
2226
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
2227
+ 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>
2228
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
2229
+
2230
+ Examples:
2231
+ To get a list of Lambda functions
2232
+ This operation returns a list of Lambda functions.
2233
+
2234
+ >>> await client.list()
2235
+ """
2236
+
2237
+ async def _handler(
2238
+ req: "AsyncOperationRequest[capo_lambda.types.list_functions_request.ListFunctionsRequest]",
2239
+ ) -> AsyncOperationResponse[
2240
+ "capo_lambda.types.list_functions_response.ListFunctionsResponse"
2241
+ ]:
2242
+ import capo_lambda._operations.aws_gir_api_service.list_functions
2243
+
2244
+ (
2245
+ output,
2246
+ http_response,
2247
+ ) = await capo_lambda._operations.aws_gir_api_service.list_functions.async_list_functions(
2248
+ req.options, req.input
2249
+ )
2250
+ return AsyncOperationResponse(output=output, response=http_response)
2251
+
2252
+ interceptors_, options_ = self._service.operation_options(config_overrides)
2253
+ input_: capo_lambda.types.list_functions_request.ListFunctionsRequest = {} # type: ignore[typeddict-item]
2254
+ if master_region is not None:
2255
+ input_["master_region"] = master_region
2256
+ if function_version is not None:
2257
+ input_["function_version"] = function_version
2258
+ if marker is not None:
2259
+ input_["marker"] = marker
2260
+ if max_items is not None:
2261
+ input_["max_items"] = max_items
2262
+
2263
+ response = await aexecute_pipeline(
2264
+ AsyncOperationRequest(input=input_, options=options_),
2265
+ handler=_handler,
2266
+ interceptors=list(interceptors_),
2267
+ )
2268
+ return response.output
2269
+
2270
+ async def create_function_url_config(
2271
+ self,
2272
+ function_name: "capo_lambda.types.function_name.FunctionName",
2273
+ auth_type: "capo_lambda.types.function_url_auth_type.FunctionUrlAuthType",
2274
+ *,
2275
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
2276
+ qualifier: Optional[
2277
+ "capo_lambda.types.function_url_qualifier.FunctionUrlQualifier"
2278
+ ] = None,
2279
+ cors: Optional["capo_lambda.types.cors.Cors"] = None,
2280
+ invoke_mode: Optional["capo_lambda.types.invoke_mode.InvokeMode"] = None,
2281
+ ) -> "capo_lambda.types.create_function_url_config_response.CreateFunctionUrlConfigResponse":
2282
+ r"""<p>Creates a Lambda function URL with the specified configuration parameters. A function URL is a dedicated HTTP(S) endpoint that you can use to invoke your function.</p>
2283
+
2284
+ Args:
2285
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
2286
+ qualifier: <p>The alias name.</p>
2287
+ auth_type: <p>The type of authentication that your function URL uses. Set to <code>AWS_IAM</code> if you want to restrict access to authenticated users only. Set to <code>NONE</code> if you want to bypass IAM authentication to create a public endpoint. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html\">Control access to Lambda function URLs</a>.</p>
2288
+ cors: <p>The <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS\">cross-origin resource sharing (CORS)</a> settings for your function URL.</p>
2289
+ invoke_mode: <p>Use one of the following options:</p> <ul> <li> <p> <code>BUFFERED</code> – This is the default option. Lambda invokes your function using the <code>Invoke</code> API operation. Invocation results are available when the payload is complete. The maximum payload size is 6 MB.</p> </li> <li> <p> <code>RESPONSE_STREAM</code> – Your function streams payload results as they become available. Lambda invokes your function using the <code>InvokeWithResponseStream</code> API operation. The maximum response payload size is 200 MB.</p> </li> </ul>
2290
+
2291
+ Raises:
2292
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
2293
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
2294
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
2295
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
2296
+ 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>
2297
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
2298
+ """
2299
+
2300
+ async def _handler(
2301
+ req: "AsyncOperationRequest[capo_lambda.types.create_function_url_config_request.CreateFunctionUrlConfigRequest]",
2302
+ ) -> AsyncOperationResponse[
2303
+ "capo_lambda.types.create_function_url_config_response.CreateFunctionUrlConfigResponse"
2304
+ ]:
2305
+ import capo_lambda._operations.aws_gir_api_service.create_function_url_config
2306
+
2307
+ (
2308
+ output,
2309
+ http_response,
2310
+ ) = await capo_lambda._operations.aws_gir_api_service.create_function_url_config.async_create_function_url_config(
2311
+ req.options, req.input
2312
+ )
2313
+ return AsyncOperationResponse(output=output, response=http_response)
2314
+
2315
+ interceptors_, options_ = self._service.operation_options(config_overrides)
2316
+ input_: capo_lambda.types.create_function_url_config_request.CreateFunctionUrlConfigRequest = {} # type: ignore[typeddict-item]
2317
+ input_["function_name"] = function_name
2318
+ if qualifier is not None:
2319
+ input_["qualifier"] = qualifier
2320
+ input_["auth_type"] = auth_type
2321
+ if cors is not None:
2322
+ input_["cors"] = cors
2323
+ if invoke_mode is not None:
2324
+ input_["invoke_mode"] = invoke_mode
2325
+
2326
+ response = await aexecute_pipeline(
2327
+ AsyncOperationRequest(input=input_, options=options_),
2328
+ handler=_handler,
2329
+ interceptors=list(interceptors_),
2330
+ )
2331
+ return response.output
2332
+
2333
+ async def delete_function_concurrency(
2334
+ self,
2335
+ function_name: "capo_lambda.types.function_name.FunctionName",
2336
+ *,
2337
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
2338
+ ) -> None:
2339
+ r"""<p>Removes a concurrent execution limit from a function.</p>
2340
+
2341
+ Args:
2342
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
2343
+
2344
+ Raises:
2345
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
2346
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
2347
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
2348
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
2349
+ 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>
2350
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
2351
+
2352
+ Examples:
2353
+ To remove the reserved concurrent execution limit from a function
2354
+ The following example deletes the reserved concurrent execution limit from a function named my-function.
2355
+
2356
+ >>> await client.delete_function_concurrency(function_name='my-function')
2357
+ """
2358
+
2359
+ async def _handler(
2360
+ req: "AsyncOperationRequest[capo_lambda.types.delete_function_concurrency_request.DeleteFunctionConcurrencyRequest]",
2361
+ ) -> AsyncOperationResponse[None]:
2362
+ import capo_lambda._operations.aws_gir_api_service.delete_function_concurrency
2363
+
2364
+ (
2365
+ output,
2366
+ http_response,
2367
+ ) = await capo_lambda._operations.aws_gir_api_service.delete_function_concurrency.async_delete_function_concurrency(
2368
+ req.options, req.input
2369
+ )
2370
+ return AsyncOperationResponse(output=output, response=http_response)
2371
+
2372
+ interceptors_, options_ = self._service.operation_options(config_overrides)
2373
+ input_: capo_lambda.types.delete_function_concurrency_request.DeleteFunctionConcurrencyRequest = {} # type: ignore[typeddict-item]
2374
+ input_["function_name"] = function_name
2375
+
2376
+ response = await aexecute_pipeline(
2377
+ AsyncOperationRequest(input=input_, options=options_),
2378
+ handler=_handler,
2379
+ interceptors=list(interceptors_),
2380
+ )
2381
+ return response.output
2382
+
2383
+ async def delete_function_url_config(
2384
+ self,
2385
+ function_name: "capo_lambda.types.function_name.FunctionName",
2386
+ *,
2387
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
2388
+ qualifier: Optional[
2389
+ "capo_lambda.types.function_url_qualifier.FunctionUrlQualifier"
2390
+ ] = None,
2391
+ ) -> None:
2392
+ r"""<p>Deletes a Lambda function URL. When you delete a function URL, you can't recover it. Creating a new function URL results in a different URL address.</p>
2393
+
2394
+ Args:
2395
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
2396
+ qualifier: <p>The alias name.</p>
2397
+
2398
+ Raises:
2399
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
2400
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
2401
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
2402
+ 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>
2403
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
2404
+ """
2405
+
2406
+ async def _handler(
2407
+ req: "AsyncOperationRequest[capo_lambda.types.delete_function_url_config_request.DeleteFunctionUrlConfigRequest]",
2408
+ ) -> AsyncOperationResponse[None]:
2409
+ import capo_lambda._operations.aws_gir_api_service.delete_function_url_config
2410
+
2411
+ (
2412
+ output,
2413
+ http_response,
2414
+ ) = await capo_lambda._operations.aws_gir_api_service.delete_function_url_config.async_delete_function_url_config(
2415
+ req.options, req.input
2416
+ )
2417
+ return AsyncOperationResponse(output=output, response=http_response)
2418
+
2419
+ interceptors_, options_ = self._service.operation_options(config_overrides)
2420
+ input_: capo_lambda.types.delete_function_url_config_request.DeleteFunctionUrlConfigRequest = {} # type: ignore[typeddict-item]
2421
+ input_["function_name"] = function_name
2422
+ if qualifier is not None:
2423
+ input_["qualifier"] = qualifier
2424
+
2425
+ response = await aexecute_pipeline(
2426
+ AsyncOperationRequest(input=input_, options=options_),
2427
+ handler=_handler,
2428
+ interceptors=list(interceptors_),
2429
+ )
2430
+ return response.output
2431
+
2432
+ async def get_function_concurrency(
2433
+ self,
2434
+ function_name: "capo_lambda.types.function_name.FunctionName",
2435
+ *,
2436
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
2437
+ ) -> "capo_lambda.types.get_function_concurrency_response.GetFunctionConcurrencyResponse":
2438
+ r"""<p>Returns details about the reserved concurrency configuration for a function. To set a concurrency limit for a function, use <a>PutFunctionConcurrency</a>.</p>
2439
+
2440
+ Args:
2441
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
2442
+
2443
+ Raises:
2444
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
2445
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
2446
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
2447
+ 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>
2448
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
2449
+
2450
+ Examples:
2451
+ To get the reserved concurrency setting for a function
2452
+ The following example returns the reserved concurrency setting for a function named my-function.
2453
+
2454
+ >>> await client.get_function_concurrency(function_name='my-function')
2455
+ """
2456
+
2457
+ async def _handler(
2458
+ req: "AsyncOperationRequest[capo_lambda.types.get_function_concurrency_request.GetFunctionConcurrencyRequest]",
2459
+ ) -> AsyncOperationResponse[
2460
+ "capo_lambda.types.get_function_concurrency_response.GetFunctionConcurrencyResponse"
2461
+ ]:
2462
+ import capo_lambda._operations.aws_gir_api_service.get_function_concurrency
2463
+
2464
+ (
2465
+ output,
2466
+ http_response,
2467
+ ) = await capo_lambda._operations.aws_gir_api_service.get_function_concurrency.async_get_function_concurrency(
2468
+ req.options, req.input
2469
+ )
2470
+ return AsyncOperationResponse(output=output, response=http_response)
2471
+
2472
+ interceptors_, options_ = self._service.operation_options(config_overrides)
2473
+ input_: capo_lambda.types.get_function_concurrency_request.GetFunctionConcurrencyRequest = {} # type: ignore[typeddict-item]
2474
+ input_["function_name"] = function_name
2475
+
2476
+ response = await aexecute_pipeline(
2477
+ AsyncOperationRequest(input=input_, options=options_),
2478
+ handler=_handler,
2479
+ interceptors=list(interceptors_),
2480
+ )
2481
+ return response.output
2482
+
2483
+ async def get_function_url_config(
2484
+ self,
2485
+ function_name: "capo_lambda.types.function_name.FunctionName",
2486
+ *,
2487
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
2488
+ qualifier: Optional[
2489
+ "capo_lambda.types.function_url_qualifier.FunctionUrlQualifier"
2490
+ ] = None,
2491
+ ) -> "capo_lambda.types.get_function_url_config_response.GetFunctionUrlConfigResponse":
2492
+ r"""<p>Returns details about a Lambda function URL.</p>
2493
+
2494
+ Args:
2495
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
2496
+ qualifier: <p>The alias name.</p>
2497
+
2498
+ Raises:
2499
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
2500
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
2501
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
2502
+ 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>
2503
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
2504
+ """
2505
+
2506
+ async def _handler(
2507
+ req: "AsyncOperationRequest[capo_lambda.types.get_function_url_config_request.GetFunctionUrlConfigRequest]",
2508
+ ) -> AsyncOperationResponse[
2509
+ "capo_lambda.types.get_function_url_config_response.GetFunctionUrlConfigResponse"
2510
+ ]:
2511
+ import capo_lambda._operations.aws_gir_api_service.get_function_url_config
2512
+
2513
+ (
2514
+ output,
2515
+ http_response,
2516
+ ) = await capo_lambda._operations.aws_gir_api_service.get_function_url_config.async_get_function_url_config(
2517
+ req.options, req.input
2518
+ )
2519
+ return AsyncOperationResponse(output=output, response=http_response)
2520
+
2521
+ interceptors_, options_ = self._service.operation_options(config_overrides)
2522
+ input_: capo_lambda.types.get_function_url_config_request.GetFunctionUrlConfigRequest = {} # type: ignore[typeddict-item]
2523
+ input_["function_name"] = function_name
2524
+ if qualifier is not None:
2525
+ input_["qualifier"] = qualifier
2526
+
2527
+ response = await aexecute_pipeline(
2528
+ AsyncOperationRequest(input=input_, options=options_),
2529
+ handler=_handler,
2530
+ interceptors=list(interceptors_),
2531
+ )
2532
+ return response.output
2533
+
2534
+ async def list_function_url_configs(
2535
+ self,
2536
+ function_name: "capo_lambda.types.function_name.FunctionName",
2537
+ *,
2538
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
2539
+ marker: Optional["capo_lambda.types.string.String"] = None,
2540
+ max_items: Optional["capo_lambda.types.max_items.MaxItems"] = None,
2541
+ ) -> "capo_lambda.types.list_function_url_configs_response.ListFunctionUrlConfigsResponse":
2542
+ r"""<p>Returns a list of Lambda function URLs for the specified function.</p>
2543
+
2544
+ Args:
2545
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
2546
+ marker: <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
2547
+ max_items: <p>The maximum number of function URLs to return in the response. Note that <code>ListFunctionUrlConfigs</code> returns a maximum of 50 items in each response, even if you set the number higher.</p>
2548
+
2549
+ Raises:
2550
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
2551
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
2552
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
2553
+ 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>
2554
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
2555
+ """
2556
+
2557
+ async def _handler(
2558
+ req: "AsyncOperationRequest[capo_lambda.types.list_function_url_configs_request.ListFunctionUrlConfigsRequest]",
2559
+ ) -> AsyncOperationResponse[
2560
+ "capo_lambda.types.list_function_url_configs_response.ListFunctionUrlConfigsResponse"
2561
+ ]:
2562
+ import capo_lambda._operations.aws_gir_api_service.list_function_url_configs
2563
+
2564
+ (
2565
+ output,
2566
+ http_response,
2567
+ ) = await capo_lambda._operations.aws_gir_api_service.list_function_url_configs.async_list_function_url_configs(
2568
+ req.options, req.input
2569
+ )
2570
+ return AsyncOperationResponse(output=output, response=http_response)
2571
+
2572
+ interceptors_, options_ = self._service.operation_options(config_overrides)
2573
+ input_: capo_lambda.types.list_function_url_configs_request.ListFunctionUrlConfigsRequest = {} # type: ignore[typeddict-item]
2574
+ input_["function_name"] = function_name
2575
+ if marker is not None:
2576
+ input_["marker"] = marker
2577
+ if max_items is not None:
2578
+ input_["max_items"] = max_items
2579
+
2580
+ response = await aexecute_pipeline(
2581
+ AsyncOperationRequest(input=input_, options=options_),
2582
+ handler=_handler,
2583
+ interceptors=list(interceptors_),
2584
+ )
2585
+ return response.output
2586
+
2587
+ async def list_provisioned_concurrency_configs(
2588
+ self,
2589
+ function_name: "capo_lambda.types.function_name.FunctionName",
2590
+ *,
2591
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
2592
+ marker: Optional["capo_lambda.types.string.String"] = None,
2593
+ max_items: Optional[
2594
+ "capo_lambda.types.max_provisioned_concurrency_config_list_items.MaxProvisionedConcurrencyConfigListItems"
2595
+ ] = None,
2596
+ ) -> "capo_lambda.types.list_provisioned_concurrency_configs_response.ListProvisionedConcurrencyConfigsResponse":
2597
+ r"""<p>Retrieves a list of provisioned concurrency configurations for a function.</p>
2598
+
2599
+ Args:
2600
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
2601
+ marker: <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
2602
+ max_items: <p>Specify a number to limit the number of configurations returned.</p>
2603
+
2604
+ Raises:
2605
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
2606
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
2607
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
2608
+ 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>
2609
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
2610
+
2611
+ Examples:
2612
+ To get a list of provisioned concurrency configurations
2613
+ The following example returns a list of provisioned concurrency configurations for a function named my-function.
2614
+
2615
+ >>> await client.list_provisioned_concurrency_configs(function_name='my-function')
2616
+ """
2617
+
2618
+ async def _handler(
2619
+ req: "AsyncOperationRequest[capo_lambda.types.list_provisioned_concurrency_configs_request.ListProvisionedConcurrencyConfigsRequest]",
2620
+ ) -> AsyncOperationResponse[
2621
+ "capo_lambda.types.list_provisioned_concurrency_configs_response.ListProvisionedConcurrencyConfigsResponse"
2622
+ ]:
2623
+ import capo_lambda._operations.aws_gir_api_service.list_provisioned_concurrency_configs
2624
+
2625
+ (
2626
+ output,
2627
+ http_response,
2628
+ ) = await capo_lambda._operations.aws_gir_api_service.list_provisioned_concurrency_configs.async_list_provisioned_concurrency_configs(
2629
+ req.options, req.input
2630
+ )
2631
+ return AsyncOperationResponse(output=output, response=http_response)
2632
+
2633
+ interceptors_, options_ = self._service.operation_options(config_overrides)
2634
+ input_: capo_lambda.types.list_provisioned_concurrency_configs_request.ListProvisionedConcurrencyConfigsRequest = {} # type: ignore[typeddict-item]
2635
+ input_["function_name"] = function_name
2636
+ if marker is not None:
2637
+ input_["marker"] = marker
2638
+ if max_items is not None:
2639
+ input_["max_items"] = max_items
2640
+
2641
+ response = await aexecute_pipeline(
2642
+ AsyncOperationRequest(input=input_, options=options_),
2643
+ handler=_handler,
2644
+ interceptors=list(interceptors_),
2645
+ )
2646
+ return response.output
2647
+
2648
+ async def put_function_concurrency(
2649
+ self,
2650
+ function_name: "capo_lambda.types.function_name.FunctionName",
2651
+ reserved_concurrent_executions: "capo_lambda.types.reserved_concurrent_executions.ReservedConcurrentExecutions",
2652
+ *,
2653
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
2654
+ ) -> "capo_lambda.types.concurrency.Concurrency":
2655
+ r"""<p>Sets the maximum number of simultaneous executions for a function, and reserves capacity for that concurrency level.</p> <p>Concurrency settings apply to the function as a whole, including all published versions and the unpublished version. Reserving concurrency both ensures that your function has capacity to process the specified number of events simultaneously, and prevents it from scaling beyond that level. Use <a>GetFunction</a> to see the current setting for a function.</p> <p>Use <a>GetAccountSettings</a> to see your Regional concurrency limit. You can reserve concurrency for as many functions as you like, as long as you leave at least 100 simultaneous executions unreserved for functions that aren't configured with a per-function limit. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-scaling.html\">Lambda function scaling</a>.</p>
2656
+
2657
+ Args:
2658
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
2659
+ reserved_concurrent_executions: <p>The number of simultaneous executions to reserve for the function.</p>
2660
+
2661
+ Raises:
2662
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
2663
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
2664
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
2665
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
2666
+ 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>
2667
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
2668
+
2669
+ Examples:
2670
+ To configure a reserved concurrency limit for a function
2671
+ The following example configures 100 reserved concurrent executions for the my-function function.
2672
+
2673
+ >>> await client.put_function_concurrency(function_name='my-function', reserved_concurrent_executions=100)
2674
+ """
2675
+
2676
+ async def _handler(
2677
+ req: "AsyncOperationRequest[capo_lambda.types.put_function_concurrency_request.PutFunctionConcurrencyRequest]",
2678
+ ) -> AsyncOperationResponse["capo_lambda.types.concurrency.Concurrency"]:
2679
+ import capo_lambda._operations.aws_gir_api_service.put_function_concurrency
2680
+
2681
+ (
2682
+ output,
2683
+ http_response,
2684
+ ) = await capo_lambda._operations.aws_gir_api_service.put_function_concurrency.async_put_function_concurrency(
2685
+ req.options, req.input
2686
+ )
2687
+ return AsyncOperationResponse(output=output, response=http_response)
2688
+
2689
+ interceptors_, options_ = self._service.operation_options(config_overrides)
2690
+ input_: capo_lambda.types.put_function_concurrency_request.PutFunctionConcurrencyRequest = {} # type: ignore[typeddict-item]
2691
+ input_["function_name"] = function_name
2692
+ input_["reserved_concurrent_executions"] = reserved_concurrent_executions
2693
+
2694
+ response = await aexecute_pipeline(
2695
+ AsyncOperationRequest(input=input_, options=options_),
2696
+ handler=_handler,
2697
+ interceptors=list(interceptors_),
2698
+ )
2699
+ return response.output
2700
+
2701
+ async def update_function_code(
2702
+ self,
2703
+ function_name: "capo_lambda.types.function_name.FunctionName",
2704
+ *,
2705
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
2706
+ zip_file: Optional["capo_lambda.types.blob.Blob"] = None,
2707
+ s3_bucket: Optional["capo_lambda.types.s3_bucket.S3Bucket"] = None,
2708
+ s3_key: Optional["capo_lambda.types.s3_key.S3Key"] = None,
2709
+ s3_object_version: Optional[
2710
+ "capo_lambda.types.s3_object_version.S3ObjectVersion"
2711
+ ] = None,
2712
+ image_uri: Optional["capo_lambda.types.string.String"] = None,
2713
+ publish: Optional["capo_lambda.types.boolean.Boolean"] = None,
2714
+ dry_run: Optional["capo_lambda.types.boolean.Boolean"] = None,
2715
+ revision_id: Optional["capo_lambda.types.string.String"] = None,
2716
+ architectures: Optional[
2717
+ "capo_lambda.types.architectures_list.ArchitecturesList"
2718
+ ] = None,
2719
+ source_kms_key_arn: Optional["capo_lambda.types.kms_key_arn.KMSKeyArn"] = None,
2720
+ publish_to: Optional[
2721
+ "capo_lambda.types.function_version_latest_published.FunctionVersionLatestPublished"
2722
+ ] = None,
2723
+ ) -> "capo_lambda.types.function_configuration.FunctionConfiguration":
2724
+ r"""<p>Updates a Lambda function's code. If code signing is enabled for the function, the code package must be signed by a trusted publisher. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html\">Configuring code signing for Lambda</a>.</p> <p>If the function's package type is <code>Image</code>, then you must specify the code package in <code>ImageUri</code> as the URI of a <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html\">container image</a> in the Amazon ECR registry.</p> <p>If the function's package type is <code>Zip</code>, then you must specify the deployment package as a <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html#gettingstarted-package-zip\">.zip file archive</a>. Enter the Amazon S3 bucket and key of the code .zip file location. You can also provide the function code inline using the <code>ZipFile</code> field.</p> <p>The code in the deployment package must be compatible with the target instruction set architecture of the function (<code>x86-64</code> or <code>arm64</code>).</p> <p>The function's code is locked when you publish a version. You can't modify the code of a published version, only the unpublished version.</p> <note> <p>For a function defined as a container image, Lambda resolves the image tag to an image digest. In Amazon ECR, if you update the image tag to a new image, Lambda does not automatically update the function.</p> </note>
2725
+
2726
+ Args:
2727
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
2728
+ zip_file: <p>The base64-encoded contents of the deployment package. Amazon Web Services SDK and CLI clients handle the encoding for you. Use only with a function defined with a .zip file archive deployment package.</p>
2729
+ s3_bucket: <p>An Amazon S3 bucket in the same Amazon Web Services Region as your function. The bucket can be in a different Amazon Web Services account. Use only with a function defined with a .zip file archive deployment package.</p>
2730
+ s3_key: <p>The Amazon S3 key of the deployment package. Use only with a function defined with a .zip file archive deployment package.</p>
2731
+ s3_object_version: <p>For versioned objects, the version of the deployment package object to use.</p>
2732
+ image_uri: <p>URI of a container image in the Amazon ECR registry. Do not use for a function defined with a .zip file archive.</p>
2733
+ publish: <p>Set to true to publish a new version of the function after updating the code. This has the same effect as calling <a>PublishVersion</a> separately.</p>
2734
+ dry_run: <p>Set to true to validate the request parameters and access permissions without modifying the function code.</p>
2735
+ revision_id: <p>Update the function only if the revision ID matches the ID that's specified. Use this option to avoid modifying a function that has changed since you last read it.</p>
2736
+ architectures: <p>The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is <code>x86_64</code>.</p>
2737
+ source_kms_key_arn: <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt your function's .zip deployment package. If you don't provide a customer managed key, Lambda uses an Amazon Web Services managed key.</p>
2738
+ publish_to: <p>Specifies where to publish the function version or configuration.</p>
2739
+
2740
+ Raises:
2741
+ capo_lambda.errors.code_signing_config_not_found_exception.CodeSigningConfigNotFoundException: <p>The specified code signing configuration does not exist.</p>
2742
+ capo_lambda.errors.code_storage_exceeded_exception.CodeStorageExceededException: <p>Your Amazon Web Services account has exceeded its maximum total code size. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html\">Lambda quotas</a>.</p>
2743
+ capo_lambda.errors.code_verification_failed_exception.CodeVerificationFailedException: <p>The code signature failed one or more of the validation checks for signature mismatch or expiry, and the code signing policy is set to ENFORCE. Lambda blocks the deployment.</p>
2744
+ capo_lambda.errors.invalid_code_signature_exception.InvalidCodeSignatureException: <p>The code signature failed the integrity check. If the integrity check fails, then Lambda blocks deployment, even if the code signing policy is set to WARN.</p>
2745
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
2746
+ capo_lambda.errors.precondition_failed_exception.PreconditionFailedException: <p>The RevisionId provided does not match the latest RevisionId for the Lambda function or alias.</p> <ul> <li> <p> <b>For AddPermission and RemovePermission API operations:</b> Call <code>GetPolicy</code> to retrieve the latest RevisionId for your resource.</p> </li> <li> <p> <b>For all other API operations:</b> Call <code>GetFunction</code> or <code>GetAlias</code> to retrieve the latest RevisionId for your resource.</p> </li> </ul>
2747
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
2748
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
2749
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
2750
+ 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>
2751
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
2752
+
2753
+ Examples:
2754
+ To update a Lambda function's code
2755
+ The following example replaces the code of the unpublished ($LATEST) version of a function named my-function with the contents of the specified zip file in Amazon S3.
2756
+
2757
+ >>> await client.update_function_code(function_name='my-function', s3_bucket='my-bucket-1xpuxmplzrlbh', s3_key='function.zip')
2758
+ """
2759
+
2760
+ async def _handler(
2761
+ req: "AsyncOperationRequest[capo_lambda.types.update_function_code_request.UpdateFunctionCodeRequest]",
2762
+ ) -> AsyncOperationResponse[
2763
+ "capo_lambda.types.function_configuration.FunctionConfiguration"
2764
+ ]:
2765
+ import capo_lambda._operations.aws_gir_api_service.update_function_code
2766
+
2767
+ (
2768
+ output,
2769
+ http_response,
2770
+ ) = await capo_lambda._operations.aws_gir_api_service.update_function_code.async_update_function_code(
2771
+ req.options, req.input
2772
+ )
2773
+ return AsyncOperationResponse(output=output, response=http_response)
2774
+
2775
+ interceptors_, options_ = self._service.operation_options(config_overrides)
2776
+ input_: capo_lambda.types.update_function_code_request.UpdateFunctionCodeRequest = {} # type: ignore[typeddict-item]
2777
+ input_["function_name"] = function_name
2778
+ if zip_file is not None:
2779
+ input_["zip_file"] = zip_file
2780
+ if s3_bucket is not None:
2781
+ input_["s3_bucket"] = s3_bucket
2782
+ if s3_key is not None:
2783
+ input_["s3_key"] = s3_key
2784
+ if s3_object_version is not None:
2785
+ input_["s3_object_version"] = s3_object_version
2786
+ if image_uri is not None:
2787
+ input_["image_uri"] = image_uri
2788
+ if publish is not None:
2789
+ input_["publish"] = publish
2790
+ if dry_run is not None:
2791
+ input_["dry_run"] = dry_run
2792
+ if revision_id is not None:
2793
+ input_["revision_id"] = revision_id
2794
+ if architectures is not None:
2795
+ input_["architectures"] = architectures
2796
+ if source_kms_key_arn is not None:
2797
+ input_["source_kms_key_arn"] = source_kms_key_arn
2798
+ if publish_to is not None:
2799
+ input_["publish_to"] = publish_to
2800
+
2801
+ response = await aexecute_pipeline(
2802
+ AsyncOperationRequest(input=input_, options=options_),
2803
+ handler=_handler,
2804
+ interceptors=list(interceptors_),
2805
+ )
2806
+ return response.output
2807
+
2808
+ async def update_function_configuration(
2809
+ self,
2810
+ function_name: "capo_lambda.types.function_name.FunctionName",
2811
+ *,
2812
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
2813
+ role: Optional["capo_lambda.types.role_arn.RoleArn"] = None,
2814
+ handler: Optional["capo_lambda.types.handler.Handler"] = None,
2815
+ description: Optional["capo_lambda.types.description.Description"] = None,
2816
+ timeout: Optional["capo_lambda.types.timeout.Timeout"] = None,
2817
+ memory_size: Optional["capo_lambda.types.memory_size.MemorySize"] = None,
2818
+ vpc_config: Optional["capo_lambda.types.vpc_config.VpcConfig"] = None,
2819
+ environment: Optional["capo_lambda.types.environment.Environment"] = None,
2820
+ runtime: Optional["capo_lambda.types.runtime.Runtime"] = None,
2821
+ dead_letter_config: Optional[
2822
+ "capo_lambda.types.dead_letter_config.DeadLetterConfig"
2823
+ ] = None,
2824
+ kms_key_arn: Optional["capo_lambda.types.kms_key_arn.KMSKeyArn"] = None,
2825
+ tracing_config: Optional[
2826
+ "capo_lambda.types.tracing_config.TracingConfig"
2827
+ ] = None,
2828
+ revision_id: Optional["capo_lambda.types.string.String"] = None,
2829
+ layers: Optional["capo_lambda.types.layer_list.LayerList"] = None,
2830
+ file_system_configs: Optional[
2831
+ "capo_lambda.types.file_system_config_list.FileSystemConfigList"
2832
+ ] = None,
2833
+ image_config: Optional["capo_lambda.types.image_config.ImageConfig"] = None,
2834
+ ephemeral_storage: Optional[
2835
+ "capo_lambda.types.ephemeral_storage.EphemeralStorage"
2836
+ ] = None,
2837
+ snap_start: Optional["capo_lambda.types.snap_start.SnapStart"] = None,
2838
+ logging_config: Optional[
2839
+ "capo_lambda.types.logging_config.LoggingConfig"
2840
+ ] = None,
2841
+ capacity_provider_config: Optional[
2842
+ "capo_lambda.types.capacity_provider_config.CapacityProviderConfig"
2843
+ ] = None,
2844
+ durable_config: Optional[
2845
+ "capo_lambda.types.durable_config.DurableConfig"
2846
+ ] = None,
2847
+ ) -> "capo_lambda.types.function_configuration.FunctionConfiguration":
2848
+ r"""<p>Modify the version-specific settings of a Lambda function.</p> <p>When you update a function, Lambda provisions an instance of the function and its supporting resources. If your function connects to a VPC, this process can take a minute. During this time, you can't modify the function, but you can still invoke it. The <code>LastUpdateStatus</code>, <code>LastUpdateStatusReason</code>, and <code>LastUpdateStatusReasonCode</code> fields in the response from <a>GetFunctionConfiguration</a> indicate when the update is complete and the function is processing events with the new configuration. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html\">Lambda function states</a>.</p> <p>These settings can vary between versions of a function and are locked when you publish a version. You can't modify the configuration of a published version, only the unpublished version.</p> <p>To configure function concurrency, use <a>PutFunctionConcurrency</a>. To grant invoke permissions to an Amazon Web Services account or Amazon Web Services service, use <a>AddPermission</a>.</p>
2849
+
2850
+ Args:
2851
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
2852
+ role: <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
2853
+ handler: <p>The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html\">Lambda programming model</a>.</p>
2854
+ description: <p>A description of the function.</p>
2855
+ timeout: <p>The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html\">Lambda execution environment</a>.</p>
2856
+ memory_size: <p>The amount of <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console\">memory available to the function</a> at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB.</p>
2857
+ vpc_config: <p>For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html\">Configuring a Lambda function to access resources in a VPC</a>.</p>
2858
+ environment: <p>Environment variables that are accessible from function code during execution.</p>
2859
+ runtime: <p>The identifier of the function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html\"> runtime</a>. Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.</p> <p>The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing functions shortly after each runtime is deprecated. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels\">Runtime use after deprecation</a>.</p> <p>For a list of all currently supported runtimes, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported\">Supported runtimes</a>.</p>
2860
+ dead_letter_config: <p>A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq\">Dead-letter queues</a>.</p>
2861
+ kms_key_arn: <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p> <ul> <li> <p>The function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption\">environment variables</a>.</p> </li> <li> <p>The function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html\">Lambda SnapStart</a> snapshots.</p> </li> <li> <p>When used with <code>SourceKMSKeyArn</code>, the unzipped version of the .zip deployment package that's used for function invocations. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption\"> Specifying a customer managed key for Lambda</a>.</p> </li> <li> <p>The optimized version of the container image that's used for function invocations. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle\">Function lifecycle</a>.</p> </li> </ul> <p>If you don't provide a customer managed key, Lambda uses an <a href=\"https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk\">Amazon Web Services owned key</a> or an <a href=\"https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk\">Amazon Web Services managed key</a>.</p>
2862
+ tracing_config: <p>Set <code>Mode</code> to <code>Active</code> to sample and trace a subset of incoming requests with <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html\">X-Ray</a>.</p>
2863
+ revision_id: <p>Update the function only if the revision ID matches the ID that's specified. Use this option to avoid modifying a function that has changed since you last read it.</p>
2864
+ layers: <p>A list of <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html\">function layers</a> to add to the function's execution environment. Specify each layer by its ARN, including the version.</p>
2865
+ file_system_configs: <p>Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.</p>
2866
+ image_config: <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms\">Container image configuration values</a> that override the values in the container image Docker file.</p>
2867
+ ephemeral_storage: <p>The size of the function's <code>/tmp</code> directory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage\">Configuring ephemeral storage (console)</a>.</p>
2868
+ snap_start: <p>The function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html\">SnapStart</a> setting.</p>
2869
+ logging_config: <p>The function's Amazon CloudWatch Logs configuration settings.</p>
2870
+ capacity_provider_config: <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
2871
+ durable_config: <p>Configuration settings for durable functions. Allows updating execution timeout and retention period for functions with durability enabled.</p>
2872
+
2873
+ Raises:
2874
+ capo_lambda.errors.code_signing_config_not_found_exception.CodeSigningConfigNotFoundException: <p>The specified code signing configuration does not exist.</p>
2875
+ capo_lambda.errors.code_verification_failed_exception.CodeVerificationFailedException: <p>The code signature failed one or more of the validation checks for signature mismatch or expiry, and the code signing policy is set to ENFORCE. Lambda blocks the deployment.</p>
2876
+ capo_lambda.errors.invalid_code_signature_exception.InvalidCodeSignatureException: <p>The code signature failed the integrity check. If the integrity check fails, then Lambda blocks deployment, even if the code signing policy is set to WARN.</p>
2877
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
2878
+ capo_lambda.errors.precondition_failed_exception.PreconditionFailedException: <p>The RevisionId provided does not match the latest RevisionId for the Lambda function or alias.</p> <ul> <li> <p> <b>For AddPermission and RemovePermission API operations:</b> Call <code>GetPolicy</code> to retrieve the latest RevisionId for your resource.</p> </li> <li> <p> <b>For all other API operations:</b> Call <code>GetFunction</code> or <code>GetAlias</code> to retrieve the latest RevisionId for your resource.</p> </li> </ul>
2879
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
2880
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
2881
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
2882
+ 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>
2883
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
2884
+
2885
+ Examples:
2886
+ To update a Lambda function's configuration
2887
+ The following example modifies the memory size to be 256 MB for the unpublished ($LATEST) version of a function named my-function.
2888
+
2889
+ >>> await client.update_function_configuration(function_name='my-function', memory_size=256, durable_config={'ExecutionTimeout': 3600, 'RetentionPeriodInDays': 45})
2890
+ """
2891
+
2892
+ async def _handler(
2893
+ req: "AsyncOperationRequest[capo_lambda.types.update_function_configuration_request.UpdateFunctionConfigurationRequest]",
2894
+ ) -> AsyncOperationResponse[
2895
+ "capo_lambda.types.function_configuration.FunctionConfiguration"
2896
+ ]:
2897
+ import capo_lambda._operations.aws_gir_api_service.update_function_configuration
2898
+
2899
+ (
2900
+ output,
2901
+ http_response,
2902
+ ) = await capo_lambda._operations.aws_gir_api_service.update_function_configuration.async_update_function_configuration(
2903
+ req.options, req.input
2904
+ )
2905
+ return AsyncOperationResponse(output=output, response=http_response)
2906
+
2907
+ interceptors_, options_ = self._service.operation_options(config_overrides)
2908
+ input_: capo_lambda.types.update_function_configuration_request.UpdateFunctionConfigurationRequest = {} # type: ignore[typeddict-item]
2909
+ input_["function_name"] = function_name
2910
+ if role is not None:
2911
+ input_["role"] = role
2912
+ if handler is not None:
2913
+ input_["handler"] = handler
2914
+ if description is not None:
2915
+ input_["description"] = description
2916
+ if timeout is not None:
2917
+ input_["timeout"] = timeout
2918
+ if memory_size is not None:
2919
+ input_["memory_size"] = memory_size
2920
+ if vpc_config is not None:
2921
+ input_["vpc_config"] = vpc_config
2922
+ if environment is not None:
2923
+ input_["environment"] = environment
2924
+ if runtime is not None:
2925
+ input_["runtime"] = runtime
2926
+ if dead_letter_config is not None:
2927
+ input_["dead_letter_config"] = dead_letter_config
2928
+ if kms_key_arn is not None:
2929
+ input_["kms_key_arn"] = kms_key_arn
2930
+ if tracing_config is not None:
2931
+ input_["tracing_config"] = tracing_config
2932
+ if revision_id is not None:
2933
+ input_["revision_id"] = revision_id
2934
+ if layers is not None:
2935
+ input_["layers"] = layers
2936
+ if file_system_configs is not None:
2937
+ input_["file_system_configs"] = file_system_configs
2938
+ if image_config is not None:
2939
+ input_["image_config"] = image_config
2940
+ if ephemeral_storage is not None:
2941
+ input_["ephemeral_storage"] = ephemeral_storage
2942
+ if snap_start is not None:
2943
+ input_["snap_start"] = snap_start
2944
+ if logging_config is not None:
2945
+ input_["logging_config"] = logging_config
2946
+ if capacity_provider_config is not None:
2947
+ input_["capacity_provider_config"] = capacity_provider_config
2948
+ if durable_config is not None:
2949
+ input_["durable_config"] = durable_config
2950
+
2951
+ response = await aexecute_pipeline(
2952
+ AsyncOperationRequest(input=input_, options=options_),
2953
+ handler=_handler,
2954
+ interceptors=list(interceptors_),
2955
+ )
2956
+ return response.output
2957
+
2958
+ async def update_function_url_config(
2959
+ self,
2960
+ function_name: "capo_lambda.types.function_name.FunctionName",
2961
+ *,
2962
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
2963
+ qualifier: Optional[
2964
+ "capo_lambda.types.function_url_qualifier.FunctionUrlQualifier"
2965
+ ] = None,
2966
+ auth_type: Optional[
2967
+ "capo_lambda.types.function_url_auth_type.FunctionUrlAuthType"
2968
+ ] = None,
2969
+ cors: Optional["capo_lambda.types.cors.Cors"] = None,
2970
+ invoke_mode: Optional["capo_lambda.types.invoke_mode.InvokeMode"] = None,
2971
+ ) -> "capo_lambda.types.update_function_url_config_response.UpdateFunctionUrlConfigResponse":
2972
+ r"""<p>Updates the configuration for a Lambda function URL.</p>
2973
+
2974
+ Args:
2975
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
2976
+ qualifier: <p>The alias name.</p>
2977
+ auth_type: <p>The type of authentication that your function URL uses. Set to <code>AWS_IAM</code> if you want to restrict access to authenticated users only. Set to <code>NONE</code> if you want to bypass IAM authentication to create a public endpoint. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html\">Control access to Lambda function URLs</a>.</p>
2978
+ cors: <p>The <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS\">cross-origin resource sharing (CORS)</a> settings for your function URL.</p>
2979
+ invoke_mode: <p>Use one of the following options:</p> <ul> <li> <p> <code>BUFFERED</code> – This is the default option. Lambda invokes your function using the <code>Invoke</code> API operation. Invocation results are available when the payload is complete. The maximum payload size is 6 MB.</p> </li> <li> <p> <code>RESPONSE_STREAM</code> – Your function streams payload results as they become available. Lambda invokes your function using the <code>InvokeWithResponseStream</code> API operation. The maximum response payload size is 200 MB.</p> </li> </ul>
2980
+
2981
+ Raises:
2982
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
2983
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
2984
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
2985
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
2986
+ 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>
2987
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
2988
+ """
2989
+
2990
+ async def _handler(
2991
+ req: "AsyncOperationRequest[capo_lambda.types.update_function_url_config_request.UpdateFunctionUrlConfigRequest]",
2992
+ ) -> AsyncOperationResponse[
2993
+ "capo_lambda.types.update_function_url_config_response.UpdateFunctionUrlConfigResponse"
2994
+ ]:
2995
+ import capo_lambda._operations.aws_gir_api_service.update_function_url_config
2996
+
2997
+ (
2998
+ output,
2999
+ http_response,
3000
+ ) = await capo_lambda._operations.aws_gir_api_service.update_function_url_config.async_update_function_url_config(
3001
+ req.options, req.input
3002
+ )
3003
+ return AsyncOperationResponse(output=output, response=http_response)
3004
+
3005
+ interceptors_, options_ = self._service.operation_options(config_overrides)
3006
+ input_: capo_lambda.types.update_function_url_config_request.UpdateFunctionUrlConfigRequest = {} # type: ignore[typeddict-item]
3007
+ input_["function_name"] = function_name
3008
+ if qualifier is not None:
3009
+ input_["qualifier"] = qualifier
3010
+ if auth_type is not None:
3011
+ input_["auth_type"] = auth_type
3012
+ if cors is not None:
3013
+ input_["cors"] = cors
3014
+ if invoke_mode is not None:
3015
+ input_["invoke_mode"] = invoke_mode
3016
+
3017
+ response = await aexecute_pipeline(
3018
+ AsyncOperationRequest(input=input_, options=options_),
3019
+ handler=_handler,
3020
+ interceptors=list(interceptors_),
3021
+ )
3022
+ return response.output
3023
+
3024
+ async def delete_function_code_signing_config(
3025
+ self,
3026
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
3027
+ *,
3028
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
3029
+ ) -> None:
3030
+ r"""<p>Removes the code signing configuration from the function.</p>
3031
+
3032
+ Args:
3033
+ 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>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 is limited to 64 characters in length.</p>
3034
+
3035
+ Raises:
3036
+ capo_lambda.errors.code_signing_config_not_found_exception.CodeSigningConfigNotFoundException: <p>The specified code signing configuration does not exist.</p>
3037
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
3038
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
3039
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
3040
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
3041
+ 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>
3042
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
3043
+ """
3044
+
3045
+ async def _handler(
3046
+ req: "AsyncOperationRequest[capo_lambda.types.delete_function_code_signing_config_request.DeleteFunctionCodeSigningConfigRequest]",
3047
+ ) -> AsyncOperationResponse[None]:
3048
+ import capo_lambda._operations.aws_gir_api_service.delete_function_code_signing_config
3049
+
3050
+ (
3051
+ output,
3052
+ http_response,
3053
+ ) = await capo_lambda._operations.aws_gir_api_service.delete_function_code_signing_config.async_delete_function_code_signing_config(
3054
+ req.options, req.input
3055
+ )
3056
+ return AsyncOperationResponse(output=output, response=http_response)
3057
+
3058
+ interceptors_, options_ = self._service.operation_options(config_overrides)
3059
+ input_: capo_lambda.types.delete_function_code_signing_config_request.DeleteFunctionCodeSigningConfigRequest = {} # type: ignore[typeddict-item]
3060
+ input_["function_name"] = function_name
3061
+
3062
+ response = await aexecute_pipeline(
3063
+ AsyncOperationRequest(input=input_, options=options_),
3064
+ handler=_handler,
3065
+ interceptors=list(interceptors_),
3066
+ )
3067
+ return response.output
3068
+
3069
+ async def get_function(
3070
+ self,
3071
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
3072
+ *,
3073
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
3074
+ qualifier: Optional[
3075
+ "capo_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
3076
+ ] = None,
3077
+ ) -> "capo_lambda.types.get_function_response.GetFunctionResponse":
3078
+ r"""<p>Returns information about the function or function version, with a link to download the deployment package that's valid for 10 minutes. If you specify a function version, only details that are specific to that version are returned.</p>
3079
+
3080
+ Args:
3081
+ function_name: <p>The name or ARN of the Lambda function, version, or alias.</p> <p class=\"title\"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> – <code>my-function</code> (name-only), <code>my-function:v1</code> (with alias).</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
3082
+ qualifier: <p>Specify a version or alias to get details about a published version of the function.</p>
3083
+
3084
+ Raises:
3085
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
3086
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
3087
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
3088
+ 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>
3089
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
3090
+
3091
+ Examples:
3092
+ To get a Lambda function
3093
+ The following example returns code and configuration details for version 1 of a function named my-function.
3094
+
3095
+ >>> await client.get_function(function_name='my-function', qualifier='1')
3096
+ """
3097
+
3098
+ async def _handler(
3099
+ req: "AsyncOperationRequest[capo_lambda.types.get_function_request.GetFunctionRequest]",
3100
+ ) -> AsyncOperationResponse[
3101
+ "capo_lambda.types.get_function_response.GetFunctionResponse"
3102
+ ]:
3103
+ import capo_lambda._operations.aws_gir_api_service.get_function
3104
+
3105
+ (
3106
+ output,
3107
+ http_response,
3108
+ ) = await capo_lambda._operations.aws_gir_api_service.get_function.async_get_function(
3109
+ req.options, req.input
3110
+ )
3111
+ return AsyncOperationResponse(output=output, response=http_response)
3112
+
3113
+ interceptors_, options_ = self._service.operation_options(config_overrides)
3114
+ input_: capo_lambda.types.get_function_request.GetFunctionRequest = {} # type: ignore[typeddict-item]
3115
+ input_["function_name"] = function_name
3116
+ if qualifier is not None:
3117
+ input_["qualifier"] = qualifier
3118
+
3119
+ response = await aexecute_pipeline(
3120
+ AsyncOperationRequest(input=input_, options=options_),
3121
+ handler=_handler,
3122
+ interceptors=list(interceptors_),
3123
+ )
3124
+ return response.output
3125
+
3126
+ async def get_function_code_signing_config(
3127
+ self,
3128
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
3129
+ *,
3130
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
3131
+ ) -> "capo_lambda.types.get_function_code_signing_config_response.GetFunctionCodeSigningConfigResponse":
3132
+ r"""<p>Returns the code signing configuration for the specified function.</p>
3133
+
3134
+ Args:
3135
+ 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>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 is limited to 64 characters in length.</p>
3136
+
3137
+ Raises:
3138
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
3139
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
3140
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
3141
+ 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>
3142
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
3143
+ """
3144
+
3145
+ async def _handler(
3146
+ req: "AsyncOperationRequest[capo_lambda.types.get_function_code_signing_config_request.GetFunctionCodeSigningConfigRequest]",
3147
+ ) -> AsyncOperationResponse[
3148
+ "capo_lambda.types.get_function_code_signing_config_response.GetFunctionCodeSigningConfigResponse"
3149
+ ]:
3150
+ import capo_lambda._operations.aws_gir_api_service.get_function_code_signing_config
3151
+
3152
+ (
3153
+ output,
3154
+ http_response,
3155
+ ) = await capo_lambda._operations.aws_gir_api_service.get_function_code_signing_config.async_get_function_code_signing_config(
3156
+ req.options, req.input
3157
+ )
3158
+ return AsyncOperationResponse(output=output, response=http_response)
3159
+
3160
+ interceptors_, options_ = self._service.operation_options(config_overrides)
3161
+ input_: capo_lambda.types.get_function_code_signing_config_request.GetFunctionCodeSigningConfigRequest = {} # type: ignore[typeddict-item]
3162
+ input_["function_name"] = function_name
3163
+
3164
+ response = await aexecute_pipeline(
3165
+ AsyncOperationRequest(input=input_, options=options_),
3166
+ handler=_handler,
3167
+ interceptors=list(interceptors_),
3168
+ )
3169
+ return response.output
3170
+
3171
+ async def get_function_configuration(
3172
+ self,
3173
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
3174
+ *,
3175
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
3176
+ qualifier: Optional[
3177
+ "capo_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
3178
+ ] = None,
3179
+ ) -> "capo_lambda.types.function_configuration.FunctionConfiguration":
3180
+ r"""<p>Returns the version-specific settings of a Lambda function or version. The output includes only options that can vary between versions of a function. To modify these settings, use <a>UpdateFunctionConfiguration</a>.</p> <p>To get all of a function's details, including function-level settings, use <a>GetFunction</a>.</p>
3181
+
3182
+ Args:
3183
+ function_name: <p>The name or ARN of the Lambda function, version, or alias.</p> <p class=\"title\"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> – <code>my-function</code> (name-only), <code>my-function:v1</code> (with alias).</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
3184
+ qualifier: <p>Specify a version or alias to get details about a published version of the function.</p>
3185
+
3186
+ Raises:
3187
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
3188
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
3189
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
3190
+ 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>
3191
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
3192
+
3193
+ Examples:
3194
+ To get a Lambda function's event source mapping
3195
+ The following example returns and configuration details for version 1 of a function named my-function.
3196
+
3197
+ >>> await client.get_function_configuration(function_name='my-function', qualifier='1')
3198
+ """
3199
+
3200
+ async def _handler(
3201
+ req: "AsyncOperationRequest[capo_lambda.types.get_function_configuration_request.GetFunctionConfigurationRequest]",
3202
+ ) -> AsyncOperationResponse[
3203
+ "capo_lambda.types.function_configuration.FunctionConfiguration"
3204
+ ]:
3205
+ import capo_lambda._operations.aws_gir_api_service.get_function_configuration
3206
+
3207
+ (
3208
+ output,
3209
+ http_response,
3210
+ ) = await capo_lambda._operations.aws_gir_api_service.get_function_configuration.async_get_function_configuration(
3211
+ req.options, req.input
3212
+ )
3213
+ return AsyncOperationResponse(output=output, response=http_response)
3214
+
3215
+ interceptors_, options_ = self._service.operation_options(config_overrides)
3216
+ input_: capo_lambda.types.get_function_configuration_request.GetFunctionConfigurationRequest = {} # type: ignore[typeddict-item]
3217
+ input_["function_name"] = function_name
3218
+ if qualifier is not None:
3219
+ input_["qualifier"] = qualifier
3220
+
3221
+ response = await aexecute_pipeline(
3222
+ AsyncOperationRequest(input=input_, options=options_),
3223
+ handler=_handler,
3224
+ interceptors=list(interceptors_),
3225
+ )
3226
+ return response.output
3227
+
3228
+ async def get_function_recursion_config(
3229
+ self,
3230
+ function_name: "capo_lambda.types.unqualified_function_name.UnqualifiedFunctionName",
3231
+ *,
3232
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
3233
+ ) -> "capo_lambda.types.get_function_recursion_config_response.GetFunctionRecursionConfigResponse":
3234
+ r"""<p>Returns your function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-recursion.html\">recursive loop detection</a> configuration. </p>
3235
+
3236
+ Args:
3237
+ function_name: <p>The name of the function.</p>
3238
+
3239
+ Raises:
3240
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
3241
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
3242
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
3243
+ 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>
3244
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
3245
+ """
3246
+
3247
+ async def _handler(
3248
+ req: "AsyncOperationRequest[capo_lambda.types.get_function_recursion_config_request.GetFunctionRecursionConfigRequest]",
3249
+ ) -> AsyncOperationResponse[
3250
+ "capo_lambda.types.get_function_recursion_config_response.GetFunctionRecursionConfigResponse"
3251
+ ]:
3252
+ import capo_lambda._operations.aws_gir_api_service.get_function_recursion_config
3253
+
3254
+ (
3255
+ output,
3256
+ http_response,
3257
+ ) = await capo_lambda._operations.aws_gir_api_service.get_function_recursion_config.async_get_function_recursion_config(
3258
+ req.options, req.input
3259
+ )
3260
+ return AsyncOperationResponse(output=output, response=http_response)
3261
+
3262
+ interceptors_, options_ = self._service.operation_options(config_overrides)
3263
+ input_: capo_lambda.types.get_function_recursion_config_request.GetFunctionRecursionConfigRequest = {} # type: ignore[typeddict-item]
3264
+ input_["function_name"] = function_name
3265
+
3266
+ response = await aexecute_pipeline(
3267
+ AsyncOperationRequest(input=input_, options=options_),
3268
+ handler=_handler,
3269
+ interceptors=list(interceptors_),
3270
+ )
3271
+ return response.output
3272
+
3273
+ async def get_function_scaling_config(
3274
+ self,
3275
+ function_name: "capo_lambda.types.unqualified_function_name.UnqualifiedFunctionName",
3276
+ qualifier: "capo_lambda.types.published_function_qualifier.PublishedFunctionQualifier",
3277
+ *,
3278
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
3279
+ ) -> "capo_lambda.types.get_function_scaling_config_response.GetFunctionScalingConfigResponse":
3280
+ """<p>Retrieves the scaling configuration for a Lambda Managed Instances function.</p>
3281
+
3282
+ Args:
3283
+ function_name: <p>The name or ARN of the Lambda function.</p>
3284
+ qualifier: <p>Specify a version or alias to get the scaling configuration for a published version of the function.</p>
3285
+
3286
+ Raises:
3287
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
3288
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
3289
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
3290
+ 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>
3291
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
3292
+ """
3293
+
3294
+ async def _handler(
3295
+ req: "AsyncOperationRequest[capo_lambda.types.get_function_scaling_config_request.GetFunctionScalingConfigRequest]",
3296
+ ) -> AsyncOperationResponse[
3297
+ "capo_lambda.types.get_function_scaling_config_response.GetFunctionScalingConfigResponse"
3298
+ ]:
3299
+ import capo_lambda._operations.aws_gir_api_service.get_function_scaling_config
3300
+
3301
+ (
3302
+ output,
3303
+ http_response,
3304
+ ) = await capo_lambda._operations.aws_gir_api_service.get_function_scaling_config.async_get_function_scaling_config(
3305
+ req.options, req.input
3306
+ )
3307
+ return AsyncOperationResponse(output=output, response=http_response)
3308
+
3309
+ interceptors_, options_ = self._service.operation_options(config_overrides)
3310
+ input_: capo_lambda.types.get_function_scaling_config_request.GetFunctionScalingConfigRequest = {} # type: ignore[typeddict-item]
3311
+ input_["function_name"] = function_name
3312
+ input_["qualifier"] = qualifier
3313
+
3314
+ response = await aexecute_pipeline(
3315
+ AsyncOperationRequest(input=input_, options=options_),
3316
+ handler=_handler,
3317
+ interceptors=list(interceptors_),
3318
+ )
3319
+ return response.output
3320
+
3321
+ async def get_policy(
3322
+ self,
3323
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
3324
+ *,
3325
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
3326
+ qualifier: Optional[
3327
+ "capo_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
3328
+ ] = None,
3329
+ ) -> "capo_lambda.types.get_policy_response.GetPolicyResponse":
3330
+ r"""<p>Returns the <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html\">resource-based IAM policy</a> for a function, version, or alias.</p>
3331
+
3332
+ Args:
3333
+ function_name: <p>The name or ARN of the Lambda function, version, or alias.</p> <p class=\"title\"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> – <code>my-function</code> (name-only), <code>my-function:v1</code> (with alias).</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
3334
+ qualifier: <p>Specify a version or alias to get the policy for that resource.</p>
3335
+
3336
+ Raises:
3337
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
3338
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
3339
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
3340
+ 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>
3341
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
3342
+
3343
+ Examples:
3344
+ To retrieve a Lambda function policy
3345
+ The following example returns the resource-based policy for version 1 of a Lambda function named my-function.
3346
+
3347
+ >>> await client.get_policy(function_name='my-function', qualifier='1')
3348
+ """
3349
+
3350
+ async def _handler(
3351
+ req: "AsyncOperationRequest[capo_lambda.types.get_policy_request.GetPolicyRequest]",
3352
+ ) -> AsyncOperationResponse[
3353
+ "capo_lambda.types.get_policy_response.GetPolicyResponse"
3354
+ ]:
3355
+ import capo_lambda._operations.aws_gir_api_service.get_policy
3356
+
3357
+ (
3358
+ output,
3359
+ http_response,
3360
+ ) = await capo_lambda._operations.aws_gir_api_service.get_policy.async_get_policy(
3361
+ req.options, req.input
3362
+ )
3363
+ return AsyncOperationResponse(output=output, response=http_response)
3364
+
3365
+ interceptors_, options_ = self._service.operation_options(config_overrides)
3366
+ input_: capo_lambda.types.get_policy_request.GetPolicyRequest = {} # type: ignore[typeddict-item]
3367
+ input_["function_name"] = function_name
3368
+ if qualifier is not None:
3369
+ input_["qualifier"] = qualifier
3370
+
3371
+ response = await aexecute_pipeline(
3372
+ AsyncOperationRequest(input=input_, options=options_),
3373
+ handler=_handler,
3374
+ interceptors=list(interceptors_),
3375
+ )
3376
+ return response.output
3377
+
3378
+ async def get_runtime_management_config(
3379
+ self,
3380
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
3381
+ *,
3382
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
3383
+ qualifier: Optional[
3384
+ "capo_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
3385
+ ] = None,
3386
+ ) -> "capo_lambda.types.get_runtime_management_config_response.GetRuntimeManagementConfigResponse":
3387
+ r"""<p>Retrieves the runtime management configuration for a function's version. If the runtime update mode is <b>Manual</b>, this includes the ARN of the runtime version and the runtime update mode. If the runtime update mode is <b>Auto</b> or <b>Function update</b>, this includes the runtime update mode and <code>null</code> is returned for the ARN. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html\">Runtime updates</a>.</p>
3388
+
3389
+ Args:
3390
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
3391
+ qualifier: <p>Specify a version of the function. This can be <code>$LATEST</code> or a published version number. If no value is specified, the configuration for the <code>$LATEST</code> version is returned.</p>
3392
+
3393
+ Raises:
3394
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
3395
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
3396
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
3397
+ 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>
3398
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
3399
+ """
3400
+
3401
+ async def _handler(
3402
+ req: "AsyncOperationRequest[capo_lambda.types.get_runtime_management_config_request.GetRuntimeManagementConfigRequest]",
3403
+ ) -> AsyncOperationResponse[
3404
+ "capo_lambda.types.get_runtime_management_config_response.GetRuntimeManagementConfigResponse"
3405
+ ]:
3406
+ import capo_lambda._operations.aws_gir_api_service.get_runtime_management_config
3407
+
3408
+ (
3409
+ output,
3410
+ http_response,
3411
+ ) = await capo_lambda._operations.aws_gir_api_service.get_runtime_management_config.async_get_runtime_management_config(
3412
+ req.options, req.input
3413
+ )
3414
+ return AsyncOperationResponse(output=output, response=http_response)
3415
+
3416
+ interceptors_, options_ = self._service.operation_options(config_overrides)
3417
+ input_: capo_lambda.types.get_runtime_management_config_request.GetRuntimeManagementConfigRequest = {} # type: ignore[typeddict-item]
3418
+ input_["function_name"] = function_name
3419
+ if qualifier is not None:
3420
+ input_["qualifier"] = qualifier
3421
+
3422
+ response = await aexecute_pipeline(
3423
+ AsyncOperationRequest(input=input_, options=options_),
3424
+ handler=_handler,
3425
+ interceptors=list(interceptors_),
3426
+ )
3427
+ return response.output
3428
+
3429
+ async def invoke(
3430
+ self,
3431
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
3432
+ *,
3433
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
3434
+ invocation_type: Optional[
3435
+ "capo_lambda.types.invocation_type.InvocationType"
3436
+ ] = None,
3437
+ log_type: Optional["capo_lambda.types.log_type.LogType"] = None,
3438
+ client_context: Optional["capo_lambda.types.string.String"] = None,
3439
+ durable_execution_name: Optional[
3440
+ "capo_lambda.types.durable_execution_name.DurableExecutionName"
3441
+ ] = None,
3442
+ payload: Optional["capo_lambda.types.blob.Blob"] = None,
3443
+ qualifier: Optional[
3444
+ "capo_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
3445
+ ] = None,
3446
+ tenant_id: Optional["capo_lambda.types.tenant_id.TenantId"] = None,
3447
+ ) -> "capo_lambda.types.invocation_response.InvocationResponse":
3448
+ r"""<p>Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. By default, Lambda invokes your function synchronously (i.e. the<code>InvocationType</code> is <code>RequestResponse</code>). To invoke a function asynchronously, set <code>InvocationType</code> to <code>Event</code>. Lambda passes the <code>ClientContext</code> object to your function for synchronous invocations only.</p> <p>For synchronous invocations, the maximum payload size is 6 MB. For asynchronous invocations, the maximum payload size is 1 MB.</p> <p>For <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-sync.html\">synchronous invocation</a>, details about the function response, including errors, are included in the response body and headers. For either invocation type, you can find more information in the <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions.html\">execution log</a> and <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html\">trace</a>.</p> <p>When an error occurs, your function may be invoked multiple times. Retry behavior varies by error type, client, event source, and invocation type. For example, if you invoke a function asynchronously and it returns an error, Lambda executes the function up to two more times. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-retries.html\">Error handling and automatic retries in Lambda</a>.</p> <p>For <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html\">asynchronous invocation</a>, Lambda adds events to a queue before sending them to your function. If your function does not have enough capacity to keep up with the queue, events may be lost. Occasionally, your function may receive the same event multiple times, even if no error occurs. To retain events that were not processed, configure your function with a <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq\">dead-letter queue</a>.</p> <p>The status code in the API response doesn't reflect function errors. Error codes are reserved for errors that prevent your function from executing, such as permissions errors, <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html\">quota</a> errors, or issues with your function's code and configuration. For example, Lambda returns <code>TooManyRequestsException</code> if running the function would cause you to exceed a concurrency limit at either the account level (<code>ConcurrentInvocationLimitExceeded</code>) or function level (<code>ReservedFunctionConcurrentInvocationLimitExceeded</code>).</p> <p>For functions with a long timeout, your client might disconnect during synchronous invocation while it waits for a response. Configure your HTTP client, SDK, firewall, proxy, or operating system to allow for long connections with timeout or keep-alive settings.</p> <p>This operation requires permission for the <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awslambda.html\">lambda:InvokeFunction</a> action. For details on how to set up permissions for cross-account invocations, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html#permissions-resource-xaccountinvoke\">Granting function access to other accounts</a>.</p>
3449
+
3450
+ Args:
3451
+ function_name: <p>The name or ARN of the Lambda function, version, or alias.</p> <p class=\"title\"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> – <code>my-function</code> (name-only), <code>my-function:v1</code> (with alias).</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
3452
+ invocation_type: <p>Choose from the following options.</p> <ul> <li> <p> <code>RequestResponse</code> (default) – Invoke the function synchronously. Keep the connection open until the function returns a response or times out. The API response includes the function response and additional data.</p> </li> <li> <p> <code>Event</code> – Invoke the function asynchronously. Send events that fail multiple times to the function's dead-letter queue (if one is configured). The API response only includes a status code.</p> </li> <li> <p> <code>DryRun</code> – Validate parameter values and verify that the user or role has permission to invoke the function.</p> </li> </ul>
3453
+ log_type: <p>Set to <code>Tail</code> to include the execution log in the response. Applies to synchronously invoked functions only.</p>
3454
+ client_context: <p>Up to 3,583 bytes of base64-encoded data about the invoking client to pass to the function in the context object. Lambda passes the <code>ClientContext</code> object to your function for synchronous invocations only.</p>
3455
+ durable_execution_name: <p>Optional unique name for the durable execution. When you start your special function, you can give it a unique name to identify this specific execution. It's like giving a nickname to a task.</p>
3456
+ payload: <p>The JSON that you want to provide to your Lambda function as input. The maximum payload size is 6 MB for synchronous invocations and 1 MB for asynchronous invocations.</p> <p>You can enter the JSON directly. For example, <code>--payload '{ \"key\": \"value\" }'</code>. You can also specify a file path. For example, <code>--payload file://payload.json</code>.</p>
3457
+ qualifier: <p>Specify a version or alias to invoke a published version of the function.</p>
3458
+ tenant_id: <p>The identifier of the tenant in a multi-tenant Lambda function.</p>
3459
+
3460
+ Raises:
3461
+ capo_lambda.errors.durable_execution_already_started_exception.DurableExecutionAlreadyStartedException: <p>The durable execution with the specified name has already been started. Each durable execution name must be unique within the function. Use a different name or check the status of the existing execution.</p>
3462
+ capo_lambda.errors.ec2_access_denied_exception.EC2AccessDeniedException: <p>Need additional permissions to configure VPC settings.</p>
3463
+ capo_lambda.errors.ec2_throttled_exception.EC2ThrottledException: <p>Amazon EC2 throttled Lambda during Lambda function initialization using the execution role provided for the function.</p>
3464
+ capo_lambda.errors.ec2_unexpected_exception.EC2UnexpectedException: <p>Lambda received an unexpected Amazon EC2 client exception while setting up for the Lambda function.</p>
3465
+ capo_lambda.errors.efsio_exception.EFSIOException: <p>An error occurred when reading from or writing to a connected file system.</p>
3466
+ capo_lambda.errors.efs_mount_connectivity_exception.EFSMountConnectivityException: <p>The Lambda function couldn't make a network connection to the configured file system.</p>
3467
+ capo_lambda.errors.efs_mount_failure_exception.EFSMountFailureException: <p>The Lambda function couldn't mount the configured file system due to a permission or configuration issue.</p>
3468
+ capo_lambda.errors.efs_mount_timeout_exception.EFSMountTimeoutException: <p>The Lambda function made a network connection to the configured file system, but the mount operation timed out.</p>
3469
+ capo_lambda.errors.eni_limit_reached_exception.ENILimitReachedException: <p>Lambda couldn't create an elastic network interface in the VPC, specified as part of Lambda function configuration, because the limit for network interfaces has been reached. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html\">Lambda quotas</a>.</p>
3470
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
3471
+ capo_lambda.errors.invalid_request_content_exception.InvalidRequestContentException: <p>The request body could not be parsed as JSON, or a request header is invalid. For example, the 'x-amzn-RequestId' header is not a valid UUID string.</p>
3472
+ capo_lambda.errors.invalid_runtime_exception.InvalidRuntimeException: <p>The runtime or runtime version specified is not supported.</p>
3473
+ capo_lambda.errors.invalid_security_group_id_exception.InvalidSecurityGroupIDException: <p>The security group ID provided in the Lambda function VPC configuration is not valid.</p>
3474
+ capo_lambda.errors.invalid_subnet_id_exception.InvalidSubnetIDException: <p>The subnet ID provided in the Lambda function VPC configuration is not valid.</p>
3475
+ capo_lambda.errors.invalid_zip_file_exception.InvalidZipFileException: <p>Lambda could not unzip the deployment package.</p>
3476
+ capo_lambda.errors.kms_access_denied_exception.KMSAccessDeniedException: <p>Lambda couldn't decrypt the environment variables because KMS access was denied. Check the Lambda function's KMS permissions.</p>
3477
+ capo_lambda.errors.kms_disabled_exception.KMSDisabledException: <p>Lambda couldn't decrypt the environment variables because the KMS key used is disabled. Check the Lambda function's KMS key settings.</p>
3478
+ capo_lambda.errors.kms_invalid_state_exception.KMSInvalidStateException: <p>Lambda couldn't decrypt the environment variables because the state of the KMS key used is not valid for Decrypt. Check the function's KMS key settings.</p>
3479
+ capo_lambda.errors.kms_not_found_exception.KMSNotFoundException: <p>Lambda couldn't decrypt the environment variables because the KMS key was not found. Check the function's KMS key settings.</p>
3480
+ capo_lambda.errors.no_published_version_exception.NoPublishedVersionException: <p>The function has no published versions available.</p>
3481
+ capo_lambda.errors.recursive_invocation_exception.RecursiveInvocationException: <p>Lambda has detected your function being invoked in a recursive loop with other Amazon Web Services resources and stopped your function's invocation.</p>
3482
+ capo_lambda.errors.request_too_large_exception.RequestTooLargeException: <p>The request payload exceeded the <code>Invoke</code> request body JSON input quota. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html\">Lambda quotas</a>.</p>
3483
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
3484
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
3485
+ capo_lambda.errors.resource_not_ready_exception.ResourceNotReadyException: <p>The function is inactive and its VPC connection is no longer available. Wait for the VPC connection to reestablish and try again.</p>
3486
+ capo_lambda.errors.s3_files_mount_connectivity_exception.S3FilesMountConnectivityException: <p>The Lambda function couldn't make a network connection to the configured S3 Files access point.</p>
3487
+ capo_lambda.errors.s3_files_mount_failure_exception.S3FilesMountFailureException: <p>The Lambda function couldn't mount the configured S3 Files access point due to a permission or configuration issue.</p>
3488
+ capo_lambda.errors.s3_files_mount_timeout_exception.S3FilesMountTimeoutException: <p>The Lambda function made a network connection to the configured S3 Files access point, but the mount operation timed out.</p>
3489
+ capo_lambda.errors.serialized_request_entity_too_large_exception.SerializedRequestEntityTooLargeException: <p>The request payload exceeded the maximum allowed size for serialized request entities.</p>
3490
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
3491
+ capo_lambda.errors.snap_start_exception.SnapStartException: <p>The <code>afterRestore()</code> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/snapstart-runtime-hooks.html\">runtime hook</a> encountered an error. For more information, check the Amazon CloudWatch logs.</p>
3492
+ capo_lambda.errors.snap_start_not_ready_exception.SnapStartNotReadyException: <p>Lambda is initializing your function. You can invoke the function when the <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html\">function state</a> becomes <code>Active</code>.</p>
3493
+ capo_lambda.errors.snap_start_timeout_exception.SnapStartTimeoutException: <p>Lambda couldn't restore the snapshot within the timeout limit.</p>
3494
+ capo_lambda.errors.subnet_ip_address_limit_reached_exception.SubnetIPAddressLimitReachedException: <p>Lambda couldn't set up VPC access for the Lambda function because one or more configured subnets has no available IP addresses.</p>
3495
+ 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>
3496
+ capo_lambda.errors.unsupported_media_type_exception.UnsupportedMediaTypeException: <p>The content type of the <code>Invoke</code> request body is not JSON.</p>
3497
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
3498
+
3499
+ Examples:
3500
+ To invoke a Lambda function
3501
+ The following example invokes version 1 of a function named my-function with an empty event payload.
3502
+
3503
+ >>> await client.invoke(function_name='my-function', invocation_type='Event', durable_execution_name='myExecution', payload='{}', qualifier='1')
3504
+ To invoke a Lambda function asynchronously
3505
+ The following example invokes version 1 of a function named my-function asynchronously.
3506
+
3507
+ >>> await client.invoke(function_name='my-function', payload='{}', invocation_type='Event', qualifier='1')
3508
+ """
3509
+
3510
+ async def _handler(
3511
+ req: "AsyncOperationRequest[capo_lambda.types.invocation_request.InvocationRequest]",
3512
+ ) -> AsyncOperationResponse[
3513
+ "capo_lambda.types.invocation_response.InvocationResponse"
3514
+ ]:
3515
+ import capo_lambda._operations.aws_gir_api_service.invoke
3516
+
3517
+ (
3518
+ output,
3519
+ http_response,
3520
+ ) = await capo_lambda._operations.aws_gir_api_service.invoke.async_invoke(
3521
+ req.options, req.input
3522
+ )
3523
+ return AsyncOperationResponse(output=output, response=http_response)
3524
+
3525
+ interceptors_, options_ = self._service.operation_options(config_overrides)
3526
+ input_: capo_lambda.types.invocation_request.InvocationRequest = {} # type: ignore[typeddict-item]
3527
+ input_["function_name"] = function_name
3528
+ if invocation_type is not None:
3529
+ input_["invocation_type"] = invocation_type
3530
+ if log_type is not None:
3531
+ input_["log_type"] = log_type
3532
+ if client_context is not None:
3533
+ input_["client_context"] = client_context
3534
+ if durable_execution_name is not None:
3535
+ input_["durable_execution_name"] = durable_execution_name
3536
+ if payload is not None:
3537
+ input_["payload"] = payload
3538
+ if qualifier is not None:
3539
+ input_["qualifier"] = qualifier
3540
+ if tenant_id is not None:
3541
+ input_["tenant_id"] = tenant_id
3542
+
3543
+ response = await aexecute_pipeline(
3544
+ AsyncOperationRequest(input=input_, options=options_),
3545
+ handler=_handler,
3546
+ interceptors=list(interceptors_),
3547
+ )
3548
+ return response.output
3549
+
3550
+ async def invoke_async(
3551
+ self,
3552
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
3553
+ invoke_args: AsyncIterator[bytes] | bytes,
3554
+ *,
3555
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
3556
+ ) -> "capo_lambda.types.invoke_async_response.InvokeAsyncResponse":
3557
+ r"""<note> <p>For asynchronous function invocation, use <a>Invoke</a>.</p> </note> <p>Invokes a function asynchronously.</p> <note> <p>The payload limit is 256KB. For larger payloads, for up to 1MB, use <a>Invoke</a>.</p> </note> <note> <p>If you do use the InvokeAsync action, note that it doesn't support the use of X-Ray active tracing. Trace ID is not propagated to the function, even if X-Ray active tracing is turned on.</p> </note>
3558
+
3559
+ Args:
3560
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
3561
+ invoke_args: <p>The JSON that you want to provide to your Lambda function as input.</p>
3562
+
3563
+ Raises:
3564
+ capo_lambda.errors.invalid_request_content_exception.InvalidRequestContentException: <p>The request body could not be parsed as JSON, or a request header is invalid. For example, the 'x-amzn-RequestId' header is not a valid UUID string.</p>
3565
+ capo_lambda.errors.invalid_runtime_exception.InvalidRuntimeException: <p>The runtime or runtime version specified is not supported.</p>
3566
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
3567
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
3568
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
3569
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
3570
+
3571
+ Examples:
3572
+ To invoke a Lambda function asynchronously
3573
+ The following example invokes a Lambda function asynchronously
3574
+
3575
+ >>> await client.invoke_async(function_name='my-function', invoke_args='{}')
3576
+ """
3577
+
3578
+ async def _handler(
3579
+ req: "AsyncOperationRequest[capo_lambda.types.invoke_async_request.InvokeAsyncRequest]",
3580
+ ) -> AsyncOperationResponse[
3581
+ "capo_lambda.types.invoke_async_response.InvokeAsyncResponse"
3582
+ ]:
3583
+ import capo_lambda._operations.aws_gir_api_service.invoke_async
3584
+
3585
+ (
3586
+ output,
3587
+ http_response,
3588
+ ) = await capo_lambda._operations.aws_gir_api_service.invoke_async.async_invoke_async(
3589
+ req.options, req.input
3590
+ )
3591
+ return AsyncOperationResponse(output=output, response=http_response)
3592
+
3593
+ interceptors_, options_ = self._service.operation_options(config_overrides)
3594
+ input_: capo_lambda.types.invoke_async_request.InvokeAsyncRequest = {} # type: ignore[typeddict-item]
3595
+ input_["function_name"] = function_name
3596
+ input_["invoke_args"] = ensure_async_iterator(invoke_args)
3597
+
3598
+ response = await aexecute_pipeline(
3599
+ AsyncOperationRequest(input=input_, options=options_),
3600
+ handler=_handler,
3601
+ interceptors=list(interceptors_),
3602
+ )
3603
+ return response.output
3604
+
3605
+ @asynccontextmanager
3606
+ async def invoke_with_response_stream(
3607
+ self,
3608
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
3609
+ *,
3610
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
3611
+ invocation_type: Optional[
3612
+ "capo_lambda.types.response_streaming_invocation_type.ResponseStreamingInvocationType"
3613
+ ] = None,
3614
+ log_type: Optional["capo_lambda.types.log_type.LogType"] = None,
3615
+ client_context: Optional["capo_lambda.types.string.String"] = None,
3616
+ qualifier: Optional[
3617
+ "capo_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
3618
+ ] = None,
3619
+ payload: Optional["capo_lambda.types.blob.Blob"] = None,
3620
+ tenant_id: Optional["capo_lambda.types.tenant_id.TenantId"] = None,
3621
+ ) -> "AsyncGenerator[capo_lambda.types.invoke_with_response_stream_response.InvokeWithResponseStreamResponse]":
3622
+ r"""<p>Configure your Lambda functions to stream response payloads back to clients. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-response-streaming.html\">Configuring a Lambda function to stream responses</a>.</p> <p>This operation requires permission for the <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awslambda.html\">lambda:InvokeFunction</a> action. For details on how to set up permissions for cross-account invocations, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html#permissions-resource-xaccountinvoke\">Granting function access to other accounts</a>.</p>
3623
+
3624
+ Args:
3625
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
3626
+ invocation_type: <p>Use one of the following options:</p> <ul> <li> <p> <code>RequestResponse</code> (default) – Invoke the function synchronously. Keep the connection open until the function returns a response or times out. The API operation response includes the function response and additional data.</p> </li> <li> <p> <code>DryRun</code> – Validate parameter values and verify that the IAM user or role has permission to invoke the function.</p> </li> </ul>
3627
+ log_type: <p>Set to <code>Tail</code> to include the execution log in the response. Applies to synchronously invoked functions only.</p>
3628
+ client_context: <p>Up to 3,583 bytes of base64-encoded data about the invoking client to pass to the function in the context object.</p>
3629
+ qualifier: <p>The alias name.</p>
3630
+ payload: <p>The JSON that you want to provide to your Lambda function as input.</p> <p>You can enter the JSON directly. For example, <code>--payload '{ \"key\": \"value\" }'</code>. You can also specify a file path. For example, <code>--payload file://payload.json</code>.</p>
3631
+ tenant_id: <p>The identifier of the tenant in a multi-tenant Lambda function.</p>
3632
+
3633
+ Raises:
3634
+ capo_lambda.errors.ec2_access_denied_exception.EC2AccessDeniedException: <p>Need additional permissions to configure VPC settings.</p>
3635
+ capo_lambda.errors.ec2_throttled_exception.EC2ThrottledException: <p>Amazon EC2 throttled Lambda during Lambda function initialization using the execution role provided for the function.</p>
3636
+ capo_lambda.errors.ec2_unexpected_exception.EC2UnexpectedException: <p>Lambda received an unexpected Amazon EC2 client exception while setting up for the Lambda function.</p>
3637
+ capo_lambda.errors.efsio_exception.EFSIOException: <p>An error occurred when reading from or writing to a connected file system.</p>
3638
+ capo_lambda.errors.efs_mount_connectivity_exception.EFSMountConnectivityException: <p>The Lambda function couldn't make a network connection to the configured file system.</p>
3639
+ capo_lambda.errors.efs_mount_failure_exception.EFSMountFailureException: <p>The Lambda function couldn't mount the configured file system due to a permission or configuration issue.</p>
3640
+ capo_lambda.errors.efs_mount_timeout_exception.EFSMountTimeoutException: <p>The Lambda function made a network connection to the configured file system, but the mount operation timed out.</p>
3641
+ capo_lambda.errors.eni_limit_reached_exception.ENILimitReachedException: <p>Lambda couldn't create an elastic network interface in the VPC, specified as part of Lambda function configuration, because the limit for network interfaces has been reached. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html\">Lambda quotas</a>.</p>
3642
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
3643
+ capo_lambda.errors.invalid_request_content_exception.InvalidRequestContentException: <p>The request body could not be parsed as JSON, or a request header is invalid. For example, the 'x-amzn-RequestId' header is not a valid UUID string.</p>
3644
+ capo_lambda.errors.invalid_runtime_exception.InvalidRuntimeException: <p>The runtime or runtime version specified is not supported.</p>
3645
+ capo_lambda.errors.invalid_security_group_id_exception.InvalidSecurityGroupIDException: <p>The security group ID provided in the Lambda function VPC configuration is not valid.</p>
3646
+ capo_lambda.errors.invalid_subnet_id_exception.InvalidSubnetIDException: <p>The subnet ID provided in the Lambda function VPC configuration is not valid.</p>
3647
+ capo_lambda.errors.invalid_zip_file_exception.InvalidZipFileException: <p>Lambda could not unzip the deployment package.</p>
3648
+ capo_lambda.errors.kms_access_denied_exception.KMSAccessDeniedException: <p>Lambda couldn't decrypt the environment variables because KMS access was denied. Check the Lambda function's KMS permissions.</p>
3649
+ capo_lambda.errors.kms_disabled_exception.KMSDisabledException: <p>Lambda couldn't decrypt the environment variables because the KMS key used is disabled. Check the Lambda function's KMS key settings.</p>
3650
+ capo_lambda.errors.kms_invalid_state_exception.KMSInvalidStateException: <p>Lambda couldn't decrypt the environment variables because the state of the KMS key used is not valid for Decrypt. Check the function's KMS key settings.</p>
3651
+ capo_lambda.errors.kms_not_found_exception.KMSNotFoundException: <p>Lambda couldn't decrypt the environment variables because the KMS key was not found. Check the function's KMS key settings.</p>
3652
+ capo_lambda.errors.no_published_version_exception.NoPublishedVersionException: <p>The function has no published versions available.</p>
3653
+ capo_lambda.errors.recursive_invocation_exception.RecursiveInvocationException: <p>Lambda has detected your function being invoked in a recursive loop with other Amazon Web Services resources and stopped your function's invocation.</p>
3654
+ capo_lambda.errors.request_too_large_exception.RequestTooLargeException: <p>The request payload exceeded the <code>Invoke</code> request body JSON input quota. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html\">Lambda quotas</a>.</p>
3655
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
3656
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
3657
+ capo_lambda.errors.resource_not_ready_exception.ResourceNotReadyException: <p>The function is inactive and its VPC connection is no longer available. Wait for the VPC connection to reestablish and try again.</p>
3658
+ capo_lambda.errors.s3_files_mount_connectivity_exception.S3FilesMountConnectivityException: <p>The Lambda function couldn't make a network connection to the configured S3 Files access point.</p>
3659
+ capo_lambda.errors.s3_files_mount_failure_exception.S3FilesMountFailureException: <p>The Lambda function couldn't mount the configured S3 Files access point due to a permission or configuration issue.</p>
3660
+ capo_lambda.errors.s3_files_mount_timeout_exception.S3FilesMountTimeoutException: <p>The Lambda function made a network connection to the configured S3 Files access point, but the mount operation timed out.</p>
3661
+ capo_lambda.errors.serialized_request_entity_too_large_exception.SerializedRequestEntityTooLargeException: <p>The request payload exceeded the maximum allowed size for serialized request entities.</p>
3662
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
3663
+ capo_lambda.errors.snap_start_exception.SnapStartException: <p>The <code>afterRestore()</code> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/snapstart-runtime-hooks.html\">runtime hook</a> encountered an error. For more information, check the Amazon CloudWatch logs.</p>
3664
+ capo_lambda.errors.snap_start_not_ready_exception.SnapStartNotReadyException: <p>Lambda is initializing your function. You can invoke the function when the <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html\">function state</a> becomes <code>Active</code>.</p>
3665
+ capo_lambda.errors.snap_start_timeout_exception.SnapStartTimeoutException: <p>Lambda couldn't restore the snapshot within the timeout limit.</p>
3666
+ capo_lambda.errors.subnet_ip_address_limit_reached_exception.SubnetIPAddressLimitReachedException: <p>Lambda couldn't set up VPC access for the Lambda function because one or more configured subnets has no available IP addresses.</p>
3667
+ 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>
3668
+ capo_lambda.errors.unsupported_media_type_exception.UnsupportedMediaTypeException: <p>The content type of the <code>Invoke</code> request body is not JSON.</p>
3669
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
3670
+ """
3671
+
3672
+ async def _handler(
3673
+ req: "AsyncOperationRequest[capo_lambda.types.invoke_with_response_stream_request.InvokeWithResponseStreamRequest]",
3674
+ ) -> AsyncOperationResponse[
3675
+ "capo_lambda.types.invoke_with_response_stream_response.InvokeWithResponseStreamResponse"
3676
+ ]:
3677
+ import capo_lambda._operations.aws_gir_api_service.invoke_with_response_stream
3678
+
3679
+ (
3680
+ output,
3681
+ http_response,
3682
+ ) = await capo_lambda._operations.aws_gir_api_service.invoke_with_response_stream.async_invoke_with_response_stream(
3683
+ req.options, req.input
3684
+ )
3685
+ return AsyncOperationResponse(output=output, response=http_response)
3686
+
3687
+ interceptors_, options_ = self._service.operation_options(config_overrides)
3688
+ input_: capo_lambda.types.invoke_with_response_stream_request.InvokeWithResponseStreamRequest = {} # type: ignore[typeddict-item]
3689
+ input_["function_name"] = function_name
3690
+ if invocation_type is not None:
3691
+ input_["invocation_type"] = invocation_type
3692
+ if log_type is not None:
3693
+ input_["log_type"] = log_type
3694
+ if client_context is not None:
3695
+ input_["client_context"] = client_context
3696
+ if qualifier is not None:
3697
+ input_["qualifier"] = qualifier
3698
+ if payload is not None:
3699
+ input_["payload"] = payload
3700
+ if tenant_id is not None:
3701
+ input_["tenant_id"] = tenant_id
3702
+
3703
+ response = await aexecute_pipeline(
3704
+ AsyncOperationRequest(input=input_, options=options_),
3705
+ handler=_handler,
3706
+ interceptors=list(interceptors_),
3707
+ )
3708
+ yield response.output
3709
+
3710
+ async def put_function_code_signing_config(
3711
+ self,
3712
+ code_signing_config_arn: "capo_lambda.types.code_signing_config_arn.CodeSigningConfigArn",
3713
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
3714
+ *,
3715
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
3716
+ ) -> "capo_lambda.types.put_function_code_signing_config_response.PutFunctionCodeSigningConfigResponse":
3717
+ r"""<p>Update the code signing configuration for the function. Changes to the code signing configuration take effect the next time a user tries to deploy a code package to the function. </p>
3718
+
3719
+ Args:
3720
+ code_signing_config_arn: <p>The The Amazon Resource Name (ARN) of the code signing configuration.</p>
3721
+ 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>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 is limited to 64 characters in length.</p>
3722
+
3723
+ Raises:
3724
+ capo_lambda.errors.code_signing_config_not_found_exception.CodeSigningConfigNotFoundException: <p>The specified code signing configuration does not exist.</p>
3725
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
3726
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
3727
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
3728
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
3729
+ 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>
3730
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
3731
+ """
3732
+
3733
+ async def _handler(
3734
+ req: "AsyncOperationRequest[capo_lambda.types.put_function_code_signing_config_request.PutFunctionCodeSigningConfigRequest]",
3735
+ ) -> AsyncOperationResponse[
3736
+ "capo_lambda.types.put_function_code_signing_config_response.PutFunctionCodeSigningConfigResponse"
3737
+ ]:
3738
+ import capo_lambda._operations.aws_gir_api_service.put_function_code_signing_config
3739
+
3740
+ (
3741
+ output,
3742
+ http_response,
3743
+ ) = await capo_lambda._operations.aws_gir_api_service.put_function_code_signing_config.async_put_function_code_signing_config(
3744
+ req.options, req.input
3745
+ )
3746
+ return AsyncOperationResponse(output=output, response=http_response)
3747
+
3748
+ interceptors_, options_ = self._service.operation_options(config_overrides)
3749
+ input_: capo_lambda.types.put_function_code_signing_config_request.PutFunctionCodeSigningConfigRequest = {} # type: ignore[typeddict-item]
3750
+ input_["code_signing_config_arn"] = code_signing_config_arn
3751
+ input_["function_name"] = function_name
3752
+
3753
+ response = await aexecute_pipeline(
3754
+ AsyncOperationRequest(input=input_, options=options_),
3755
+ handler=_handler,
3756
+ interceptors=list(interceptors_),
3757
+ )
3758
+ return response.output
3759
+
3760
+ async def put_function_recursion_config(
3761
+ self,
3762
+ function_name: "capo_lambda.types.unqualified_function_name.UnqualifiedFunctionName",
3763
+ recursive_loop: "capo_lambda.types.recursive_loop.RecursiveLoop",
3764
+ *,
3765
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
3766
+ ) -> "capo_lambda.types.put_function_recursion_config_response.PutFunctionRecursionConfigResponse":
3767
+ r"""<p>Sets your function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-recursion.html\">recursive loop detection</a> configuration.</p> <p>When you configure a Lambda function to output to the same service or resource that invokes the function, it's possible to create an infinite recursive loop. For example, a Lambda function might write a message to an Amazon Simple Queue Service (Amazon SQS) queue, which then invokes the same function. This invocation causes the function to write another message to the queue, which in turn invokes the function again.</p> <p>Lambda can detect certain types of recursive loops shortly after they occur. When Lambda detects a recursive loop and your function's recursive loop detection configuration is set to <code>Terminate</code>, it stops your function being invoked and notifies you.</p>
3768
+
3769
+ Args:
3770
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
3771
+ recursive_loop: <p>If you set your function's recursive loop detection configuration to <code>Allow</code>, Lambda doesn't take any action when it detects your function being invoked as part of a recursive loop. We recommend that you only use this setting if your design intentionally uses a Lambda function to write data back to the same Amazon Web Services resource that invokes it.</p> <p>If you set your function's recursive loop detection configuration to <code>Terminate</code>, Lambda stops your function being invoked and notifies you when it detects your function being invoked as part of a recursive loop.</p> <p>By default, Lambda sets your function's configuration to <code>Terminate</code>.</p> <important> <p>If your design intentionally uses a Lambda function to write data back to the same Amazon Web Services resource that invokes the function, then use caution and implement suitable guard rails to prevent unexpected charges being billed to your Amazon Web Services account. To learn more about best practices for using recursive invocation patterns, see <a href=\"https://serverlessland.com/content/service/lambda/guides/aws-lambda-operator-guide/recursive-runaway\">Recursive patterns that cause run-away Lambda functions</a> in Serverless Land.</p> </important>
3772
+
3773
+ Raises:
3774
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
3775
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
3776
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
3777
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
3778
+ 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>
3779
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
3780
+ """
3781
+
3782
+ async def _handler(
3783
+ req: "AsyncOperationRequest[capo_lambda.types.put_function_recursion_config_request.PutFunctionRecursionConfigRequest]",
3784
+ ) -> AsyncOperationResponse[
3785
+ "capo_lambda.types.put_function_recursion_config_response.PutFunctionRecursionConfigResponse"
3786
+ ]:
3787
+ import capo_lambda._operations.aws_gir_api_service.put_function_recursion_config
3788
+
3789
+ (
3790
+ output,
3791
+ http_response,
3792
+ ) = await capo_lambda._operations.aws_gir_api_service.put_function_recursion_config.async_put_function_recursion_config(
3793
+ req.options, req.input
3794
+ )
3795
+ return AsyncOperationResponse(output=output, response=http_response)
3796
+
3797
+ interceptors_, options_ = self._service.operation_options(config_overrides)
3798
+ input_: capo_lambda.types.put_function_recursion_config_request.PutFunctionRecursionConfigRequest = {} # type: ignore[typeddict-item]
3799
+ input_["function_name"] = function_name
3800
+ input_["recursive_loop"] = recursive_loop
3801
+
3802
+ response = await aexecute_pipeline(
3803
+ AsyncOperationRequest(input=input_, options=options_),
3804
+ handler=_handler,
3805
+ interceptors=list(interceptors_),
3806
+ )
3807
+ return response.output
3808
+
3809
+ async def put_function_scaling_config(
3810
+ self,
3811
+ function_name: "capo_lambda.types.unqualified_function_name.UnqualifiedFunctionName",
3812
+ qualifier: "capo_lambda.types.published_function_qualifier.PublishedFunctionQualifier",
3813
+ *,
3814
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
3815
+ function_scaling_config: Optional[
3816
+ "capo_lambda.types.function_scaling_config.FunctionScalingConfig"
3817
+ ] = None,
3818
+ ) -> "capo_lambda.types.put_function_scaling_config_response.PutFunctionScalingConfigResponse":
3819
+ """<p>Sets the scaling configuration for a Lambda Managed Instances function. The scaling configuration defines the minimum and maximum number of execution environments that can be provisioned for the function, allowing you to control scaling behavior and resource allocation.</p>
3820
+
3821
+ Args:
3822
+ function_name: <p>The name or ARN of the Lambda function.</p>
3823
+ qualifier: <p>Specify a version or alias to set the scaling configuration for a published version of the function.</p>
3824
+ function_scaling_config: <p>The scaling configuration to apply to the function, including minimum and maximum execution environment limits.</p>
3825
+
3826
+ Raises:
3827
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
3828
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
3829
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
3830
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
3831
+ 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>
3832
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
3833
+ """
3834
+
3835
+ async def _handler(
3836
+ req: "AsyncOperationRequest[capo_lambda.types.put_function_scaling_config_request.PutFunctionScalingConfigRequest]",
3837
+ ) -> AsyncOperationResponse[
3838
+ "capo_lambda.types.put_function_scaling_config_response.PutFunctionScalingConfigResponse"
3839
+ ]:
3840
+ import capo_lambda._operations.aws_gir_api_service.put_function_scaling_config
3841
+
3842
+ (
3843
+ output,
3844
+ http_response,
3845
+ ) = await capo_lambda._operations.aws_gir_api_service.put_function_scaling_config.async_put_function_scaling_config(
3846
+ req.options, req.input
3847
+ )
3848
+ return AsyncOperationResponse(output=output, response=http_response)
3849
+
3850
+ interceptors_, options_ = self._service.operation_options(config_overrides)
3851
+ input_: capo_lambda.types.put_function_scaling_config_request.PutFunctionScalingConfigRequest = {} # type: ignore[typeddict-item]
3852
+ input_["function_name"] = function_name
3853
+ input_["qualifier"] = qualifier
3854
+ if function_scaling_config is not None:
3855
+ input_["function_scaling_config"] = function_scaling_config
3856
+
3857
+ response = await aexecute_pipeline(
3858
+ AsyncOperationRequest(input=input_, options=options_),
3859
+ handler=_handler,
3860
+ interceptors=list(interceptors_),
3861
+ )
3862
+ return response.output
3863
+
3864
+ async def put_runtime_management_config(
3865
+ self,
3866
+ function_name: "capo_lambda.types.namespaced_function_name.NamespacedFunctionName",
3867
+ update_runtime_on: "capo_lambda.types.update_runtime_on.UpdateRuntimeOn",
3868
+ *,
3869
+ config_overrides: Optional[AsyncLambdaClientConfig] = None,
3870
+ qualifier: Optional[
3871
+ "capo_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
3872
+ ] = None,
3873
+ runtime_version_arn: Optional[
3874
+ "capo_lambda.types.runtime_version_arn.RuntimeVersionArn"
3875
+ ] = None,
3876
+ ) -> "capo_lambda.types.put_runtime_management_config_response.PutRuntimeManagementConfigResponse":
3877
+ r"""<p>Sets the runtime management configuration for a function's version. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html\">Runtime updates</a>.</p>
3878
+
3879
+ Args:
3880
+ 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>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
3881
+ qualifier: <p>Specify a version of the function. This can be <code>$LATEST</code> or a published version number. If no value is specified, the configuration for the <code>$LATEST</code> version is returned.</p>
3882
+ update_runtime_on: <p>Specify the runtime update mode.</p> <ul> <li> <p> <b>Auto (default)</b> - Automatically update to the most recent and secure runtime version using a <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-two-phase\">Two-phase runtime version rollout</a>. This is the best choice for most customers to ensure they always benefit from runtime updates.</p> </li> <li> <p> <b>Function update</b> - Lambda updates the runtime of your function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.</p> </li> <li> <p> <b>Manual</b> - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-rollback\">Roll back a runtime version</a>.</p> </li> </ul>
3883
+ runtime_version_arn: <p>The ARN of the runtime version you want the function to use.</p> <note> <p>This is only required if you're using the <b>Manual</b> runtime update mode.</p> </note>
3884
+
3885
+ Raises:
3886
+ capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
3887
+ capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
3888
+ capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
3889
+ capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
3890
+ 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>
3891
+ capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
3892
+ """
3893
+
3894
+ async def _handler(
3895
+ req: "AsyncOperationRequest[capo_lambda.types.put_runtime_management_config_request.PutRuntimeManagementConfigRequest]",
3896
+ ) -> AsyncOperationResponse[
3897
+ "capo_lambda.types.put_runtime_management_config_response.PutRuntimeManagementConfigResponse"
3898
+ ]:
3899
+ import capo_lambda._operations.aws_gir_api_service.put_runtime_management_config
3900
+
3901
+ (
3902
+ output,
3903
+ http_response,
3904
+ ) = await capo_lambda._operations.aws_gir_api_service.put_runtime_management_config.async_put_runtime_management_config(
3905
+ req.options, req.input
3906
+ )
3907
+ return AsyncOperationResponse(output=output, response=http_response)
3908
+
3909
+ interceptors_, options_ = self._service.operation_options(config_overrides)
3910
+ input_: capo_lambda.types.put_runtime_management_config_request.PutRuntimeManagementConfigRequest = {} # type: ignore[typeddict-item]
3911
+ input_["function_name"] = function_name
3912
+ if qualifier is not None:
3913
+ input_["qualifier"] = qualifier
3914
+ input_["update_runtime_on"] = update_runtime_on
3915
+ if runtime_version_arn is not None:
3916
+ input_["runtime_version_arn"] = runtime_version_arn
3917
+
3918
+ response = await aexecute_pipeline(
3919
+ AsyncOperationRequest(input=input_, options=options_),
3920
+ handler=_handler,
3921
+ interceptors=list(interceptors_),
3922
+ )
3923
+ return response.output