Skip to content

delete_graph_snapshot

delete_graph_snapshot(
    snapshot_identifier: SnapshotIdentifier,
    *,
    config_overrides: Optional[NeptuneGraphClientConfig] = None,
) -> DeleteGraphSnapshotOutput

Deletes the specified graph snapshot.

Parameters:

Raises:

Source code in docs_src/capo_neptune_graph/_services/neptune_graph.py
def delete_graph_snapshot(
    self,
    snapshot_identifier: "capo_neptune_graph.types.snapshot_identifier.SnapshotIdentifier",
    *,
    config_overrides: Optional[NeptuneGraphClientConfig] = None,
) -> "capo_neptune_graph.types.delete_graph_snapshot_output.DeleteGraphSnapshotOutput":
    """<p>Deletes the specified graph snapshot.</p>

    Args:
        snapshot_identifier: <p>ID of the graph snapshot to be 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.delete_graph_snapshot_input.DeleteGraphSnapshotInput]",
    ) -> OperationResponse[
        "capo_neptune_graph.types.delete_graph_snapshot_output.DeleteGraphSnapshotOutput"
    ]:
        import capo_neptune_graph._operations.amazon_neptune_graph.delete_graph_snapshot

        output, http_response = (
            capo_neptune_graph._operations.amazon_neptune_graph.delete_graph_snapshot.delete_graph_snapshot(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteGraphSnapshot")
    )
    input_: capo_neptune_graph.types.delete_graph_snapshot_input.DeleteGraphSnapshotInput = {
        "snapshot_identifier": snapshot_identifier
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output