Path: blob/master/src/packages/next/lib/api/schema/projects/set-admin-quotas.ts
1698 views
import { z } from "../../framework";12import {3FailedAPIOperationSchema,4SuccessfulAPIOperationSchema,5} from "../common";67import { ProjectIdSchema } from "./common";89// OpenAPI spec10//11export const SetAdminQuotasInputSchema = z12.object({13project_id: ProjectIdSchema.describe("Project id to set quotas for."),14memory_limit: z15.number()16.nonnegative()17.optional()18.describe("Memory limit in MB"),19memory_request: z20.number()21.nonnegative()22.optional()23.describe("Memory request in MB"),24cpu_request: z25.number()26.nonnegative()27.optional()28.describe("CPU request (number of cores)"),29cpu_limit: z30.number()31.nonnegative()32.optional()33.describe("CPU limit (number of cores)"),34disk_quota: z35.number()36.nonnegative()37.optional()38.describe("Disk quota in MB"),39idle_timeout: z40.number()41.nonnegative()42.optional()43.describe("Idle timeout in seconds"),44internet: z.boolean().optional().describe("Internet access"),45member_host: z.boolean().optional().describe("Member hosting"),46always_running: z.boolean().optional().describe("Always running"),47})48.describe(49"**Administrators only**. Used to set project quotas as an admin. Important: you have to stop and start the project after any change.",50);5152export const SetAdminQuotasOutputSchema = z.union([53FailedAPIOperationSchema,54SuccessfulAPIOperationSchema,55]);5657export type SetAdminQuotasInput = z.infer<typeof SetAdminQuotasInputSchema>;58export type SetAdminQuotasOutput = z.infer<typeof SetAdminQuotasOutputSchema>;596061