Empties the data from a specified Neptune Analytics graph.
Parameters:
-
graph_identifier
(GraphIdentifier)
–
ID of the graph to reset.
-
skip_snapshot
(bool)
–
Determines whether a final graph snapshot is created before the graph data is deleted. If set to true, no graph snapshot is created. If set to false, a graph snapshot is created before the data is deleted.
Raises:
Source code in docs_src/capo_neptune_graph/_services/neptune_graph.py
| def reset_graph(
self,
graph_identifier: "capo_neptune_graph.types.graph_identifier.GraphIdentifier",
skip_snapshot: bool,
*,
config_overrides: Optional[NeptuneGraphClientConfig] = None,
) -> "capo_neptune_graph.types.reset_graph_output.ResetGraphOutput":
"""<p>Empties the data from a specified Neptune Analytics graph.</p>
Args:
graph_identifier: <p>ID of the graph to reset.</p>
skip_snapshot: <p>Determines whether a final graph snapshot is created before the graph data is deleted. If set to <code>true</code>, no graph snapshot is created. If set to <code>false</code>, a graph snapshot is created before the data is deleted.</p>
Raises:
capo_neptune_graph.errors.conflict_exception.ConflictException: <p>Raised when a conflict is encountered.</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.
"""
def _handler(
req: "OperationRequest[capo_neptune_graph.types.reset_graph_input.ResetGraphInput]",
) -> OperationResponse[
"capo_neptune_graph.types.reset_graph_output.ResetGraphOutput"
]:
import capo_neptune_graph._operations.amazon_neptune_graph.reset_graph
output, http_response = (
capo_neptune_graph._operations.amazon_neptune_graph.reset_graph.reset_graph(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ResetGraph")
)
input_: capo_neptune_graph.types.reset_graph_input.ResetGraphInput = {
"graph_identifier": graph_identifier,
"skip_snapshot": skip_snapshot,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|