Retrieves the status of a specified query.
When invoking this operation in a Neptune Analytics cluster, the IAM user or role making the request must have the neptune-graph:GetQueryStatus IAM action attached.
Parameters:
-
graph_identifier
(GraphIdentifier)
–
The unique identifier of the Neptune Analytics graph.
-
query_id
(str)
–
The ID of the query in question.
Raises:
Source code in docs_src/capo_neptune_graph/_services/async_neptune_graph.py
| async def get_query(
self,
graph_identifier: "capo_neptune_graph.types.graph_identifier.GraphIdentifier",
query_id: str,
*,
config_overrides: Optional[AsyncNeptuneGraphClientConfig] = None,
) -> "capo_neptune_graph.types.get_query_output.GetQueryOutput":
"""<p>Retrieves the status of a specified query.</p> <note> <p> When invoking this operation in a Neptune Analytics cluster, the IAM user or role making the request must have the <code>neptune-graph:GetQueryStatus</code> IAM action attached. </p> </note>
Args:
graph_identifier: <p>The unique identifier of the Neptune Analytics graph.</p>
query_id: <p>The ID of the query in question.</p>
Raises:
capo_neptune_graph.errors.access_denied_exception.AccessDeniedException: <p>Raised in case of an authentication or authorization failure.</p>
capo_neptune_graph.errors.internal_server_exception.InternalServerException: <p>A failure occurred on the server.</p>
capo_neptune_graph.errors.resource_not_found_exception.ResourceNotFoundException: <p>A specified resource could not be located.</p>
capo_neptune_graph.errors.throttling_exception.ThrottlingException: <p>The exception was interrupted by throttling.</p>
capo_neptune_graph.errors.validation_exception.ValidationException: <p>A resource could not be validated.</p>
capo_neptune_graph.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_neptune_graph.types.get_query_input.GetQueryInput]",
) -> AsyncOperationResponse[
"capo_neptune_graph.types.get_query_output.GetQueryOutput"
]:
import capo_neptune_graph._operations.amazon_neptune_graph.get_query
(
output,
http_response,
) = await capo_neptune_graph._operations.amazon_neptune_graph.get_query.async_get_query(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetQuery")
)
input_: capo_neptune_graph.types.get_query_input.GetQueryInput = {
"graph_identifier": graph_identifier,
"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
|