Skip to content

get_session_endpoint

get_session_endpoint(
    application_id: ApplicationId,
    session_id: SessionId,
    *,
    config_overrides: Optional[EMRServerlessClientConfig] = None,
) -> GetSessionEndpointResponse

Returns the session endpoint URL and a time-limited authentication token for the specified session. Use the endpoint and token to connect a client to the session. Call this operation again when the authentication token expires to obtain a new token.

Parameters:

  • application_id (ApplicationId) –

    The ID of the application that the session belongs to.

  • session_id (SessionId) –

    The ID of the session.

Raises:

Source code in docs_src/capo_emr_serverless/_services/emr_serverless.py
def get_session_endpoint(
    self,
    application_id: "capo_emr_serverless.types.application_id.ApplicationId",
    session_id: "capo_emr_serverless.types.session_id.SessionId",
    *,
    config_overrides: Optional[EMRServerlessClientConfig] = None,
) -> "capo_emr_serverless.types.get_session_endpoint_response.GetSessionEndpointResponse":
    """<p>Returns the session endpoint URL and a time-limited authentication token for the specified session. Use the endpoint and token to connect a client to the session. Call this operation again when the authentication token expires to obtain a new token.</p>

    Args:
        application_id: <p>The ID of the application that the session belongs to.</p>
        session_id: <p>The ID of the session.</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.
    """

    def _handler(
        req: "OperationRequest[capo_emr_serverless.types.get_session_endpoint_request.GetSessionEndpointRequest]",
    ) -> OperationResponse[
        "capo_emr_serverless.types.get_session_endpoint_response.GetSessionEndpointResponse"
    ]:
        import capo_emr_serverless._operations.aws_toledo_web_service.get_session_endpoint

        output, http_response = (
            capo_emr_serverless._operations.aws_toledo_web_service.get_session_endpoint.get_session_endpoint(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_emr_serverless.types.get_session_endpoint_response.GetSessionEndpointResponse",
    ) -> dict[str, Any]:
        import capo_emr_serverless.types.get_session_endpoint_response

        return capo_emr_serverless.types.get_session_endpoint_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetSessionEndpoint", redact_output=_redact_output),
    )
    input_: capo_emr_serverless.types.get_session_endpoint_request.GetSessionEndpointRequest = {
        "application_id": application_id,
        "session_id": session_id,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output