Returns a URL that you can use to access the application UIs for a specified resource, such as a session.
For resources in a running state, the application UI is a live user interface such as the Spark web UI. For terminated resources, the application UI is a persistent application user interface such as the Spark History Server.
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 that the resource belongs to.
-
resource_id
(ResourceId)
–
-
resource_type
(ResourceType)
–
The type of resource to access the dashboard for. Currently, only Session is supported.
-
access_system_profile_logs
(Optional[bool], default:
None
)
–
Allows access to system profile logs for Lake Formation-enabled sessions. Default is false.
Raises:
Source code in docs_src/capo_emr_serverless/_services/async_emr_serverless.py
| async def get_resource_dashboard(
self,
application_id: "capo_emr_serverless.types.application_id.ApplicationId",
resource_id: "capo_emr_serverless.types.resource_id.ResourceId",
resource_type: "capo_emr_serverless.types.resource_type.ResourceType",
*,
config_overrides: Optional[AsyncEMRServerlessClientConfig] = None,
access_system_profile_logs: Optional[bool] = None,
) -> "capo_emr_serverless.types.get_resource_dashboard_response.GetResourceDashboardResponse":
"""<p>Returns a URL that you can use to access the application UIs for a specified resource, such as a session.</p> <p>For resources in a running state, the application UI is a live user interface such as the Spark web UI. For terminated resources, the application UI is a persistent application user interface such as the Spark History Server.</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 that the resource belongs to.</p>
resource_id: <p>The ID of the resource.</p>
resource_type: <p>The type of resource to access the dashboard for. Currently, only <code>Session</code> is supported.</p>
access_system_profile_logs: <p>Allows access to system profile logs for Lake Formation-enabled sessions. 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_resource_dashboard_request.GetResourceDashboardRequest]",
) -> AsyncOperationResponse[
"capo_emr_serverless.types.get_resource_dashboard_response.GetResourceDashboardResponse"
]:
import capo_emr_serverless._operations.aws_toledo_web_service.get_resource_dashboard
(
output,
http_response,
) = await capo_emr_serverless._operations.aws_toledo_web_service.get_resource_dashboard.async_get_resource_dashboard(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetResourceDashboard")
)
input_: capo_emr_serverless.types.get_resource_dashboard_request.GetResourceDashboardRequest = {
"application_id": application_id,
"resource_id": resource_id,
"resource_type": resource_type,
}
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
|