Skip to content

send_durable_execution_callback_success

send_durable_execution_callback_success(
    callback_id: CallbackId,
    *,
    config_overrides: Optional[LambdaClientConfig] = None,
    result: Optional[BinaryOperationPayload] = None,
) -> SendDurableExecutionCallbackSuccessResponse

Sends a successful completion response for a callback operation in a durable execution. Use this API when an external system has successfully completed a callback operation.

Parameters:

  • callback_id (CallbackId) –

    The unique identifier for the callback operation.

  • result (Optional[BinaryOperationPayload], default: None ) –

    The result data from the successful callback operation. Maximum size is 256 KB.

Raises:

  • CallbackTimeoutException –

    The callback ID token has either expired or the callback associated with the token has already been closed.

  • InvalidParameterValueException –

    One of the parameters in the request is not valid.

  • KMSAccessDeniedException –

    Lambda couldn't decrypt the environment variables because KMS access was denied. Check the Lambda function's KMS permissions.

  • KMSDisabledException –

    Lambda couldn't decrypt the environment variables because the KMS key used is disabled. Check the Lambda function's KMS key settings.

  • KMSInvalidStateException –

    Lambda couldn't decrypt the environment variables because the state of the KMS key used is not valid for Decrypt. Check the function's KMS key settings.

  • KMSNotFoundException –

    Lambda couldn't decrypt the environment variables because the KMS key was not found. Check the function's KMS key settings.

  • ResourceNotFoundException –

    The resource specified in the request does not exist.

  • ServiceException –

    The Lambda service encountered an internal error.

  • TooManyRequestsException –

    The request throughput limit was exceeded. For more information, see Lambda quotas.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_lambda/_services/_lambda.py
def send_durable_execution_callback_success(
    self,
    callback_id: "capo_lambda.types.callback_id.CallbackId",
    *,
    config_overrides: Optional[LambdaClientConfig] = None,
    result: Optional[
        "capo_lambda.types.binary_operation_payload.BinaryOperationPayload"
    ] = None,
) -> "capo_lambda.types.send_durable_execution_callback_success_response.SendDurableExecutionCallbackSuccessResponse":
    """<p>Sends a successful completion response for a callback operation in a durable execution. Use this API when an external system has successfully completed a callback operation.</p>

    Args:
        callback_id: <p>The unique identifier for the callback operation.</p>
        result: <p>The result data from the successful callback operation. Maximum size is 256 KB.</p>

    Raises:
        capo_lambda.errors.callback_timeout_exception.CallbackTimeoutException: <p>The callback ID token has either expired or the callback associated with the token has already been closed.</p>
        capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
        capo_lambda.errors.kms_access_denied_exception.KMSAccessDeniedException: <p>Lambda couldn't decrypt the environment variables because KMS access was denied. Check the Lambda function's KMS permissions.</p>
        capo_lambda.errors.kms_disabled_exception.KMSDisabledException: <p>Lambda couldn't decrypt the environment variables because the KMS key used is disabled. Check the Lambda function's KMS key settings.</p>
        capo_lambda.errors.kms_invalid_state_exception.KMSInvalidStateException: <p>Lambda couldn't decrypt the environment variables because the state of the KMS key used is not valid for Decrypt. Check the function's KMS key settings.</p>
        capo_lambda.errors.kms_not_found_exception.KMSNotFoundException: <p>Lambda couldn't decrypt the environment variables because the KMS key was not found. Check the function's KMS key settings.</p>
        capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
        capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
        capo_lambda.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests">Lambda quotas</a>.</p>
        capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_lambda.types.send_durable_execution_callback_success_request.SendDurableExecutionCallbackSuccessRequest]",
    ) -> OperationResponse[
        "capo_lambda.types.send_durable_execution_callback_success_response.SendDurableExecutionCallbackSuccessResponse"
    ]:
        import capo_lambda._operations.aws_gir_api_service.send_durable_execution_callback_success

        output, http_response = (
            capo_lambda._operations.aws_gir_api_service.send_durable_execution_callback_success.send_durable_execution_callback_success(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_lambda.types.send_durable_execution_callback_success_request.SendDurableExecutionCallbackSuccessRequest",
    ) -> dict[str, Any]:
        import capo_lambda.types.send_durable_execution_callback_success_request

        return capo_lambda.types.send_durable_execution_callback_success_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "SendDurableExecutionCallbackSuccess", redact_input=_redact_input
        ),
    )
    input_: capo_lambda.types.send_durable_execution_callback_success_request.SendDurableExecutionCallbackSuccessRequest = {
        "callback_id": callback_id
    }
    if result is not None:
        input_["result"] = result

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output