Skip to content

get_dashboard_for_job_run async

get_dashboard_for_job_run(
    application_id: ApplicationId,
    job_run_id: JobRunId,
    *,
    config_overrides: Optional[AsyncEMRServerlessClientConfig] = None,
    attempt: Optional[AttemptNumber] = None,
    access_system_profile_logs: Optional[bool] = None,
) -> GetDashboardForJobRunResponse

Creates and returns a URL that you can use to access the application UIs for a job run.

For jobs in a running state, the application UI is a live user interface such as the Spark or Tez web UI. For completed jobs, the application UI is a persistent application user interface such as the Spark History Server or persistent Tez UI.

The URL is valid for one hour after you generate it. To access the application UI after that hour elapses, you must invoke the API again to generate a new URL.

Parameters:

  • application_id (ApplicationId) –

    The ID of the application.

  • job_run_id (JobRunId) –

    The ID of the job run.

  • attempt (Optional[AttemptNumber], default: None ) –

    An optimal parameter that indicates the amount of attempts for the job. If not specified, this value defaults to the attempt of the latest job.

  • access_system_profile_logs (Optional[bool], default: None ) –

    Allows access to system profile logs for Lake Formation-enabled jobs. Default is false.

Raises:

Source code in docs_src/capo_emr_serverless/_services/async_emr_serverless.py
async def get_dashboard_for_job_run(
    self,
    application_id: "capo_emr_serverless.types.application_id.ApplicationId",
    job_run_id: "capo_emr_serverless.types.job_run_id.JobRunId",
    *,
    config_overrides: Optional[AsyncEMRServerlessClientConfig] = None,
    attempt: Optional[
        "capo_emr_serverless.types.attempt_number.AttemptNumber"
    ] = None,
    access_system_profile_logs: Optional[bool] = None,
) -> "capo_emr_serverless.types.get_dashboard_for_job_run_response.GetDashboardForJobRunResponse":
    """<p>Creates and returns a URL that you can use to access the application UIs for a job run.</p> <p>For jobs in a running state, the application UI is a live user interface such as the Spark or Tez web UI. For completed jobs, the application UI is a persistent application user interface such as the Spark History Server or persistent Tez UI.</p> <note> <p>The URL is valid for one hour after you generate it. To access the application UI after that hour elapses, you must invoke the API again to generate a new URL.</p> </note>

    Args:
        application_id: <p>The ID of the application.</p>
        job_run_id: <p>The ID of the job run.</p>
        attempt: <p>An optimal parameter that indicates the amount of attempts for the job. If not specified, this value defaults to the attempt of the latest job.</p>
        access_system_profile_logs: <p>Allows access to system profile logs for Lake Formation-enabled jobs. Default is false.</p>

    Raises:
        capo_emr_serverless.errors.internal_server_exception.InternalServerException: <p>Request processing failed because of an error or failure with the service.</p>
        capo_emr_serverless.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_emr_serverless.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_emr_serverless.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_emr_serverless.types.get_dashboard_for_job_run_request.GetDashboardForJobRunRequest]",
    ) -> AsyncOperationResponse[
        "capo_emr_serverless.types.get_dashboard_for_job_run_response.GetDashboardForJobRunResponse"
    ]:
        import capo_emr_serverless._operations.aws_toledo_web_service.get_dashboard_for_job_run

        (
            output,
            http_response,
        ) = await capo_emr_serverless._operations.aws_toledo_web_service.get_dashboard_for_job_run.async_get_dashboard_for_job_run(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetDashboardForJobRun")
    )
    input_: capo_emr_serverless.types.get_dashboard_for_job_run_request.GetDashboardForJobRunRequest = {
        "application_id": application_id,
        "job_run_id": job_run_id,
    }
    if attempt is not None:
        input_["attempt"] = attempt
    if access_system_profile_logs is not None:
        input_["access_system_profile_logs"] = access_system_profile_logs

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