aws-sdk-lambda 0.4.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.
- aws_sdk_lambda/__init__.py +32 -0
- aws_sdk_lambda/_async.py +25 -0
- aws_sdk_lambda/_auth/_identity.py +16 -0
- aws_sdk_lambda/_auth/_providers.py +159 -0
- aws_sdk_lambda/_auth/_signers.py +84 -0
- aws_sdk_lambda/_auth/_sigv4.py +382 -0
- aws_sdk_lambda/_auth/_zapros_handler.py +62 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/add_layer_version_permission.py +178 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/add_permission.py +174 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/checkpoint_durable_execution.py +153 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/create_alias.py +160 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/create_capacity_provider.py +158 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/create_code_signing_config.py +140 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/create_event_source_mapping.py +158 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/create_function.py +188 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/create_function_url_config.py +162 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/delete_alias.py +134 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/delete_capacity_provider.py +160 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/delete_code_signing_config.py +150 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/delete_event_source_mapping.py +161 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/delete_function.py +154 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/delete_function_code_signing_config.py +146 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/delete_function_concurrency.py +137 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/delete_function_event_invoke_config.py +142 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/delete_function_url_config.py +133 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/delete_layer_version.py +123 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/delete_provisioned_concurrency_config.py +142 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_account_settings.py +135 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_alias.py +152 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_capacity_provider.py +154 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_code_signing_config.py +148 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_durable_execution.py +154 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_durable_execution_history.py +161 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_durable_execution_state.py +153 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_event_source_mapping.py +149 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_function.py +151 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_function_code_signing_config.py +152 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_function_concurrency.py +149 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_function_configuration.py +153 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_function_event_invoke_config.py +156 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_function_recursion_config.py +152 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_function_scaling_config.py +154 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_function_url_config.py +151 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_layer_version.py +155 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_layer_version_by_arn.py +151 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_layer_version_policy.py +155 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_policy.py +147 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_provisioned_concurrency_config.py +160 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/get_runtime_management_config.py +154 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/invoke.py +370 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/invoke_async.py +150 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/invoke_with_response_stream.py +40 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/list_aliases.py +155 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/list_capacity_providers.py +149 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/list_code_signing_configs.py +139 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/list_durable_executions_by_function.py +167 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/list_event_source_mappings.py +155 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/list_function_event_invoke_configs.py +156 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/list_function_url_configs.py +153 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/list_function_versions_by_capacity_provider.py +158 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/list_functions.py +149 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/list_functions_by_code_signing_config.py +152 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/list_layer_versions.py +159 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/list_layers.py +149 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/list_provisioned_concurrency_configs.py +156 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/list_tags.py +145 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/list_versions_by_function.py +153 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/publish_layer_version.py +160 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/publish_version.py +178 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/put_function_code_signing_config.py +171 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/put_function_concurrency.py +154 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/put_function_event_invoke_config.py +169 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/put_function_recursion_config.py +163 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/put_function_scaling_config.py +165 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/put_provisioned_concurrency_config.py +167 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/put_runtime_management_config.py +165 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/remove_layer_version_permission.py +144 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/remove_permission.py +145 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/send_durable_execution_callback_failure.py +156 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/send_durable_execution_callback_heartbeat.py +148 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/send_durable_execution_callback_success.py +158 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/stop_durable_execution.py +162 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/tag_resource.py +142 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/untag_resource.py +139 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/update_alias.py +169 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/update_capacity_provider.py +165 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/update_code_signing_config.py +153 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/update_event_source_mapping.py +166 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/update_function_code.py +190 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/update_function_configuration.py +186 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/update_function_event_invoke_config.py +169 -0
- aws_sdk_lambda/_operations/aws_gir_api_service/update_function_url_config.py +162 -0
- aws_sdk_lambda/_pagination.py +21 -0
- aws_sdk_lambda/_protocol/__init__.py +1 -0
- aws_sdk_lambda/_protocol/errors.py +59 -0
- aws_sdk_lambda/_protocol/xml.py +27 -0
- aws_sdk_lambda/_resources/aws_gir_api_service/capacity_provider_resource.py +615 -0
- aws_sdk_lambda/_resources/aws_gir_api_service/code_signing_config_resource.py +584 -0
- aws_sdk_lambda/_resources/aws_gir_api_service/event_source_mapping.py +1081 -0
- aws_sdk_lambda/_resources/aws_gir_api_service/function.py +3353 -0
- aws_sdk_lambda/_resources/aws_gir_api_service/function_alias.py +592 -0
- aws_sdk_lambda/_resources/aws_gir_api_service/function_version_resource.py +265 -0
- aws_sdk_lambda/_resources/aws_gir_api_service/layer_resource.py +156 -0
- aws_sdk_lambda/_resources/aws_gir_api_service/layer_version.py +902 -0
- aws_sdk_lambda/_resources/aws_gir_api_service/permission.py +355 -0
- aws_sdk_lambda/_resources/aws_gir_api_service/provisioned_concurrency_config.py +326 -0
- aws_sdk_lambda/_resources/aws_gir_api_service/resource_policy.py +17 -0
- aws_sdk_lambda/_rule_engine/__init__.py +0 -0
- aws_sdk_lambda/_rule_engine/_aws_partition.py +160 -0
- aws_sdk_lambda/_rule_engine/_endpoint_rule_set.py +136 -0
- aws_sdk_lambda/_rule_engine/_endpoint_runtime.py +389 -0
- aws_sdk_lambda/_services/_lambda.py +1232 -0
- aws_sdk_lambda/_services/_pipeline.py +195 -0
- aws_sdk_lambda/_services/async__lambda.py +1253 -0
- aws_sdk_lambda/errors/__init__.py +145 -0
- aws_sdk_lambda/errors/_base.py +94 -0
- aws_sdk_lambda/errors/callback_timeout_exception.py +54 -0
- aws_sdk_lambda/errors/capacity_provider_limit_exceeded_exception.py +54 -0
- aws_sdk_lambda/errors/code_signing_config_not_found_exception.py +53 -0
- aws_sdk_lambda/errors/code_storage_exceeded_exception.py +54 -0
- aws_sdk_lambda/errors/code_verification_failed_exception.py +53 -0
- aws_sdk_lambda/errors/durable_execution_already_started_exception.py +54 -0
- aws_sdk_lambda/errors/ec2_access_denied_exception.py +53 -0
- aws_sdk_lambda/errors/ec2_throttled_exception.py +53 -0
- aws_sdk_lambda/errors/ec2_unexpected_exception.py +58 -0
- aws_sdk_lambda/errors/efs_mount_connectivity_exception.py +53 -0
- aws_sdk_lambda/errors/efs_mount_failure_exception.py +53 -0
- aws_sdk_lambda/errors/efs_mount_timeout_exception.py +53 -0
- aws_sdk_lambda/errors/efsio_exception.py +53 -0
- aws_sdk_lambda/errors/eni_limit_reached_exception.py +53 -0
- aws_sdk_lambda/errors/function_versions_per_capacity_provider_limit_exceeded_exception.py +62 -0
- aws_sdk_lambda/errors/invalid_code_signature_exception.py +53 -0
- aws_sdk_lambda/errors/invalid_parameter_value_exception.py +55 -0
- aws_sdk_lambda/errors/invalid_request_content_exception.py +55 -0
- aws_sdk_lambda/errors/invalid_runtime_exception.py +53 -0
- aws_sdk_lambda/errors/invalid_security_group_id_exception.py +53 -0
- aws_sdk_lambda/errors/invalid_subnet_id_exception.py +53 -0
- aws_sdk_lambda/errors/invalid_zip_file_exception.py +53 -0
- aws_sdk_lambda/errors/kms_access_denied_exception.py +53 -0
- aws_sdk_lambda/errors/kms_disabled_exception.py +53 -0
- aws_sdk_lambda/errors/kms_invalid_state_exception.py +53 -0
- aws_sdk_lambda/errors/kms_not_found_exception.py +53 -0
- aws_sdk_lambda/errors/no_published_version_exception.py +54 -0
- aws_sdk_lambda/errors/policy_length_exceeded_exception.py +53 -0
- aws_sdk_lambda/errors/precondition_failed_exception.py +55 -0
- aws_sdk_lambda/errors/provisioned_concurrency_config_not_found_exception.py +53 -0
- aws_sdk_lambda/errors/recursive_invocation_exception.py +55 -0
- aws_sdk_lambda/errors/request_too_large_exception.py +53 -0
- aws_sdk_lambda/errors/resource_conflict_exception.py +55 -0
- aws_sdk_lambda/errors/resource_in_use_exception.py +53 -0
- aws_sdk_lambda/errors/resource_not_found_exception.py +53 -0
- aws_sdk_lambda/errors/resource_not_ready_exception.py +55 -0
- aws_sdk_lambda/errors/s3_files_mount_connectivity_exception.py +55 -0
- aws_sdk_lambda/errors/s3_files_mount_failure_exception.py +55 -0
- aws_sdk_lambda/errors/s3_files_mount_timeout_exception.py +55 -0
- aws_sdk_lambda/errors/serialized_request_entity_too_large_exception.py +54 -0
- aws_sdk_lambda/errors/service_exception.py +53 -0
- aws_sdk_lambda/errors/snap_start_exception.py +53 -0
- aws_sdk_lambda/errors/snap_start_not_ready_exception.py +53 -0
- aws_sdk_lambda/errors/snap_start_timeout_exception.py +53 -0
- aws_sdk_lambda/errors/subnet_ip_address_limit_reached_exception.py +53 -0
- aws_sdk_lambda/errors/too_many_requests_exception.py +69 -0
- aws_sdk_lambda/errors/unsupported_media_type_exception.py +53 -0
- aws_sdk_lambda/py.typed +0 -0
- aws_sdk_lambda/types/_prelude/blob.py +12 -0
- aws_sdk_lambda/types/_prelude/timestamp.py +12 -0
- aws_sdk_lambda/types/account_limit.py +62 -0
- aws_sdk_lambda/types/account_usage.py +34 -0
- aws_sdk_lambda/types/action.py +5 -0
- aws_sdk_lambda/types/add_layer_version_permission_request.py +67 -0
- aws_sdk_lambda/types/add_layer_version_permission_response.py +34 -0
- aws_sdk_lambda/types/add_permission_request.py +126 -0
- aws_sdk_lambda/types/add_permission_response.py +28 -0
- aws_sdk_lambda/types/additional_version.py +5 -0
- aws_sdk_lambda/types/additional_version_weights.py +27 -0
- aws_sdk_lambda/types/alias.py +5 -0
- aws_sdk_lambda/types/alias_configuration.py +77 -0
- aws_sdk_lambda/types/alias_list.py +29 -0
- aws_sdk_lambda/types/alias_routing_configuration.py +42 -0
- aws_sdk_lambda/types/allow_credentials.py +5 -0
- aws_sdk_lambda/types/allow_methods_list.py +17 -0
- aws_sdk_lambda/types/allow_origins_list.py +17 -0
- aws_sdk_lambda/types/allowed_publishers.py +45 -0
- aws_sdk_lambda/types/amazon_managed_kafka_event_source_config.py +49 -0
- aws_sdk_lambda/types/application_log_level.py +37 -0
- aws_sdk_lambda/types/architecture.py +29 -0
- aws_sdk_lambda/types/architectures_list.py +27 -0
- aws_sdk_lambda/types/arn.py +5 -0
- aws_sdk_lambda/types/attempt_count.py +7 -0
- aws_sdk_lambda/types/batch_size.py +5 -0
- aws_sdk_lambda/types/binary_operation_payload.py +15 -0
- aws_sdk_lambda/types/bisect_batch_on_function_error.py +5 -0
- aws_sdk_lambda/types/blob.py +15 -0
- aws_sdk_lambda/types/blob_stream.py +11 -0
- aws_sdk_lambda/types/boolean.py +7 -0
- aws_sdk_lambda/types/callback_details.py +46 -0
- aws_sdk_lambda/types/callback_failed_details.py +33 -0
- aws_sdk_lambda/types/callback_id.py +5 -0
- aws_sdk_lambda/types/callback_options.py +34 -0
- aws_sdk_lambda/types/callback_started_details.py +46 -0
- aws_sdk_lambda/types/callback_succeeded_details.py +35 -0
- aws_sdk_lambda/types/callback_timed_out_details.py +33 -0
- aws_sdk_lambda/types/capacity_provider.py +145 -0
- aws_sdk_lambda/types/capacity_provider_arn.py +5 -0
- aws_sdk_lambda/types/capacity_provider_config.py +43 -0
- aws_sdk_lambda/types/capacity_provider_max_v_cpu_count.py +5 -0
- aws_sdk_lambda/types/capacity_provider_name.py +5 -0
- aws_sdk_lambda/types/capacity_provider_permissions_config.py +35 -0
- aws_sdk_lambda/types/capacity_provider_predefined_metric_type.py +25 -0
- aws_sdk_lambda/types/capacity_provider_scaling_config.py +72 -0
- aws_sdk_lambda/types/capacity_provider_scaling_mode.py +31 -0
- aws_sdk_lambda/types/capacity_provider_scaling_policies_list.py +33 -0
- aws_sdk_lambda/types/capacity_provider_security_group_ids.py +19 -0
- aws_sdk_lambda/types/capacity_provider_state.py +33 -0
- aws_sdk_lambda/types/capacity_provider_subnet_ids.py +17 -0
- aws_sdk_lambda/types/capacity_provider_vpc_config.py +63 -0
- aws_sdk_lambda/types/capacity_providers_list.py +29 -0
- aws_sdk_lambda/types/chained_invoke_details.py +39 -0
- aws_sdk_lambda/types/chained_invoke_failed_details.py +33 -0
- aws_sdk_lambda/types/chained_invoke_options.py +40 -0
- aws_sdk_lambda/types/chained_invoke_started_details.py +69 -0
- aws_sdk_lambda/types/chained_invoke_stopped_details.py +33 -0
- aws_sdk_lambda/types/chained_invoke_succeeded_details.py +35 -0
- aws_sdk_lambda/types/chained_invoke_timed_out_details.py +33 -0
- aws_sdk_lambda/types/checkpoint_durable_execution_request.py +60 -0
- aws_sdk_lambda/types/checkpoint_durable_execution_response.py +54 -0
- aws_sdk_lambda/types/checkpoint_token.py +5 -0
- aws_sdk_lambda/types/checkpoint_updated_execution_state.py +43 -0
- aws_sdk_lambda/types/client_token.py +5 -0
- aws_sdk_lambda/types/code_signing_config.py +98 -0
- aws_sdk_lambda/types/code_signing_config_arn.py +5 -0
- aws_sdk_lambda/types/code_signing_config_id.py +5 -0
- aws_sdk_lambda/types/code_signing_config_list.py +29 -0
- aws_sdk_lambda/types/code_signing_policies.py +42 -0
- aws_sdk_lambda/types/code_signing_policy.py +29 -0
- aws_sdk_lambda/types/collection_name.py +5 -0
- aws_sdk_lambda/types/compatible_architectures.py +29 -0
- aws_sdk_lambda/types/compatible_runtimes.py +27 -0
- aws_sdk_lambda/types/concurrency.py +30 -0
- aws_sdk_lambda/types/context_details.py +46 -0
- aws_sdk_lambda/types/context_failed_details.py +33 -0
- aws_sdk_lambda/types/context_options.py +28 -0
- aws_sdk_lambda/types/context_started_details.py +18 -0
- aws_sdk_lambda/types/context_succeeded_details.py +35 -0
- aws_sdk_lambda/types/cors.py +100 -0
- aws_sdk_lambda/types/create_alias_request.py +72 -0
- aws_sdk_lambda/types/create_capacity_provider_request.py +139 -0
- aws_sdk_lambda/types/create_capacity_provider_response.py +41 -0
- aws_sdk_lambda/types/create_code_signing_config_request.py +82 -0
- aws_sdk_lambda/types/create_code_signing_config_response.py +41 -0
- aws_sdk_lambda/types/create_event_source_mapping_request.py +430 -0
- aws_sdk_lambda/types/create_function_request.py +391 -0
- aws_sdk_lambda/types/create_function_url_config_request.py +73 -0
- aws_sdk_lambda/types/create_function_url_config_response.py +95 -0
- aws_sdk_lambda/types/database_name.py +5 -0
- aws_sdk_lambda/types/date.py +15 -0
- aws_sdk_lambda/types/dead_letter_config.py +28 -0
- aws_sdk_lambda/types/delete_alias_request.py +25 -0
- aws_sdk_lambda/types/delete_capacity_provider_request.py +24 -0
- aws_sdk_lambda/types/delete_capacity_provider_response.py +41 -0
- aws_sdk_lambda/types/delete_code_signing_config_request.py +24 -0
- aws_sdk_lambda/types/delete_code_signing_config_response.py +18 -0
- aws_sdk_lambda/types/delete_event_source_mapping_request.py +22 -0
- aws_sdk_lambda/types/delete_function_code_signing_config_request.py +24 -0
- aws_sdk_lambda/types/delete_function_concurrency_request.py +22 -0
- aws_sdk_lambda/types/delete_function_event_invoke_config_request.py +31 -0
- aws_sdk_lambda/types/delete_function_request.py +31 -0
- aws_sdk_lambda/types/delete_function_response.py +22 -0
- aws_sdk_lambda/types/delete_function_url_config_request.py +29 -0
- aws_sdk_lambda/types/delete_layer_version_request.py +25 -0
- aws_sdk_lambda/types/delete_provisioned_concurrency_config_request.py +25 -0
- aws_sdk_lambda/types/description.py +5 -0
- aws_sdk_lambda/types/destination_arn.py +5 -0
- aws_sdk_lambda/types/destination_config.py +51 -0
- aws_sdk_lambda/types/document_db_event_source_config.py +50 -0
- aws_sdk_lambda/types/durable_config.py +39 -0
- aws_sdk_lambda/types/durable_execution_arn.py +5 -0
- aws_sdk_lambda/types/durable_execution_name.py +5 -0
- aws_sdk_lambda/types/durable_executions.py +27 -0
- aws_sdk_lambda/types/duration_seconds.py +5 -0
- aws_sdk_lambda/types/enabled.py +5 -0
- aws_sdk_lambda/types/end_point_type.py +21 -0
- aws_sdk_lambda/types/endpoint.py +5 -0
- aws_sdk_lambda/types/endpoint_lists.py +17 -0
- aws_sdk_lambda/types/endpoints.py +37 -0
- aws_sdk_lambda/types/environment.py +38 -0
- aws_sdk_lambda/types/environment_error.py +35 -0
- aws_sdk_lambda/types/environment_response.py +53 -0
- aws_sdk_lambda/types/environment_variable_name.py +5 -0
- aws_sdk_lambda/types/environment_variable_value.py +5 -0
- aws_sdk_lambda/types/environment_variables.py +27 -0
- aws_sdk_lambda/types/ephemeral_storage.py +29 -0
- aws_sdk_lambda/types/ephemeral_storage_size.py +5 -0
- aws_sdk_lambda/types/error_data.py +5 -0
- aws_sdk_lambda/types/error_message.py +5 -0
- aws_sdk_lambda/types/error_object.py +59 -0
- aws_sdk_lambda/types/error_type.py +5 -0
- aws_sdk_lambda/types/event.py +588 -0
- aws_sdk_lambda/types/event_error.py +43 -0
- aws_sdk_lambda/types/event_id.py +7 -0
- aws_sdk_lambda/types/event_input.py +35 -0
- aws_sdk_lambda/types/event_result.py +35 -0
- aws_sdk_lambda/types/event_source_mapping_arn.py +5 -0
- aws_sdk_lambda/types/event_source_mapping_configuration.py +474 -0
- aws_sdk_lambda/types/event_source_mapping_logging_config.py +42 -0
- aws_sdk_lambda/types/event_source_mapping_metric.py +31 -0
- aws_sdk_lambda/types/event_source_mapping_metric_list.py +33 -0
- aws_sdk_lambda/types/event_source_mapping_metrics_config.py +42 -0
- aws_sdk_lambda/types/event_source_mapping_system_log_level.py +33 -0
- aws_sdk_lambda/types/event_source_mappings_list.py +35 -0
- aws_sdk_lambda/types/event_source_position.py +31 -0
- aws_sdk_lambda/types/event_source_token.py +5 -0
- aws_sdk_lambda/types/event_type.py +73 -0
- aws_sdk_lambda/types/events.py +27 -0
- aws_sdk_lambda/types/execution.py +103 -0
- aws_sdk_lambda/types/execution_details.py +28 -0
- aws_sdk_lambda/types/execution_environment_memory_gi_b_per_v_cpu.py +5 -0
- aws_sdk_lambda/types/execution_failed_details.py +33 -0
- aws_sdk_lambda/types/execution_started_details.py +41 -0
- aws_sdk_lambda/types/execution_status.py +35 -0
- aws_sdk_lambda/types/execution_status_list.py +29 -0
- aws_sdk_lambda/types/execution_stopped_details.py +33 -0
- aws_sdk_lambda/types/execution_succeeded_details.py +35 -0
- aws_sdk_lambda/types/execution_timed_out_details.py +32 -0
- aws_sdk_lambda/types/execution_timeout.py +5 -0
- aws_sdk_lambda/types/execution_timestamp.py +15 -0
- aws_sdk_lambda/types/file_system_arn.py +5 -0
- aws_sdk_lambda/types/file_system_config.py +37 -0
- aws_sdk_lambda/types/file_system_config_list.py +29 -0
- aws_sdk_lambda/types/filter.py +28 -0
- aws_sdk_lambda/types/filter_criteria.py +36 -0
- aws_sdk_lambda/types/filter_criteria_error.py +39 -0
- aws_sdk_lambda/types/filter_criteria_error_code.py +5 -0
- aws_sdk_lambda/types/filter_criteria_error_message.py +5 -0
- aws_sdk_lambda/types/filter_list.py +27 -0
- aws_sdk_lambda/types/full_document.py +29 -0
- aws_sdk_lambda/types/function_arn.py +5 -0
- aws_sdk_lambda/types/function_arn_list.py +17 -0
- aws_sdk_lambda/types/function_code.py +69 -0
- aws_sdk_lambda/types/function_code_location.py +52 -0
- aws_sdk_lambda/types/function_configuration.py +531 -0
- aws_sdk_lambda/types/function_event_invoke_config.py +82 -0
- aws_sdk_lambda/types/function_event_invoke_config_list.py +33 -0
- aws_sdk_lambda/types/function_list.py +29 -0
- aws_sdk_lambda/types/function_name.py +5 -0
- aws_sdk_lambda/types/function_response_type.py +21 -0
- aws_sdk_lambda/types/function_response_type_list.py +29 -0
- aws_sdk_lambda/types/function_scaling_config.py +38 -0
- aws_sdk_lambda/types/function_scaling_config_execution_environments.py +5 -0
- aws_sdk_lambda/types/function_url.py +5 -0
- aws_sdk_lambda/types/function_url_auth_type.py +29 -0
- aws_sdk_lambda/types/function_url_config.py +96 -0
- aws_sdk_lambda/types/function_url_config_list.py +29 -0
- aws_sdk_lambda/types/function_url_qualifier.py +5 -0
- aws_sdk_lambda/types/function_version.py +21 -0
- aws_sdk_lambda/types/function_version_latest_published.py +23 -0
- aws_sdk_lambda/types/function_versions_by_capacity_provider_list.py +37 -0
- aws_sdk_lambda/types/function_versions_by_capacity_provider_list_item.py +45 -0
- aws_sdk_lambda/types/get_account_settings_request.py +18 -0
- aws_sdk_lambda/types/get_account_settings_response.py +51 -0
- aws_sdk_lambda/types/get_alias_request.py +25 -0
- aws_sdk_lambda/types/get_capacity_provider_request.py +24 -0
- aws_sdk_lambda/types/get_capacity_provider_response.py +41 -0
- aws_sdk_lambda/types/get_code_signing_config_request.py +24 -0
- aws_sdk_lambda/types/get_code_signing_config_response.py +41 -0
- aws_sdk_lambda/types/get_durable_execution_history_request.py +40 -0
- aws_sdk_lambda/types/get_durable_execution_history_response.py +42 -0
- aws_sdk_lambda/types/get_durable_execution_request.py +24 -0
- aws_sdk_lambda/types/get_durable_execution_response.py +158 -0
- aws_sdk_lambda/types/get_durable_execution_state_request.py +35 -0
- aws_sdk_lambda/types/get_durable_execution_state_response.py +48 -0
- aws_sdk_lambda/types/get_event_source_mapping_request.py +22 -0
- aws_sdk_lambda/types/get_function_code_signing_config_request.py +24 -0
- aws_sdk_lambda/types/get_function_code_signing_config_response.py +43 -0
- aws_sdk_lambda/types/get_function_concurrency_request.py +22 -0
- aws_sdk_lambda/types/get_function_concurrency_response.py +30 -0
- aws_sdk_lambda/types/get_function_configuration_request.py +31 -0
- aws_sdk_lambda/types/get_function_event_invoke_config_request.py +31 -0
- aws_sdk_lambda/types/get_function_recursion_config_request.py +24 -0
- aws_sdk_lambda/types/get_function_recursion_config_response.py +36 -0
- aws_sdk_lambda/types/get_function_request.py +31 -0
- aws_sdk_lambda/types/get_function_response.py +100 -0
- aws_sdk_lambda/types/get_function_scaling_config_request.py +29 -0
- aws_sdk_lambda/types/get_function_scaling_config_response.py +69 -0
- aws_sdk_lambda/types/get_function_url_config_request.py +29 -0
- aws_sdk_lambda/types/get_function_url_config_response.py +100 -0
- aws_sdk_lambda/types/get_layer_version_by_arn_request.py +22 -0
- aws_sdk_lambda/types/get_layer_version_policy_request.py +25 -0
- aws_sdk_lambda/types/get_layer_version_policy_response.py +34 -0
- aws_sdk_lambda/types/get_layer_version_request.py +25 -0
- aws_sdk_lambda/types/get_layer_version_response.py +129 -0
- aws_sdk_lambda/types/get_policy_request.py +31 -0
- aws_sdk_lambda/types/get_policy_response.py +34 -0
- aws_sdk_lambda/types/get_provisioned_concurrency_config_request.py +25 -0
- aws_sdk_lambda/types/get_provisioned_concurrency_config_response.py +94 -0
- aws_sdk_lambda/types/get_runtime_management_config_request.py +31 -0
- aws_sdk_lambda/types/get_runtime_management_config_response.py +58 -0
- aws_sdk_lambda/types/handler.py +5 -0
- aws_sdk_lambda/types/header.py +5 -0
- aws_sdk_lambda/types/headers_list.py +17 -0
- aws_sdk_lambda/types/http_status.py +7 -0
- aws_sdk_lambda/types/image_config.py +59 -0
- aws_sdk_lambda/types/image_config_error.py +35 -0
- aws_sdk_lambda/types/image_config_response.py +51 -0
- aws_sdk_lambda/types/include_execution_data.py +5 -0
- aws_sdk_lambda/types/input_payload.py +5 -0
- aws_sdk_lambda/types/instance_requirements.py +79 -0
- aws_sdk_lambda/types/instance_type.py +5 -0
- aws_sdk_lambda/types/instance_type_set.py +17 -0
- aws_sdk_lambda/types/integer.py +7 -0
- aws_sdk_lambda/types/invocation_completed_details.py +79 -0
- aws_sdk_lambda/types/invocation_request.py +59 -0
- aws_sdk_lambda/types/invocation_response.py +48 -0
- aws_sdk_lambda/types/invocation_type.py +31 -0
- aws_sdk_lambda/types/invoke_async_request.py +16 -0
- aws_sdk_lambda/types/invoke_async_response.py +22 -0
- aws_sdk_lambda/types/invoke_mode.py +29 -0
- aws_sdk_lambda/types/invoke_response_stream_update.py +32 -0
- aws_sdk_lambda/types/invoke_with_response_stream_complete_event.py +40 -0
- aws_sdk_lambda/types/invoke_with_response_stream_request.py +56 -0
- aws_sdk_lambda/types/invoke_with_response_stream_response.py +24 -0
- aws_sdk_lambda/types/invoke_with_response_stream_response_event.py +72 -0
- aws_sdk_lambda/types/invoked_via_function_url.py +5 -0
- aws_sdk_lambda/types/item_count.py +7 -0
- aws_sdk_lambda/types/kafka_schema_registry_access_config.py +49 -0
- aws_sdk_lambda/types/kafka_schema_registry_access_config_list.py +37 -0
- aws_sdk_lambda/types/kafka_schema_registry_auth_type.py +33 -0
- aws_sdk_lambda/types/kafka_schema_registry_config.py +93 -0
- aws_sdk_lambda/types/kafka_schema_validation_attribute.py +31 -0
- aws_sdk_lambda/types/kafka_schema_validation_config.py +42 -0
- aws_sdk_lambda/types/kafka_schema_validation_config_list.py +33 -0
- aws_sdk_lambda/types/kms_key_arn.py +5 -0
- aws_sdk_lambda/types/kms_key_arn_non_empty.py +5 -0
- aws_sdk_lambda/types/lambda_managed_instances_capacity_provider_config.py +61 -0
- aws_sdk_lambda/types/last_update_status.py +31 -0
- aws_sdk_lambda/types/last_update_status_reason.py +5 -0
- aws_sdk_lambda/types/last_update_status_reason_code.py +95 -0
- aws_sdk_lambda/types/layer.py +49 -0
- aws_sdk_lambda/types/layer_arn.py +5 -0
- aws_sdk_lambda/types/layer_list.py +17 -0
- aws_sdk_lambda/types/layer_name.py +5 -0
- aws_sdk_lambda/types/layer_permission_allowed_action.py +5 -0
- aws_sdk_lambda/types/layer_permission_allowed_principal.py +5 -0
- aws_sdk_lambda/types/layer_version_arn.py +5 -0
- aws_sdk_lambda/types/layer_version_content_input.py +55 -0
- aws_sdk_lambda/types/layer_version_content_output.py +54 -0
- aws_sdk_lambda/types/layer_version_number.py +7 -0
- aws_sdk_lambda/types/layer_versions_list.py +29 -0
- aws_sdk_lambda/types/layer_versions_list_item.py +101 -0
- aws_sdk_lambda/types/layers_list.py +27 -0
- aws_sdk_lambda/types/layers_list_item.py +56 -0
- aws_sdk_lambda/types/layers_reference_list.py +27 -0
- aws_sdk_lambda/types/license_info.py +5 -0
- aws_sdk_lambda/types/list_aliases_request.py +35 -0
- aws_sdk_lambda/types/list_aliases_response.py +43 -0
- aws_sdk_lambda/types/list_capacity_providers_request.py +34 -0
- aws_sdk_lambda/types/list_capacity_providers_response.py +54 -0
- aws_sdk_lambda/types/list_code_signing_configs_request.py +27 -0
- aws_sdk_lambda/types/list_code_signing_configs_response.py +49 -0
- aws_sdk_lambda/types/list_durable_executions_by_function_request.py +59 -0
- aws_sdk_lambda/types/list_durable_executions_by_function_response.py +49 -0
- aws_sdk_lambda/types/list_event_source_mappings_request.py +35 -0
- aws_sdk_lambda/types/list_event_source_mappings_response.py +49 -0
- aws_sdk_lambda/types/list_function_event_invoke_configs_request.py +34 -0
- aws_sdk_lambda/types/list_function_event_invoke_configs_response.py +49 -0
- aws_sdk_lambda/types/list_function_url_configs_request.py +30 -0
- aws_sdk_lambda/types/list_function_url_configs_response.py +54 -0
- aws_sdk_lambda/types/list_function_versions_by_capacity_provider_request.py +34 -0
- aws_sdk_lambda/types/list_function_versions_by_capacity_provider_response.py +64 -0
- aws_sdk_lambda/types/list_functions_by_code_signing_config_request.py +32 -0
- aws_sdk_lambda/types/list_functions_by_code_signing_config_response.py +43 -0
- aws_sdk_lambda/types/list_functions_request.py +35 -0
- aws_sdk_lambda/types/list_functions_response.py +43 -0
- aws_sdk_lambda/types/list_layer_versions_request.py +40 -0
- aws_sdk_lambda/types/list_layer_versions_response.py +47 -0
- aws_sdk_lambda/types/list_layers_request.py +37 -0
- aws_sdk_lambda/types/list_layers_response.py +41 -0
- aws_sdk_lambda/types/list_provisioned_concurrency_configs_request.py +32 -0
- aws_sdk_lambda/types/list_provisioned_concurrency_configs_response.py +49 -0
- aws_sdk_lambda/types/list_tags_request.py +22 -0
- aws_sdk_lambda/types/list_tags_response.py +32 -0
- aws_sdk_lambda/types/list_versions_by_function_request.py +32 -0
- aws_sdk_lambda/types/list_versions_by_function_response.py +43 -0
- aws_sdk_lambda/types/local_mount_path.py +5 -0
- aws_sdk_lambda/types/log_format.py +29 -0
- aws_sdk_lambda/types/log_group.py +5 -0
- aws_sdk_lambda/types/log_type.py +29 -0
- aws_sdk_lambda/types/logging_config.py +83 -0
- aws_sdk_lambda/types/long.py +7 -0
- aws_sdk_lambda/types/master_region.py +5 -0
- aws_sdk_lambda/types/max_age.py +5 -0
- aws_sdk_lambda/types/max_fifty_list_items.py +5 -0
- aws_sdk_lambda/types/max_function_event_invoke_config_list_items.py +5 -0
- aws_sdk_lambda/types/max_items.py +5 -0
- aws_sdk_lambda/types/max_layer_list_items.py +5 -0
- aws_sdk_lambda/types/max_list_items.py +5 -0
- aws_sdk_lambda/types/max_provisioned_concurrency_config_list_items.py +5 -0
- aws_sdk_lambda/types/maximum_batching_window_in_seconds.py +5 -0
- aws_sdk_lambda/types/maximum_concurrency.py +5 -0
- aws_sdk_lambda/types/maximum_event_age_in_seconds.py +5 -0
- aws_sdk_lambda/types/maximum_number_of_pollers.py +5 -0
- aws_sdk_lambda/types/maximum_record_age_in_seconds.py +5 -0
- aws_sdk_lambda/types/maximum_retry_attempts.py +5 -0
- aws_sdk_lambda/types/maximum_retry_attempts_event_source_mapping.py +5 -0
- aws_sdk_lambda/types/memory_size.py +5 -0
- aws_sdk_lambda/types/method.py +5 -0
- aws_sdk_lambda/types/metric_target_value.py +5 -0
- aws_sdk_lambda/types/minimum_number_of_pollers.py +5 -0
- aws_sdk_lambda/types/name_spaced_function_arn.py +5 -0
- aws_sdk_lambda/types/namespaced_function_name.py +5 -0
- aws_sdk_lambda/types/namespaced_statement_id.py +5 -0
- aws_sdk_lambda/types/non_negative_integer.py +5 -0
- aws_sdk_lambda/types/nullable_boolean.py +5 -0
- aws_sdk_lambda/types/numeric_latest_published_or_alias_qualifier.py +5 -0
- aws_sdk_lambda/types/on_failure.py +28 -0
- aws_sdk_lambda/types/on_success.py +28 -0
- aws_sdk_lambda/types/operation.py +217 -0
- aws_sdk_lambda/types/operation_action.py +35 -0
- aws_sdk_lambda/types/operation_id.py +5 -0
- aws_sdk_lambda/types/operation_name.py +5 -0
- aws_sdk_lambda/types/operation_payload.py +5 -0
- aws_sdk_lambda/types/operation_status.py +41 -0
- aws_sdk_lambda/types/operation_sub_type.py +5 -0
- aws_sdk_lambda/types/operation_type.py +37 -0
- aws_sdk_lambda/types/operation_update.py +180 -0
- aws_sdk_lambda/types/operation_updates.py +29 -0
- aws_sdk_lambda/types/operations.py +27 -0
- aws_sdk_lambda/types/organization_id.py +5 -0
- aws_sdk_lambda/types/origin.py +5 -0
- aws_sdk_lambda/types/output_payload.py +5 -0
- aws_sdk_lambda/types/package_type.py +29 -0
- aws_sdk_lambda/types/parallelization_factor.py +5 -0
- aws_sdk_lambda/types/pattern.py +5 -0
- aws_sdk_lambda/types/per_execution_environment_max_concurrency.py +5 -0
- aws_sdk_lambda/types/positive_integer.py +5 -0
- aws_sdk_lambda/types/principal.py +5 -0
- aws_sdk_lambda/types/principal_org_id.py +5 -0
- aws_sdk_lambda/types/provisioned_concurrency_config_list.py +37 -0
- aws_sdk_lambda/types/provisioned_concurrency_config_list_item.py +101 -0
- aws_sdk_lambda/types/provisioned_concurrency_status_enum.py +33 -0
- aws_sdk_lambda/types/provisioned_poller_config.py +48 -0
- aws_sdk_lambda/types/provisioned_poller_group_name.py +5 -0
- aws_sdk_lambda/types/publish_layer_version_request.py +100 -0
- aws_sdk_lambda/types/publish_layer_version_response.py +129 -0
- aws_sdk_lambda/types/publish_version_request.py +65 -0
- aws_sdk_lambda/types/published_function_qualifier.py +5 -0
- aws_sdk_lambda/types/put_function_code_signing_config_request.py +38 -0
- aws_sdk_lambda/types/put_function_code_signing_config_response.py +43 -0
- aws_sdk_lambda/types/put_function_concurrency_request.py +34 -0
- aws_sdk_lambda/types/put_function_event_invoke_config_request.py +70 -0
- aws_sdk_lambda/types/put_function_recursion_config_request.py +44 -0
- aws_sdk_lambda/types/put_function_recursion_config_response.py +36 -0
- aws_sdk_lambda/types/put_function_scaling_config_request.py +52 -0
- aws_sdk_lambda/types/put_function_scaling_config_response.py +36 -0
- aws_sdk_lambda/types/put_provisioned_concurrency_config_request.py +41 -0
- aws_sdk_lambda/types/put_provisioned_concurrency_config_response.py +94 -0
- aws_sdk_lambda/types/put_runtime_management_config_request.py +62 -0
- aws_sdk_lambda/types/put_runtime_management_config_response.py +62 -0
- aws_sdk_lambda/types/qualifier.py +5 -0
- aws_sdk_lambda/types/queue.py +5 -0
- aws_sdk_lambda/types/queues.py +17 -0
- aws_sdk_lambda/types/recursive_loop.py +29 -0
- aws_sdk_lambda/types/remove_layer_version_permission_request.py +33 -0
- aws_sdk_lambda/types/remove_permission_request.py +37 -0
- aws_sdk_lambda/types/replay_children.py +5 -0
- aws_sdk_lambda/types/reserved_concurrent_executions.py +5 -0
- aws_sdk_lambda/types/resource_arn.py +5 -0
- aws_sdk_lambda/types/response_streaming_invocation_type.py +31 -0
- aws_sdk_lambda/types/retention_period_in_days.py +5 -0
- aws_sdk_lambda/types/retry_details.py +38 -0
- aws_sdk_lambda/types/reverse_order.py +5 -0
- aws_sdk_lambda/types/role_arn.py +5 -0
- aws_sdk_lambda/types/runtime.py +117 -0
- aws_sdk_lambda/types/runtime_version_arn.py +5 -0
- aws_sdk_lambda/types/runtime_version_config.py +45 -0
- aws_sdk_lambda/types/runtime_version_error.py +35 -0
- aws_sdk_lambda/types/s3_bucket.py +5 -0
- aws_sdk_lambda/types/s3_key.py +5 -0
- aws_sdk_lambda/types/s3_object_version.py +5 -0
- aws_sdk_lambda/types/scaling_config.py +30 -0
- aws_sdk_lambda/types/schema_registry_event_record_format.py +31 -0
- aws_sdk_lambda/types/schema_registry_uri.py +5 -0
- aws_sdk_lambda/types/security_group_id.py +5 -0
- aws_sdk_lambda/types/security_group_ids.py +19 -0
- aws_sdk_lambda/types/self_managed_event_source.py +36 -0
- aws_sdk_lambda/types/self_managed_kafka_event_source_config.py +49 -0
- aws_sdk_lambda/types/send_durable_execution_callback_failure_request.py +35 -0
- aws_sdk_lambda/types/send_durable_execution_callback_failure_response.py +18 -0
- aws_sdk_lambda/types/send_durable_execution_callback_heartbeat_request.py +22 -0
- aws_sdk_lambda/types/send_durable_execution_callback_heartbeat_response.py +18 -0
- aws_sdk_lambda/types/send_durable_execution_callback_success_request.py +41 -0
- aws_sdk_lambda/types/send_durable_execution_callback_success_response.py +18 -0
- aws_sdk_lambda/types/sensitive_string.py +5 -0
- aws_sdk_lambda/types/signing_profile_version_arns.py +17 -0
- aws_sdk_lambda/types/snap_start.py +36 -0
- aws_sdk_lambda/types/snap_start_apply_on.py +29 -0
- aws_sdk_lambda/types/snap_start_optimization_status.py +31 -0
- aws_sdk_lambda/types/snap_start_response.py +57 -0
- aws_sdk_lambda/types/source_access_configuration.py +43 -0
- aws_sdk_lambda/types/source_access_configurations.py +33 -0
- aws_sdk_lambda/types/source_access_type.py +41 -0
- aws_sdk_lambda/types/source_owner.py +5 -0
- aws_sdk_lambda/types/stack_trace_entries.py +19 -0
- aws_sdk_lambda/types/stack_trace_entry.py +5 -0
- aws_sdk_lambda/types/state.py +41 -0
- aws_sdk_lambda/types/state_reason.py +5 -0
- aws_sdk_lambda/types/state_reason_code.py +101 -0
- aws_sdk_lambda/types/statement_id.py +5 -0
- aws_sdk_lambda/types/step_details.py +68 -0
- aws_sdk_lambda/types/step_failed_details.py +49 -0
- aws_sdk_lambda/types/step_options.py +30 -0
- aws_sdk_lambda/types/step_started_details.py +18 -0
- aws_sdk_lambda/types/step_succeeded_details.py +51 -0
- aws_sdk_lambda/types/stop_durable_execution_request.py +37 -0
- aws_sdk_lambda/types/stop_durable_execution_response.py +41 -0
- aws_sdk_lambda/types/string.py +5 -0
- aws_sdk_lambda/types/string_list.py +17 -0
- aws_sdk_lambda/types/subnet_id.py +5 -0
- aws_sdk_lambda/types/subnet_ids.py +17 -0
- aws_sdk_lambda/types/system_log_level.py +31 -0
- aws_sdk_lambda/types/tag_key.py +5 -0
- aws_sdk_lambda/types/tag_key_list.py +17 -0
- aws_sdk_lambda/types/tag_resource_request.py +36 -0
- aws_sdk_lambda/types/tag_value.py +5 -0
- aws_sdk_lambda/types/taggable_resource.py +5 -0
- aws_sdk_lambda/types/tags.py +26 -0
- aws_sdk_lambda/types/tags_error.py +37 -0
- aws_sdk_lambda/types/tags_error_code.py +5 -0
- aws_sdk_lambda/types/tags_error_message.py +5 -0
- aws_sdk_lambda/types/target_tracking_scaling_policy.py +51 -0
- aws_sdk_lambda/types/tenancy_config.py +43 -0
- aws_sdk_lambda/types/tenant_id.py +5 -0
- aws_sdk_lambda/types/tenant_isolation_mode.py +21 -0
- aws_sdk_lambda/types/throttle_reason.py +37 -0
- aws_sdk_lambda/types/timeout.py +5 -0
- aws_sdk_lambda/types/timestamp.py +5 -0
- aws_sdk_lambda/types/topic.py +5 -0
- aws_sdk_lambda/types/topics.py +17 -0
- aws_sdk_lambda/types/trace_header.py +28 -0
- aws_sdk_lambda/types/tracing_config.py +32 -0
- aws_sdk_lambda/types/tracing_config_response.py +32 -0
- aws_sdk_lambda/types/tracing_mode.py +29 -0
- aws_sdk_lambda/types/truncated.py +5 -0
- aws_sdk_lambda/types/tumbling_window_in_seconds.py +5 -0
- aws_sdk_lambda/types/unqualified_function_name.py +5 -0
- aws_sdk_lambda/types/unreserved_concurrent_executions.py +5 -0
- aws_sdk_lambda/types/untag_resource_request.py +25 -0
- aws_sdk_lambda/types/update_alias_request.py +71 -0
- aws_sdk_lambda/types/update_capacity_provider_request.py +47 -0
- aws_sdk_lambda/types/update_capacity_provider_response.py +41 -0
- aws_sdk_lambda/types/update_code_signing_config_request.py +75 -0
- aws_sdk_lambda/types/update_code_signing_config_response.py +41 -0
- aws_sdk_lambda/types/update_event_source_mapping_request.py +328 -0
- aws_sdk_lambda/types/update_function_code_request.py +131 -0
- aws_sdk_lambda/types/update_function_configuration_request.py +282 -0
- aws_sdk_lambda/types/update_function_event_invoke_config_request.py +70 -0
- aws_sdk_lambda/types/update_function_url_config_request.py +72 -0
- aws_sdk_lambda/types/update_function_url_config_response.py +104 -0
- aws_sdk_lambda/types/update_runtime_on.py +31 -0
- aws_sdk_lambda/types/uri.py +5 -0
- aws_sdk_lambda/types/version.py +5 -0
- aws_sdk_lambda/types/version_with_latest_published.py +5 -0
- aws_sdk_lambda/types/vpc_config.py +66 -0
- aws_sdk_lambda/types/vpc_config_response.py +73 -0
- aws_sdk_lambda/types/vpc_id.py +5 -0
- aws_sdk_lambda/types/wait_cancelled_details.py +32 -0
- aws_sdk_lambda/types/wait_details.py +42 -0
- aws_sdk_lambda/types/wait_options.py +28 -0
- aws_sdk_lambda/types/wait_started_details.py +53 -0
- aws_sdk_lambda/types/wait_succeeded_details.py +28 -0
- aws_sdk_lambda/types/weight.py +7 -0
- aws_sdk_lambda/types/working_directory.py +5 -0
- aws_sdk_lambda/types/x_amzn_trace_id.py +5 -0
- aws_sdk_lambda-0.4.0.dist-info/METADATA +97 -0
- aws_sdk_lambda-0.4.0.dist-info/RECORD +678 -0
- aws_sdk_lambda-0.4.0.dist-info/WHEEL +5 -0
- aws_sdk_lambda-0.4.0.dist-info/licenses/LICENSE +21 -0
- aws_sdk_lambda-0.4.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,3353 @@
|
|
|
1
|
+
from collections.abc import AsyncIterator, Iterator
|
|
2
|
+
from typing import TYPE_CHECKING, Optional
|
|
3
|
+
|
|
4
|
+
import aws_sdk_lambda._auth._signers
|
|
5
|
+
import aws_sdk_lambda._auth._sigv4
|
|
6
|
+
from aws_sdk_lambda._services._lambda import ensure_sync_iterator
|
|
7
|
+
from aws_sdk_lambda._services._pipeline import (
|
|
8
|
+
AsyncOperationRequest,
|
|
9
|
+
AsyncOperationResponse,
|
|
10
|
+
OperationRequest,
|
|
11
|
+
OperationResponse,
|
|
12
|
+
aexecute_pipeline,
|
|
13
|
+
execute_pipeline,
|
|
14
|
+
)
|
|
15
|
+
from aws_sdk_lambda._services.async__lambda import ensure_async_iterator
|
|
16
|
+
|
|
17
|
+
if TYPE_CHECKING:
|
|
18
|
+
import aws_sdk_lambda.types.architectures_list
|
|
19
|
+
import aws_sdk_lambda.types.blob
|
|
20
|
+
import aws_sdk_lambda.types.blob_stream
|
|
21
|
+
import aws_sdk_lambda.types.boolean
|
|
22
|
+
import aws_sdk_lambda.types.capacity_provider_config
|
|
23
|
+
import aws_sdk_lambda.types.code_signing_config_arn
|
|
24
|
+
import aws_sdk_lambda.types.concurrency
|
|
25
|
+
import aws_sdk_lambda.types.cors
|
|
26
|
+
import aws_sdk_lambda.types.create_function_request
|
|
27
|
+
import aws_sdk_lambda.types.create_function_url_config_request
|
|
28
|
+
import aws_sdk_lambda.types.create_function_url_config_response
|
|
29
|
+
import aws_sdk_lambda.types.dead_letter_config
|
|
30
|
+
import aws_sdk_lambda.types.delete_function_code_signing_config_request
|
|
31
|
+
import aws_sdk_lambda.types.delete_function_concurrency_request
|
|
32
|
+
import aws_sdk_lambda.types.delete_function_url_config_request
|
|
33
|
+
import aws_sdk_lambda.types.description
|
|
34
|
+
import aws_sdk_lambda.types.durable_config
|
|
35
|
+
import aws_sdk_lambda.types.durable_execution_name
|
|
36
|
+
import aws_sdk_lambda.types.environment
|
|
37
|
+
import aws_sdk_lambda.types.ephemeral_storage
|
|
38
|
+
import aws_sdk_lambda.types.file_system_config_list
|
|
39
|
+
import aws_sdk_lambda.types.function_code
|
|
40
|
+
import aws_sdk_lambda.types.function_configuration
|
|
41
|
+
import aws_sdk_lambda.types.function_name
|
|
42
|
+
import aws_sdk_lambda.types.function_scaling_config
|
|
43
|
+
import aws_sdk_lambda.types.function_url_auth_type
|
|
44
|
+
import aws_sdk_lambda.types.function_url_qualifier
|
|
45
|
+
import aws_sdk_lambda.types.function_version
|
|
46
|
+
import aws_sdk_lambda.types.function_version_latest_published
|
|
47
|
+
import aws_sdk_lambda.types.get_function_code_signing_config_request
|
|
48
|
+
import aws_sdk_lambda.types.get_function_code_signing_config_response
|
|
49
|
+
import aws_sdk_lambda.types.get_function_concurrency_request
|
|
50
|
+
import aws_sdk_lambda.types.get_function_concurrency_response
|
|
51
|
+
import aws_sdk_lambda.types.get_function_configuration_request
|
|
52
|
+
import aws_sdk_lambda.types.get_function_recursion_config_request
|
|
53
|
+
import aws_sdk_lambda.types.get_function_recursion_config_response
|
|
54
|
+
import aws_sdk_lambda.types.get_function_request
|
|
55
|
+
import aws_sdk_lambda.types.get_function_response
|
|
56
|
+
import aws_sdk_lambda.types.get_function_scaling_config_request
|
|
57
|
+
import aws_sdk_lambda.types.get_function_scaling_config_response
|
|
58
|
+
import aws_sdk_lambda.types.get_function_url_config_request
|
|
59
|
+
import aws_sdk_lambda.types.get_function_url_config_response
|
|
60
|
+
import aws_sdk_lambda.types.get_policy_request
|
|
61
|
+
import aws_sdk_lambda.types.get_policy_response
|
|
62
|
+
import aws_sdk_lambda.types.get_runtime_management_config_request
|
|
63
|
+
import aws_sdk_lambda.types.get_runtime_management_config_response
|
|
64
|
+
import aws_sdk_lambda.types.handler
|
|
65
|
+
import aws_sdk_lambda.types.image_config
|
|
66
|
+
import aws_sdk_lambda.types.invocation_request
|
|
67
|
+
import aws_sdk_lambda.types.invocation_response
|
|
68
|
+
import aws_sdk_lambda.types.invocation_type
|
|
69
|
+
import aws_sdk_lambda.types.invoke_async_request
|
|
70
|
+
import aws_sdk_lambda.types.invoke_async_response
|
|
71
|
+
import aws_sdk_lambda.types.invoke_mode
|
|
72
|
+
import aws_sdk_lambda.types.invoke_with_response_stream_request
|
|
73
|
+
import aws_sdk_lambda.types.invoke_with_response_stream_response
|
|
74
|
+
import aws_sdk_lambda.types.kms_key_arn
|
|
75
|
+
import aws_sdk_lambda.types.layer_list
|
|
76
|
+
import aws_sdk_lambda.types.list_function_url_configs_request
|
|
77
|
+
import aws_sdk_lambda.types.list_function_url_configs_response
|
|
78
|
+
import aws_sdk_lambda.types.list_functions_request
|
|
79
|
+
import aws_sdk_lambda.types.list_functions_response
|
|
80
|
+
import aws_sdk_lambda.types.list_provisioned_concurrency_configs_request
|
|
81
|
+
import aws_sdk_lambda.types.list_provisioned_concurrency_configs_response
|
|
82
|
+
import aws_sdk_lambda.types.log_type
|
|
83
|
+
import aws_sdk_lambda.types.logging_config
|
|
84
|
+
import aws_sdk_lambda.types.master_region
|
|
85
|
+
import aws_sdk_lambda.types.max_items
|
|
86
|
+
import aws_sdk_lambda.types.max_list_items
|
|
87
|
+
import aws_sdk_lambda.types.max_provisioned_concurrency_config_list_items
|
|
88
|
+
import aws_sdk_lambda.types.memory_size
|
|
89
|
+
import aws_sdk_lambda.types.namespaced_function_name
|
|
90
|
+
import aws_sdk_lambda.types.numeric_latest_published_or_alias_qualifier
|
|
91
|
+
import aws_sdk_lambda.types.package_type
|
|
92
|
+
import aws_sdk_lambda.types.published_function_qualifier
|
|
93
|
+
import aws_sdk_lambda.types.put_function_code_signing_config_request
|
|
94
|
+
import aws_sdk_lambda.types.put_function_code_signing_config_response
|
|
95
|
+
import aws_sdk_lambda.types.put_function_concurrency_request
|
|
96
|
+
import aws_sdk_lambda.types.put_function_recursion_config_request
|
|
97
|
+
import aws_sdk_lambda.types.put_function_recursion_config_response
|
|
98
|
+
import aws_sdk_lambda.types.put_function_scaling_config_request
|
|
99
|
+
import aws_sdk_lambda.types.put_function_scaling_config_response
|
|
100
|
+
import aws_sdk_lambda.types.put_runtime_management_config_request
|
|
101
|
+
import aws_sdk_lambda.types.put_runtime_management_config_response
|
|
102
|
+
import aws_sdk_lambda.types.recursive_loop
|
|
103
|
+
import aws_sdk_lambda.types.reserved_concurrent_executions
|
|
104
|
+
import aws_sdk_lambda.types.response_streaming_invocation_type
|
|
105
|
+
import aws_sdk_lambda.types.role_arn
|
|
106
|
+
import aws_sdk_lambda.types.runtime
|
|
107
|
+
import aws_sdk_lambda.types.runtime_version_arn
|
|
108
|
+
import aws_sdk_lambda.types.s3_bucket
|
|
109
|
+
import aws_sdk_lambda.types.s3_key
|
|
110
|
+
import aws_sdk_lambda.types.s3_object_version
|
|
111
|
+
import aws_sdk_lambda.types.snap_start
|
|
112
|
+
import aws_sdk_lambda.types.string
|
|
113
|
+
import aws_sdk_lambda.types.tags
|
|
114
|
+
import aws_sdk_lambda.types.tenancy_config
|
|
115
|
+
import aws_sdk_lambda.types.tenant_id
|
|
116
|
+
import aws_sdk_lambda.types.timeout
|
|
117
|
+
import aws_sdk_lambda.types.tracing_config
|
|
118
|
+
import aws_sdk_lambda.types.unqualified_function_name
|
|
119
|
+
import aws_sdk_lambda.types.update_function_code_request
|
|
120
|
+
import aws_sdk_lambda.types.update_function_configuration_request
|
|
121
|
+
import aws_sdk_lambda.types.update_function_url_config_request
|
|
122
|
+
import aws_sdk_lambda.types.update_function_url_config_response
|
|
123
|
+
import aws_sdk_lambda.types.update_runtime_on
|
|
124
|
+
import aws_sdk_lambda.types.vpc_config
|
|
125
|
+
from aws_sdk_lambda._services._lambda import LambdaClient, LambdaClientConfig
|
|
126
|
+
from aws_sdk_lambda._services.async__lambda import (
|
|
127
|
+
AsyncLambdaClient,
|
|
128
|
+
AsyncLambdaClientConfig,
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
class Function:
|
|
133
|
+
def __init__(self, service: LambdaClient) -> None:
|
|
134
|
+
self._service = service
|
|
135
|
+
|
|
136
|
+
def put(
|
|
137
|
+
self,
|
|
138
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
139
|
+
role: "aws_sdk_lambda.types.role_arn.RoleArn",
|
|
140
|
+
code: "aws_sdk_lambda.types.function_code.FunctionCode",
|
|
141
|
+
*,
|
|
142
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
143
|
+
runtime: Optional["aws_sdk_lambda.types.runtime.Runtime"] = None,
|
|
144
|
+
handler: Optional["aws_sdk_lambda.types.handler.Handler"] = None,
|
|
145
|
+
description: Optional["aws_sdk_lambda.types.description.Description"] = None,
|
|
146
|
+
timeout: Optional["aws_sdk_lambda.types.timeout.Timeout"] = None,
|
|
147
|
+
memory_size: Optional["aws_sdk_lambda.types.memory_size.MemorySize"] = None,
|
|
148
|
+
publish: Optional["aws_sdk_lambda.types.boolean.Boolean"] = None,
|
|
149
|
+
vpc_config: Optional["aws_sdk_lambda.types.vpc_config.VpcConfig"] = None,
|
|
150
|
+
package_type: Optional["aws_sdk_lambda.types.package_type.PackageType"] = None,
|
|
151
|
+
dead_letter_config: Optional[
|
|
152
|
+
"aws_sdk_lambda.types.dead_letter_config.DeadLetterConfig"
|
|
153
|
+
] = None,
|
|
154
|
+
environment: Optional["aws_sdk_lambda.types.environment.Environment"] = None,
|
|
155
|
+
kms_key_arn: Optional["aws_sdk_lambda.types.kms_key_arn.KMSKeyArn"] = None,
|
|
156
|
+
tracing_config: Optional[
|
|
157
|
+
"aws_sdk_lambda.types.tracing_config.TracingConfig"
|
|
158
|
+
] = None,
|
|
159
|
+
tags: Optional["aws_sdk_lambda.types.tags.Tags"] = None,
|
|
160
|
+
layers: Optional["aws_sdk_lambda.types.layer_list.LayerList"] = None,
|
|
161
|
+
file_system_configs: Optional[
|
|
162
|
+
"aws_sdk_lambda.types.file_system_config_list.FileSystemConfigList"
|
|
163
|
+
] = None,
|
|
164
|
+
image_config: Optional["aws_sdk_lambda.types.image_config.ImageConfig"] = None,
|
|
165
|
+
code_signing_config_arn: Optional[
|
|
166
|
+
"aws_sdk_lambda.types.code_signing_config_arn.CodeSigningConfigArn"
|
|
167
|
+
] = None,
|
|
168
|
+
architectures: Optional[
|
|
169
|
+
"aws_sdk_lambda.types.architectures_list.ArchitecturesList"
|
|
170
|
+
] = None,
|
|
171
|
+
ephemeral_storage: Optional[
|
|
172
|
+
"aws_sdk_lambda.types.ephemeral_storage.EphemeralStorage"
|
|
173
|
+
] = None,
|
|
174
|
+
snap_start: Optional["aws_sdk_lambda.types.snap_start.SnapStart"] = None,
|
|
175
|
+
logging_config: Optional[
|
|
176
|
+
"aws_sdk_lambda.types.logging_config.LoggingConfig"
|
|
177
|
+
] = None,
|
|
178
|
+
capacity_provider_config: Optional[
|
|
179
|
+
"aws_sdk_lambda.types.capacity_provider_config.CapacityProviderConfig"
|
|
180
|
+
] = None,
|
|
181
|
+
publish_to: Optional[
|
|
182
|
+
"aws_sdk_lambda.types.function_version_latest_published.FunctionVersionLatestPublished"
|
|
183
|
+
] = None,
|
|
184
|
+
durable_config: Optional[
|
|
185
|
+
"aws_sdk_lambda.types.durable_config.DurableConfig"
|
|
186
|
+
] = None,
|
|
187
|
+
tenancy_config: Optional[
|
|
188
|
+
"aws_sdk_lambda.types.tenancy_config.TenancyConfig"
|
|
189
|
+
] = None,
|
|
190
|
+
) -> "aws_sdk_lambda.types.function_configuration.FunctionConfiguration":
|
|
191
|
+
"""<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>
|
|
192
|
+
|
|
193
|
+
Args:
|
|
194
|
+
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>
|
|
195
|
+
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>
|
|
196
|
+
role: <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
|
|
197
|
+
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>
|
|
198
|
+
code: <p>The code for the function.</p>
|
|
199
|
+
description: <p>A description of the function.</p>
|
|
200
|
+
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>
|
|
201
|
+
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>
|
|
202
|
+
publish: <p>Set to true to publish the first version of the function during creation.</p>
|
|
203
|
+
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>
|
|
204
|
+
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>
|
|
205
|
+
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>
|
|
206
|
+
environment: <p>Environment variables that are accessible from function code during execution.</p>
|
|
207
|
+
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>
|
|
208
|
+
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>
|
|
209
|
+
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>
|
|
210
|
+
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>
|
|
211
|
+
file_system_configs: <p>Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.</p>
|
|
212
|
+
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>
|
|
213
|
+
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>
|
|
214
|
+
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>
|
|
215
|
+
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>
|
|
216
|
+
snap_start: <p>The function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html\">SnapStart</a> setting.</p>
|
|
217
|
+
logging_config: <p>The function's Amazon CloudWatch Logs configuration settings.</p>
|
|
218
|
+
capacity_provider_config: <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
|
|
219
|
+
publish_to: <p>Specifies where to publish the function version or configuration.</p>
|
|
220
|
+
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>
|
|
221
|
+
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>
|
|
222
|
+
|
|
223
|
+
Examples:
|
|
224
|
+
To create a function
|
|
225
|
+
The following example creates a function with a deployment package in Amazon S3 and enables X-Ray tracing and environment variable encryption.
|
|
226
|
+
|
|
227
|
+
>>> 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'})
|
|
228
|
+
"""
|
|
229
|
+
|
|
230
|
+
def _handler(
|
|
231
|
+
req: "OperationRequest[aws_sdk_lambda.types.create_function_request.CreateFunctionRequest]",
|
|
232
|
+
) -> OperationResponse[
|
|
233
|
+
"aws_sdk_lambda.types.function_configuration.FunctionConfiguration"
|
|
234
|
+
]:
|
|
235
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.create_function
|
|
236
|
+
|
|
237
|
+
output, http_response = (
|
|
238
|
+
aws_sdk_lambda._operations.aws_gir_api_service.create_function.create_function(
|
|
239
|
+
req.options, req.input
|
|
240
|
+
)
|
|
241
|
+
)
|
|
242
|
+
return OperationResponse(output=output, response=http_response)
|
|
243
|
+
|
|
244
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
245
|
+
input: aws_sdk_lambda.types.create_function_request.CreateFunctionRequest = {} # type: ignore[typeddict-item]
|
|
246
|
+
input["function_name"] = function_name
|
|
247
|
+
if runtime is not None:
|
|
248
|
+
input["runtime"] = runtime
|
|
249
|
+
input["role"] = role
|
|
250
|
+
if handler is not None:
|
|
251
|
+
input["handler"] = handler
|
|
252
|
+
input["code"] = code
|
|
253
|
+
if description is not None:
|
|
254
|
+
input["description"] = description
|
|
255
|
+
if timeout is not None:
|
|
256
|
+
input["timeout"] = timeout
|
|
257
|
+
if memory_size is not None:
|
|
258
|
+
input["memory_size"] = memory_size
|
|
259
|
+
if publish is not None:
|
|
260
|
+
input["publish"] = publish
|
|
261
|
+
if vpc_config is not None:
|
|
262
|
+
input["vpc_config"] = vpc_config
|
|
263
|
+
if package_type is not None:
|
|
264
|
+
input["package_type"] = package_type
|
|
265
|
+
if dead_letter_config is not None:
|
|
266
|
+
input["dead_letter_config"] = dead_letter_config
|
|
267
|
+
if environment is not None:
|
|
268
|
+
input["environment"] = environment
|
|
269
|
+
if kms_key_arn is not None:
|
|
270
|
+
input["kms_key_arn"] = kms_key_arn
|
|
271
|
+
if tracing_config is not None:
|
|
272
|
+
input["tracing_config"] = tracing_config
|
|
273
|
+
if tags is not None:
|
|
274
|
+
input["tags"] = tags
|
|
275
|
+
if layers is not None:
|
|
276
|
+
input["layers"] = layers
|
|
277
|
+
if file_system_configs is not None:
|
|
278
|
+
input["file_system_configs"] = file_system_configs
|
|
279
|
+
if image_config is not None:
|
|
280
|
+
input["image_config"] = image_config
|
|
281
|
+
if code_signing_config_arn is not None:
|
|
282
|
+
input["code_signing_config_arn"] = code_signing_config_arn
|
|
283
|
+
if architectures is not None:
|
|
284
|
+
input["architectures"] = architectures
|
|
285
|
+
if ephemeral_storage is not None:
|
|
286
|
+
input["ephemeral_storage"] = ephemeral_storage
|
|
287
|
+
if snap_start is not None:
|
|
288
|
+
input["snap_start"] = snap_start
|
|
289
|
+
if logging_config is not None:
|
|
290
|
+
input["logging_config"] = logging_config
|
|
291
|
+
if capacity_provider_config is not None:
|
|
292
|
+
input["capacity_provider_config"] = capacity_provider_config
|
|
293
|
+
if publish_to is not None:
|
|
294
|
+
input["publish_to"] = publish_to
|
|
295
|
+
if durable_config is not None:
|
|
296
|
+
input["durable_config"] = durable_config
|
|
297
|
+
if tenancy_config is not None:
|
|
298
|
+
input["tenancy_config"] = tenancy_config
|
|
299
|
+
|
|
300
|
+
response = execute_pipeline(
|
|
301
|
+
OperationRequest(input=input, options=options_),
|
|
302
|
+
handler=_handler,
|
|
303
|
+
interceptors=list(interceptors_),
|
|
304
|
+
)
|
|
305
|
+
return response.output
|
|
306
|
+
|
|
307
|
+
def list(
|
|
308
|
+
self,
|
|
309
|
+
*,
|
|
310
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
311
|
+
master_region: Optional[
|
|
312
|
+
"aws_sdk_lambda.types.master_region.MasterRegion"
|
|
313
|
+
] = None,
|
|
314
|
+
function_version: Optional[
|
|
315
|
+
"aws_sdk_lambda.types.function_version.FunctionVersion"
|
|
316
|
+
] = None,
|
|
317
|
+
marker: Optional["aws_sdk_lambda.types.string.String"] = None,
|
|
318
|
+
max_items: Optional["aws_sdk_lambda.types.max_list_items.MaxListItems"] = None,
|
|
319
|
+
) -> "aws_sdk_lambda.types.list_functions_response.ListFunctionsResponse":
|
|
320
|
+
"""<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>
|
|
321
|
+
|
|
322
|
+
Args:
|
|
323
|
+
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>
|
|
324
|
+
function_version: <p>Set to <code>ALL</code> to include entries for all published versions of each function.</p>
|
|
325
|
+
marker: <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
|
|
326
|
+
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>
|
|
327
|
+
|
|
328
|
+
Examples:
|
|
329
|
+
To get a list of Lambda functions
|
|
330
|
+
This operation returns a list of Lambda functions.
|
|
331
|
+
|
|
332
|
+
>>> client.list()
|
|
333
|
+
"""
|
|
334
|
+
|
|
335
|
+
def _handler(
|
|
336
|
+
req: "OperationRequest[aws_sdk_lambda.types.list_functions_request.ListFunctionsRequest]",
|
|
337
|
+
) -> OperationResponse[
|
|
338
|
+
"aws_sdk_lambda.types.list_functions_response.ListFunctionsResponse"
|
|
339
|
+
]:
|
|
340
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.list_functions
|
|
341
|
+
|
|
342
|
+
output, http_response = (
|
|
343
|
+
aws_sdk_lambda._operations.aws_gir_api_service.list_functions.list_functions(
|
|
344
|
+
req.options, req.input
|
|
345
|
+
)
|
|
346
|
+
)
|
|
347
|
+
return OperationResponse(output=output, response=http_response)
|
|
348
|
+
|
|
349
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
350
|
+
input: aws_sdk_lambda.types.list_functions_request.ListFunctionsRequest = {} # type: ignore[typeddict-item]
|
|
351
|
+
if master_region is not None:
|
|
352
|
+
input["master_region"] = master_region
|
|
353
|
+
if function_version is not None:
|
|
354
|
+
input["function_version"] = function_version
|
|
355
|
+
if marker is not None:
|
|
356
|
+
input["marker"] = marker
|
|
357
|
+
if max_items is not None:
|
|
358
|
+
input["max_items"] = max_items
|
|
359
|
+
|
|
360
|
+
response = execute_pipeline(
|
|
361
|
+
OperationRequest(input=input, options=options_),
|
|
362
|
+
handler=_handler,
|
|
363
|
+
interceptors=list(interceptors_),
|
|
364
|
+
)
|
|
365
|
+
return response.output
|
|
366
|
+
|
|
367
|
+
def create_function_url_config(
|
|
368
|
+
self,
|
|
369
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
370
|
+
auth_type: "aws_sdk_lambda.types.function_url_auth_type.FunctionUrlAuthType",
|
|
371
|
+
*,
|
|
372
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
373
|
+
qualifier: Optional[
|
|
374
|
+
"aws_sdk_lambda.types.function_url_qualifier.FunctionUrlQualifier"
|
|
375
|
+
] = None,
|
|
376
|
+
cors: Optional["aws_sdk_lambda.types.cors.Cors"] = None,
|
|
377
|
+
invoke_mode: Optional["aws_sdk_lambda.types.invoke_mode.InvokeMode"] = None,
|
|
378
|
+
) -> "aws_sdk_lambda.types.create_function_url_config_response.CreateFunctionUrlConfigResponse":
|
|
379
|
+
"""<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>
|
|
380
|
+
|
|
381
|
+
Args:
|
|
382
|
+
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>
|
|
383
|
+
qualifier: <p>The alias name.</p>
|
|
384
|
+
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>
|
|
385
|
+
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>
|
|
386
|
+
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>
|
|
387
|
+
"""
|
|
388
|
+
|
|
389
|
+
def _handler(
|
|
390
|
+
req: "OperationRequest[aws_sdk_lambda.types.create_function_url_config_request.CreateFunctionUrlConfigRequest]",
|
|
391
|
+
) -> OperationResponse[
|
|
392
|
+
"aws_sdk_lambda.types.create_function_url_config_response.CreateFunctionUrlConfigResponse"
|
|
393
|
+
]:
|
|
394
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.create_function_url_config
|
|
395
|
+
|
|
396
|
+
output, http_response = (
|
|
397
|
+
aws_sdk_lambda._operations.aws_gir_api_service.create_function_url_config.create_function_url_config(
|
|
398
|
+
req.options, req.input
|
|
399
|
+
)
|
|
400
|
+
)
|
|
401
|
+
return OperationResponse(output=output, response=http_response)
|
|
402
|
+
|
|
403
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
404
|
+
input: aws_sdk_lambda.types.create_function_url_config_request.CreateFunctionUrlConfigRequest = {} # type: ignore[typeddict-item]
|
|
405
|
+
input["function_name"] = function_name
|
|
406
|
+
if qualifier is not None:
|
|
407
|
+
input["qualifier"] = qualifier
|
|
408
|
+
input["auth_type"] = auth_type
|
|
409
|
+
if cors is not None:
|
|
410
|
+
input["cors"] = cors
|
|
411
|
+
if invoke_mode is not None:
|
|
412
|
+
input["invoke_mode"] = invoke_mode
|
|
413
|
+
|
|
414
|
+
response = execute_pipeline(
|
|
415
|
+
OperationRequest(input=input, options=options_),
|
|
416
|
+
handler=_handler,
|
|
417
|
+
interceptors=list(interceptors_),
|
|
418
|
+
)
|
|
419
|
+
return response.output
|
|
420
|
+
|
|
421
|
+
def delete_function_concurrency(
|
|
422
|
+
self,
|
|
423
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
424
|
+
*,
|
|
425
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
426
|
+
) -> None:
|
|
427
|
+
"""<p>Removes a concurrent execution limit from a function.</p>
|
|
428
|
+
|
|
429
|
+
Args:
|
|
430
|
+
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>
|
|
431
|
+
|
|
432
|
+
Examples:
|
|
433
|
+
To remove the reserved concurrent execution limit from a function
|
|
434
|
+
The following example deletes the reserved concurrent execution limit from a function named my-function.
|
|
435
|
+
|
|
436
|
+
>>> client.delete_function_concurrency(function_name='my-function')
|
|
437
|
+
"""
|
|
438
|
+
|
|
439
|
+
def _handler(
|
|
440
|
+
req: "OperationRequest[aws_sdk_lambda.types.delete_function_concurrency_request.DeleteFunctionConcurrencyRequest]",
|
|
441
|
+
) -> OperationResponse[None]:
|
|
442
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.delete_function_concurrency
|
|
443
|
+
|
|
444
|
+
output, http_response = (
|
|
445
|
+
aws_sdk_lambda._operations.aws_gir_api_service.delete_function_concurrency.delete_function_concurrency(
|
|
446
|
+
req.options, req.input
|
|
447
|
+
)
|
|
448
|
+
)
|
|
449
|
+
return OperationResponse(output=output, response=http_response)
|
|
450
|
+
|
|
451
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
452
|
+
input: aws_sdk_lambda.types.delete_function_concurrency_request.DeleteFunctionConcurrencyRequest = {} # type: ignore[typeddict-item]
|
|
453
|
+
input["function_name"] = function_name
|
|
454
|
+
|
|
455
|
+
response = execute_pipeline(
|
|
456
|
+
OperationRequest(input=input, options=options_),
|
|
457
|
+
handler=_handler,
|
|
458
|
+
interceptors=list(interceptors_),
|
|
459
|
+
)
|
|
460
|
+
return response.output
|
|
461
|
+
|
|
462
|
+
def delete_function_url_config(
|
|
463
|
+
self,
|
|
464
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
465
|
+
*,
|
|
466
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
467
|
+
qualifier: Optional[
|
|
468
|
+
"aws_sdk_lambda.types.function_url_qualifier.FunctionUrlQualifier"
|
|
469
|
+
] = None,
|
|
470
|
+
) -> None:
|
|
471
|
+
"""<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>
|
|
472
|
+
|
|
473
|
+
Args:
|
|
474
|
+
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>
|
|
475
|
+
qualifier: <p>The alias name.</p>
|
|
476
|
+
"""
|
|
477
|
+
|
|
478
|
+
def _handler(
|
|
479
|
+
req: "OperationRequest[aws_sdk_lambda.types.delete_function_url_config_request.DeleteFunctionUrlConfigRequest]",
|
|
480
|
+
) -> OperationResponse[None]:
|
|
481
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.delete_function_url_config
|
|
482
|
+
|
|
483
|
+
output, http_response = (
|
|
484
|
+
aws_sdk_lambda._operations.aws_gir_api_service.delete_function_url_config.delete_function_url_config(
|
|
485
|
+
req.options, req.input
|
|
486
|
+
)
|
|
487
|
+
)
|
|
488
|
+
return OperationResponse(output=output, response=http_response)
|
|
489
|
+
|
|
490
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
491
|
+
input: aws_sdk_lambda.types.delete_function_url_config_request.DeleteFunctionUrlConfigRequest = {} # type: ignore[typeddict-item]
|
|
492
|
+
input["function_name"] = function_name
|
|
493
|
+
if qualifier is not None:
|
|
494
|
+
input["qualifier"] = qualifier
|
|
495
|
+
|
|
496
|
+
response = execute_pipeline(
|
|
497
|
+
OperationRequest(input=input, options=options_),
|
|
498
|
+
handler=_handler,
|
|
499
|
+
interceptors=list(interceptors_),
|
|
500
|
+
)
|
|
501
|
+
return response.output
|
|
502
|
+
|
|
503
|
+
def get_function_concurrency(
|
|
504
|
+
self,
|
|
505
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
506
|
+
*,
|
|
507
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
508
|
+
) -> "aws_sdk_lambda.types.get_function_concurrency_response.GetFunctionConcurrencyResponse":
|
|
509
|
+
"""<p>Returns details about the reserved concurrency configuration for a function. To set a concurrency limit for a function, use <a>PutFunctionConcurrency</a>.</p>
|
|
510
|
+
|
|
511
|
+
Args:
|
|
512
|
+
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>
|
|
513
|
+
|
|
514
|
+
Examples:
|
|
515
|
+
To get the reserved concurrency setting for a function
|
|
516
|
+
The following example returns the reserved concurrency setting for a function named my-function.
|
|
517
|
+
|
|
518
|
+
>>> client.get_function_concurrency(function_name='my-function')
|
|
519
|
+
"""
|
|
520
|
+
|
|
521
|
+
def _handler(
|
|
522
|
+
req: "OperationRequest[aws_sdk_lambda.types.get_function_concurrency_request.GetFunctionConcurrencyRequest]",
|
|
523
|
+
) -> OperationResponse[
|
|
524
|
+
"aws_sdk_lambda.types.get_function_concurrency_response.GetFunctionConcurrencyResponse"
|
|
525
|
+
]:
|
|
526
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.get_function_concurrency
|
|
527
|
+
|
|
528
|
+
output, http_response = (
|
|
529
|
+
aws_sdk_lambda._operations.aws_gir_api_service.get_function_concurrency.get_function_concurrency(
|
|
530
|
+
req.options, req.input
|
|
531
|
+
)
|
|
532
|
+
)
|
|
533
|
+
return OperationResponse(output=output, response=http_response)
|
|
534
|
+
|
|
535
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
536
|
+
input: aws_sdk_lambda.types.get_function_concurrency_request.GetFunctionConcurrencyRequest = {} # type: ignore[typeddict-item]
|
|
537
|
+
input["function_name"] = function_name
|
|
538
|
+
|
|
539
|
+
response = execute_pipeline(
|
|
540
|
+
OperationRequest(input=input, options=options_),
|
|
541
|
+
handler=_handler,
|
|
542
|
+
interceptors=list(interceptors_),
|
|
543
|
+
)
|
|
544
|
+
return response.output
|
|
545
|
+
|
|
546
|
+
def get_function_url_config(
|
|
547
|
+
self,
|
|
548
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
549
|
+
*,
|
|
550
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
551
|
+
qualifier: Optional[
|
|
552
|
+
"aws_sdk_lambda.types.function_url_qualifier.FunctionUrlQualifier"
|
|
553
|
+
] = None,
|
|
554
|
+
) -> "aws_sdk_lambda.types.get_function_url_config_response.GetFunctionUrlConfigResponse":
|
|
555
|
+
"""<p>Returns details about a Lambda function URL.</p>
|
|
556
|
+
|
|
557
|
+
Args:
|
|
558
|
+
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>
|
|
559
|
+
qualifier: <p>The alias name.</p>
|
|
560
|
+
"""
|
|
561
|
+
|
|
562
|
+
def _handler(
|
|
563
|
+
req: "OperationRequest[aws_sdk_lambda.types.get_function_url_config_request.GetFunctionUrlConfigRequest]",
|
|
564
|
+
) -> OperationResponse[
|
|
565
|
+
"aws_sdk_lambda.types.get_function_url_config_response.GetFunctionUrlConfigResponse"
|
|
566
|
+
]:
|
|
567
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.get_function_url_config
|
|
568
|
+
|
|
569
|
+
output, http_response = (
|
|
570
|
+
aws_sdk_lambda._operations.aws_gir_api_service.get_function_url_config.get_function_url_config(
|
|
571
|
+
req.options, req.input
|
|
572
|
+
)
|
|
573
|
+
)
|
|
574
|
+
return OperationResponse(output=output, response=http_response)
|
|
575
|
+
|
|
576
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
577
|
+
input: aws_sdk_lambda.types.get_function_url_config_request.GetFunctionUrlConfigRequest = {} # type: ignore[typeddict-item]
|
|
578
|
+
input["function_name"] = function_name
|
|
579
|
+
if qualifier is not None:
|
|
580
|
+
input["qualifier"] = qualifier
|
|
581
|
+
|
|
582
|
+
response = execute_pipeline(
|
|
583
|
+
OperationRequest(input=input, options=options_),
|
|
584
|
+
handler=_handler,
|
|
585
|
+
interceptors=list(interceptors_),
|
|
586
|
+
)
|
|
587
|
+
return response.output
|
|
588
|
+
|
|
589
|
+
def list_function_url_configs(
|
|
590
|
+
self,
|
|
591
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
592
|
+
*,
|
|
593
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
594
|
+
marker: Optional["aws_sdk_lambda.types.string.String"] = None,
|
|
595
|
+
max_items: Optional["aws_sdk_lambda.types.max_items.MaxItems"] = None,
|
|
596
|
+
) -> "aws_sdk_lambda.types.list_function_url_configs_response.ListFunctionUrlConfigsResponse":
|
|
597
|
+
"""<p>Returns a list of Lambda function URLs for the specified function.</p>
|
|
598
|
+
|
|
599
|
+
Args:
|
|
600
|
+
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>
|
|
601
|
+
marker: <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
|
|
602
|
+
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>
|
|
603
|
+
"""
|
|
604
|
+
|
|
605
|
+
def _handler(
|
|
606
|
+
req: "OperationRequest[aws_sdk_lambda.types.list_function_url_configs_request.ListFunctionUrlConfigsRequest]",
|
|
607
|
+
) -> OperationResponse[
|
|
608
|
+
"aws_sdk_lambda.types.list_function_url_configs_response.ListFunctionUrlConfigsResponse"
|
|
609
|
+
]:
|
|
610
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.list_function_url_configs
|
|
611
|
+
|
|
612
|
+
output, http_response = (
|
|
613
|
+
aws_sdk_lambda._operations.aws_gir_api_service.list_function_url_configs.list_function_url_configs(
|
|
614
|
+
req.options, req.input
|
|
615
|
+
)
|
|
616
|
+
)
|
|
617
|
+
return OperationResponse(output=output, response=http_response)
|
|
618
|
+
|
|
619
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
620
|
+
input: aws_sdk_lambda.types.list_function_url_configs_request.ListFunctionUrlConfigsRequest = {} # type: ignore[typeddict-item]
|
|
621
|
+
input["function_name"] = function_name
|
|
622
|
+
if marker is not None:
|
|
623
|
+
input["marker"] = marker
|
|
624
|
+
if max_items is not None:
|
|
625
|
+
input["max_items"] = max_items
|
|
626
|
+
|
|
627
|
+
response = execute_pipeline(
|
|
628
|
+
OperationRequest(input=input, options=options_),
|
|
629
|
+
handler=_handler,
|
|
630
|
+
interceptors=list(interceptors_),
|
|
631
|
+
)
|
|
632
|
+
return response.output
|
|
633
|
+
|
|
634
|
+
def list_provisioned_concurrency_configs(
|
|
635
|
+
self,
|
|
636
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
637
|
+
*,
|
|
638
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
639
|
+
marker: Optional["aws_sdk_lambda.types.string.String"] = None,
|
|
640
|
+
max_items: Optional[
|
|
641
|
+
"aws_sdk_lambda.types.max_provisioned_concurrency_config_list_items.MaxProvisionedConcurrencyConfigListItems"
|
|
642
|
+
] = None,
|
|
643
|
+
) -> "aws_sdk_lambda.types.list_provisioned_concurrency_configs_response.ListProvisionedConcurrencyConfigsResponse":
|
|
644
|
+
"""<p>Retrieves a list of provisioned concurrency configurations for a function.</p>
|
|
645
|
+
|
|
646
|
+
Args:
|
|
647
|
+
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>
|
|
648
|
+
marker: <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
|
|
649
|
+
max_items: <p>Specify a number to limit the number of configurations returned.</p>
|
|
650
|
+
|
|
651
|
+
Examples:
|
|
652
|
+
To get a list of provisioned concurrency configurations
|
|
653
|
+
The following example returns a list of provisioned concurrency configurations for a function named my-function.
|
|
654
|
+
|
|
655
|
+
>>> client.list_provisioned_concurrency_configs(function_name='my-function')
|
|
656
|
+
"""
|
|
657
|
+
|
|
658
|
+
def _handler(
|
|
659
|
+
req: "OperationRequest[aws_sdk_lambda.types.list_provisioned_concurrency_configs_request.ListProvisionedConcurrencyConfigsRequest]",
|
|
660
|
+
) -> OperationResponse[
|
|
661
|
+
"aws_sdk_lambda.types.list_provisioned_concurrency_configs_response.ListProvisionedConcurrencyConfigsResponse"
|
|
662
|
+
]:
|
|
663
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.list_provisioned_concurrency_configs
|
|
664
|
+
|
|
665
|
+
output, http_response = (
|
|
666
|
+
aws_sdk_lambda._operations.aws_gir_api_service.list_provisioned_concurrency_configs.list_provisioned_concurrency_configs(
|
|
667
|
+
req.options, req.input
|
|
668
|
+
)
|
|
669
|
+
)
|
|
670
|
+
return OperationResponse(output=output, response=http_response)
|
|
671
|
+
|
|
672
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
673
|
+
input: aws_sdk_lambda.types.list_provisioned_concurrency_configs_request.ListProvisionedConcurrencyConfigsRequest = {} # type: ignore[typeddict-item]
|
|
674
|
+
input["function_name"] = function_name
|
|
675
|
+
if marker is not None:
|
|
676
|
+
input["marker"] = marker
|
|
677
|
+
if max_items is not None:
|
|
678
|
+
input["max_items"] = max_items
|
|
679
|
+
|
|
680
|
+
response = execute_pipeline(
|
|
681
|
+
OperationRequest(input=input, options=options_),
|
|
682
|
+
handler=_handler,
|
|
683
|
+
interceptors=list(interceptors_),
|
|
684
|
+
)
|
|
685
|
+
return response.output
|
|
686
|
+
|
|
687
|
+
def put_function_concurrency(
|
|
688
|
+
self,
|
|
689
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
690
|
+
reserved_concurrent_executions: "aws_sdk_lambda.types.reserved_concurrent_executions.ReservedConcurrentExecutions",
|
|
691
|
+
*,
|
|
692
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
693
|
+
) -> "aws_sdk_lambda.types.concurrency.Concurrency":
|
|
694
|
+
"""<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>
|
|
695
|
+
|
|
696
|
+
Args:
|
|
697
|
+
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>
|
|
698
|
+
reserved_concurrent_executions: <p>The number of simultaneous executions to reserve for the function.</p>
|
|
699
|
+
|
|
700
|
+
Examples:
|
|
701
|
+
To configure a reserved concurrency limit for a function
|
|
702
|
+
The following example configures 100 reserved concurrent executions for the my-function function.
|
|
703
|
+
|
|
704
|
+
>>> client.put_function_concurrency(function_name='my-function', reserved_concurrent_executions=100)
|
|
705
|
+
"""
|
|
706
|
+
|
|
707
|
+
def _handler(
|
|
708
|
+
req: "OperationRequest[aws_sdk_lambda.types.put_function_concurrency_request.PutFunctionConcurrencyRequest]",
|
|
709
|
+
) -> OperationResponse["aws_sdk_lambda.types.concurrency.Concurrency"]:
|
|
710
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.put_function_concurrency
|
|
711
|
+
|
|
712
|
+
output, http_response = (
|
|
713
|
+
aws_sdk_lambda._operations.aws_gir_api_service.put_function_concurrency.put_function_concurrency(
|
|
714
|
+
req.options, req.input
|
|
715
|
+
)
|
|
716
|
+
)
|
|
717
|
+
return OperationResponse(output=output, response=http_response)
|
|
718
|
+
|
|
719
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
720
|
+
input: aws_sdk_lambda.types.put_function_concurrency_request.PutFunctionConcurrencyRequest = {} # type: ignore[typeddict-item]
|
|
721
|
+
input["function_name"] = function_name
|
|
722
|
+
input["reserved_concurrent_executions"] = reserved_concurrent_executions
|
|
723
|
+
|
|
724
|
+
response = execute_pipeline(
|
|
725
|
+
OperationRequest(input=input, options=options_),
|
|
726
|
+
handler=_handler,
|
|
727
|
+
interceptors=list(interceptors_),
|
|
728
|
+
)
|
|
729
|
+
return response.output
|
|
730
|
+
|
|
731
|
+
def update_function_code(
|
|
732
|
+
self,
|
|
733
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
734
|
+
*,
|
|
735
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
736
|
+
zip_file: Optional["aws_sdk_lambda.types.blob.Blob"] = None,
|
|
737
|
+
s3_bucket: Optional["aws_sdk_lambda.types.s3_bucket.S3Bucket"] = None,
|
|
738
|
+
s3_key: Optional["aws_sdk_lambda.types.s3_key.S3Key"] = None,
|
|
739
|
+
s3_object_version: Optional[
|
|
740
|
+
"aws_sdk_lambda.types.s3_object_version.S3ObjectVersion"
|
|
741
|
+
] = None,
|
|
742
|
+
image_uri: Optional["aws_sdk_lambda.types.string.String"] = None,
|
|
743
|
+
publish: Optional["aws_sdk_lambda.types.boolean.Boolean"] = None,
|
|
744
|
+
dry_run: Optional["aws_sdk_lambda.types.boolean.Boolean"] = None,
|
|
745
|
+
revision_id: Optional["aws_sdk_lambda.types.string.String"] = None,
|
|
746
|
+
architectures: Optional[
|
|
747
|
+
"aws_sdk_lambda.types.architectures_list.ArchitecturesList"
|
|
748
|
+
] = None,
|
|
749
|
+
source_kms_key_arn: Optional[
|
|
750
|
+
"aws_sdk_lambda.types.kms_key_arn.KMSKeyArn"
|
|
751
|
+
] = None,
|
|
752
|
+
publish_to: Optional[
|
|
753
|
+
"aws_sdk_lambda.types.function_version_latest_published.FunctionVersionLatestPublished"
|
|
754
|
+
] = None,
|
|
755
|
+
) -> "aws_sdk_lambda.types.function_configuration.FunctionConfiguration":
|
|
756
|
+
"""<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>
|
|
757
|
+
|
|
758
|
+
Args:
|
|
759
|
+
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>
|
|
760
|
+
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>
|
|
761
|
+
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>
|
|
762
|
+
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>
|
|
763
|
+
s3_object_version: <p>For versioned objects, the version of the deployment package object to use.</p>
|
|
764
|
+
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>
|
|
765
|
+
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>
|
|
766
|
+
dry_run: <p>Set to true to validate the request parameters and access permissions without modifying the function code.</p>
|
|
767
|
+
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>
|
|
768
|
+
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>
|
|
769
|
+
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>
|
|
770
|
+
publish_to: <p>Specifies where to publish the function version or configuration.</p>
|
|
771
|
+
|
|
772
|
+
Examples:
|
|
773
|
+
To update a Lambda function's code
|
|
774
|
+
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.
|
|
775
|
+
|
|
776
|
+
>>> client.update_function_code(function_name='my-function', s3_bucket='my-bucket-1xpuxmplzrlbh', s3_key='function.zip')
|
|
777
|
+
"""
|
|
778
|
+
|
|
779
|
+
def _handler(
|
|
780
|
+
req: "OperationRequest[aws_sdk_lambda.types.update_function_code_request.UpdateFunctionCodeRequest]",
|
|
781
|
+
) -> OperationResponse[
|
|
782
|
+
"aws_sdk_lambda.types.function_configuration.FunctionConfiguration"
|
|
783
|
+
]:
|
|
784
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.update_function_code
|
|
785
|
+
|
|
786
|
+
output, http_response = (
|
|
787
|
+
aws_sdk_lambda._operations.aws_gir_api_service.update_function_code.update_function_code(
|
|
788
|
+
req.options, req.input
|
|
789
|
+
)
|
|
790
|
+
)
|
|
791
|
+
return OperationResponse(output=output, response=http_response)
|
|
792
|
+
|
|
793
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
794
|
+
input: aws_sdk_lambda.types.update_function_code_request.UpdateFunctionCodeRequest = {} # type: ignore[typeddict-item]
|
|
795
|
+
input["function_name"] = function_name
|
|
796
|
+
if zip_file is not None:
|
|
797
|
+
input["zip_file"] = zip_file
|
|
798
|
+
if s3_bucket is not None:
|
|
799
|
+
input["s3_bucket"] = s3_bucket
|
|
800
|
+
if s3_key is not None:
|
|
801
|
+
input["s3_key"] = s3_key
|
|
802
|
+
if s3_object_version is not None:
|
|
803
|
+
input["s3_object_version"] = s3_object_version
|
|
804
|
+
if image_uri is not None:
|
|
805
|
+
input["image_uri"] = image_uri
|
|
806
|
+
if publish is not None:
|
|
807
|
+
input["publish"] = publish
|
|
808
|
+
if dry_run is not None:
|
|
809
|
+
input["dry_run"] = dry_run
|
|
810
|
+
if revision_id is not None:
|
|
811
|
+
input["revision_id"] = revision_id
|
|
812
|
+
if architectures is not None:
|
|
813
|
+
input["architectures"] = architectures
|
|
814
|
+
if source_kms_key_arn is not None:
|
|
815
|
+
input["source_kms_key_arn"] = source_kms_key_arn
|
|
816
|
+
if publish_to is not None:
|
|
817
|
+
input["publish_to"] = publish_to
|
|
818
|
+
|
|
819
|
+
response = execute_pipeline(
|
|
820
|
+
OperationRequest(input=input, options=options_),
|
|
821
|
+
handler=_handler,
|
|
822
|
+
interceptors=list(interceptors_),
|
|
823
|
+
)
|
|
824
|
+
return response.output
|
|
825
|
+
|
|
826
|
+
def update_function_configuration(
|
|
827
|
+
self,
|
|
828
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
829
|
+
*,
|
|
830
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
831
|
+
role: Optional["aws_sdk_lambda.types.role_arn.RoleArn"] = None,
|
|
832
|
+
handler: Optional["aws_sdk_lambda.types.handler.Handler"] = None,
|
|
833
|
+
description: Optional["aws_sdk_lambda.types.description.Description"] = None,
|
|
834
|
+
timeout: Optional["aws_sdk_lambda.types.timeout.Timeout"] = None,
|
|
835
|
+
memory_size: Optional["aws_sdk_lambda.types.memory_size.MemorySize"] = None,
|
|
836
|
+
vpc_config: Optional["aws_sdk_lambda.types.vpc_config.VpcConfig"] = None,
|
|
837
|
+
environment: Optional["aws_sdk_lambda.types.environment.Environment"] = None,
|
|
838
|
+
runtime: Optional["aws_sdk_lambda.types.runtime.Runtime"] = None,
|
|
839
|
+
dead_letter_config: Optional[
|
|
840
|
+
"aws_sdk_lambda.types.dead_letter_config.DeadLetterConfig"
|
|
841
|
+
] = None,
|
|
842
|
+
kms_key_arn: Optional["aws_sdk_lambda.types.kms_key_arn.KMSKeyArn"] = None,
|
|
843
|
+
tracing_config: Optional[
|
|
844
|
+
"aws_sdk_lambda.types.tracing_config.TracingConfig"
|
|
845
|
+
] = None,
|
|
846
|
+
revision_id: Optional["aws_sdk_lambda.types.string.String"] = None,
|
|
847
|
+
layers: Optional["aws_sdk_lambda.types.layer_list.LayerList"] = None,
|
|
848
|
+
file_system_configs: Optional[
|
|
849
|
+
"aws_sdk_lambda.types.file_system_config_list.FileSystemConfigList"
|
|
850
|
+
] = None,
|
|
851
|
+
image_config: Optional["aws_sdk_lambda.types.image_config.ImageConfig"] = None,
|
|
852
|
+
ephemeral_storage: Optional[
|
|
853
|
+
"aws_sdk_lambda.types.ephemeral_storage.EphemeralStorage"
|
|
854
|
+
] = None,
|
|
855
|
+
snap_start: Optional["aws_sdk_lambda.types.snap_start.SnapStart"] = None,
|
|
856
|
+
logging_config: Optional[
|
|
857
|
+
"aws_sdk_lambda.types.logging_config.LoggingConfig"
|
|
858
|
+
] = None,
|
|
859
|
+
capacity_provider_config: Optional[
|
|
860
|
+
"aws_sdk_lambda.types.capacity_provider_config.CapacityProviderConfig"
|
|
861
|
+
] = None,
|
|
862
|
+
durable_config: Optional[
|
|
863
|
+
"aws_sdk_lambda.types.durable_config.DurableConfig"
|
|
864
|
+
] = None,
|
|
865
|
+
) -> "aws_sdk_lambda.types.function_configuration.FunctionConfiguration":
|
|
866
|
+
"""<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>
|
|
867
|
+
|
|
868
|
+
Args:
|
|
869
|
+
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>
|
|
870
|
+
role: <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
|
|
871
|
+
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>
|
|
872
|
+
description: <p>A description of the function.</p>
|
|
873
|
+
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>
|
|
874
|
+
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>
|
|
875
|
+
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>
|
|
876
|
+
environment: <p>Environment variables that are accessible from function code during execution.</p>
|
|
877
|
+
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>
|
|
878
|
+
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>
|
|
879
|
+
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>
|
|
880
|
+
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>
|
|
881
|
+
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>
|
|
882
|
+
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>
|
|
883
|
+
file_system_configs: <p>Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.</p>
|
|
884
|
+
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>
|
|
885
|
+
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>
|
|
886
|
+
snap_start: <p>The function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html\">SnapStart</a> setting.</p>
|
|
887
|
+
logging_config: <p>The function's Amazon CloudWatch Logs configuration settings.</p>
|
|
888
|
+
capacity_provider_config: <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
|
|
889
|
+
durable_config: <p>Configuration settings for durable functions. Allows updating execution timeout and retention period for functions with durability enabled.</p>
|
|
890
|
+
|
|
891
|
+
Examples:
|
|
892
|
+
To update a Lambda function's configuration
|
|
893
|
+
The following example modifies the memory size to be 256 MB for the unpublished ($LATEST) version of a function named my-function.
|
|
894
|
+
|
|
895
|
+
>>> client.update_function_configuration(function_name='my-function', memory_size=256, durable_config={'ExecutionTimeout': 3600, 'RetentionPeriodInDays': 45})
|
|
896
|
+
"""
|
|
897
|
+
|
|
898
|
+
def _handler(
|
|
899
|
+
req: "OperationRequest[aws_sdk_lambda.types.update_function_configuration_request.UpdateFunctionConfigurationRequest]",
|
|
900
|
+
) -> OperationResponse[
|
|
901
|
+
"aws_sdk_lambda.types.function_configuration.FunctionConfiguration"
|
|
902
|
+
]:
|
|
903
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.update_function_configuration
|
|
904
|
+
|
|
905
|
+
output, http_response = (
|
|
906
|
+
aws_sdk_lambda._operations.aws_gir_api_service.update_function_configuration.update_function_configuration(
|
|
907
|
+
req.options, req.input
|
|
908
|
+
)
|
|
909
|
+
)
|
|
910
|
+
return OperationResponse(output=output, response=http_response)
|
|
911
|
+
|
|
912
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
913
|
+
input: aws_sdk_lambda.types.update_function_configuration_request.UpdateFunctionConfigurationRequest = {} # type: ignore[typeddict-item]
|
|
914
|
+
input["function_name"] = function_name
|
|
915
|
+
if role is not None:
|
|
916
|
+
input["role"] = role
|
|
917
|
+
if handler is not None:
|
|
918
|
+
input["handler"] = handler
|
|
919
|
+
if description is not None:
|
|
920
|
+
input["description"] = description
|
|
921
|
+
if timeout is not None:
|
|
922
|
+
input["timeout"] = timeout
|
|
923
|
+
if memory_size is not None:
|
|
924
|
+
input["memory_size"] = memory_size
|
|
925
|
+
if vpc_config is not None:
|
|
926
|
+
input["vpc_config"] = vpc_config
|
|
927
|
+
if environment is not None:
|
|
928
|
+
input["environment"] = environment
|
|
929
|
+
if runtime is not None:
|
|
930
|
+
input["runtime"] = runtime
|
|
931
|
+
if dead_letter_config is not None:
|
|
932
|
+
input["dead_letter_config"] = dead_letter_config
|
|
933
|
+
if kms_key_arn is not None:
|
|
934
|
+
input["kms_key_arn"] = kms_key_arn
|
|
935
|
+
if tracing_config is not None:
|
|
936
|
+
input["tracing_config"] = tracing_config
|
|
937
|
+
if revision_id is not None:
|
|
938
|
+
input["revision_id"] = revision_id
|
|
939
|
+
if layers is not None:
|
|
940
|
+
input["layers"] = layers
|
|
941
|
+
if file_system_configs is not None:
|
|
942
|
+
input["file_system_configs"] = file_system_configs
|
|
943
|
+
if image_config is not None:
|
|
944
|
+
input["image_config"] = image_config
|
|
945
|
+
if ephemeral_storage is not None:
|
|
946
|
+
input["ephemeral_storage"] = ephemeral_storage
|
|
947
|
+
if snap_start is not None:
|
|
948
|
+
input["snap_start"] = snap_start
|
|
949
|
+
if logging_config is not None:
|
|
950
|
+
input["logging_config"] = logging_config
|
|
951
|
+
if capacity_provider_config is not None:
|
|
952
|
+
input["capacity_provider_config"] = capacity_provider_config
|
|
953
|
+
if durable_config is not None:
|
|
954
|
+
input["durable_config"] = durable_config
|
|
955
|
+
|
|
956
|
+
response = execute_pipeline(
|
|
957
|
+
OperationRequest(input=input, options=options_),
|
|
958
|
+
handler=_handler,
|
|
959
|
+
interceptors=list(interceptors_),
|
|
960
|
+
)
|
|
961
|
+
return response.output
|
|
962
|
+
|
|
963
|
+
def update_function_url_config(
|
|
964
|
+
self,
|
|
965
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
966
|
+
*,
|
|
967
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
968
|
+
qualifier: Optional[
|
|
969
|
+
"aws_sdk_lambda.types.function_url_qualifier.FunctionUrlQualifier"
|
|
970
|
+
] = None,
|
|
971
|
+
auth_type: Optional[
|
|
972
|
+
"aws_sdk_lambda.types.function_url_auth_type.FunctionUrlAuthType"
|
|
973
|
+
] = None,
|
|
974
|
+
cors: Optional["aws_sdk_lambda.types.cors.Cors"] = None,
|
|
975
|
+
invoke_mode: Optional["aws_sdk_lambda.types.invoke_mode.InvokeMode"] = None,
|
|
976
|
+
) -> "aws_sdk_lambda.types.update_function_url_config_response.UpdateFunctionUrlConfigResponse":
|
|
977
|
+
"""<p>Updates the configuration for a Lambda function URL.</p>
|
|
978
|
+
|
|
979
|
+
Args:
|
|
980
|
+
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>
|
|
981
|
+
qualifier: <p>The alias name.</p>
|
|
982
|
+
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>
|
|
983
|
+
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>
|
|
984
|
+
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>
|
|
985
|
+
"""
|
|
986
|
+
|
|
987
|
+
def _handler(
|
|
988
|
+
req: "OperationRequest[aws_sdk_lambda.types.update_function_url_config_request.UpdateFunctionUrlConfigRequest]",
|
|
989
|
+
) -> OperationResponse[
|
|
990
|
+
"aws_sdk_lambda.types.update_function_url_config_response.UpdateFunctionUrlConfigResponse"
|
|
991
|
+
]:
|
|
992
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.update_function_url_config
|
|
993
|
+
|
|
994
|
+
output, http_response = (
|
|
995
|
+
aws_sdk_lambda._operations.aws_gir_api_service.update_function_url_config.update_function_url_config(
|
|
996
|
+
req.options, req.input
|
|
997
|
+
)
|
|
998
|
+
)
|
|
999
|
+
return OperationResponse(output=output, response=http_response)
|
|
1000
|
+
|
|
1001
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
1002
|
+
input: aws_sdk_lambda.types.update_function_url_config_request.UpdateFunctionUrlConfigRequest = {} # type: ignore[typeddict-item]
|
|
1003
|
+
input["function_name"] = function_name
|
|
1004
|
+
if qualifier is not None:
|
|
1005
|
+
input["qualifier"] = qualifier
|
|
1006
|
+
if auth_type is not None:
|
|
1007
|
+
input["auth_type"] = auth_type
|
|
1008
|
+
if cors is not None:
|
|
1009
|
+
input["cors"] = cors
|
|
1010
|
+
if invoke_mode is not None:
|
|
1011
|
+
input["invoke_mode"] = invoke_mode
|
|
1012
|
+
|
|
1013
|
+
response = execute_pipeline(
|
|
1014
|
+
OperationRequest(input=input, options=options_),
|
|
1015
|
+
handler=_handler,
|
|
1016
|
+
interceptors=list(interceptors_),
|
|
1017
|
+
)
|
|
1018
|
+
return response.output
|
|
1019
|
+
|
|
1020
|
+
def delete_function_code_signing_config(
|
|
1021
|
+
self,
|
|
1022
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
1023
|
+
*,
|
|
1024
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
1025
|
+
) -> None:
|
|
1026
|
+
"""<p>Removes the code signing configuration from the function.</p>
|
|
1027
|
+
|
|
1028
|
+
Args:
|
|
1029
|
+
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>
|
|
1030
|
+
"""
|
|
1031
|
+
|
|
1032
|
+
def _handler(
|
|
1033
|
+
req: "OperationRequest[aws_sdk_lambda.types.delete_function_code_signing_config_request.DeleteFunctionCodeSigningConfigRequest]",
|
|
1034
|
+
) -> OperationResponse[None]:
|
|
1035
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.delete_function_code_signing_config
|
|
1036
|
+
|
|
1037
|
+
output, http_response = (
|
|
1038
|
+
aws_sdk_lambda._operations.aws_gir_api_service.delete_function_code_signing_config.delete_function_code_signing_config(
|
|
1039
|
+
req.options, req.input
|
|
1040
|
+
)
|
|
1041
|
+
)
|
|
1042
|
+
return OperationResponse(output=output, response=http_response)
|
|
1043
|
+
|
|
1044
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
1045
|
+
input: aws_sdk_lambda.types.delete_function_code_signing_config_request.DeleteFunctionCodeSigningConfigRequest = {} # type: ignore[typeddict-item]
|
|
1046
|
+
input["function_name"] = function_name
|
|
1047
|
+
|
|
1048
|
+
response = execute_pipeline(
|
|
1049
|
+
OperationRequest(input=input, options=options_),
|
|
1050
|
+
handler=_handler,
|
|
1051
|
+
interceptors=list(interceptors_),
|
|
1052
|
+
)
|
|
1053
|
+
return response.output
|
|
1054
|
+
|
|
1055
|
+
def get_function(
|
|
1056
|
+
self,
|
|
1057
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
1058
|
+
*,
|
|
1059
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
1060
|
+
qualifier: Optional[
|
|
1061
|
+
"aws_sdk_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
|
|
1062
|
+
] = None,
|
|
1063
|
+
) -> "aws_sdk_lambda.types.get_function_response.GetFunctionResponse":
|
|
1064
|
+
"""<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>
|
|
1065
|
+
|
|
1066
|
+
Args:
|
|
1067
|
+
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>
|
|
1068
|
+
qualifier: <p>Specify a version or alias to get details about a published version of the function.</p>
|
|
1069
|
+
|
|
1070
|
+
Examples:
|
|
1071
|
+
To get a Lambda function
|
|
1072
|
+
The following example returns code and configuration details for version 1 of a function named my-function.
|
|
1073
|
+
|
|
1074
|
+
>>> client.get_function(function_name='my-function', qualifier='1')
|
|
1075
|
+
"""
|
|
1076
|
+
|
|
1077
|
+
def _handler(
|
|
1078
|
+
req: "OperationRequest[aws_sdk_lambda.types.get_function_request.GetFunctionRequest]",
|
|
1079
|
+
) -> OperationResponse[
|
|
1080
|
+
"aws_sdk_lambda.types.get_function_response.GetFunctionResponse"
|
|
1081
|
+
]:
|
|
1082
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.get_function
|
|
1083
|
+
|
|
1084
|
+
output, http_response = (
|
|
1085
|
+
aws_sdk_lambda._operations.aws_gir_api_service.get_function.get_function(
|
|
1086
|
+
req.options, req.input
|
|
1087
|
+
)
|
|
1088
|
+
)
|
|
1089
|
+
return OperationResponse(output=output, response=http_response)
|
|
1090
|
+
|
|
1091
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
1092
|
+
input: aws_sdk_lambda.types.get_function_request.GetFunctionRequest = {} # type: ignore[typeddict-item]
|
|
1093
|
+
input["function_name"] = function_name
|
|
1094
|
+
if qualifier is not None:
|
|
1095
|
+
input["qualifier"] = qualifier
|
|
1096
|
+
|
|
1097
|
+
response = execute_pipeline(
|
|
1098
|
+
OperationRequest(input=input, options=options_),
|
|
1099
|
+
handler=_handler,
|
|
1100
|
+
interceptors=list(interceptors_),
|
|
1101
|
+
)
|
|
1102
|
+
return response.output
|
|
1103
|
+
|
|
1104
|
+
def get_function_code_signing_config(
|
|
1105
|
+
self,
|
|
1106
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
1107
|
+
*,
|
|
1108
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
1109
|
+
) -> "aws_sdk_lambda.types.get_function_code_signing_config_response.GetFunctionCodeSigningConfigResponse":
|
|
1110
|
+
"""<p>Returns the code signing configuration for the specified function.</p>
|
|
1111
|
+
|
|
1112
|
+
Args:
|
|
1113
|
+
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>
|
|
1114
|
+
"""
|
|
1115
|
+
|
|
1116
|
+
def _handler(
|
|
1117
|
+
req: "OperationRequest[aws_sdk_lambda.types.get_function_code_signing_config_request.GetFunctionCodeSigningConfigRequest]",
|
|
1118
|
+
) -> OperationResponse[
|
|
1119
|
+
"aws_sdk_lambda.types.get_function_code_signing_config_response.GetFunctionCodeSigningConfigResponse"
|
|
1120
|
+
]:
|
|
1121
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.get_function_code_signing_config
|
|
1122
|
+
|
|
1123
|
+
output, http_response = (
|
|
1124
|
+
aws_sdk_lambda._operations.aws_gir_api_service.get_function_code_signing_config.get_function_code_signing_config(
|
|
1125
|
+
req.options, req.input
|
|
1126
|
+
)
|
|
1127
|
+
)
|
|
1128
|
+
return OperationResponse(output=output, response=http_response)
|
|
1129
|
+
|
|
1130
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
1131
|
+
input: aws_sdk_lambda.types.get_function_code_signing_config_request.GetFunctionCodeSigningConfigRequest = {} # type: ignore[typeddict-item]
|
|
1132
|
+
input["function_name"] = function_name
|
|
1133
|
+
|
|
1134
|
+
response = execute_pipeline(
|
|
1135
|
+
OperationRequest(input=input, options=options_),
|
|
1136
|
+
handler=_handler,
|
|
1137
|
+
interceptors=list(interceptors_),
|
|
1138
|
+
)
|
|
1139
|
+
return response.output
|
|
1140
|
+
|
|
1141
|
+
def get_function_configuration(
|
|
1142
|
+
self,
|
|
1143
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
1144
|
+
*,
|
|
1145
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
1146
|
+
qualifier: Optional[
|
|
1147
|
+
"aws_sdk_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
|
|
1148
|
+
] = None,
|
|
1149
|
+
) -> "aws_sdk_lambda.types.function_configuration.FunctionConfiguration":
|
|
1150
|
+
"""<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>
|
|
1151
|
+
|
|
1152
|
+
Args:
|
|
1153
|
+
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>
|
|
1154
|
+
qualifier: <p>Specify a version or alias to get details about a published version of the function.</p>
|
|
1155
|
+
|
|
1156
|
+
Examples:
|
|
1157
|
+
To get a Lambda function's event source mapping
|
|
1158
|
+
The following example returns and configuration details for version 1 of a function named my-function.
|
|
1159
|
+
|
|
1160
|
+
>>> client.get_function_configuration(function_name='my-function', qualifier='1')
|
|
1161
|
+
"""
|
|
1162
|
+
|
|
1163
|
+
def _handler(
|
|
1164
|
+
req: "OperationRequest[aws_sdk_lambda.types.get_function_configuration_request.GetFunctionConfigurationRequest]",
|
|
1165
|
+
) -> OperationResponse[
|
|
1166
|
+
"aws_sdk_lambda.types.function_configuration.FunctionConfiguration"
|
|
1167
|
+
]:
|
|
1168
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.get_function_configuration
|
|
1169
|
+
|
|
1170
|
+
output, http_response = (
|
|
1171
|
+
aws_sdk_lambda._operations.aws_gir_api_service.get_function_configuration.get_function_configuration(
|
|
1172
|
+
req.options, req.input
|
|
1173
|
+
)
|
|
1174
|
+
)
|
|
1175
|
+
return OperationResponse(output=output, response=http_response)
|
|
1176
|
+
|
|
1177
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
1178
|
+
input: aws_sdk_lambda.types.get_function_configuration_request.GetFunctionConfigurationRequest = {} # type: ignore[typeddict-item]
|
|
1179
|
+
input["function_name"] = function_name
|
|
1180
|
+
if qualifier is not None:
|
|
1181
|
+
input["qualifier"] = qualifier
|
|
1182
|
+
|
|
1183
|
+
response = execute_pipeline(
|
|
1184
|
+
OperationRequest(input=input, options=options_),
|
|
1185
|
+
handler=_handler,
|
|
1186
|
+
interceptors=list(interceptors_),
|
|
1187
|
+
)
|
|
1188
|
+
return response.output
|
|
1189
|
+
|
|
1190
|
+
def get_function_recursion_config(
|
|
1191
|
+
self,
|
|
1192
|
+
function_name: "aws_sdk_lambda.types.unqualified_function_name.UnqualifiedFunctionName",
|
|
1193
|
+
*,
|
|
1194
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
1195
|
+
) -> "aws_sdk_lambda.types.get_function_recursion_config_response.GetFunctionRecursionConfigResponse":
|
|
1196
|
+
"""<p>Returns your function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-recursion.html\">recursive loop detection</a> configuration. </p>
|
|
1197
|
+
|
|
1198
|
+
Args:
|
|
1199
|
+
function_name: <p>The name of the function.</p>
|
|
1200
|
+
"""
|
|
1201
|
+
|
|
1202
|
+
def _handler(
|
|
1203
|
+
req: "OperationRequest[aws_sdk_lambda.types.get_function_recursion_config_request.GetFunctionRecursionConfigRequest]",
|
|
1204
|
+
) -> OperationResponse[
|
|
1205
|
+
"aws_sdk_lambda.types.get_function_recursion_config_response.GetFunctionRecursionConfigResponse"
|
|
1206
|
+
]:
|
|
1207
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.get_function_recursion_config
|
|
1208
|
+
|
|
1209
|
+
output, http_response = (
|
|
1210
|
+
aws_sdk_lambda._operations.aws_gir_api_service.get_function_recursion_config.get_function_recursion_config(
|
|
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: aws_sdk_lambda.types.get_function_recursion_config_request.GetFunctionRecursionConfigRequest = {} # type: ignore[typeddict-item]
|
|
1218
|
+
input["function_name"] = function_name
|
|
1219
|
+
|
|
1220
|
+
response = execute_pipeline(
|
|
1221
|
+
OperationRequest(input=input, options=options_),
|
|
1222
|
+
handler=_handler,
|
|
1223
|
+
interceptors=list(interceptors_),
|
|
1224
|
+
)
|
|
1225
|
+
return response.output
|
|
1226
|
+
|
|
1227
|
+
def get_function_scaling_config(
|
|
1228
|
+
self,
|
|
1229
|
+
function_name: "aws_sdk_lambda.types.unqualified_function_name.UnqualifiedFunctionName",
|
|
1230
|
+
qualifier: "aws_sdk_lambda.types.published_function_qualifier.PublishedFunctionQualifier",
|
|
1231
|
+
*,
|
|
1232
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
1233
|
+
) -> "aws_sdk_lambda.types.get_function_scaling_config_response.GetFunctionScalingConfigResponse":
|
|
1234
|
+
"""<p>Retrieves the scaling configuration for a Lambda Managed Instances function.</p>
|
|
1235
|
+
|
|
1236
|
+
Args:
|
|
1237
|
+
function_name: <p>The name or ARN of the Lambda function.</p>
|
|
1238
|
+
qualifier: <p>Specify a version or alias to get the scaling configuration for a published version of the function.</p>
|
|
1239
|
+
"""
|
|
1240
|
+
|
|
1241
|
+
def _handler(
|
|
1242
|
+
req: "OperationRequest[aws_sdk_lambda.types.get_function_scaling_config_request.GetFunctionScalingConfigRequest]",
|
|
1243
|
+
) -> OperationResponse[
|
|
1244
|
+
"aws_sdk_lambda.types.get_function_scaling_config_response.GetFunctionScalingConfigResponse"
|
|
1245
|
+
]:
|
|
1246
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.get_function_scaling_config
|
|
1247
|
+
|
|
1248
|
+
output, http_response = (
|
|
1249
|
+
aws_sdk_lambda._operations.aws_gir_api_service.get_function_scaling_config.get_function_scaling_config(
|
|
1250
|
+
req.options, req.input
|
|
1251
|
+
)
|
|
1252
|
+
)
|
|
1253
|
+
return OperationResponse(output=output, response=http_response)
|
|
1254
|
+
|
|
1255
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
1256
|
+
input: aws_sdk_lambda.types.get_function_scaling_config_request.GetFunctionScalingConfigRequest = {} # type: ignore[typeddict-item]
|
|
1257
|
+
input["function_name"] = function_name
|
|
1258
|
+
input["qualifier"] = qualifier
|
|
1259
|
+
|
|
1260
|
+
response = execute_pipeline(
|
|
1261
|
+
OperationRequest(input=input, options=options_),
|
|
1262
|
+
handler=_handler,
|
|
1263
|
+
interceptors=list(interceptors_),
|
|
1264
|
+
)
|
|
1265
|
+
return response.output
|
|
1266
|
+
|
|
1267
|
+
def get_policy(
|
|
1268
|
+
self,
|
|
1269
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
1270
|
+
*,
|
|
1271
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
1272
|
+
qualifier: Optional[
|
|
1273
|
+
"aws_sdk_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
|
|
1274
|
+
] = None,
|
|
1275
|
+
) -> "aws_sdk_lambda.types.get_policy_response.GetPolicyResponse":
|
|
1276
|
+
"""<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>
|
|
1277
|
+
|
|
1278
|
+
Args:
|
|
1279
|
+
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>
|
|
1280
|
+
qualifier: <p>Specify a version or alias to get the policy for that resource.</p>
|
|
1281
|
+
|
|
1282
|
+
Examples:
|
|
1283
|
+
To retrieve a Lambda function policy
|
|
1284
|
+
The following example returns the resource-based policy for version 1 of a Lambda function named my-function.
|
|
1285
|
+
|
|
1286
|
+
>>> client.get_policy(function_name='my-function', qualifier='1')
|
|
1287
|
+
"""
|
|
1288
|
+
|
|
1289
|
+
def _handler(
|
|
1290
|
+
req: "OperationRequest[aws_sdk_lambda.types.get_policy_request.GetPolicyRequest]",
|
|
1291
|
+
) -> OperationResponse[
|
|
1292
|
+
"aws_sdk_lambda.types.get_policy_response.GetPolicyResponse"
|
|
1293
|
+
]:
|
|
1294
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.get_policy
|
|
1295
|
+
|
|
1296
|
+
output, http_response = (
|
|
1297
|
+
aws_sdk_lambda._operations.aws_gir_api_service.get_policy.get_policy(
|
|
1298
|
+
req.options, req.input
|
|
1299
|
+
)
|
|
1300
|
+
)
|
|
1301
|
+
return OperationResponse(output=output, response=http_response)
|
|
1302
|
+
|
|
1303
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
1304
|
+
input: aws_sdk_lambda.types.get_policy_request.GetPolicyRequest = {} # type: ignore[typeddict-item]
|
|
1305
|
+
input["function_name"] = function_name
|
|
1306
|
+
if qualifier is not None:
|
|
1307
|
+
input["qualifier"] = qualifier
|
|
1308
|
+
|
|
1309
|
+
response = execute_pipeline(
|
|
1310
|
+
OperationRequest(input=input, options=options_),
|
|
1311
|
+
handler=_handler,
|
|
1312
|
+
interceptors=list(interceptors_),
|
|
1313
|
+
)
|
|
1314
|
+
return response.output
|
|
1315
|
+
|
|
1316
|
+
def get_runtime_management_config(
|
|
1317
|
+
self,
|
|
1318
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
1319
|
+
*,
|
|
1320
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
1321
|
+
qualifier: Optional[
|
|
1322
|
+
"aws_sdk_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
|
|
1323
|
+
] = None,
|
|
1324
|
+
) -> "aws_sdk_lambda.types.get_runtime_management_config_response.GetRuntimeManagementConfigResponse":
|
|
1325
|
+
"""<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>
|
|
1326
|
+
|
|
1327
|
+
Args:
|
|
1328
|
+
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>
|
|
1329
|
+
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>
|
|
1330
|
+
"""
|
|
1331
|
+
|
|
1332
|
+
def _handler(
|
|
1333
|
+
req: "OperationRequest[aws_sdk_lambda.types.get_runtime_management_config_request.GetRuntimeManagementConfigRequest]",
|
|
1334
|
+
) -> OperationResponse[
|
|
1335
|
+
"aws_sdk_lambda.types.get_runtime_management_config_response.GetRuntimeManagementConfigResponse"
|
|
1336
|
+
]:
|
|
1337
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.get_runtime_management_config
|
|
1338
|
+
|
|
1339
|
+
output, http_response = (
|
|
1340
|
+
aws_sdk_lambda._operations.aws_gir_api_service.get_runtime_management_config.get_runtime_management_config(
|
|
1341
|
+
req.options, req.input
|
|
1342
|
+
)
|
|
1343
|
+
)
|
|
1344
|
+
return OperationResponse(output=output, response=http_response)
|
|
1345
|
+
|
|
1346
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
1347
|
+
input: aws_sdk_lambda.types.get_runtime_management_config_request.GetRuntimeManagementConfigRequest = {} # type: ignore[typeddict-item]
|
|
1348
|
+
input["function_name"] = function_name
|
|
1349
|
+
if qualifier is not None:
|
|
1350
|
+
input["qualifier"] = qualifier
|
|
1351
|
+
|
|
1352
|
+
response = execute_pipeline(
|
|
1353
|
+
OperationRequest(input=input, options=options_),
|
|
1354
|
+
handler=_handler,
|
|
1355
|
+
interceptors=list(interceptors_),
|
|
1356
|
+
)
|
|
1357
|
+
return response.output
|
|
1358
|
+
|
|
1359
|
+
def invoke(
|
|
1360
|
+
self,
|
|
1361
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
1362
|
+
*,
|
|
1363
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
1364
|
+
invocation_type: Optional[
|
|
1365
|
+
"aws_sdk_lambda.types.invocation_type.InvocationType"
|
|
1366
|
+
] = None,
|
|
1367
|
+
log_type: Optional["aws_sdk_lambda.types.log_type.LogType"] = None,
|
|
1368
|
+
client_context: Optional["aws_sdk_lambda.types.string.String"] = None,
|
|
1369
|
+
durable_execution_name: Optional[
|
|
1370
|
+
"aws_sdk_lambda.types.durable_execution_name.DurableExecutionName"
|
|
1371
|
+
] = None,
|
|
1372
|
+
payload: Optional["aws_sdk_lambda.types.blob.Blob"] = None,
|
|
1373
|
+
qualifier: Optional[
|
|
1374
|
+
"aws_sdk_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
|
|
1375
|
+
] = None,
|
|
1376
|
+
tenant_id: Optional["aws_sdk_lambda.types.tenant_id.TenantId"] = None,
|
|
1377
|
+
) -> "aws_sdk_lambda.types.invocation_response.InvocationResponse":
|
|
1378
|
+
"""<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>
|
|
1379
|
+
|
|
1380
|
+
Args:
|
|
1381
|
+
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>
|
|
1382
|
+
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>
|
|
1383
|
+
log_type: <p>Set to <code>Tail</code> to include the execution log in the response. Applies to synchronously invoked functions only.</p>
|
|
1384
|
+
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>
|
|
1385
|
+
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>
|
|
1386
|
+
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>
|
|
1387
|
+
qualifier: <p>Specify a version or alias to invoke a published version of the function.</p>
|
|
1388
|
+
tenant_id: <p>The identifier of the tenant in a multi-tenant Lambda function.</p>
|
|
1389
|
+
|
|
1390
|
+
Examples:
|
|
1391
|
+
To invoke a Lambda function
|
|
1392
|
+
The following example invokes version 1 of a function named my-function with an empty event payload.
|
|
1393
|
+
|
|
1394
|
+
>>> client.invoke(function_name='my-function', invocation_type='Event', durable_execution_name='myExecution', payload='{}', qualifier='1')
|
|
1395
|
+
To invoke a Lambda function asynchronously
|
|
1396
|
+
The following example invokes version 1 of a function named my-function asynchronously.
|
|
1397
|
+
|
|
1398
|
+
>>> client.invoke(function_name='my-function', payload='{}', invocation_type='Event', qualifier='1')
|
|
1399
|
+
"""
|
|
1400
|
+
|
|
1401
|
+
def _handler(
|
|
1402
|
+
req: "OperationRequest[aws_sdk_lambda.types.invocation_request.InvocationRequest]",
|
|
1403
|
+
) -> OperationResponse[
|
|
1404
|
+
"aws_sdk_lambda.types.invocation_response.InvocationResponse"
|
|
1405
|
+
]:
|
|
1406
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.invoke
|
|
1407
|
+
|
|
1408
|
+
output, http_response = (
|
|
1409
|
+
aws_sdk_lambda._operations.aws_gir_api_service.invoke.invoke(
|
|
1410
|
+
req.options, req.input
|
|
1411
|
+
)
|
|
1412
|
+
)
|
|
1413
|
+
return OperationResponse(output=output, response=http_response)
|
|
1414
|
+
|
|
1415
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
1416
|
+
input: aws_sdk_lambda.types.invocation_request.InvocationRequest = {} # type: ignore[typeddict-item]
|
|
1417
|
+
input["function_name"] = function_name
|
|
1418
|
+
if invocation_type is not None:
|
|
1419
|
+
input["invocation_type"] = invocation_type
|
|
1420
|
+
if log_type is not None:
|
|
1421
|
+
input["log_type"] = log_type
|
|
1422
|
+
if client_context is not None:
|
|
1423
|
+
input["client_context"] = client_context
|
|
1424
|
+
if durable_execution_name is not None:
|
|
1425
|
+
input["durable_execution_name"] = durable_execution_name
|
|
1426
|
+
if payload is not None:
|
|
1427
|
+
input["payload"] = payload
|
|
1428
|
+
if qualifier is not None:
|
|
1429
|
+
input["qualifier"] = qualifier
|
|
1430
|
+
if tenant_id is not None:
|
|
1431
|
+
input["tenant_id"] = tenant_id
|
|
1432
|
+
|
|
1433
|
+
response = execute_pipeline(
|
|
1434
|
+
OperationRequest(input=input, options=options_),
|
|
1435
|
+
handler=_handler,
|
|
1436
|
+
interceptors=list(interceptors_),
|
|
1437
|
+
)
|
|
1438
|
+
return response.output
|
|
1439
|
+
|
|
1440
|
+
def invoke_async(
|
|
1441
|
+
self,
|
|
1442
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
1443
|
+
invoke_args: Iterator[bytes] | bytes,
|
|
1444
|
+
*,
|
|
1445
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
1446
|
+
) -> "aws_sdk_lambda.types.invoke_async_response.InvokeAsyncResponse":
|
|
1447
|
+
"""<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>
|
|
1448
|
+
|
|
1449
|
+
Args:
|
|
1450
|
+
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>
|
|
1451
|
+
invoke_args: <p>The JSON that you want to provide to your Lambda function as input.</p>
|
|
1452
|
+
|
|
1453
|
+
Examples:
|
|
1454
|
+
To invoke a Lambda function asynchronously
|
|
1455
|
+
The following example invokes a Lambda function asynchronously
|
|
1456
|
+
|
|
1457
|
+
>>> client.invoke_async(function_name='my-function', invoke_args='{}')
|
|
1458
|
+
"""
|
|
1459
|
+
|
|
1460
|
+
def _handler(
|
|
1461
|
+
req: "OperationRequest[aws_sdk_lambda.types.invoke_async_request.InvokeAsyncRequest]",
|
|
1462
|
+
) -> OperationResponse[
|
|
1463
|
+
"aws_sdk_lambda.types.invoke_async_response.InvokeAsyncResponse"
|
|
1464
|
+
]:
|
|
1465
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.invoke_async
|
|
1466
|
+
|
|
1467
|
+
output, http_response = (
|
|
1468
|
+
aws_sdk_lambda._operations.aws_gir_api_service.invoke_async.invoke_async(
|
|
1469
|
+
req.options, req.input
|
|
1470
|
+
)
|
|
1471
|
+
)
|
|
1472
|
+
return OperationResponse(output=output, response=http_response)
|
|
1473
|
+
|
|
1474
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
1475
|
+
input: aws_sdk_lambda.types.invoke_async_request.InvokeAsyncRequest = {} # type: ignore[typeddict-item]
|
|
1476
|
+
input["function_name"] = function_name
|
|
1477
|
+
input["invoke_args"] = ensure_sync_iterator(invoke_args) # type: ignore
|
|
1478
|
+
|
|
1479
|
+
response = execute_pipeline(
|
|
1480
|
+
OperationRequest(input=input, options=options_),
|
|
1481
|
+
handler=_handler,
|
|
1482
|
+
interceptors=list(interceptors_),
|
|
1483
|
+
)
|
|
1484
|
+
return response.output
|
|
1485
|
+
|
|
1486
|
+
def invoke_with_response_stream(
|
|
1487
|
+
self,
|
|
1488
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
1489
|
+
*,
|
|
1490
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
1491
|
+
invocation_type: Optional[
|
|
1492
|
+
"aws_sdk_lambda.types.response_streaming_invocation_type.ResponseStreamingInvocationType"
|
|
1493
|
+
] = None,
|
|
1494
|
+
log_type: Optional["aws_sdk_lambda.types.log_type.LogType"] = None,
|
|
1495
|
+
client_context: Optional["aws_sdk_lambda.types.string.String"] = None,
|
|
1496
|
+
qualifier: Optional[
|
|
1497
|
+
"aws_sdk_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
|
|
1498
|
+
] = None,
|
|
1499
|
+
payload: Optional["aws_sdk_lambda.types.blob.Blob"] = None,
|
|
1500
|
+
tenant_id: Optional["aws_sdk_lambda.types.tenant_id.TenantId"] = None,
|
|
1501
|
+
) -> "aws_sdk_lambda.types.invoke_with_response_stream_response.InvokeWithResponseStreamResponse":
|
|
1502
|
+
"""<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>
|
|
1503
|
+
|
|
1504
|
+
Args:
|
|
1505
|
+
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>
|
|
1506
|
+
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>
|
|
1507
|
+
log_type: <p>Set to <code>Tail</code> to include the execution log in the response. Applies to synchronously invoked functions only.</p>
|
|
1508
|
+
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>
|
|
1509
|
+
qualifier: <p>The alias name.</p>
|
|
1510
|
+
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>
|
|
1511
|
+
tenant_id: <p>The identifier of the tenant in a multi-tenant Lambda function.</p>
|
|
1512
|
+
"""
|
|
1513
|
+
|
|
1514
|
+
def _handler(
|
|
1515
|
+
req: "OperationRequest[aws_sdk_lambda.types.invoke_with_response_stream_request.InvokeWithResponseStreamRequest]",
|
|
1516
|
+
) -> OperationResponse[
|
|
1517
|
+
"aws_sdk_lambda.types.invoke_with_response_stream_response.InvokeWithResponseStreamResponse"
|
|
1518
|
+
]:
|
|
1519
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.invoke_with_response_stream
|
|
1520
|
+
|
|
1521
|
+
output, http_response = (
|
|
1522
|
+
aws_sdk_lambda._operations.aws_gir_api_service.invoke_with_response_stream.invoke_with_response_stream(
|
|
1523
|
+
req.options, req.input
|
|
1524
|
+
)
|
|
1525
|
+
)
|
|
1526
|
+
return OperationResponse(output=output, response=http_response)
|
|
1527
|
+
|
|
1528
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
1529
|
+
input: aws_sdk_lambda.types.invoke_with_response_stream_request.InvokeWithResponseStreamRequest = {} # type: ignore[typeddict-item]
|
|
1530
|
+
input["function_name"] = function_name
|
|
1531
|
+
if invocation_type is not None:
|
|
1532
|
+
input["invocation_type"] = invocation_type
|
|
1533
|
+
if log_type is not None:
|
|
1534
|
+
input["log_type"] = log_type
|
|
1535
|
+
if client_context is not None:
|
|
1536
|
+
input["client_context"] = client_context
|
|
1537
|
+
if qualifier is not None:
|
|
1538
|
+
input["qualifier"] = qualifier
|
|
1539
|
+
if payload is not None:
|
|
1540
|
+
input["payload"] = payload
|
|
1541
|
+
if tenant_id is not None:
|
|
1542
|
+
input["tenant_id"] = tenant_id
|
|
1543
|
+
|
|
1544
|
+
response = execute_pipeline(
|
|
1545
|
+
OperationRequest(input=input, options=options_),
|
|
1546
|
+
handler=_handler,
|
|
1547
|
+
interceptors=list(interceptors_),
|
|
1548
|
+
)
|
|
1549
|
+
return response.output
|
|
1550
|
+
|
|
1551
|
+
def put_function_code_signing_config(
|
|
1552
|
+
self,
|
|
1553
|
+
code_signing_config_arn: "aws_sdk_lambda.types.code_signing_config_arn.CodeSigningConfigArn",
|
|
1554
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
1555
|
+
*,
|
|
1556
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
1557
|
+
) -> "aws_sdk_lambda.types.put_function_code_signing_config_response.PutFunctionCodeSigningConfigResponse":
|
|
1558
|
+
"""<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>
|
|
1559
|
+
|
|
1560
|
+
Args:
|
|
1561
|
+
code_signing_config_arn: <p>The The Amazon Resource Name (ARN) of the code signing configuration.</p>
|
|
1562
|
+
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>
|
|
1563
|
+
"""
|
|
1564
|
+
|
|
1565
|
+
def _handler(
|
|
1566
|
+
req: "OperationRequest[aws_sdk_lambda.types.put_function_code_signing_config_request.PutFunctionCodeSigningConfigRequest]",
|
|
1567
|
+
) -> OperationResponse[
|
|
1568
|
+
"aws_sdk_lambda.types.put_function_code_signing_config_response.PutFunctionCodeSigningConfigResponse"
|
|
1569
|
+
]:
|
|
1570
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.put_function_code_signing_config
|
|
1571
|
+
|
|
1572
|
+
output, http_response = (
|
|
1573
|
+
aws_sdk_lambda._operations.aws_gir_api_service.put_function_code_signing_config.put_function_code_signing_config(
|
|
1574
|
+
req.options, req.input
|
|
1575
|
+
)
|
|
1576
|
+
)
|
|
1577
|
+
return OperationResponse(output=output, response=http_response)
|
|
1578
|
+
|
|
1579
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
1580
|
+
input: aws_sdk_lambda.types.put_function_code_signing_config_request.PutFunctionCodeSigningConfigRequest = {} # type: ignore[typeddict-item]
|
|
1581
|
+
input["code_signing_config_arn"] = code_signing_config_arn
|
|
1582
|
+
input["function_name"] = function_name
|
|
1583
|
+
|
|
1584
|
+
response = execute_pipeline(
|
|
1585
|
+
OperationRequest(input=input, options=options_),
|
|
1586
|
+
handler=_handler,
|
|
1587
|
+
interceptors=list(interceptors_),
|
|
1588
|
+
)
|
|
1589
|
+
return response.output
|
|
1590
|
+
|
|
1591
|
+
def put_function_recursion_config(
|
|
1592
|
+
self,
|
|
1593
|
+
function_name: "aws_sdk_lambda.types.unqualified_function_name.UnqualifiedFunctionName",
|
|
1594
|
+
recursive_loop: "aws_sdk_lambda.types.recursive_loop.RecursiveLoop",
|
|
1595
|
+
*,
|
|
1596
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
1597
|
+
) -> "aws_sdk_lambda.types.put_function_recursion_config_response.PutFunctionRecursionConfigResponse":
|
|
1598
|
+
"""<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>
|
|
1599
|
+
|
|
1600
|
+
Args:
|
|
1601
|
+
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>
|
|
1602
|
+
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>
|
|
1603
|
+
"""
|
|
1604
|
+
|
|
1605
|
+
def _handler(
|
|
1606
|
+
req: "OperationRequest[aws_sdk_lambda.types.put_function_recursion_config_request.PutFunctionRecursionConfigRequest]",
|
|
1607
|
+
) -> OperationResponse[
|
|
1608
|
+
"aws_sdk_lambda.types.put_function_recursion_config_response.PutFunctionRecursionConfigResponse"
|
|
1609
|
+
]:
|
|
1610
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.put_function_recursion_config
|
|
1611
|
+
|
|
1612
|
+
output, http_response = (
|
|
1613
|
+
aws_sdk_lambda._operations.aws_gir_api_service.put_function_recursion_config.put_function_recursion_config(
|
|
1614
|
+
req.options, req.input
|
|
1615
|
+
)
|
|
1616
|
+
)
|
|
1617
|
+
return OperationResponse(output=output, response=http_response)
|
|
1618
|
+
|
|
1619
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
1620
|
+
input: aws_sdk_lambda.types.put_function_recursion_config_request.PutFunctionRecursionConfigRequest = {} # type: ignore[typeddict-item]
|
|
1621
|
+
input["function_name"] = function_name
|
|
1622
|
+
input["recursive_loop"] = recursive_loop
|
|
1623
|
+
|
|
1624
|
+
response = execute_pipeline(
|
|
1625
|
+
OperationRequest(input=input, options=options_),
|
|
1626
|
+
handler=_handler,
|
|
1627
|
+
interceptors=list(interceptors_),
|
|
1628
|
+
)
|
|
1629
|
+
return response.output
|
|
1630
|
+
|
|
1631
|
+
def put_function_scaling_config(
|
|
1632
|
+
self,
|
|
1633
|
+
function_name: "aws_sdk_lambda.types.unqualified_function_name.UnqualifiedFunctionName",
|
|
1634
|
+
qualifier: "aws_sdk_lambda.types.published_function_qualifier.PublishedFunctionQualifier",
|
|
1635
|
+
*,
|
|
1636
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
1637
|
+
function_scaling_config: Optional[
|
|
1638
|
+
"aws_sdk_lambda.types.function_scaling_config.FunctionScalingConfig"
|
|
1639
|
+
] = None,
|
|
1640
|
+
) -> "aws_sdk_lambda.types.put_function_scaling_config_response.PutFunctionScalingConfigResponse":
|
|
1641
|
+
"""<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>
|
|
1642
|
+
|
|
1643
|
+
Args:
|
|
1644
|
+
function_name: <p>The name or ARN of the Lambda function.</p>
|
|
1645
|
+
qualifier: <p>Specify a version or alias to set the scaling configuration for a published version of the function.</p>
|
|
1646
|
+
function_scaling_config: <p>The scaling configuration to apply to the function, including minimum and maximum execution environment limits.</p>
|
|
1647
|
+
"""
|
|
1648
|
+
|
|
1649
|
+
def _handler(
|
|
1650
|
+
req: "OperationRequest[aws_sdk_lambda.types.put_function_scaling_config_request.PutFunctionScalingConfigRequest]",
|
|
1651
|
+
) -> OperationResponse[
|
|
1652
|
+
"aws_sdk_lambda.types.put_function_scaling_config_response.PutFunctionScalingConfigResponse"
|
|
1653
|
+
]:
|
|
1654
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.put_function_scaling_config
|
|
1655
|
+
|
|
1656
|
+
output, http_response = (
|
|
1657
|
+
aws_sdk_lambda._operations.aws_gir_api_service.put_function_scaling_config.put_function_scaling_config(
|
|
1658
|
+
req.options, req.input
|
|
1659
|
+
)
|
|
1660
|
+
)
|
|
1661
|
+
return OperationResponse(output=output, response=http_response)
|
|
1662
|
+
|
|
1663
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
1664
|
+
input: aws_sdk_lambda.types.put_function_scaling_config_request.PutFunctionScalingConfigRequest = {} # type: ignore[typeddict-item]
|
|
1665
|
+
input["function_name"] = function_name
|
|
1666
|
+
input["qualifier"] = qualifier
|
|
1667
|
+
if function_scaling_config is not None:
|
|
1668
|
+
input["function_scaling_config"] = function_scaling_config
|
|
1669
|
+
|
|
1670
|
+
response = execute_pipeline(
|
|
1671
|
+
OperationRequest(input=input, options=options_),
|
|
1672
|
+
handler=_handler,
|
|
1673
|
+
interceptors=list(interceptors_),
|
|
1674
|
+
)
|
|
1675
|
+
return response.output
|
|
1676
|
+
|
|
1677
|
+
def put_runtime_management_config(
|
|
1678
|
+
self,
|
|
1679
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
1680
|
+
update_runtime_on: "aws_sdk_lambda.types.update_runtime_on.UpdateRuntimeOn",
|
|
1681
|
+
*,
|
|
1682
|
+
config_overrides: Optional[LambdaClientConfig] = None,
|
|
1683
|
+
qualifier: Optional[
|
|
1684
|
+
"aws_sdk_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
|
|
1685
|
+
] = None,
|
|
1686
|
+
runtime_version_arn: Optional[
|
|
1687
|
+
"aws_sdk_lambda.types.runtime_version_arn.RuntimeVersionArn"
|
|
1688
|
+
] = None,
|
|
1689
|
+
) -> "aws_sdk_lambda.types.put_runtime_management_config_response.PutRuntimeManagementConfigResponse":
|
|
1690
|
+
"""<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>
|
|
1691
|
+
|
|
1692
|
+
Args:
|
|
1693
|
+
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>
|
|
1694
|
+
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>
|
|
1695
|
+
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>
|
|
1696
|
+
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>
|
|
1697
|
+
"""
|
|
1698
|
+
|
|
1699
|
+
def _handler(
|
|
1700
|
+
req: "OperationRequest[aws_sdk_lambda.types.put_runtime_management_config_request.PutRuntimeManagementConfigRequest]",
|
|
1701
|
+
) -> OperationResponse[
|
|
1702
|
+
"aws_sdk_lambda.types.put_runtime_management_config_response.PutRuntimeManagementConfigResponse"
|
|
1703
|
+
]:
|
|
1704
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.put_runtime_management_config
|
|
1705
|
+
|
|
1706
|
+
output, http_response = (
|
|
1707
|
+
aws_sdk_lambda._operations.aws_gir_api_service.put_runtime_management_config.put_runtime_management_config(
|
|
1708
|
+
req.options, req.input
|
|
1709
|
+
)
|
|
1710
|
+
)
|
|
1711
|
+
return OperationResponse(output=output, response=http_response)
|
|
1712
|
+
|
|
1713
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
1714
|
+
input: aws_sdk_lambda.types.put_runtime_management_config_request.PutRuntimeManagementConfigRequest = {} # type: ignore[typeddict-item]
|
|
1715
|
+
input["function_name"] = function_name
|
|
1716
|
+
if qualifier is not None:
|
|
1717
|
+
input["qualifier"] = qualifier
|
|
1718
|
+
input["update_runtime_on"] = update_runtime_on
|
|
1719
|
+
if runtime_version_arn is not None:
|
|
1720
|
+
input["runtime_version_arn"] = runtime_version_arn
|
|
1721
|
+
|
|
1722
|
+
response = execute_pipeline(
|
|
1723
|
+
OperationRequest(input=input, options=options_),
|
|
1724
|
+
handler=_handler,
|
|
1725
|
+
interceptors=list(interceptors_),
|
|
1726
|
+
)
|
|
1727
|
+
return response.output
|
|
1728
|
+
|
|
1729
|
+
|
|
1730
|
+
class AsyncFunction:
|
|
1731
|
+
def __init__(self, service: AsyncLambdaClient) -> None:
|
|
1732
|
+
self._service = service
|
|
1733
|
+
|
|
1734
|
+
async def put(
|
|
1735
|
+
self,
|
|
1736
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
1737
|
+
role: "aws_sdk_lambda.types.role_arn.RoleArn",
|
|
1738
|
+
code: "aws_sdk_lambda.types.function_code.FunctionCode",
|
|
1739
|
+
*,
|
|
1740
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
1741
|
+
runtime: Optional["aws_sdk_lambda.types.runtime.Runtime"] = None,
|
|
1742
|
+
handler: Optional["aws_sdk_lambda.types.handler.Handler"] = None,
|
|
1743
|
+
description: Optional["aws_sdk_lambda.types.description.Description"] = None,
|
|
1744
|
+
timeout: Optional["aws_sdk_lambda.types.timeout.Timeout"] = None,
|
|
1745
|
+
memory_size: Optional["aws_sdk_lambda.types.memory_size.MemorySize"] = None,
|
|
1746
|
+
publish: Optional["aws_sdk_lambda.types.boolean.Boolean"] = None,
|
|
1747
|
+
vpc_config: Optional["aws_sdk_lambda.types.vpc_config.VpcConfig"] = None,
|
|
1748
|
+
package_type: Optional["aws_sdk_lambda.types.package_type.PackageType"] = None,
|
|
1749
|
+
dead_letter_config: Optional[
|
|
1750
|
+
"aws_sdk_lambda.types.dead_letter_config.DeadLetterConfig"
|
|
1751
|
+
] = None,
|
|
1752
|
+
environment: Optional["aws_sdk_lambda.types.environment.Environment"] = None,
|
|
1753
|
+
kms_key_arn: Optional["aws_sdk_lambda.types.kms_key_arn.KMSKeyArn"] = None,
|
|
1754
|
+
tracing_config: Optional[
|
|
1755
|
+
"aws_sdk_lambda.types.tracing_config.TracingConfig"
|
|
1756
|
+
] = None,
|
|
1757
|
+
tags: Optional["aws_sdk_lambda.types.tags.Tags"] = None,
|
|
1758
|
+
layers: Optional["aws_sdk_lambda.types.layer_list.LayerList"] = None,
|
|
1759
|
+
file_system_configs: Optional[
|
|
1760
|
+
"aws_sdk_lambda.types.file_system_config_list.FileSystemConfigList"
|
|
1761
|
+
] = None,
|
|
1762
|
+
image_config: Optional["aws_sdk_lambda.types.image_config.ImageConfig"] = None,
|
|
1763
|
+
code_signing_config_arn: Optional[
|
|
1764
|
+
"aws_sdk_lambda.types.code_signing_config_arn.CodeSigningConfigArn"
|
|
1765
|
+
] = None,
|
|
1766
|
+
architectures: Optional[
|
|
1767
|
+
"aws_sdk_lambda.types.architectures_list.ArchitecturesList"
|
|
1768
|
+
] = None,
|
|
1769
|
+
ephemeral_storage: Optional[
|
|
1770
|
+
"aws_sdk_lambda.types.ephemeral_storage.EphemeralStorage"
|
|
1771
|
+
] = None,
|
|
1772
|
+
snap_start: Optional["aws_sdk_lambda.types.snap_start.SnapStart"] = None,
|
|
1773
|
+
logging_config: Optional[
|
|
1774
|
+
"aws_sdk_lambda.types.logging_config.LoggingConfig"
|
|
1775
|
+
] = None,
|
|
1776
|
+
capacity_provider_config: Optional[
|
|
1777
|
+
"aws_sdk_lambda.types.capacity_provider_config.CapacityProviderConfig"
|
|
1778
|
+
] = None,
|
|
1779
|
+
publish_to: Optional[
|
|
1780
|
+
"aws_sdk_lambda.types.function_version_latest_published.FunctionVersionLatestPublished"
|
|
1781
|
+
] = None,
|
|
1782
|
+
durable_config: Optional[
|
|
1783
|
+
"aws_sdk_lambda.types.durable_config.DurableConfig"
|
|
1784
|
+
] = None,
|
|
1785
|
+
tenancy_config: Optional[
|
|
1786
|
+
"aws_sdk_lambda.types.tenancy_config.TenancyConfig"
|
|
1787
|
+
] = None,
|
|
1788
|
+
) -> "aws_sdk_lambda.types.function_configuration.FunctionConfiguration":
|
|
1789
|
+
"""<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>
|
|
1790
|
+
|
|
1791
|
+
Args:
|
|
1792
|
+
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>
|
|
1793
|
+
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>
|
|
1794
|
+
role: <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
|
|
1795
|
+
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>
|
|
1796
|
+
code: <p>The code for the function.</p>
|
|
1797
|
+
description: <p>A description of the function.</p>
|
|
1798
|
+
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>
|
|
1799
|
+
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>
|
|
1800
|
+
publish: <p>Set to true to publish the first version of the function during creation.</p>
|
|
1801
|
+
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>
|
|
1802
|
+
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>
|
|
1803
|
+
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>
|
|
1804
|
+
environment: <p>Environment variables that are accessible from function code during execution.</p>
|
|
1805
|
+
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>
|
|
1806
|
+
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>
|
|
1807
|
+
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>
|
|
1808
|
+
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>
|
|
1809
|
+
file_system_configs: <p>Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.</p>
|
|
1810
|
+
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>
|
|
1811
|
+
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>
|
|
1812
|
+
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>
|
|
1813
|
+
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>
|
|
1814
|
+
snap_start: <p>The function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html\">SnapStart</a> setting.</p>
|
|
1815
|
+
logging_config: <p>The function's Amazon CloudWatch Logs configuration settings.</p>
|
|
1816
|
+
capacity_provider_config: <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
|
|
1817
|
+
publish_to: <p>Specifies where to publish the function version or configuration.</p>
|
|
1818
|
+
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>
|
|
1819
|
+
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>
|
|
1820
|
+
|
|
1821
|
+
Examples:
|
|
1822
|
+
To create a function
|
|
1823
|
+
The following example creates a function with a deployment package in Amazon S3 and enables X-Ray tracing and environment variable encryption.
|
|
1824
|
+
|
|
1825
|
+
>>> 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'})
|
|
1826
|
+
"""
|
|
1827
|
+
|
|
1828
|
+
async def _handler(
|
|
1829
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.create_function_request.CreateFunctionRequest]",
|
|
1830
|
+
) -> AsyncOperationResponse[
|
|
1831
|
+
"aws_sdk_lambda.types.function_configuration.FunctionConfiguration"
|
|
1832
|
+
]:
|
|
1833
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.create_function
|
|
1834
|
+
|
|
1835
|
+
(
|
|
1836
|
+
output,
|
|
1837
|
+
http_response,
|
|
1838
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.create_function.async_create_function(
|
|
1839
|
+
req.options, req.input
|
|
1840
|
+
)
|
|
1841
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1842
|
+
|
|
1843
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
1844
|
+
input: aws_sdk_lambda.types.create_function_request.CreateFunctionRequest = {} # type: ignore[typeddict-item]
|
|
1845
|
+
input["function_name"] = function_name
|
|
1846
|
+
if runtime is not None:
|
|
1847
|
+
input["runtime"] = runtime
|
|
1848
|
+
input["role"] = role
|
|
1849
|
+
if handler is not None:
|
|
1850
|
+
input["handler"] = handler
|
|
1851
|
+
input["code"] = code
|
|
1852
|
+
if description is not None:
|
|
1853
|
+
input["description"] = description
|
|
1854
|
+
if timeout is not None:
|
|
1855
|
+
input["timeout"] = timeout
|
|
1856
|
+
if memory_size is not None:
|
|
1857
|
+
input["memory_size"] = memory_size
|
|
1858
|
+
if publish is not None:
|
|
1859
|
+
input["publish"] = publish
|
|
1860
|
+
if vpc_config is not None:
|
|
1861
|
+
input["vpc_config"] = vpc_config
|
|
1862
|
+
if package_type is not None:
|
|
1863
|
+
input["package_type"] = package_type
|
|
1864
|
+
if dead_letter_config is not None:
|
|
1865
|
+
input["dead_letter_config"] = dead_letter_config
|
|
1866
|
+
if environment is not None:
|
|
1867
|
+
input["environment"] = environment
|
|
1868
|
+
if kms_key_arn is not None:
|
|
1869
|
+
input["kms_key_arn"] = kms_key_arn
|
|
1870
|
+
if tracing_config is not None:
|
|
1871
|
+
input["tracing_config"] = tracing_config
|
|
1872
|
+
if tags is not None:
|
|
1873
|
+
input["tags"] = tags
|
|
1874
|
+
if layers is not None:
|
|
1875
|
+
input["layers"] = layers
|
|
1876
|
+
if file_system_configs is not None:
|
|
1877
|
+
input["file_system_configs"] = file_system_configs
|
|
1878
|
+
if image_config is not None:
|
|
1879
|
+
input["image_config"] = image_config
|
|
1880
|
+
if code_signing_config_arn is not None:
|
|
1881
|
+
input["code_signing_config_arn"] = code_signing_config_arn
|
|
1882
|
+
if architectures is not None:
|
|
1883
|
+
input["architectures"] = architectures
|
|
1884
|
+
if ephemeral_storage is not None:
|
|
1885
|
+
input["ephemeral_storage"] = ephemeral_storage
|
|
1886
|
+
if snap_start is not None:
|
|
1887
|
+
input["snap_start"] = snap_start
|
|
1888
|
+
if logging_config is not None:
|
|
1889
|
+
input["logging_config"] = logging_config
|
|
1890
|
+
if capacity_provider_config is not None:
|
|
1891
|
+
input["capacity_provider_config"] = capacity_provider_config
|
|
1892
|
+
if publish_to is not None:
|
|
1893
|
+
input["publish_to"] = publish_to
|
|
1894
|
+
if durable_config is not None:
|
|
1895
|
+
input["durable_config"] = durable_config
|
|
1896
|
+
if tenancy_config is not None:
|
|
1897
|
+
input["tenancy_config"] = tenancy_config
|
|
1898
|
+
|
|
1899
|
+
response = await aexecute_pipeline(
|
|
1900
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
1901
|
+
handler=_handler,
|
|
1902
|
+
interceptors=list(interceptors_),
|
|
1903
|
+
)
|
|
1904
|
+
return response.output
|
|
1905
|
+
|
|
1906
|
+
async def list(
|
|
1907
|
+
self,
|
|
1908
|
+
*,
|
|
1909
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
1910
|
+
master_region: Optional[
|
|
1911
|
+
"aws_sdk_lambda.types.master_region.MasterRegion"
|
|
1912
|
+
] = None,
|
|
1913
|
+
function_version: Optional[
|
|
1914
|
+
"aws_sdk_lambda.types.function_version.FunctionVersion"
|
|
1915
|
+
] = None,
|
|
1916
|
+
marker: Optional["aws_sdk_lambda.types.string.String"] = None,
|
|
1917
|
+
max_items: Optional["aws_sdk_lambda.types.max_list_items.MaxListItems"] = None,
|
|
1918
|
+
) -> "aws_sdk_lambda.types.list_functions_response.ListFunctionsResponse":
|
|
1919
|
+
"""<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>
|
|
1920
|
+
|
|
1921
|
+
Args:
|
|
1922
|
+
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>
|
|
1923
|
+
function_version: <p>Set to <code>ALL</code> to include entries for all published versions of each function.</p>
|
|
1924
|
+
marker: <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
|
|
1925
|
+
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>
|
|
1926
|
+
|
|
1927
|
+
Examples:
|
|
1928
|
+
To get a list of Lambda functions
|
|
1929
|
+
This operation returns a list of Lambda functions.
|
|
1930
|
+
|
|
1931
|
+
>>> await client.list()
|
|
1932
|
+
"""
|
|
1933
|
+
|
|
1934
|
+
async def _handler(
|
|
1935
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.list_functions_request.ListFunctionsRequest]",
|
|
1936
|
+
) -> AsyncOperationResponse[
|
|
1937
|
+
"aws_sdk_lambda.types.list_functions_response.ListFunctionsResponse"
|
|
1938
|
+
]:
|
|
1939
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.list_functions
|
|
1940
|
+
|
|
1941
|
+
(
|
|
1942
|
+
output,
|
|
1943
|
+
http_response,
|
|
1944
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.list_functions.async_list_functions(
|
|
1945
|
+
req.options, req.input
|
|
1946
|
+
)
|
|
1947
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1948
|
+
|
|
1949
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
1950
|
+
input: aws_sdk_lambda.types.list_functions_request.ListFunctionsRequest = {} # type: ignore[typeddict-item]
|
|
1951
|
+
if master_region is not None:
|
|
1952
|
+
input["master_region"] = master_region
|
|
1953
|
+
if function_version is not None:
|
|
1954
|
+
input["function_version"] = function_version
|
|
1955
|
+
if marker is not None:
|
|
1956
|
+
input["marker"] = marker
|
|
1957
|
+
if max_items is not None:
|
|
1958
|
+
input["max_items"] = max_items
|
|
1959
|
+
|
|
1960
|
+
response = await aexecute_pipeline(
|
|
1961
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
1962
|
+
handler=_handler,
|
|
1963
|
+
interceptors=list(interceptors_),
|
|
1964
|
+
)
|
|
1965
|
+
return response.output
|
|
1966
|
+
|
|
1967
|
+
async def create_function_url_config(
|
|
1968
|
+
self,
|
|
1969
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
1970
|
+
auth_type: "aws_sdk_lambda.types.function_url_auth_type.FunctionUrlAuthType",
|
|
1971
|
+
*,
|
|
1972
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
1973
|
+
qualifier: Optional[
|
|
1974
|
+
"aws_sdk_lambda.types.function_url_qualifier.FunctionUrlQualifier"
|
|
1975
|
+
] = None,
|
|
1976
|
+
cors: Optional["aws_sdk_lambda.types.cors.Cors"] = None,
|
|
1977
|
+
invoke_mode: Optional["aws_sdk_lambda.types.invoke_mode.InvokeMode"] = None,
|
|
1978
|
+
) -> "aws_sdk_lambda.types.create_function_url_config_response.CreateFunctionUrlConfigResponse":
|
|
1979
|
+
"""<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>
|
|
1980
|
+
|
|
1981
|
+
Args:
|
|
1982
|
+
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>
|
|
1983
|
+
qualifier: <p>The alias name.</p>
|
|
1984
|
+
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>
|
|
1985
|
+
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>
|
|
1986
|
+
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>
|
|
1987
|
+
"""
|
|
1988
|
+
|
|
1989
|
+
async def _handler(
|
|
1990
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.create_function_url_config_request.CreateFunctionUrlConfigRequest]",
|
|
1991
|
+
) -> AsyncOperationResponse[
|
|
1992
|
+
"aws_sdk_lambda.types.create_function_url_config_response.CreateFunctionUrlConfigResponse"
|
|
1993
|
+
]:
|
|
1994
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.create_function_url_config
|
|
1995
|
+
|
|
1996
|
+
(
|
|
1997
|
+
output,
|
|
1998
|
+
http_response,
|
|
1999
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.create_function_url_config.async_create_function_url_config(
|
|
2000
|
+
req.options, req.input
|
|
2001
|
+
)
|
|
2002
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
2003
|
+
|
|
2004
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
2005
|
+
input: aws_sdk_lambda.types.create_function_url_config_request.CreateFunctionUrlConfigRequest = {} # type: ignore[typeddict-item]
|
|
2006
|
+
input["function_name"] = function_name
|
|
2007
|
+
if qualifier is not None:
|
|
2008
|
+
input["qualifier"] = qualifier
|
|
2009
|
+
input["auth_type"] = auth_type
|
|
2010
|
+
if cors is not None:
|
|
2011
|
+
input["cors"] = cors
|
|
2012
|
+
if invoke_mode is not None:
|
|
2013
|
+
input["invoke_mode"] = invoke_mode
|
|
2014
|
+
|
|
2015
|
+
response = await aexecute_pipeline(
|
|
2016
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
2017
|
+
handler=_handler,
|
|
2018
|
+
interceptors=list(interceptors_),
|
|
2019
|
+
)
|
|
2020
|
+
return response.output
|
|
2021
|
+
|
|
2022
|
+
async def delete_function_concurrency(
|
|
2023
|
+
self,
|
|
2024
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
2025
|
+
*,
|
|
2026
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
2027
|
+
) -> None:
|
|
2028
|
+
"""<p>Removes a concurrent execution limit from a function.</p>
|
|
2029
|
+
|
|
2030
|
+
Args:
|
|
2031
|
+
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>
|
|
2032
|
+
|
|
2033
|
+
Examples:
|
|
2034
|
+
To remove the reserved concurrent execution limit from a function
|
|
2035
|
+
The following example deletes the reserved concurrent execution limit from a function named my-function.
|
|
2036
|
+
|
|
2037
|
+
>>> await client.delete_function_concurrency(function_name='my-function')
|
|
2038
|
+
"""
|
|
2039
|
+
|
|
2040
|
+
async def _handler(
|
|
2041
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.delete_function_concurrency_request.DeleteFunctionConcurrencyRequest]",
|
|
2042
|
+
) -> AsyncOperationResponse[None]:
|
|
2043
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.delete_function_concurrency
|
|
2044
|
+
|
|
2045
|
+
(
|
|
2046
|
+
output,
|
|
2047
|
+
http_response,
|
|
2048
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.delete_function_concurrency.async_delete_function_concurrency(
|
|
2049
|
+
req.options, req.input
|
|
2050
|
+
)
|
|
2051
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
2052
|
+
|
|
2053
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
2054
|
+
input: aws_sdk_lambda.types.delete_function_concurrency_request.DeleteFunctionConcurrencyRequest = {} # type: ignore[typeddict-item]
|
|
2055
|
+
input["function_name"] = function_name
|
|
2056
|
+
|
|
2057
|
+
response = await aexecute_pipeline(
|
|
2058
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
2059
|
+
handler=_handler,
|
|
2060
|
+
interceptors=list(interceptors_),
|
|
2061
|
+
)
|
|
2062
|
+
return response.output
|
|
2063
|
+
|
|
2064
|
+
async def delete_function_url_config(
|
|
2065
|
+
self,
|
|
2066
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
2067
|
+
*,
|
|
2068
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
2069
|
+
qualifier: Optional[
|
|
2070
|
+
"aws_sdk_lambda.types.function_url_qualifier.FunctionUrlQualifier"
|
|
2071
|
+
] = None,
|
|
2072
|
+
) -> None:
|
|
2073
|
+
"""<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>
|
|
2074
|
+
|
|
2075
|
+
Args:
|
|
2076
|
+
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>
|
|
2077
|
+
qualifier: <p>The alias name.</p>
|
|
2078
|
+
"""
|
|
2079
|
+
|
|
2080
|
+
async def _handler(
|
|
2081
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.delete_function_url_config_request.DeleteFunctionUrlConfigRequest]",
|
|
2082
|
+
) -> AsyncOperationResponse[None]:
|
|
2083
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.delete_function_url_config
|
|
2084
|
+
|
|
2085
|
+
(
|
|
2086
|
+
output,
|
|
2087
|
+
http_response,
|
|
2088
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.delete_function_url_config.async_delete_function_url_config(
|
|
2089
|
+
req.options, req.input
|
|
2090
|
+
)
|
|
2091
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
2092
|
+
|
|
2093
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
2094
|
+
input: aws_sdk_lambda.types.delete_function_url_config_request.DeleteFunctionUrlConfigRequest = {} # type: ignore[typeddict-item]
|
|
2095
|
+
input["function_name"] = function_name
|
|
2096
|
+
if qualifier is not None:
|
|
2097
|
+
input["qualifier"] = qualifier
|
|
2098
|
+
|
|
2099
|
+
response = await aexecute_pipeline(
|
|
2100
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
2101
|
+
handler=_handler,
|
|
2102
|
+
interceptors=list(interceptors_),
|
|
2103
|
+
)
|
|
2104
|
+
return response.output
|
|
2105
|
+
|
|
2106
|
+
async def get_function_concurrency(
|
|
2107
|
+
self,
|
|
2108
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
2109
|
+
*,
|
|
2110
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
2111
|
+
) -> "aws_sdk_lambda.types.get_function_concurrency_response.GetFunctionConcurrencyResponse":
|
|
2112
|
+
"""<p>Returns details about the reserved concurrency configuration for a function. To set a concurrency limit for a function, use <a>PutFunctionConcurrency</a>.</p>
|
|
2113
|
+
|
|
2114
|
+
Args:
|
|
2115
|
+
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>
|
|
2116
|
+
|
|
2117
|
+
Examples:
|
|
2118
|
+
To get the reserved concurrency setting for a function
|
|
2119
|
+
The following example returns the reserved concurrency setting for a function named my-function.
|
|
2120
|
+
|
|
2121
|
+
>>> await client.get_function_concurrency(function_name='my-function')
|
|
2122
|
+
"""
|
|
2123
|
+
|
|
2124
|
+
async def _handler(
|
|
2125
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.get_function_concurrency_request.GetFunctionConcurrencyRequest]",
|
|
2126
|
+
) -> AsyncOperationResponse[
|
|
2127
|
+
"aws_sdk_lambda.types.get_function_concurrency_response.GetFunctionConcurrencyResponse"
|
|
2128
|
+
]:
|
|
2129
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.get_function_concurrency
|
|
2130
|
+
|
|
2131
|
+
(
|
|
2132
|
+
output,
|
|
2133
|
+
http_response,
|
|
2134
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.get_function_concurrency.async_get_function_concurrency(
|
|
2135
|
+
req.options, req.input
|
|
2136
|
+
)
|
|
2137
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
2138
|
+
|
|
2139
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
2140
|
+
input: aws_sdk_lambda.types.get_function_concurrency_request.GetFunctionConcurrencyRequest = {} # type: ignore[typeddict-item]
|
|
2141
|
+
input["function_name"] = function_name
|
|
2142
|
+
|
|
2143
|
+
response = await aexecute_pipeline(
|
|
2144
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
2145
|
+
handler=_handler,
|
|
2146
|
+
interceptors=list(interceptors_),
|
|
2147
|
+
)
|
|
2148
|
+
return response.output
|
|
2149
|
+
|
|
2150
|
+
async def get_function_url_config(
|
|
2151
|
+
self,
|
|
2152
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
2153
|
+
*,
|
|
2154
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
2155
|
+
qualifier: Optional[
|
|
2156
|
+
"aws_sdk_lambda.types.function_url_qualifier.FunctionUrlQualifier"
|
|
2157
|
+
] = None,
|
|
2158
|
+
) -> "aws_sdk_lambda.types.get_function_url_config_response.GetFunctionUrlConfigResponse":
|
|
2159
|
+
"""<p>Returns details about a Lambda function URL.</p>
|
|
2160
|
+
|
|
2161
|
+
Args:
|
|
2162
|
+
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>
|
|
2163
|
+
qualifier: <p>The alias name.</p>
|
|
2164
|
+
"""
|
|
2165
|
+
|
|
2166
|
+
async def _handler(
|
|
2167
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.get_function_url_config_request.GetFunctionUrlConfigRequest]",
|
|
2168
|
+
) -> AsyncOperationResponse[
|
|
2169
|
+
"aws_sdk_lambda.types.get_function_url_config_response.GetFunctionUrlConfigResponse"
|
|
2170
|
+
]:
|
|
2171
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.get_function_url_config
|
|
2172
|
+
|
|
2173
|
+
(
|
|
2174
|
+
output,
|
|
2175
|
+
http_response,
|
|
2176
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.get_function_url_config.async_get_function_url_config(
|
|
2177
|
+
req.options, req.input
|
|
2178
|
+
)
|
|
2179
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
2180
|
+
|
|
2181
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
2182
|
+
input: aws_sdk_lambda.types.get_function_url_config_request.GetFunctionUrlConfigRequest = {} # type: ignore[typeddict-item]
|
|
2183
|
+
input["function_name"] = function_name
|
|
2184
|
+
if qualifier is not None:
|
|
2185
|
+
input["qualifier"] = qualifier
|
|
2186
|
+
|
|
2187
|
+
response = await aexecute_pipeline(
|
|
2188
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
2189
|
+
handler=_handler,
|
|
2190
|
+
interceptors=list(interceptors_),
|
|
2191
|
+
)
|
|
2192
|
+
return response.output
|
|
2193
|
+
|
|
2194
|
+
async def list_function_url_configs(
|
|
2195
|
+
self,
|
|
2196
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
2197
|
+
*,
|
|
2198
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
2199
|
+
marker: Optional["aws_sdk_lambda.types.string.String"] = None,
|
|
2200
|
+
max_items: Optional["aws_sdk_lambda.types.max_items.MaxItems"] = None,
|
|
2201
|
+
) -> "aws_sdk_lambda.types.list_function_url_configs_response.ListFunctionUrlConfigsResponse":
|
|
2202
|
+
"""<p>Returns a list of Lambda function URLs for the specified function.</p>
|
|
2203
|
+
|
|
2204
|
+
Args:
|
|
2205
|
+
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>
|
|
2206
|
+
marker: <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
|
|
2207
|
+
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>
|
|
2208
|
+
"""
|
|
2209
|
+
|
|
2210
|
+
async def _handler(
|
|
2211
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.list_function_url_configs_request.ListFunctionUrlConfigsRequest]",
|
|
2212
|
+
) -> AsyncOperationResponse[
|
|
2213
|
+
"aws_sdk_lambda.types.list_function_url_configs_response.ListFunctionUrlConfigsResponse"
|
|
2214
|
+
]:
|
|
2215
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.list_function_url_configs
|
|
2216
|
+
|
|
2217
|
+
(
|
|
2218
|
+
output,
|
|
2219
|
+
http_response,
|
|
2220
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.list_function_url_configs.async_list_function_url_configs(
|
|
2221
|
+
req.options, req.input
|
|
2222
|
+
)
|
|
2223
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
2224
|
+
|
|
2225
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
2226
|
+
input: aws_sdk_lambda.types.list_function_url_configs_request.ListFunctionUrlConfigsRequest = {} # type: ignore[typeddict-item]
|
|
2227
|
+
input["function_name"] = function_name
|
|
2228
|
+
if marker is not None:
|
|
2229
|
+
input["marker"] = marker
|
|
2230
|
+
if max_items is not None:
|
|
2231
|
+
input["max_items"] = max_items
|
|
2232
|
+
|
|
2233
|
+
response = await aexecute_pipeline(
|
|
2234
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
2235
|
+
handler=_handler,
|
|
2236
|
+
interceptors=list(interceptors_),
|
|
2237
|
+
)
|
|
2238
|
+
return response.output
|
|
2239
|
+
|
|
2240
|
+
async def list_provisioned_concurrency_configs(
|
|
2241
|
+
self,
|
|
2242
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
2243
|
+
*,
|
|
2244
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
2245
|
+
marker: Optional["aws_sdk_lambda.types.string.String"] = None,
|
|
2246
|
+
max_items: Optional[
|
|
2247
|
+
"aws_sdk_lambda.types.max_provisioned_concurrency_config_list_items.MaxProvisionedConcurrencyConfigListItems"
|
|
2248
|
+
] = None,
|
|
2249
|
+
) -> "aws_sdk_lambda.types.list_provisioned_concurrency_configs_response.ListProvisionedConcurrencyConfigsResponse":
|
|
2250
|
+
"""<p>Retrieves a list of provisioned concurrency configurations for a function.</p>
|
|
2251
|
+
|
|
2252
|
+
Args:
|
|
2253
|
+
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>
|
|
2254
|
+
marker: <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
|
|
2255
|
+
max_items: <p>Specify a number to limit the number of configurations returned.</p>
|
|
2256
|
+
|
|
2257
|
+
Examples:
|
|
2258
|
+
To get a list of provisioned concurrency configurations
|
|
2259
|
+
The following example returns a list of provisioned concurrency configurations for a function named my-function.
|
|
2260
|
+
|
|
2261
|
+
>>> await client.list_provisioned_concurrency_configs(function_name='my-function')
|
|
2262
|
+
"""
|
|
2263
|
+
|
|
2264
|
+
async def _handler(
|
|
2265
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.list_provisioned_concurrency_configs_request.ListProvisionedConcurrencyConfigsRequest]",
|
|
2266
|
+
) -> AsyncOperationResponse[
|
|
2267
|
+
"aws_sdk_lambda.types.list_provisioned_concurrency_configs_response.ListProvisionedConcurrencyConfigsResponse"
|
|
2268
|
+
]:
|
|
2269
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.list_provisioned_concurrency_configs
|
|
2270
|
+
|
|
2271
|
+
(
|
|
2272
|
+
output,
|
|
2273
|
+
http_response,
|
|
2274
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.list_provisioned_concurrency_configs.async_list_provisioned_concurrency_configs(
|
|
2275
|
+
req.options, req.input
|
|
2276
|
+
)
|
|
2277
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
2278
|
+
|
|
2279
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
2280
|
+
input: aws_sdk_lambda.types.list_provisioned_concurrency_configs_request.ListProvisionedConcurrencyConfigsRequest = {} # type: ignore[typeddict-item]
|
|
2281
|
+
input["function_name"] = function_name
|
|
2282
|
+
if marker is not None:
|
|
2283
|
+
input["marker"] = marker
|
|
2284
|
+
if max_items is not None:
|
|
2285
|
+
input["max_items"] = max_items
|
|
2286
|
+
|
|
2287
|
+
response = await aexecute_pipeline(
|
|
2288
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
2289
|
+
handler=_handler,
|
|
2290
|
+
interceptors=list(interceptors_),
|
|
2291
|
+
)
|
|
2292
|
+
return response.output
|
|
2293
|
+
|
|
2294
|
+
async def put_function_concurrency(
|
|
2295
|
+
self,
|
|
2296
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
2297
|
+
reserved_concurrent_executions: "aws_sdk_lambda.types.reserved_concurrent_executions.ReservedConcurrentExecutions",
|
|
2298
|
+
*,
|
|
2299
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
2300
|
+
) -> "aws_sdk_lambda.types.concurrency.Concurrency":
|
|
2301
|
+
"""<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>
|
|
2302
|
+
|
|
2303
|
+
Args:
|
|
2304
|
+
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>
|
|
2305
|
+
reserved_concurrent_executions: <p>The number of simultaneous executions to reserve for the function.</p>
|
|
2306
|
+
|
|
2307
|
+
Examples:
|
|
2308
|
+
To configure a reserved concurrency limit for a function
|
|
2309
|
+
The following example configures 100 reserved concurrent executions for the my-function function.
|
|
2310
|
+
|
|
2311
|
+
>>> await client.put_function_concurrency(function_name='my-function', reserved_concurrent_executions=100)
|
|
2312
|
+
"""
|
|
2313
|
+
|
|
2314
|
+
async def _handler(
|
|
2315
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.put_function_concurrency_request.PutFunctionConcurrencyRequest]",
|
|
2316
|
+
) -> AsyncOperationResponse["aws_sdk_lambda.types.concurrency.Concurrency"]:
|
|
2317
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.put_function_concurrency
|
|
2318
|
+
|
|
2319
|
+
(
|
|
2320
|
+
output,
|
|
2321
|
+
http_response,
|
|
2322
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.put_function_concurrency.async_put_function_concurrency(
|
|
2323
|
+
req.options, req.input
|
|
2324
|
+
)
|
|
2325
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
2326
|
+
|
|
2327
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
2328
|
+
input: aws_sdk_lambda.types.put_function_concurrency_request.PutFunctionConcurrencyRequest = {} # type: ignore[typeddict-item]
|
|
2329
|
+
input["function_name"] = function_name
|
|
2330
|
+
input["reserved_concurrent_executions"] = reserved_concurrent_executions
|
|
2331
|
+
|
|
2332
|
+
response = await aexecute_pipeline(
|
|
2333
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
2334
|
+
handler=_handler,
|
|
2335
|
+
interceptors=list(interceptors_),
|
|
2336
|
+
)
|
|
2337
|
+
return response.output
|
|
2338
|
+
|
|
2339
|
+
async def update_function_code(
|
|
2340
|
+
self,
|
|
2341
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
2342
|
+
*,
|
|
2343
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
2344
|
+
zip_file: Optional["aws_sdk_lambda.types.blob.Blob"] = None,
|
|
2345
|
+
s3_bucket: Optional["aws_sdk_lambda.types.s3_bucket.S3Bucket"] = None,
|
|
2346
|
+
s3_key: Optional["aws_sdk_lambda.types.s3_key.S3Key"] = None,
|
|
2347
|
+
s3_object_version: Optional[
|
|
2348
|
+
"aws_sdk_lambda.types.s3_object_version.S3ObjectVersion"
|
|
2349
|
+
] = None,
|
|
2350
|
+
image_uri: Optional["aws_sdk_lambda.types.string.String"] = None,
|
|
2351
|
+
publish: Optional["aws_sdk_lambda.types.boolean.Boolean"] = None,
|
|
2352
|
+
dry_run: Optional["aws_sdk_lambda.types.boolean.Boolean"] = None,
|
|
2353
|
+
revision_id: Optional["aws_sdk_lambda.types.string.String"] = None,
|
|
2354
|
+
architectures: Optional[
|
|
2355
|
+
"aws_sdk_lambda.types.architectures_list.ArchitecturesList"
|
|
2356
|
+
] = None,
|
|
2357
|
+
source_kms_key_arn: Optional[
|
|
2358
|
+
"aws_sdk_lambda.types.kms_key_arn.KMSKeyArn"
|
|
2359
|
+
] = None,
|
|
2360
|
+
publish_to: Optional[
|
|
2361
|
+
"aws_sdk_lambda.types.function_version_latest_published.FunctionVersionLatestPublished"
|
|
2362
|
+
] = None,
|
|
2363
|
+
) -> "aws_sdk_lambda.types.function_configuration.FunctionConfiguration":
|
|
2364
|
+
"""<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>
|
|
2365
|
+
|
|
2366
|
+
Args:
|
|
2367
|
+
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>
|
|
2368
|
+
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>
|
|
2369
|
+
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>
|
|
2370
|
+
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>
|
|
2371
|
+
s3_object_version: <p>For versioned objects, the version of the deployment package object to use.</p>
|
|
2372
|
+
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>
|
|
2373
|
+
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>
|
|
2374
|
+
dry_run: <p>Set to true to validate the request parameters and access permissions without modifying the function code.</p>
|
|
2375
|
+
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>
|
|
2376
|
+
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>
|
|
2377
|
+
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>
|
|
2378
|
+
publish_to: <p>Specifies where to publish the function version or configuration.</p>
|
|
2379
|
+
|
|
2380
|
+
Examples:
|
|
2381
|
+
To update a Lambda function's code
|
|
2382
|
+
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.
|
|
2383
|
+
|
|
2384
|
+
>>> await client.update_function_code(function_name='my-function', s3_bucket='my-bucket-1xpuxmplzrlbh', s3_key='function.zip')
|
|
2385
|
+
"""
|
|
2386
|
+
|
|
2387
|
+
async def _handler(
|
|
2388
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.update_function_code_request.UpdateFunctionCodeRequest]",
|
|
2389
|
+
) -> AsyncOperationResponse[
|
|
2390
|
+
"aws_sdk_lambda.types.function_configuration.FunctionConfiguration"
|
|
2391
|
+
]:
|
|
2392
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.update_function_code
|
|
2393
|
+
|
|
2394
|
+
(
|
|
2395
|
+
output,
|
|
2396
|
+
http_response,
|
|
2397
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.update_function_code.async_update_function_code(
|
|
2398
|
+
req.options, req.input
|
|
2399
|
+
)
|
|
2400
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
2401
|
+
|
|
2402
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
2403
|
+
input: aws_sdk_lambda.types.update_function_code_request.UpdateFunctionCodeRequest = {} # type: ignore[typeddict-item]
|
|
2404
|
+
input["function_name"] = function_name
|
|
2405
|
+
if zip_file is not None:
|
|
2406
|
+
input["zip_file"] = zip_file
|
|
2407
|
+
if s3_bucket is not None:
|
|
2408
|
+
input["s3_bucket"] = s3_bucket
|
|
2409
|
+
if s3_key is not None:
|
|
2410
|
+
input["s3_key"] = s3_key
|
|
2411
|
+
if s3_object_version is not None:
|
|
2412
|
+
input["s3_object_version"] = s3_object_version
|
|
2413
|
+
if image_uri is not None:
|
|
2414
|
+
input["image_uri"] = image_uri
|
|
2415
|
+
if publish is not None:
|
|
2416
|
+
input["publish"] = publish
|
|
2417
|
+
if dry_run is not None:
|
|
2418
|
+
input["dry_run"] = dry_run
|
|
2419
|
+
if revision_id is not None:
|
|
2420
|
+
input["revision_id"] = revision_id
|
|
2421
|
+
if architectures is not None:
|
|
2422
|
+
input["architectures"] = architectures
|
|
2423
|
+
if source_kms_key_arn is not None:
|
|
2424
|
+
input["source_kms_key_arn"] = source_kms_key_arn
|
|
2425
|
+
if publish_to is not None:
|
|
2426
|
+
input["publish_to"] = publish_to
|
|
2427
|
+
|
|
2428
|
+
response = await aexecute_pipeline(
|
|
2429
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
2430
|
+
handler=_handler,
|
|
2431
|
+
interceptors=list(interceptors_),
|
|
2432
|
+
)
|
|
2433
|
+
return response.output
|
|
2434
|
+
|
|
2435
|
+
async def update_function_configuration(
|
|
2436
|
+
self,
|
|
2437
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
2438
|
+
*,
|
|
2439
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
2440
|
+
role: Optional["aws_sdk_lambda.types.role_arn.RoleArn"] = None,
|
|
2441
|
+
handler: Optional["aws_sdk_lambda.types.handler.Handler"] = None,
|
|
2442
|
+
description: Optional["aws_sdk_lambda.types.description.Description"] = None,
|
|
2443
|
+
timeout: Optional["aws_sdk_lambda.types.timeout.Timeout"] = None,
|
|
2444
|
+
memory_size: Optional["aws_sdk_lambda.types.memory_size.MemorySize"] = None,
|
|
2445
|
+
vpc_config: Optional["aws_sdk_lambda.types.vpc_config.VpcConfig"] = None,
|
|
2446
|
+
environment: Optional["aws_sdk_lambda.types.environment.Environment"] = None,
|
|
2447
|
+
runtime: Optional["aws_sdk_lambda.types.runtime.Runtime"] = None,
|
|
2448
|
+
dead_letter_config: Optional[
|
|
2449
|
+
"aws_sdk_lambda.types.dead_letter_config.DeadLetterConfig"
|
|
2450
|
+
] = None,
|
|
2451
|
+
kms_key_arn: Optional["aws_sdk_lambda.types.kms_key_arn.KMSKeyArn"] = None,
|
|
2452
|
+
tracing_config: Optional[
|
|
2453
|
+
"aws_sdk_lambda.types.tracing_config.TracingConfig"
|
|
2454
|
+
] = None,
|
|
2455
|
+
revision_id: Optional["aws_sdk_lambda.types.string.String"] = None,
|
|
2456
|
+
layers: Optional["aws_sdk_lambda.types.layer_list.LayerList"] = None,
|
|
2457
|
+
file_system_configs: Optional[
|
|
2458
|
+
"aws_sdk_lambda.types.file_system_config_list.FileSystemConfigList"
|
|
2459
|
+
] = None,
|
|
2460
|
+
image_config: Optional["aws_sdk_lambda.types.image_config.ImageConfig"] = None,
|
|
2461
|
+
ephemeral_storage: Optional[
|
|
2462
|
+
"aws_sdk_lambda.types.ephemeral_storage.EphemeralStorage"
|
|
2463
|
+
] = None,
|
|
2464
|
+
snap_start: Optional["aws_sdk_lambda.types.snap_start.SnapStart"] = None,
|
|
2465
|
+
logging_config: Optional[
|
|
2466
|
+
"aws_sdk_lambda.types.logging_config.LoggingConfig"
|
|
2467
|
+
] = None,
|
|
2468
|
+
capacity_provider_config: Optional[
|
|
2469
|
+
"aws_sdk_lambda.types.capacity_provider_config.CapacityProviderConfig"
|
|
2470
|
+
] = None,
|
|
2471
|
+
durable_config: Optional[
|
|
2472
|
+
"aws_sdk_lambda.types.durable_config.DurableConfig"
|
|
2473
|
+
] = None,
|
|
2474
|
+
) -> "aws_sdk_lambda.types.function_configuration.FunctionConfiguration":
|
|
2475
|
+
"""<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>
|
|
2476
|
+
|
|
2477
|
+
Args:
|
|
2478
|
+
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>
|
|
2479
|
+
role: <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
|
|
2480
|
+
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>
|
|
2481
|
+
description: <p>A description of the function.</p>
|
|
2482
|
+
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>
|
|
2483
|
+
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>
|
|
2484
|
+
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>
|
|
2485
|
+
environment: <p>Environment variables that are accessible from function code during execution.</p>
|
|
2486
|
+
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>
|
|
2487
|
+
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>
|
|
2488
|
+
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>
|
|
2489
|
+
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>
|
|
2490
|
+
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>
|
|
2491
|
+
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>
|
|
2492
|
+
file_system_configs: <p>Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.</p>
|
|
2493
|
+
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>
|
|
2494
|
+
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>
|
|
2495
|
+
snap_start: <p>The function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html\">SnapStart</a> setting.</p>
|
|
2496
|
+
logging_config: <p>The function's Amazon CloudWatch Logs configuration settings.</p>
|
|
2497
|
+
capacity_provider_config: <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
|
|
2498
|
+
durable_config: <p>Configuration settings for durable functions. Allows updating execution timeout and retention period for functions with durability enabled.</p>
|
|
2499
|
+
|
|
2500
|
+
Examples:
|
|
2501
|
+
To update a Lambda function's configuration
|
|
2502
|
+
The following example modifies the memory size to be 256 MB for the unpublished ($LATEST) version of a function named my-function.
|
|
2503
|
+
|
|
2504
|
+
>>> await client.update_function_configuration(function_name='my-function', memory_size=256, durable_config={'ExecutionTimeout': 3600, 'RetentionPeriodInDays': 45})
|
|
2505
|
+
"""
|
|
2506
|
+
|
|
2507
|
+
async def _handler(
|
|
2508
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.update_function_configuration_request.UpdateFunctionConfigurationRequest]",
|
|
2509
|
+
) -> AsyncOperationResponse[
|
|
2510
|
+
"aws_sdk_lambda.types.function_configuration.FunctionConfiguration"
|
|
2511
|
+
]:
|
|
2512
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.update_function_configuration
|
|
2513
|
+
|
|
2514
|
+
(
|
|
2515
|
+
output,
|
|
2516
|
+
http_response,
|
|
2517
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.update_function_configuration.async_update_function_configuration(
|
|
2518
|
+
req.options, req.input
|
|
2519
|
+
)
|
|
2520
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
2521
|
+
|
|
2522
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
2523
|
+
input: aws_sdk_lambda.types.update_function_configuration_request.UpdateFunctionConfigurationRequest = {} # type: ignore[typeddict-item]
|
|
2524
|
+
input["function_name"] = function_name
|
|
2525
|
+
if role is not None:
|
|
2526
|
+
input["role"] = role
|
|
2527
|
+
if handler is not None:
|
|
2528
|
+
input["handler"] = handler
|
|
2529
|
+
if description is not None:
|
|
2530
|
+
input["description"] = description
|
|
2531
|
+
if timeout is not None:
|
|
2532
|
+
input["timeout"] = timeout
|
|
2533
|
+
if memory_size is not None:
|
|
2534
|
+
input["memory_size"] = memory_size
|
|
2535
|
+
if vpc_config is not None:
|
|
2536
|
+
input["vpc_config"] = vpc_config
|
|
2537
|
+
if environment is not None:
|
|
2538
|
+
input["environment"] = environment
|
|
2539
|
+
if runtime is not None:
|
|
2540
|
+
input["runtime"] = runtime
|
|
2541
|
+
if dead_letter_config is not None:
|
|
2542
|
+
input["dead_letter_config"] = dead_letter_config
|
|
2543
|
+
if kms_key_arn is not None:
|
|
2544
|
+
input["kms_key_arn"] = kms_key_arn
|
|
2545
|
+
if tracing_config is not None:
|
|
2546
|
+
input["tracing_config"] = tracing_config
|
|
2547
|
+
if revision_id is not None:
|
|
2548
|
+
input["revision_id"] = revision_id
|
|
2549
|
+
if layers is not None:
|
|
2550
|
+
input["layers"] = layers
|
|
2551
|
+
if file_system_configs is not None:
|
|
2552
|
+
input["file_system_configs"] = file_system_configs
|
|
2553
|
+
if image_config is not None:
|
|
2554
|
+
input["image_config"] = image_config
|
|
2555
|
+
if ephemeral_storage is not None:
|
|
2556
|
+
input["ephemeral_storage"] = ephemeral_storage
|
|
2557
|
+
if snap_start is not None:
|
|
2558
|
+
input["snap_start"] = snap_start
|
|
2559
|
+
if logging_config is not None:
|
|
2560
|
+
input["logging_config"] = logging_config
|
|
2561
|
+
if capacity_provider_config is not None:
|
|
2562
|
+
input["capacity_provider_config"] = capacity_provider_config
|
|
2563
|
+
if durable_config is not None:
|
|
2564
|
+
input["durable_config"] = durable_config
|
|
2565
|
+
|
|
2566
|
+
response = await aexecute_pipeline(
|
|
2567
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
2568
|
+
handler=_handler,
|
|
2569
|
+
interceptors=list(interceptors_),
|
|
2570
|
+
)
|
|
2571
|
+
return response.output
|
|
2572
|
+
|
|
2573
|
+
async def update_function_url_config(
|
|
2574
|
+
self,
|
|
2575
|
+
function_name: "aws_sdk_lambda.types.function_name.FunctionName",
|
|
2576
|
+
*,
|
|
2577
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
2578
|
+
qualifier: Optional[
|
|
2579
|
+
"aws_sdk_lambda.types.function_url_qualifier.FunctionUrlQualifier"
|
|
2580
|
+
] = None,
|
|
2581
|
+
auth_type: Optional[
|
|
2582
|
+
"aws_sdk_lambda.types.function_url_auth_type.FunctionUrlAuthType"
|
|
2583
|
+
] = None,
|
|
2584
|
+
cors: Optional["aws_sdk_lambda.types.cors.Cors"] = None,
|
|
2585
|
+
invoke_mode: Optional["aws_sdk_lambda.types.invoke_mode.InvokeMode"] = None,
|
|
2586
|
+
) -> "aws_sdk_lambda.types.update_function_url_config_response.UpdateFunctionUrlConfigResponse":
|
|
2587
|
+
"""<p>Updates the configuration for a Lambda function URL.</p>
|
|
2588
|
+
|
|
2589
|
+
Args:
|
|
2590
|
+
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>
|
|
2591
|
+
qualifier: <p>The alias name.</p>
|
|
2592
|
+
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>
|
|
2593
|
+
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>
|
|
2594
|
+
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>
|
|
2595
|
+
"""
|
|
2596
|
+
|
|
2597
|
+
async def _handler(
|
|
2598
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.update_function_url_config_request.UpdateFunctionUrlConfigRequest]",
|
|
2599
|
+
) -> AsyncOperationResponse[
|
|
2600
|
+
"aws_sdk_lambda.types.update_function_url_config_response.UpdateFunctionUrlConfigResponse"
|
|
2601
|
+
]:
|
|
2602
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.update_function_url_config
|
|
2603
|
+
|
|
2604
|
+
(
|
|
2605
|
+
output,
|
|
2606
|
+
http_response,
|
|
2607
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.update_function_url_config.async_update_function_url_config(
|
|
2608
|
+
req.options, req.input
|
|
2609
|
+
)
|
|
2610
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
2611
|
+
|
|
2612
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
2613
|
+
input: aws_sdk_lambda.types.update_function_url_config_request.UpdateFunctionUrlConfigRequest = {} # type: ignore[typeddict-item]
|
|
2614
|
+
input["function_name"] = function_name
|
|
2615
|
+
if qualifier is not None:
|
|
2616
|
+
input["qualifier"] = qualifier
|
|
2617
|
+
if auth_type is not None:
|
|
2618
|
+
input["auth_type"] = auth_type
|
|
2619
|
+
if cors is not None:
|
|
2620
|
+
input["cors"] = cors
|
|
2621
|
+
if invoke_mode is not None:
|
|
2622
|
+
input["invoke_mode"] = invoke_mode
|
|
2623
|
+
|
|
2624
|
+
response = await aexecute_pipeline(
|
|
2625
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
2626
|
+
handler=_handler,
|
|
2627
|
+
interceptors=list(interceptors_),
|
|
2628
|
+
)
|
|
2629
|
+
return response.output
|
|
2630
|
+
|
|
2631
|
+
async def delete_function_code_signing_config(
|
|
2632
|
+
self,
|
|
2633
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
2634
|
+
*,
|
|
2635
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
2636
|
+
) -> None:
|
|
2637
|
+
"""<p>Removes the code signing configuration from the function.</p>
|
|
2638
|
+
|
|
2639
|
+
Args:
|
|
2640
|
+
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>
|
|
2641
|
+
"""
|
|
2642
|
+
|
|
2643
|
+
async def _handler(
|
|
2644
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.delete_function_code_signing_config_request.DeleteFunctionCodeSigningConfigRequest]",
|
|
2645
|
+
) -> AsyncOperationResponse[None]:
|
|
2646
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.delete_function_code_signing_config
|
|
2647
|
+
|
|
2648
|
+
(
|
|
2649
|
+
output,
|
|
2650
|
+
http_response,
|
|
2651
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.delete_function_code_signing_config.async_delete_function_code_signing_config(
|
|
2652
|
+
req.options, req.input
|
|
2653
|
+
)
|
|
2654
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
2655
|
+
|
|
2656
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
2657
|
+
input: aws_sdk_lambda.types.delete_function_code_signing_config_request.DeleteFunctionCodeSigningConfigRequest = {} # type: ignore[typeddict-item]
|
|
2658
|
+
input["function_name"] = function_name
|
|
2659
|
+
|
|
2660
|
+
response = await aexecute_pipeline(
|
|
2661
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
2662
|
+
handler=_handler,
|
|
2663
|
+
interceptors=list(interceptors_),
|
|
2664
|
+
)
|
|
2665
|
+
return response.output
|
|
2666
|
+
|
|
2667
|
+
async def get_function(
|
|
2668
|
+
self,
|
|
2669
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
2670
|
+
*,
|
|
2671
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
2672
|
+
qualifier: Optional[
|
|
2673
|
+
"aws_sdk_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
|
|
2674
|
+
] = None,
|
|
2675
|
+
) -> "aws_sdk_lambda.types.get_function_response.GetFunctionResponse":
|
|
2676
|
+
"""<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>
|
|
2677
|
+
|
|
2678
|
+
Args:
|
|
2679
|
+
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>
|
|
2680
|
+
qualifier: <p>Specify a version or alias to get details about a published version of the function.</p>
|
|
2681
|
+
|
|
2682
|
+
Examples:
|
|
2683
|
+
To get a Lambda function
|
|
2684
|
+
The following example returns code and configuration details for version 1 of a function named my-function.
|
|
2685
|
+
|
|
2686
|
+
>>> await client.get_function(function_name='my-function', qualifier='1')
|
|
2687
|
+
"""
|
|
2688
|
+
|
|
2689
|
+
async def _handler(
|
|
2690
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.get_function_request.GetFunctionRequest]",
|
|
2691
|
+
) -> AsyncOperationResponse[
|
|
2692
|
+
"aws_sdk_lambda.types.get_function_response.GetFunctionResponse"
|
|
2693
|
+
]:
|
|
2694
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.get_function
|
|
2695
|
+
|
|
2696
|
+
(
|
|
2697
|
+
output,
|
|
2698
|
+
http_response,
|
|
2699
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.get_function.async_get_function(
|
|
2700
|
+
req.options, req.input
|
|
2701
|
+
)
|
|
2702
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
2703
|
+
|
|
2704
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
2705
|
+
input: aws_sdk_lambda.types.get_function_request.GetFunctionRequest = {} # type: ignore[typeddict-item]
|
|
2706
|
+
input["function_name"] = function_name
|
|
2707
|
+
if qualifier is not None:
|
|
2708
|
+
input["qualifier"] = qualifier
|
|
2709
|
+
|
|
2710
|
+
response = await aexecute_pipeline(
|
|
2711
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
2712
|
+
handler=_handler,
|
|
2713
|
+
interceptors=list(interceptors_),
|
|
2714
|
+
)
|
|
2715
|
+
return response.output
|
|
2716
|
+
|
|
2717
|
+
async def get_function_code_signing_config(
|
|
2718
|
+
self,
|
|
2719
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
2720
|
+
*,
|
|
2721
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
2722
|
+
) -> "aws_sdk_lambda.types.get_function_code_signing_config_response.GetFunctionCodeSigningConfigResponse":
|
|
2723
|
+
"""<p>Returns the code signing configuration for the specified function.</p>
|
|
2724
|
+
|
|
2725
|
+
Args:
|
|
2726
|
+
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>
|
|
2727
|
+
"""
|
|
2728
|
+
|
|
2729
|
+
async def _handler(
|
|
2730
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.get_function_code_signing_config_request.GetFunctionCodeSigningConfigRequest]",
|
|
2731
|
+
) -> AsyncOperationResponse[
|
|
2732
|
+
"aws_sdk_lambda.types.get_function_code_signing_config_response.GetFunctionCodeSigningConfigResponse"
|
|
2733
|
+
]:
|
|
2734
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.get_function_code_signing_config
|
|
2735
|
+
|
|
2736
|
+
(
|
|
2737
|
+
output,
|
|
2738
|
+
http_response,
|
|
2739
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.get_function_code_signing_config.async_get_function_code_signing_config(
|
|
2740
|
+
req.options, req.input
|
|
2741
|
+
)
|
|
2742
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
2743
|
+
|
|
2744
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
2745
|
+
input: aws_sdk_lambda.types.get_function_code_signing_config_request.GetFunctionCodeSigningConfigRequest = {} # type: ignore[typeddict-item]
|
|
2746
|
+
input["function_name"] = function_name
|
|
2747
|
+
|
|
2748
|
+
response = await aexecute_pipeline(
|
|
2749
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
2750
|
+
handler=_handler,
|
|
2751
|
+
interceptors=list(interceptors_),
|
|
2752
|
+
)
|
|
2753
|
+
return response.output
|
|
2754
|
+
|
|
2755
|
+
async def get_function_configuration(
|
|
2756
|
+
self,
|
|
2757
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
2758
|
+
*,
|
|
2759
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
2760
|
+
qualifier: Optional[
|
|
2761
|
+
"aws_sdk_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
|
|
2762
|
+
] = None,
|
|
2763
|
+
) -> "aws_sdk_lambda.types.function_configuration.FunctionConfiguration":
|
|
2764
|
+
"""<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>
|
|
2765
|
+
|
|
2766
|
+
Args:
|
|
2767
|
+
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>
|
|
2768
|
+
qualifier: <p>Specify a version or alias to get details about a published version of the function.</p>
|
|
2769
|
+
|
|
2770
|
+
Examples:
|
|
2771
|
+
To get a Lambda function's event source mapping
|
|
2772
|
+
The following example returns and configuration details for version 1 of a function named my-function.
|
|
2773
|
+
|
|
2774
|
+
>>> await client.get_function_configuration(function_name='my-function', qualifier='1')
|
|
2775
|
+
"""
|
|
2776
|
+
|
|
2777
|
+
async def _handler(
|
|
2778
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.get_function_configuration_request.GetFunctionConfigurationRequest]",
|
|
2779
|
+
) -> AsyncOperationResponse[
|
|
2780
|
+
"aws_sdk_lambda.types.function_configuration.FunctionConfiguration"
|
|
2781
|
+
]:
|
|
2782
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.get_function_configuration
|
|
2783
|
+
|
|
2784
|
+
(
|
|
2785
|
+
output,
|
|
2786
|
+
http_response,
|
|
2787
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.get_function_configuration.async_get_function_configuration(
|
|
2788
|
+
req.options, req.input
|
|
2789
|
+
)
|
|
2790
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
2791
|
+
|
|
2792
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
2793
|
+
input: aws_sdk_lambda.types.get_function_configuration_request.GetFunctionConfigurationRequest = {} # type: ignore[typeddict-item]
|
|
2794
|
+
input["function_name"] = function_name
|
|
2795
|
+
if qualifier is not None:
|
|
2796
|
+
input["qualifier"] = qualifier
|
|
2797
|
+
|
|
2798
|
+
response = await aexecute_pipeline(
|
|
2799
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
2800
|
+
handler=_handler,
|
|
2801
|
+
interceptors=list(interceptors_),
|
|
2802
|
+
)
|
|
2803
|
+
return response.output
|
|
2804
|
+
|
|
2805
|
+
async def get_function_recursion_config(
|
|
2806
|
+
self,
|
|
2807
|
+
function_name: "aws_sdk_lambda.types.unqualified_function_name.UnqualifiedFunctionName",
|
|
2808
|
+
*,
|
|
2809
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
2810
|
+
) -> "aws_sdk_lambda.types.get_function_recursion_config_response.GetFunctionRecursionConfigResponse":
|
|
2811
|
+
"""<p>Returns your function's <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-recursion.html\">recursive loop detection</a> configuration. </p>
|
|
2812
|
+
|
|
2813
|
+
Args:
|
|
2814
|
+
function_name: <p>The name of the function.</p>
|
|
2815
|
+
"""
|
|
2816
|
+
|
|
2817
|
+
async def _handler(
|
|
2818
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.get_function_recursion_config_request.GetFunctionRecursionConfigRequest]",
|
|
2819
|
+
) -> AsyncOperationResponse[
|
|
2820
|
+
"aws_sdk_lambda.types.get_function_recursion_config_response.GetFunctionRecursionConfigResponse"
|
|
2821
|
+
]:
|
|
2822
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.get_function_recursion_config
|
|
2823
|
+
|
|
2824
|
+
(
|
|
2825
|
+
output,
|
|
2826
|
+
http_response,
|
|
2827
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.get_function_recursion_config.async_get_function_recursion_config(
|
|
2828
|
+
req.options, req.input
|
|
2829
|
+
)
|
|
2830
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
2831
|
+
|
|
2832
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
2833
|
+
input: aws_sdk_lambda.types.get_function_recursion_config_request.GetFunctionRecursionConfigRequest = {} # type: ignore[typeddict-item]
|
|
2834
|
+
input["function_name"] = function_name
|
|
2835
|
+
|
|
2836
|
+
response = await aexecute_pipeline(
|
|
2837
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
2838
|
+
handler=_handler,
|
|
2839
|
+
interceptors=list(interceptors_),
|
|
2840
|
+
)
|
|
2841
|
+
return response.output
|
|
2842
|
+
|
|
2843
|
+
async def get_function_scaling_config(
|
|
2844
|
+
self,
|
|
2845
|
+
function_name: "aws_sdk_lambda.types.unqualified_function_name.UnqualifiedFunctionName",
|
|
2846
|
+
qualifier: "aws_sdk_lambda.types.published_function_qualifier.PublishedFunctionQualifier",
|
|
2847
|
+
*,
|
|
2848
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
2849
|
+
) -> "aws_sdk_lambda.types.get_function_scaling_config_response.GetFunctionScalingConfigResponse":
|
|
2850
|
+
"""<p>Retrieves the scaling configuration for a Lambda Managed Instances function.</p>
|
|
2851
|
+
|
|
2852
|
+
Args:
|
|
2853
|
+
function_name: <p>The name or ARN of the Lambda function.</p>
|
|
2854
|
+
qualifier: <p>Specify a version or alias to get the scaling configuration for a published version of the function.</p>
|
|
2855
|
+
"""
|
|
2856
|
+
|
|
2857
|
+
async def _handler(
|
|
2858
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.get_function_scaling_config_request.GetFunctionScalingConfigRequest]",
|
|
2859
|
+
) -> AsyncOperationResponse[
|
|
2860
|
+
"aws_sdk_lambda.types.get_function_scaling_config_response.GetFunctionScalingConfigResponse"
|
|
2861
|
+
]:
|
|
2862
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.get_function_scaling_config
|
|
2863
|
+
|
|
2864
|
+
(
|
|
2865
|
+
output,
|
|
2866
|
+
http_response,
|
|
2867
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.get_function_scaling_config.async_get_function_scaling_config(
|
|
2868
|
+
req.options, req.input
|
|
2869
|
+
)
|
|
2870
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
2871
|
+
|
|
2872
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
2873
|
+
input: aws_sdk_lambda.types.get_function_scaling_config_request.GetFunctionScalingConfigRequest = {} # type: ignore[typeddict-item]
|
|
2874
|
+
input["function_name"] = function_name
|
|
2875
|
+
input["qualifier"] = qualifier
|
|
2876
|
+
|
|
2877
|
+
response = await aexecute_pipeline(
|
|
2878
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
2879
|
+
handler=_handler,
|
|
2880
|
+
interceptors=list(interceptors_),
|
|
2881
|
+
)
|
|
2882
|
+
return response.output
|
|
2883
|
+
|
|
2884
|
+
async def get_policy(
|
|
2885
|
+
self,
|
|
2886
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
2887
|
+
*,
|
|
2888
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
2889
|
+
qualifier: Optional[
|
|
2890
|
+
"aws_sdk_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
|
|
2891
|
+
] = None,
|
|
2892
|
+
) -> "aws_sdk_lambda.types.get_policy_response.GetPolicyResponse":
|
|
2893
|
+
"""<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>
|
|
2894
|
+
|
|
2895
|
+
Args:
|
|
2896
|
+
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>
|
|
2897
|
+
qualifier: <p>Specify a version or alias to get the policy for that resource.</p>
|
|
2898
|
+
|
|
2899
|
+
Examples:
|
|
2900
|
+
To retrieve a Lambda function policy
|
|
2901
|
+
The following example returns the resource-based policy for version 1 of a Lambda function named my-function.
|
|
2902
|
+
|
|
2903
|
+
>>> await client.get_policy(function_name='my-function', qualifier='1')
|
|
2904
|
+
"""
|
|
2905
|
+
|
|
2906
|
+
async def _handler(
|
|
2907
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.get_policy_request.GetPolicyRequest]",
|
|
2908
|
+
) -> AsyncOperationResponse[
|
|
2909
|
+
"aws_sdk_lambda.types.get_policy_response.GetPolicyResponse"
|
|
2910
|
+
]:
|
|
2911
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.get_policy
|
|
2912
|
+
|
|
2913
|
+
(
|
|
2914
|
+
output,
|
|
2915
|
+
http_response,
|
|
2916
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.get_policy.async_get_policy(
|
|
2917
|
+
req.options, req.input
|
|
2918
|
+
)
|
|
2919
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
2920
|
+
|
|
2921
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
2922
|
+
input: aws_sdk_lambda.types.get_policy_request.GetPolicyRequest = {} # type: ignore[typeddict-item]
|
|
2923
|
+
input["function_name"] = function_name
|
|
2924
|
+
if qualifier is not None:
|
|
2925
|
+
input["qualifier"] = qualifier
|
|
2926
|
+
|
|
2927
|
+
response = await aexecute_pipeline(
|
|
2928
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
2929
|
+
handler=_handler,
|
|
2930
|
+
interceptors=list(interceptors_),
|
|
2931
|
+
)
|
|
2932
|
+
return response.output
|
|
2933
|
+
|
|
2934
|
+
async def get_runtime_management_config(
|
|
2935
|
+
self,
|
|
2936
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
2937
|
+
*,
|
|
2938
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
2939
|
+
qualifier: Optional[
|
|
2940
|
+
"aws_sdk_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
|
|
2941
|
+
] = None,
|
|
2942
|
+
) -> "aws_sdk_lambda.types.get_runtime_management_config_response.GetRuntimeManagementConfigResponse":
|
|
2943
|
+
"""<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>
|
|
2944
|
+
|
|
2945
|
+
Args:
|
|
2946
|
+
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>
|
|
2947
|
+
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>
|
|
2948
|
+
"""
|
|
2949
|
+
|
|
2950
|
+
async def _handler(
|
|
2951
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.get_runtime_management_config_request.GetRuntimeManagementConfigRequest]",
|
|
2952
|
+
) -> AsyncOperationResponse[
|
|
2953
|
+
"aws_sdk_lambda.types.get_runtime_management_config_response.GetRuntimeManagementConfigResponse"
|
|
2954
|
+
]:
|
|
2955
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.get_runtime_management_config
|
|
2956
|
+
|
|
2957
|
+
(
|
|
2958
|
+
output,
|
|
2959
|
+
http_response,
|
|
2960
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.get_runtime_management_config.async_get_runtime_management_config(
|
|
2961
|
+
req.options, req.input
|
|
2962
|
+
)
|
|
2963
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
2964
|
+
|
|
2965
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
2966
|
+
input: aws_sdk_lambda.types.get_runtime_management_config_request.GetRuntimeManagementConfigRequest = {} # type: ignore[typeddict-item]
|
|
2967
|
+
input["function_name"] = function_name
|
|
2968
|
+
if qualifier is not None:
|
|
2969
|
+
input["qualifier"] = qualifier
|
|
2970
|
+
|
|
2971
|
+
response = await aexecute_pipeline(
|
|
2972
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
2973
|
+
handler=_handler,
|
|
2974
|
+
interceptors=list(interceptors_),
|
|
2975
|
+
)
|
|
2976
|
+
return response.output
|
|
2977
|
+
|
|
2978
|
+
async def invoke(
|
|
2979
|
+
self,
|
|
2980
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
2981
|
+
*,
|
|
2982
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
2983
|
+
invocation_type: Optional[
|
|
2984
|
+
"aws_sdk_lambda.types.invocation_type.InvocationType"
|
|
2985
|
+
] = None,
|
|
2986
|
+
log_type: Optional["aws_sdk_lambda.types.log_type.LogType"] = None,
|
|
2987
|
+
client_context: Optional["aws_sdk_lambda.types.string.String"] = None,
|
|
2988
|
+
durable_execution_name: Optional[
|
|
2989
|
+
"aws_sdk_lambda.types.durable_execution_name.DurableExecutionName"
|
|
2990
|
+
] = None,
|
|
2991
|
+
payload: Optional["aws_sdk_lambda.types.blob.Blob"] = None,
|
|
2992
|
+
qualifier: Optional[
|
|
2993
|
+
"aws_sdk_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
|
|
2994
|
+
] = None,
|
|
2995
|
+
tenant_id: Optional["aws_sdk_lambda.types.tenant_id.TenantId"] = None,
|
|
2996
|
+
) -> "aws_sdk_lambda.types.invocation_response.InvocationResponse":
|
|
2997
|
+
"""<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>
|
|
2998
|
+
|
|
2999
|
+
Args:
|
|
3000
|
+
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>
|
|
3001
|
+
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>
|
|
3002
|
+
log_type: <p>Set to <code>Tail</code> to include the execution log in the response. Applies to synchronously invoked functions only.</p>
|
|
3003
|
+
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>
|
|
3004
|
+
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>
|
|
3005
|
+
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>
|
|
3006
|
+
qualifier: <p>Specify a version or alias to invoke a published version of the function.</p>
|
|
3007
|
+
tenant_id: <p>The identifier of the tenant in a multi-tenant Lambda function.</p>
|
|
3008
|
+
|
|
3009
|
+
Examples:
|
|
3010
|
+
To invoke a Lambda function
|
|
3011
|
+
The following example invokes version 1 of a function named my-function with an empty event payload.
|
|
3012
|
+
|
|
3013
|
+
>>> await client.invoke(function_name='my-function', invocation_type='Event', durable_execution_name='myExecution', payload='{}', qualifier='1')
|
|
3014
|
+
To invoke a Lambda function asynchronously
|
|
3015
|
+
The following example invokes version 1 of a function named my-function asynchronously.
|
|
3016
|
+
|
|
3017
|
+
>>> await client.invoke(function_name='my-function', payload='{}', invocation_type='Event', qualifier='1')
|
|
3018
|
+
"""
|
|
3019
|
+
|
|
3020
|
+
async def _handler(
|
|
3021
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.invocation_request.InvocationRequest]",
|
|
3022
|
+
) -> AsyncOperationResponse[
|
|
3023
|
+
"aws_sdk_lambda.types.invocation_response.InvocationResponse"
|
|
3024
|
+
]:
|
|
3025
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.invoke
|
|
3026
|
+
|
|
3027
|
+
(
|
|
3028
|
+
output,
|
|
3029
|
+
http_response,
|
|
3030
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.invoke.async_invoke(
|
|
3031
|
+
req.options, req.input
|
|
3032
|
+
)
|
|
3033
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
3034
|
+
|
|
3035
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
3036
|
+
input: aws_sdk_lambda.types.invocation_request.InvocationRequest = {} # type: ignore[typeddict-item]
|
|
3037
|
+
input["function_name"] = function_name
|
|
3038
|
+
if invocation_type is not None:
|
|
3039
|
+
input["invocation_type"] = invocation_type
|
|
3040
|
+
if log_type is not None:
|
|
3041
|
+
input["log_type"] = log_type
|
|
3042
|
+
if client_context is not None:
|
|
3043
|
+
input["client_context"] = client_context
|
|
3044
|
+
if durable_execution_name is not None:
|
|
3045
|
+
input["durable_execution_name"] = durable_execution_name
|
|
3046
|
+
if payload is not None:
|
|
3047
|
+
input["payload"] = payload
|
|
3048
|
+
if qualifier is not None:
|
|
3049
|
+
input["qualifier"] = qualifier
|
|
3050
|
+
if tenant_id is not None:
|
|
3051
|
+
input["tenant_id"] = tenant_id
|
|
3052
|
+
|
|
3053
|
+
response = await aexecute_pipeline(
|
|
3054
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
3055
|
+
handler=_handler,
|
|
3056
|
+
interceptors=list(interceptors_),
|
|
3057
|
+
)
|
|
3058
|
+
return response.output
|
|
3059
|
+
|
|
3060
|
+
async def invoke_async(
|
|
3061
|
+
self,
|
|
3062
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
3063
|
+
invoke_args: AsyncIterator[bytes] | bytes,
|
|
3064
|
+
*,
|
|
3065
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
3066
|
+
) -> "aws_sdk_lambda.types.invoke_async_response.InvokeAsyncResponse":
|
|
3067
|
+
"""<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>
|
|
3068
|
+
|
|
3069
|
+
Args:
|
|
3070
|
+
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>
|
|
3071
|
+
invoke_args: <p>The JSON that you want to provide to your Lambda function as input.</p>
|
|
3072
|
+
|
|
3073
|
+
Examples:
|
|
3074
|
+
To invoke a Lambda function asynchronously
|
|
3075
|
+
The following example invokes a Lambda function asynchronously
|
|
3076
|
+
|
|
3077
|
+
>>> await client.invoke_async(function_name='my-function', invoke_args='{}')
|
|
3078
|
+
"""
|
|
3079
|
+
|
|
3080
|
+
async def _handler(
|
|
3081
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.invoke_async_request.InvokeAsyncRequest]",
|
|
3082
|
+
) -> AsyncOperationResponse[
|
|
3083
|
+
"aws_sdk_lambda.types.invoke_async_response.InvokeAsyncResponse"
|
|
3084
|
+
]:
|
|
3085
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.invoke_async
|
|
3086
|
+
|
|
3087
|
+
(
|
|
3088
|
+
output,
|
|
3089
|
+
http_response,
|
|
3090
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.invoke_async.async_invoke_async(
|
|
3091
|
+
req.options, req.input
|
|
3092
|
+
)
|
|
3093
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
3094
|
+
|
|
3095
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
3096
|
+
input: aws_sdk_lambda.types.invoke_async_request.InvokeAsyncRequest = {} # type: ignore[typeddict-item]
|
|
3097
|
+
input["function_name"] = function_name
|
|
3098
|
+
input["invoke_args"] = ensure_async_iterator(invoke_args) # type: ignore
|
|
3099
|
+
|
|
3100
|
+
response = await aexecute_pipeline(
|
|
3101
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
3102
|
+
handler=_handler,
|
|
3103
|
+
interceptors=list(interceptors_),
|
|
3104
|
+
)
|
|
3105
|
+
return response.output
|
|
3106
|
+
|
|
3107
|
+
async def invoke_with_response_stream(
|
|
3108
|
+
self,
|
|
3109
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
3110
|
+
*,
|
|
3111
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
3112
|
+
invocation_type: Optional[
|
|
3113
|
+
"aws_sdk_lambda.types.response_streaming_invocation_type.ResponseStreamingInvocationType"
|
|
3114
|
+
] = None,
|
|
3115
|
+
log_type: Optional["aws_sdk_lambda.types.log_type.LogType"] = None,
|
|
3116
|
+
client_context: Optional["aws_sdk_lambda.types.string.String"] = None,
|
|
3117
|
+
qualifier: Optional[
|
|
3118
|
+
"aws_sdk_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
|
|
3119
|
+
] = None,
|
|
3120
|
+
payload: Optional["aws_sdk_lambda.types.blob.Blob"] = None,
|
|
3121
|
+
tenant_id: Optional["aws_sdk_lambda.types.tenant_id.TenantId"] = None,
|
|
3122
|
+
) -> "aws_sdk_lambda.types.invoke_with_response_stream_response.InvokeWithResponseStreamResponse":
|
|
3123
|
+
"""<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>
|
|
3124
|
+
|
|
3125
|
+
Args:
|
|
3126
|
+
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>
|
|
3127
|
+
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>
|
|
3128
|
+
log_type: <p>Set to <code>Tail</code> to include the execution log in the response. Applies to synchronously invoked functions only.</p>
|
|
3129
|
+
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>
|
|
3130
|
+
qualifier: <p>The alias name.</p>
|
|
3131
|
+
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>
|
|
3132
|
+
tenant_id: <p>The identifier of the tenant in a multi-tenant Lambda function.</p>
|
|
3133
|
+
"""
|
|
3134
|
+
|
|
3135
|
+
async def _handler(
|
|
3136
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.invoke_with_response_stream_request.InvokeWithResponseStreamRequest]",
|
|
3137
|
+
) -> AsyncOperationResponse[
|
|
3138
|
+
"aws_sdk_lambda.types.invoke_with_response_stream_response.InvokeWithResponseStreamResponse"
|
|
3139
|
+
]:
|
|
3140
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.invoke_with_response_stream
|
|
3141
|
+
|
|
3142
|
+
(
|
|
3143
|
+
output,
|
|
3144
|
+
http_response,
|
|
3145
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.invoke_with_response_stream.async_invoke_with_response_stream(
|
|
3146
|
+
req.options, req.input
|
|
3147
|
+
)
|
|
3148
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
3149
|
+
|
|
3150
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
3151
|
+
input: aws_sdk_lambda.types.invoke_with_response_stream_request.InvokeWithResponseStreamRequest = {} # type: ignore[typeddict-item]
|
|
3152
|
+
input["function_name"] = function_name
|
|
3153
|
+
if invocation_type is not None:
|
|
3154
|
+
input["invocation_type"] = invocation_type
|
|
3155
|
+
if log_type is not None:
|
|
3156
|
+
input["log_type"] = log_type
|
|
3157
|
+
if client_context is not None:
|
|
3158
|
+
input["client_context"] = client_context
|
|
3159
|
+
if qualifier is not None:
|
|
3160
|
+
input["qualifier"] = qualifier
|
|
3161
|
+
if payload is not None:
|
|
3162
|
+
input["payload"] = payload
|
|
3163
|
+
if tenant_id is not None:
|
|
3164
|
+
input["tenant_id"] = tenant_id
|
|
3165
|
+
|
|
3166
|
+
response = await aexecute_pipeline(
|
|
3167
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
3168
|
+
handler=_handler,
|
|
3169
|
+
interceptors=list(interceptors_),
|
|
3170
|
+
)
|
|
3171
|
+
return response.output
|
|
3172
|
+
|
|
3173
|
+
async def put_function_code_signing_config(
|
|
3174
|
+
self,
|
|
3175
|
+
code_signing_config_arn: "aws_sdk_lambda.types.code_signing_config_arn.CodeSigningConfigArn",
|
|
3176
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
3177
|
+
*,
|
|
3178
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
3179
|
+
) -> "aws_sdk_lambda.types.put_function_code_signing_config_response.PutFunctionCodeSigningConfigResponse":
|
|
3180
|
+
"""<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>
|
|
3181
|
+
|
|
3182
|
+
Args:
|
|
3183
|
+
code_signing_config_arn: <p>The The Amazon Resource Name (ARN) of the code signing configuration.</p>
|
|
3184
|
+
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>
|
|
3185
|
+
"""
|
|
3186
|
+
|
|
3187
|
+
async def _handler(
|
|
3188
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.put_function_code_signing_config_request.PutFunctionCodeSigningConfigRequest]",
|
|
3189
|
+
) -> AsyncOperationResponse[
|
|
3190
|
+
"aws_sdk_lambda.types.put_function_code_signing_config_response.PutFunctionCodeSigningConfigResponse"
|
|
3191
|
+
]:
|
|
3192
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.put_function_code_signing_config
|
|
3193
|
+
|
|
3194
|
+
(
|
|
3195
|
+
output,
|
|
3196
|
+
http_response,
|
|
3197
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.put_function_code_signing_config.async_put_function_code_signing_config(
|
|
3198
|
+
req.options, req.input
|
|
3199
|
+
)
|
|
3200
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
3201
|
+
|
|
3202
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
3203
|
+
input: aws_sdk_lambda.types.put_function_code_signing_config_request.PutFunctionCodeSigningConfigRequest = {} # type: ignore[typeddict-item]
|
|
3204
|
+
input["code_signing_config_arn"] = code_signing_config_arn
|
|
3205
|
+
input["function_name"] = function_name
|
|
3206
|
+
|
|
3207
|
+
response = await aexecute_pipeline(
|
|
3208
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
3209
|
+
handler=_handler,
|
|
3210
|
+
interceptors=list(interceptors_),
|
|
3211
|
+
)
|
|
3212
|
+
return response.output
|
|
3213
|
+
|
|
3214
|
+
async def put_function_recursion_config(
|
|
3215
|
+
self,
|
|
3216
|
+
function_name: "aws_sdk_lambda.types.unqualified_function_name.UnqualifiedFunctionName",
|
|
3217
|
+
recursive_loop: "aws_sdk_lambda.types.recursive_loop.RecursiveLoop",
|
|
3218
|
+
*,
|
|
3219
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
3220
|
+
) -> "aws_sdk_lambda.types.put_function_recursion_config_response.PutFunctionRecursionConfigResponse":
|
|
3221
|
+
"""<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>
|
|
3222
|
+
|
|
3223
|
+
Args:
|
|
3224
|
+
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>
|
|
3225
|
+
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>
|
|
3226
|
+
"""
|
|
3227
|
+
|
|
3228
|
+
async def _handler(
|
|
3229
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.put_function_recursion_config_request.PutFunctionRecursionConfigRequest]",
|
|
3230
|
+
) -> AsyncOperationResponse[
|
|
3231
|
+
"aws_sdk_lambda.types.put_function_recursion_config_response.PutFunctionRecursionConfigResponse"
|
|
3232
|
+
]:
|
|
3233
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.put_function_recursion_config
|
|
3234
|
+
|
|
3235
|
+
(
|
|
3236
|
+
output,
|
|
3237
|
+
http_response,
|
|
3238
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.put_function_recursion_config.async_put_function_recursion_config(
|
|
3239
|
+
req.options, req.input
|
|
3240
|
+
)
|
|
3241
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
3242
|
+
|
|
3243
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
3244
|
+
input: aws_sdk_lambda.types.put_function_recursion_config_request.PutFunctionRecursionConfigRequest = {} # type: ignore[typeddict-item]
|
|
3245
|
+
input["function_name"] = function_name
|
|
3246
|
+
input["recursive_loop"] = recursive_loop
|
|
3247
|
+
|
|
3248
|
+
response = await aexecute_pipeline(
|
|
3249
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
3250
|
+
handler=_handler,
|
|
3251
|
+
interceptors=list(interceptors_),
|
|
3252
|
+
)
|
|
3253
|
+
return response.output
|
|
3254
|
+
|
|
3255
|
+
async def put_function_scaling_config(
|
|
3256
|
+
self,
|
|
3257
|
+
function_name: "aws_sdk_lambda.types.unqualified_function_name.UnqualifiedFunctionName",
|
|
3258
|
+
qualifier: "aws_sdk_lambda.types.published_function_qualifier.PublishedFunctionQualifier",
|
|
3259
|
+
*,
|
|
3260
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
3261
|
+
function_scaling_config: Optional[
|
|
3262
|
+
"aws_sdk_lambda.types.function_scaling_config.FunctionScalingConfig"
|
|
3263
|
+
] = None,
|
|
3264
|
+
) -> "aws_sdk_lambda.types.put_function_scaling_config_response.PutFunctionScalingConfigResponse":
|
|
3265
|
+
"""<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>
|
|
3266
|
+
|
|
3267
|
+
Args:
|
|
3268
|
+
function_name: <p>The name or ARN of the Lambda function.</p>
|
|
3269
|
+
qualifier: <p>Specify a version or alias to set the scaling configuration for a published version of the function.</p>
|
|
3270
|
+
function_scaling_config: <p>The scaling configuration to apply to the function, including minimum and maximum execution environment limits.</p>
|
|
3271
|
+
"""
|
|
3272
|
+
|
|
3273
|
+
async def _handler(
|
|
3274
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.put_function_scaling_config_request.PutFunctionScalingConfigRequest]",
|
|
3275
|
+
) -> AsyncOperationResponse[
|
|
3276
|
+
"aws_sdk_lambda.types.put_function_scaling_config_response.PutFunctionScalingConfigResponse"
|
|
3277
|
+
]:
|
|
3278
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.put_function_scaling_config
|
|
3279
|
+
|
|
3280
|
+
(
|
|
3281
|
+
output,
|
|
3282
|
+
http_response,
|
|
3283
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.put_function_scaling_config.async_put_function_scaling_config(
|
|
3284
|
+
req.options, req.input
|
|
3285
|
+
)
|
|
3286
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
3287
|
+
|
|
3288
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
3289
|
+
input: aws_sdk_lambda.types.put_function_scaling_config_request.PutFunctionScalingConfigRequest = {} # type: ignore[typeddict-item]
|
|
3290
|
+
input["function_name"] = function_name
|
|
3291
|
+
input["qualifier"] = qualifier
|
|
3292
|
+
if function_scaling_config is not None:
|
|
3293
|
+
input["function_scaling_config"] = function_scaling_config
|
|
3294
|
+
|
|
3295
|
+
response = await aexecute_pipeline(
|
|
3296
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
3297
|
+
handler=_handler,
|
|
3298
|
+
interceptors=list(interceptors_),
|
|
3299
|
+
)
|
|
3300
|
+
return response.output
|
|
3301
|
+
|
|
3302
|
+
async def put_runtime_management_config(
|
|
3303
|
+
self,
|
|
3304
|
+
function_name: "aws_sdk_lambda.types.namespaced_function_name.NamespacedFunctionName",
|
|
3305
|
+
update_runtime_on: "aws_sdk_lambda.types.update_runtime_on.UpdateRuntimeOn",
|
|
3306
|
+
*,
|
|
3307
|
+
config_overrides: Optional[AsyncLambdaClientConfig] = None,
|
|
3308
|
+
qualifier: Optional[
|
|
3309
|
+
"aws_sdk_lambda.types.numeric_latest_published_or_alias_qualifier.NumericLatestPublishedOrAliasQualifier"
|
|
3310
|
+
] = None,
|
|
3311
|
+
runtime_version_arn: Optional[
|
|
3312
|
+
"aws_sdk_lambda.types.runtime_version_arn.RuntimeVersionArn"
|
|
3313
|
+
] = None,
|
|
3314
|
+
) -> "aws_sdk_lambda.types.put_runtime_management_config_response.PutRuntimeManagementConfigResponse":
|
|
3315
|
+
"""<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>
|
|
3316
|
+
|
|
3317
|
+
Args:
|
|
3318
|
+
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>
|
|
3319
|
+
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>
|
|
3320
|
+
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>
|
|
3321
|
+
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>
|
|
3322
|
+
"""
|
|
3323
|
+
|
|
3324
|
+
async def _handler(
|
|
3325
|
+
req: "AsyncOperationRequest[aws_sdk_lambda.types.put_runtime_management_config_request.PutRuntimeManagementConfigRequest]",
|
|
3326
|
+
) -> AsyncOperationResponse[
|
|
3327
|
+
"aws_sdk_lambda.types.put_runtime_management_config_response.PutRuntimeManagementConfigResponse"
|
|
3328
|
+
]:
|
|
3329
|
+
import aws_sdk_lambda._operations.aws_gir_api_service.put_runtime_management_config
|
|
3330
|
+
|
|
3331
|
+
(
|
|
3332
|
+
output,
|
|
3333
|
+
http_response,
|
|
3334
|
+
) = await aws_sdk_lambda._operations.aws_gir_api_service.put_runtime_management_config.async_put_runtime_management_config(
|
|
3335
|
+
req.options, req.input
|
|
3336
|
+
)
|
|
3337
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
3338
|
+
|
|
3339
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
3340
|
+
input: aws_sdk_lambda.types.put_runtime_management_config_request.PutRuntimeManagementConfigRequest = {} # type: ignore[typeddict-item]
|
|
3341
|
+
input["function_name"] = function_name
|
|
3342
|
+
if qualifier is not None:
|
|
3343
|
+
input["qualifier"] = qualifier
|
|
3344
|
+
input["update_runtime_on"] = update_runtime_on
|
|
3345
|
+
if runtime_version_arn is not None:
|
|
3346
|
+
input["runtime_version_arn"] = runtime_version_arn
|
|
3347
|
+
|
|
3348
|
+
response = await aexecute_pipeline(
|
|
3349
|
+
AsyncOperationRequest(input=input, options=options_),
|
|
3350
|
+
handler=_handler,
|
|
3351
|
+
interceptors=list(interceptors_),
|
|
3352
|
+
)
|
|
3353
|
+
return response.output
|