Sends a heartbeat signal for a long-running callback operation to prevent timeout. Use this API to extend the callback timeout period while the external operation is still in progress.
Parameters:
-
callback_id
(CallbackId)
–
The unique identifier for the callback operation.
Raises:
Source code in docs_src/capo_lambda/_services/async__lambda.py
| async def send_durable_execution_callback_heartbeat(
self,
callback_id: "capo_lambda.types.callback_id.CallbackId",
*,
config_overrides: Optional[AsyncLambdaClientConfig] = None,
) -> "capo_lambda.types.send_durable_execution_callback_heartbeat_response.SendDurableExecutionCallbackHeartbeatResponse":
"""<p>Sends a heartbeat signal for a long-running callback operation to prevent timeout. Use this API to extend the callback timeout period while the external operation is still in progress.</p>
Args:
callback_id: <p>The unique identifier for the callback operation.</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.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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_lambda.types.send_durable_execution_callback_heartbeat_request.SendDurableExecutionCallbackHeartbeatRequest]",
) -> AsyncOperationResponse[
"capo_lambda.types.send_durable_execution_callback_heartbeat_response.SendDurableExecutionCallbackHeartbeatResponse"
]:
import capo_lambda._operations.aws_gir_api_service.send_durable_execution_callback_heartbeat
(
output,
http_response,
) = await capo_lambda._operations.aws_gir_api_service.send_durable_execution_callback_heartbeat.async_send_durable_execution_callback_heartbeat(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("SendDurableExecutionCallbackHeartbeat")
)
input_: capo_lambda.types.send_durable_execution_callback_heartbeat_request.SendDurableExecutionCallbackHeartbeatRequest = {
"callback_id": callback_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|