export type PatchNotebookRequest = {queue?: string | undefined, executorCores?: string | undefined, executorMemory?: string | undefined, executors?: string | undefined, driverMemory?: string | undefined, sparkSessionNum?: number | undefined, cpu?: number | undefined, memoryAmount?: number | undefined, memoryUnit?: string | undefined, extraResources?: string | undefined, imageName?: string | undefined, imageType?: string | undefined}; export type PatchApiAideV1NotebooksIdArgs = {id: unknown, body: PatchNotebookRequest}; export type PatchApiAideV1NotebooksIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Patch a Notebook in the given Namesapce, Update Yarn Resource Setting * * PATCH /aide/v1/notebooks/{id} */ export const patchApiAideV1NotebooksId = async (args: PatchApiAideV1NotebooksIdArgs, options?: PatchApiAideV1NotebooksIdOptions) => { const {baseUrl = "https://gateway.mlss.aide", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/aide/v1/notebooks/${encodeURIComponent(String(args.id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PATCH", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };