Skip to content

batch_get_query_execution async

batch_get_query_execution(
    query_execution_ids: QueryExecutionIdList,
    *,
    config_overrides: Optional[AsyncAthenaClientConfig] = None,
) -> BatchGetQueryExecutionOutput

Returns the details of a single query execution or a list of up to 50 query executions, which you provide as an array of query execution ID strings. Requires you to have access to the workgroup in which the queries ran. To get a list of query execution IDs, use ListQueryExecutionsInput$WorkGroup. Query executions differ from named (saved) queries. Use BatchGetNamedQueryInput to get details about named queries.

Parameters:

Raises:

  • InternalServerException –

    Indicates a platform issue, which may be due to a transient condition or outage.

  • InvalidRequestException –

    Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

  • UnknownServiceError –

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

Source code in docs_src/capo_athena/_services/async_athena.py
async def batch_get_query_execution(
    self,
    query_execution_ids: "capo_athena.types.query_execution_id_list.QueryExecutionIdList",
    *,
    config_overrides: Optional[AsyncAthenaClientConfig] = None,
) -> "capo_athena.types.batch_get_query_execution_output.BatchGetQueryExecutionOutput":
    """<p>Returns the details of a single query execution or a list of up to 50 query executions, which you provide as an array of query execution ID strings. Requires you to have access to the workgroup in which the queries ran. To get a list of query execution IDs, use <a>ListQueryExecutionsInput$WorkGroup</a>. Query executions differ from named (saved) queries. Use <a>BatchGetNamedQueryInput</a> to get details about named queries.</p>

    Args:
        query_execution_ids: <p>An array of query execution IDs.</p>

    Raises:
        capo_athena.errors.internal_server_exception.InternalServerException: <p>Indicates a platform issue, which may be due to a transient condition or outage.</p>
        capo_athena.errors.invalid_request_exception.InvalidRequestException: <p>Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.</p>
        capo_athena.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_athena.types.batch_get_query_execution_input.BatchGetQueryExecutionInput]",
    ) -> AsyncOperationResponse[
        "capo_athena.types.batch_get_query_execution_output.BatchGetQueryExecutionOutput"
    ]:
        import capo_athena._operations.amazon_athena.batch_get_query_execution

        (
            output,
            http_response,
        ) = await capo_athena._operations.amazon_athena.batch_get_query_execution.async_batch_get_query_execution(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchGetQueryExecution")
    )
    input_: capo_athena.types.batch_get_query_execution_input.BatchGetQueryExecutionInput = {
        "query_execution_ids": query_execution_ids
    }

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