Skip to content

list_statements async

list_statements(
    session_id: NameString,
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    request_origin: Optional[OrchestrationNameString] = None,
    next_token: Optional[OrchestrationToken] = None,
) -> ListStatementsResponse

Lists statements for the session.

Parameters:

Raises:

Source code in docs_src/capo_glue/_services/async_glue.py
async def list_statements(
    self,
    session_id: "capo_glue.types.name_string.NameString",
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    request_origin: Optional[
        "capo_glue.types.orchestration_name_string.OrchestrationNameString"
    ] = None,
    next_token: Optional[
        "capo_glue.types.orchestration_token.OrchestrationToken"
    ] = None,
) -> "capo_glue.types.list_statements_response.ListStatementsResponse":
    """<p>Lists statements for the session.</p>

    Args:
        session_id: <p>The Session ID of the statements.</p>
        request_origin: <p>The origin of the request to list statements.</p>
        next_token: <p>A continuation token, if this is a continuation call.</p>

    Raises:
        capo_glue.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
        capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</p>
        capo_glue.errors.illegal_session_state_exception.IllegalSessionStateException: <p>The session is in an invalid state to perform a requested operation.</p>
        capo_glue.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_glue.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_glue.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_glue.types.list_statements_request.ListStatementsRequest]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.list_statements_response.ListStatementsResponse"
    ]:
        import capo_glue._operations.aws_glue.list_statements

        (
            output,
            http_response,
        ) = await capo_glue._operations.aws_glue.list_statements.async_list_statements(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListStatements")
    )
    input_: capo_glue.types.list_statements_request.ListStatementsRequest = {
        "session_id": session_id
    }
    if request_origin is not None:
        input_["request_origin"] = request_origin
    if next_token is not None:
        input_["next_token"] = next_token

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