Skip to content

get_durable_execution async

get_durable_execution(
    durable_execution_arn: DurableExecutionArn,
    *,
    config_overrides: Optional[AsyncLambdaClientConfig] = None,
    include_execution_data: Optional[IncludeExecutionData] = None,
) -> GetDurableExecutionResponse

Retrieves detailed information about a specific durable execution, including its current status, input payload, result or error information, and execution metadata such as start time and usage statistics.

Parameters:

  • durable_execution_arn (DurableExecutionArn) –

    The Amazon Resource Name (ARN) of the durable execution.

  • include_execution_data (Optional[IncludeExecutionData], default: None ) –

    Specifies whether to include execution data such as input payload, result, and error information in the response. Set to false for a more compact response that includes only execution metadata. The default value is set to true.

Raises:

  • 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/async__lambda.py
async def get_durable_execution(
    self,
    durable_execution_arn: "capo_lambda.types.durable_execution_arn.DurableExecutionArn",
    *,
    config_overrides: Optional[AsyncLambdaClientConfig] = None,
    include_execution_data: Optional[
        "capo_lambda.types.include_execution_data.IncludeExecutionData"
    ] = None,
) -> "capo_lambda.types.get_durable_execution_response.GetDurableExecutionResponse":
    """<p>Retrieves detailed information about a specific <a href="https://docs.aws.amazon.com/lambda/latest/dg/durable-functions.html">durable execution</a>, including its current status, input payload, result or error information, and execution metadata such as start time and usage statistics.</p>

    Args:
        durable_execution_arn: <p>The Amazon Resource Name (ARN) of the durable execution.</p>
        include_execution_data: <p>Specifies whether to include execution data such as input payload, result, and error information in the response. Set to <code>false</code> for a more compact response that includes only execution metadata. The default value is set to <code>true</code>.</p>

    Raises:
        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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_lambda.types.get_durable_execution_request.GetDurableExecutionRequest]",
    ) -> AsyncOperationResponse[
        "capo_lambda.types.get_durable_execution_response.GetDurableExecutionResponse"
    ]:
        import capo_lambda._operations.aws_gir_api_service.get_durable_execution

        (
            output,
            http_response,
        ) = await capo_lambda._operations.aws_gir_api_service.get_durable_execution.async_get_durable_execution(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_lambda.types.get_durable_execution_response.GetDurableExecutionResponse",
    ) -> dict[str, Any]:
        import capo_lambda.types.get_durable_execution_response

        return capo_lambda.types.get_durable_execution_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetDurableExecution", redact_output=_redact_output),
    )
    input_: capo_lambda.types.get_durable_execution_request.GetDurableExecutionRequest = {
        "durable_execution_arn": durable_execution_arn
    }
    if include_execution_data is not None:
        input_["include_execution_data"] = include_execution_data

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output