Path: blob/master/src/packages/next/lib/api/schema/compute/compute-server-action.ts
1451 views
import { z } from "../../framework";12import { FailedAPIOperationSchema } from "../common";34import { ComputeServerIdSchema } from "./common";56// OpenAPI spec7//8export const ComputeServerActionInputSchema = z9.object({10id: ComputeServerIdSchema,11action: z12.enum(["start", "stop", "reboot", "suspend", "resume", "deprovision"])13.describe("Action to be performed on the compute server."),14})15.describe(16`Perform various actions on a specific compute server (e.g., power off, deprovision,17etc.).`,18);1920export const ComputeServerActionOutputSchema = z.union([21FailedAPIOperationSchema,22z.object({23result: z24.array(z.string())25.describe(26"List of likely guesses for the type of code, from most likely to less likely.",27),28}),29]);3031export type ComputeServerActionInput = z.infer<32typeof ComputeServerActionInputSchema33>;34export type ComputeServerActionOutput = z.infer<35typeof ComputeServerActionOutputSchema36>;373839