Skip to content

get_workflow_run async

get_workflow_run(
    workflow_arn: WorkflowArn,
    run_id: IdString,
    *,
    config_overrides: Optional[AsyncMWAAServerlessClientConfig] = None,
) -> GetWorkflowRunResponse

Retrieves detailed information about a specific workflow run, including its status, execution details, and task instances.

Parameters:

  • workflow_arn (WorkflowArn) –

    The Amazon Resource Name (ARN) of the workflow that contains the run.

  • run_id (IdString) –

    The unique identifier of the workflow run to retrieve.

Raises:

  • AccessDeniedException –

    You do not have sufficient permission to perform this action.

  • InternalServerException –

    An unexpected server-side error occurred during request processing.

  • OperationTimeoutException –

    The operation timed out.

  • ResourceNotFoundException –

    The specified resource was not found. You can only access or modify a resource that already exists.

  • ThrottlingException –

    The request was denied because too many requests were made in a short period, exceeding the service rate limits. Amazon Managed Workflows for Apache Airflow Serverless implements throttling controls to ensure fair resource allocation across all customers in the multi-tenant environment. This helps maintain service stability and performance. If you encounter throttling, implement exponential backoff and retry logic in your applications, or consider distributing your API calls over a longer time period.

  • ValidationException –

    The specified request parameters are invalid, missing, or inconsistent with Amazon Managed Workflows for Apache Airflow Serverless service requirements. This can occur when workflow definitions contain unsupported operators, when required IAM permissions are missing, when S3 locations are inaccessible, or when network configurations are invalid. The service validates workflow definitions, execution roles, and resource configurations to ensure compatibility with the managed Airflow environment and security requirements.

  • UnknownServiceError –

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

Source code in docs_src/capo_mwaa_serverless/_services/async_mwaa_serverless.py
async def get_workflow_run(
    self,
    workflow_arn: "capo_mwaa_serverless.types.workflow_arn.WorkflowArn",
    run_id: "capo_mwaa_serverless.types.id_string.IdString",
    *,
    config_overrides: Optional[AsyncMWAAServerlessClientConfig] = None,
) -> "capo_mwaa_serverless.types.get_workflow_run_response.GetWorkflowRunResponse":
    """<p>Retrieves detailed information about a specific workflow run, including its status, execution details, and task instances.</p>

    Args:
        workflow_arn: <p>The Amazon Resource Name (ARN) of the workflow that contains the run.</p>
        run_id: <p>The unique identifier of the workflow run to retrieve.</p>

    Raises:
        capo_mwaa_serverless.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permission to perform this action.</p>
        capo_mwaa_serverless.errors.internal_server_exception.InternalServerException: <p>An unexpected server-side error occurred during request processing.</p>
        capo_mwaa_serverless.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_mwaa_serverless.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. You can only access or modify a resource that already exists.</p>
        capo_mwaa_serverless.errors.throttling_exception.ThrottlingException: <p>The request was denied because too many requests were made in a short period, exceeding the service rate limits. Amazon Managed Workflows for Apache Airflow Serverless implements throttling controls to ensure fair resource allocation across all customers in the multi-tenant environment. This helps maintain service stability and performance. If you encounter throttling, implement exponential backoff and retry logic in your applications, or consider distributing your API calls over a longer time period.</p>
        capo_mwaa_serverless.errors.validation_exception.ValidationException: <p>The specified request parameters are invalid, missing, or inconsistent with Amazon Managed Workflows for Apache Airflow Serverless service requirements. This can occur when workflow definitions contain unsupported operators, when required IAM permissions are missing, when S3 locations are inaccessible, or when network configurations are invalid. The service validates workflow definitions, execution roles, and resource configurations to ensure compatibility with the managed Airflow environment and security requirements.</p>
        capo_mwaa_serverless.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mwaa_serverless.types.get_workflow_run_request.GetWorkflowRunRequest]",
    ) -> AsyncOperationResponse[
        "capo_mwaa_serverless.types.get_workflow_run_response.GetWorkflowRunResponse"
    ]:
        import capo_mwaa_serverless._operations.amazon_mwaa_serverless.get_workflow_run

        (
            output,
            http_response,
        ) = await capo_mwaa_serverless._operations.amazon_mwaa_serverless.get_workflow_run.async_get_workflow_run(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_mwaa_serverless.types.get_workflow_run_response.GetWorkflowRunResponse",
    ) -> dict[str, Any]:
        import capo_mwaa_serverless.types.get_workflow_run_response

        return (
            capo_mwaa_serverless.types.get_workflow_run_response.redact_sensitive(
                output
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetWorkflowRun", redact_output=_redact_output),
    )
    input_: capo_mwaa_serverless.types.get_workflow_run_request.GetWorkflowRunRequest = {
        "workflow_arn": workflow_arn,
        "run_id": run_id,
    }

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