@datalayer/core
Version:
[](https://datalayer.io)
55 lines (54 loc) • 2.85 kB
TypeScript
import { RuntimeData, CreateRuntimeRequest, CreateRuntimeResponse, ListRuntimesResponse } from '../../models/RuntimeDTO';
/**
* Create a new runtime instance.
* @param token - Authentication token
* @param data - Runtime creation configuration
* @param baseUrl - Base URL for the API (defaults to production Runtimes URL)
* @returns Promise resolving to the created runtime details
* @throws {Error} If authentication token is missing or invalid
* @throws {Error} With status 404 if the environment is not found
* @throws {Error} With status 503 if no runtime is available
*/
export declare const createRuntime: (token: string, data: CreateRuntimeRequest, baseUrl?: string) => Promise<CreateRuntimeResponse>;
/**
* List all runtime instances.
* @param token - Authentication token
* @param baseUrl - Base URL for the API (defaults to production Runtimes URL)
* @returns Promise resolving to list of runtime instances
* @throws {Error} If authentication token is missing or invalid
*/
export declare const listRuntimes: (token: string, baseUrl?: string) => Promise<ListRuntimesResponse>;
/**
* Get details for a specific runtime instance.
* @param token - Authentication token
* @param podName - The unique pod name of the runtime
* @param baseUrl - Base URL for the API (defaults to production Runtimes URL)
* @returns Promise resolving to runtime details
* @throws {Error} If authentication token is missing or invalid
* @throws {Error} If pod name is missing or invalid
* @throws {Error} With status 404 if the runtime is not found
*/
export declare const getRuntime: (token: string, podName: string, baseUrl?: string) => Promise<RuntimeData>;
/**
* Delete a runtime instance.
* @param token - Authentication token
* @param podName - The unique pod name of the runtime to delete
* @param baseUrl - Base URL for the API (defaults to production Runtimes URL)
* @returns Promise resolving when deletion is complete
* @throws {Error} If authentication token is missing or invalid
* @throws {Error} If pod name is missing or invalid
* @throws {Error} With status 404 if the runtime is not found
*/
export declare const deleteRuntime: (token: string, podName: string, baseUrl?: string) => Promise<void>;
/**
* Update a runtime instance.
* @param token - Authentication token
* @param podName - The unique pod name of the runtime
* @param from - The source to update from
* @param baseUrl - Base URL for the API (defaults to production Runtimes URL)
* @returns Promise resolving to updated runtime details
* @throws {Error} If authentication token is missing or invalid
* @throws {Error} If pod name is missing or invalid
* @throws {Error} With status 404 if the runtime is not found
*/
export declare const updateRuntime: (token: string, podName: string, from: string, baseUrl?: string) => Promise<RuntimeData>;