sesterce-cli
Version:
A powerful command-line interface tool for managing Sesterce Cloud services. Sesterce CLI provides easy access to GPU cloud instances, AI inference services, container registries, and SSH key management directly from your terminal.
21 lines • 827 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.StopInferenceInstance = void 0;
const either_1 = require("@/core/logic/either");
const stop_instance_error_1 = require("./errors/stop-instance-error");
class StopInferenceInstance {
constructor(apiClient) {
this.apiClient = apiClient;
}
async execute(instanceId) {
try {
await this.apiClient.post(`/ai-inference/instances/${instanceId}/stop`);
return (0, either_1.right)(null);
}
catch (error) {
return (0, either_1.left)(new stop_instance_error_1.StopInferenceInstanceError(error instanceof Error ? error.message : "Unexpected error occurred."));
}
}
}
exports.StopInferenceInstance = StopInferenceInstance;
//# sourceMappingURL=stop-instance.js.map