Cancels an import operation if it has not yet completed.
Value
List with http response, content, and status_code. - 200: Import was successfully cancelled - 404: Import not found - 500: Internal error
Details
Only imports with status "Pending" or "InProgress" can be cancelled. Completed, failed, or already cancelled imports cannot be cancelled.
Examples
if (FALSE) { # \dontrun{
# Start an import
import_result <- start_import("my-index", "s3://bucket/data/")
import_id <- import_result$content$id
# Cancel it
cancel_import("my-index", import_id)
} # }