Returns the state of a query previously submitted. Clients are expected to poll GetQueryState to monitor the current state of the planning before retrieving the work units. A query state is only visible to the principal that made the initial call to StartQueryPlanning.
Parameters:
Raises:
Source code in docs_src/capo_lakeformation/_services/async_lake_formation.py
| async def get_query_state(
self,
query_id: "capo_lakeformation.types.get_query_state_request_query_id_string.GetQueryStateRequestQueryIdString",
*,
config_overrides: Optional[AsyncLakeFormationClientConfig] = None,
) -> "capo_lakeformation.types.get_query_state_response.GetQueryStateResponse":
"""<p>Returns the state of a query previously submitted. Clients are expected to poll <code>GetQueryState</code> to monitor the current state of the planning before retrieving the work units. A query state is only visible to the principal that made the initial call to <code>StartQueryPlanning</code>.</p>
Args:
query_id: <p>The ID of the plan query operation.</p>
Raises:
capo_lakeformation.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
capo_lakeformation.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
capo_lakeformation.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
capo_lakeformation.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_lakeformation.types.get_query_state_request.GetQueryStateRequest]",
) -> AsyncOperationResponse[
"capo_lakeformation.types.get_query_state_response.GetQueryStateResponse"
]:
import capo_lakeformation._operations.aws_lake_formation.get_query_state
(
output,
http_response,
) = await capo_lakeformation._operations.aws_lake_formation.get_query_state.async_get_query_state(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetQueryState")
)
input_: capo_lakeformation.types.get_query_state_request.GetQueryStateRequest = {
"query_id": query_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|