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/lake_formation.py
| def get_query_state(
self,
query_id: "capo_lakeformation.types.get_query_state_request_query_id_string.GetQueryStateRequestQueryIdString",
*,
config_overrides: Optional[LakeFormationClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_lakeformation.types.get_query_state_request.GetQueryStateRequest]",
) -> OperationResponse[
"capo_lakeformation.types.get_query_state_response.GetQueryStateResponse"
]:
import capo_lakeformation._operations.aws_lake_formation.get_query_state
output, http_response = (
capo_lakeformation._operations.aws_lake_formation.get_query_state.get_query_state(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|