/* tslint:disable */ /* eslint-disable */ /** * Admin API * The Admin API is used to manage the ApeCloud platform. * * The version of the OpenAPI document: 1.0.0 * Contact: support@apecloud.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from '../configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore import type { APIErrorResponse } from '../models'; // @ts-ignore import type { EventList } from '../models'; // @ts-ignore import type { ScheduledTaskDetail } from '../models'; // @ts-ignore import type { ScheduledTaskList } from '../models'; // @ts-ignore import type { ScheduledTaskStatus } from '../models'; // @ts-ignore import type { Task } from '../models'; // @ts-ignore import type { TaskList } from '../models'; // @ts-ignore import type { TaskRetryMode } from '../models'; // @ts-ignore import type { TaskTypeList } from '../models'; /** * TaskApi - axios parameter creator * @export */ export const TaskApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Forcefully abort a running task. Pending steps or OpsRequests are cancelled, running ones are aborted. * @summary Force abort a task * @param {string} taskId ID of the task * @param {*} [options] Override http request option. * @throws {RequiredError} */ abortTask: async (taskId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'taskId' is not null or undefined assertParamExists('abortTask', 'taskId', taskId) const localVarPath = `/admin/v1/tasks/{taskId}/abort` .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Cancel a task by taskID. * @summary Cancel a task * @param {string} taskId ID of the task * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelTask: async (taskId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'taskId' is not null or undefined assertParamExists('cancelTask', 'taskId', taskId) const localVarPath = `/admin/v1/tasks/{taskId}/cancel` .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get scheduled task details * @summary Get scheduled task * @param {string} scheduledTaskId ID of the scheduled task * @param {*} [options] Override http request option. * @throws {RequiredError} */ getScheduledTask: async (scheduledTaskId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'scheduledTaskId' is not null or undefined assertParamExists('getScheduledTask', 'scheduledTaskId', scheduledTaskId) const localVarPath = `/admin/v1/scheduled-tasks/{scheduledTaskId}` .replace(`{${"scheduledTaskId"}}`, encodeURIComponent(String(scheduledTaskId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get task * @summary Get task detail * @param {string} taskId ID of the task * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTask: async (taskId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'taskId' is not null or undefined assertParamExists('getTask', 'taskId', taskId) const localVarPath = `/admin/v1/tasks/{taskId}` .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get task log * @param {string} taskId ID of the task * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTaskLog: async (taskId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'taskId' is not null or undefined assertParamExists('getTaskLog', 'taskId', taskId) const localVarPath = `/admin/v1/tasks/{taskId}/log` .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get logs for a specific task step (supports job type steps) * @summary Get task step log * @param {string} taskId ID of the task * @param {string} stepId ID of the step * @param {boolean} [follow] Follow log stream (streaming mode for running steps) * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTaskStepLog: async (taskId: string, stepId: string, follow?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'taskId' is not null or undefined assertParamExists('getTaskStepLog', 'taskId', taskId) // verify required parameter 'stepId' is not null or undefined assertParamExists('getTaskStepLog', 'stepId', stepId) const localVarPath = `/admin/v1/tasks/{taskId}/steps/{stepId}/log` .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId))) .replace(`{${"stepId"}}`, encodeURIComponent(String(stepId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) if (follow !== undefined) { localVarQueryParameter['follow'] = follow; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * List scheduled tasks * @summary List scheduled tasks * @param {string} [provider] Filter by scheduler provider * @param {ScheduledTaskStatus} [status] Filter by scheduled task status * @param {number} [pageNumber] Page number, starting from 1 * @param {number} [pageSize] Number of items per page * @param {*} [options] Override http request option. * @throws {RequiredError} */ listScheduledTasks: async (provider?: string, status?: ScheduledTaskStatus, pageNumber?: number, pageSize?: number, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/admin/v1/scheduled-tasks`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) if (provider !== undefined) { localVarQueryParameter['provider'] = provider; } if (status !== undefined) { localVarQueryParameter['status'] = status; } if (pageNumber !== undefined) { localVarQueryParameter['pageNumber'] = pageNumber; } if (pageSize !== undefined) { localVarQueryParameter['pageSize'] = pageSize; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * List operation events whose recorded response contains the task ID. * @summary List operation events related to a task * @param {string} taskId ID of the task * @param {*} [options] Override http request option. * @throws {RequiredError} */ listTaskEvents: async (taskId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'taskId' is not null or undefined assertParamExists('listTaskEvents', 'taskId', taskId) const localVarPath = `/admin/v1/tasks/{taskId}/events` .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * List task types * @summary List task types * @param {*} [options] Override http request option. * @throws {RequiredError} */ listTaskTypes: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/admin/v1/taskTypes`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * List tasks * @summary List task * @param {number} start The start of the time range for the query, unit is seconds. * @param {number} end The end of the time range for the query, unit is seconds. * @param {string} [orgName] Filter by organization name * @param {string} [resourceId] Filter by resource ID (such as cluster ID, environment ID, etc.) * @param {string} [resourceType] Filter by resource type * @param {string} [taskType] Filter by task type (supports multiple task types separated by commas, e.g., \"cluster-scale,cluster-upgrade\") * @param {string} [status] Filter by task status (supports multiple statuses separated by commas, e.g., \"Running,Pending\") * @param {number} [pageNumber] The pageNumber of the query * @param {number} [pageSize] The pageSize of the query * @param {*} [options] Override http request option. * @throws {RequiredError} */ listTasks: async (start: number, end: number, orgName?: string, resourceId?: string, resourceType?: string, taskType?: string, status?: string, pageNumber?: number, pageSize?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'start' is not null or undefined assertParamExists('listTasks', 'start', start) // verify required parameter 'end' is not null or undefined assertParamExists('listTasks', 'end', end) const localVarPath = `/admin/v1/tasks`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) if (orgName !== undefined) { localVarQueryParameter['orgName'] = orgName; } if (resourceId !== undefined) { localVarQueryParameter['resourceId'] = resourceId; } if (resourceType !== undefined) { localVarQueryParameter['resourceType'] = resourceType; } if (taskType !== undefined) { localVarQueryParameter['taskType'] = taskType; } if (status !== undefined) { localVarQueryParameter['status'] = status; } if (start !== undefined) { localVarQueryParameter['start'] = start; } if (end !== undefined) { localVarQueryParameter['end'] = end; } if (pageNumber !== undefined) { localVarQueryParameter['pageNumber'] = pageNumber; } if (pageSize !== undefined) { localVarQueryParameter['pageSize'] = pageSize; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Restart a failed or stopped task. Resume requires the task type to declare resume in allowActions. The default mode is restart, which reruns all steps; resume preserves successful steps. * @summary Retry a task * @param {string} taskId ID of the task * @param {TaskRetryMode} [mode] restart reruns all steps; resume preserves successful steps and reruns unfinished steps and PreFinish hooks. * @param {*} [options] Override http request option. * @throws {RequiredError} */ retryTask: async (taskId: string, mode?: TaskRetryMode, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'taskId' is not null or undefined assertParamExists('retryTask', 'taskId', taskId) const localVarPath = `/admin/v1/tasks/{taskId}/retry` .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) if (mode !== undefined) { localVarQueryParameter['mode'] = mode; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * stop task * @summary Stop a task * @param {string} taskId ID of the task * @param {*} [options] Override http request option. * @throws {RequiredError} */ stopTask: async (taskId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'taskId' is not null or undefined assertParamExists('stopTask', 'taskId', taskId) const localVarPath = `/admin/v1/tasks/{taskId}/stop` .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * TaskApi - functional programming interface * @export */ export const TaskApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = TaskApiAxiosParamCreator(configuration) return { /** * Forcefully abort a running task. Pending steps or OpsRequests are cancelled, running ones are aborted. * @summary Force abort a task * @param {string} taskId ID of the task * @param {*} [options] Override http request option. * @throws {RequiredError} */ async abortTask(taskId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.abortTask(taskId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['TaskApi.abortTask']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Cancel a task by taskID. * @summary Cancel a task * @param {string} taskId ID of the task * @param {*} [options] Override http request option. * @throws {RequiredError} */ async cancelTask(taskId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.cancelTask(taskId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['TaskApi.cancelTask']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Get scheduled task details * @summary Get scheduled task * @param {string} scheduledTaskId ID of the scheduled task * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getScheduledTask(scheduledTaskId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getScheduledTask(scheduledTaskId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['TaskApi.getScheduledTask']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Get task * @summary Get task detail * @param {string} taskId ID of the task * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getTask(taskId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getTask(taskId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['TaskApi.getTask']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get task log * @param {string} taskId ID of the task * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getTaskLog(taskId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getTaskLog(taskId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['TaskApi.getTaskLog']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Get logs for a specific task step (supports job type steps) * @summary Get task step log * @param {string} taskId ID of the task * @param {string} stepId ID of the step * @param {boolean} [follow] Follow log stream (streaming mode for running steps) * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getTaskStepLog(taskId: string, stepId: string, follow?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getTaskStepLog(taskId, stepId, follow, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['TaskApi.getTaskStepLog']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * List scheduled tasks * @summary List scheduled tasks * @param {string} [provider] Filter by scheduler provider * @param {ScheduledTaskStatus} [status] Filter by scheduled task status * @param {number} [pageNumber] Page number, starting from 1 * @param {number} [pageSize] Number of items per page * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listScheduledTasks(provider?: string, status?: ScheduledTaskStatus, pageNumber?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listScheduledTasks(provider, status, pageNumber, pageSize, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['TaskApi.listScheduledTasks']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * List operation events whose recorded response contains the task ID. * @summary List operation events related to a task * @param {string} taskId ID of the task * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listTaskEvents(taskId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listTaskEvents(taskId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['TaskApi.listTaskEvents']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * List task types * @summary List task types * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listTaskTypes(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listTaskTypes(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['TaskApi.listTaskTypes']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * List tasks * @summary List task * @param {number} start The start of the time range for the query, unit is seconds. * @param {number} end The end of the time range for the query, unit is seconds. * @param {string} [orgName] Filter by organization name * @param {string} [resourceId] Filter by resource ID (such as cluster ID, environment ID, etc.) * @param {string} [resourceType] Filter by resource type * @param {string} [taskType] Filter by task type (supports multiple task types separated by commas, e.g., \"cluster-scale,cluster-upgrade\") * @param {string} [status] Filter by task status (supports multiple statuses separated by commas, e.g., \"Running,Pending\") * @param {number} [pageNumber] The pageNumber of the query * @param {number} [pageSize] The pageSize of the query * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listTasks(start: number, end: number, orgName?: string, resourceId?: string, resourceType?: string, taskType?: string, status?: string, pageNumber?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listTasks(start, end, orgName, resourceId, resourceType, taskType, status, pageNumber, pageSize, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['TaskApi.listTasks']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Restart a failed or stopped task. Resume requires the task type to declare resume in allowActions. The default mode is restart, which reruns all steps; resume preserves successful steps. * @summary Retry a task * @param {string} taskId ID of the task * @param {TaskRetryMode} [mode] restart reruns all steps; resume preserves successful steps and reruns unfinished steps and PreFinish hooks. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async retryTask(taskId: string, mode?: TaskRetryMode, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.retryTask(taskId, mode, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['TaskApi.retryTask']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * stop task * @summary Stop a task * @param {string} taskId ID of the task * @param {*} [options] Override http request option. * @throws {RequiredError} */ async stopTask(taskId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.stopTask(taskId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['TaskApi.stopTask']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * TaskApi - factory interface * @export */ export const TaskApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = TaskApiFp(configuration) return { /** * Forcefully abort a running task. Pending steps or OpsRequests are cancelled, running ones are aborted. * @summary Force abort a task * @param {TaskApiAbortTaskRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ abortTask(requestParameters: TaskApiAbortTaskRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.abortTask(requestParameters.taskId, options).then((request) => request(axios, basePath)); }, /** * Cancel a task by taskID. * @summary Cancel a task * @param {TaskApiCancelTaskRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelTask(requestParameters: TaskApiCancelTaskRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.cancelTask(requestParameters.taskId, options).then((request) => request(axios, basePath)); }, /** * Get scheduled task details * @summary Get scheduled task * @param {TaskApiGetScheduledTaskRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getScheduledTask(requestParameters: TaskApiGetScheduledTaskRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getScheduledTask(requestParameters.scheduledTaskId, options).then((request) => request(axios, basePath)); }, /** * Get task * @summary Get task detail * @param {TaskApiGetTaskRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTask(requestParameters: TaskApiGetTaskRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getTask(requestParameters.taskId, options).then((request) => request(axios, basePath)); }, /** * * @summary Get task log * @param {TaskApiGetTaskLogRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTaskLog(requestParameters: TaskApiGetTaskLogRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getTaskLog(requestParameters.taskId, options).then((request) => request(axios, basePath)); }, /** * Get logs for a specific task step (supports job type steps) * @summary Get task step log * @param {TaskApiGetTaskStepLogRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTaskStepLog(requestParameters: TaskApiGetTaskStepLogRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getTaskStepLog(requestParameters.taskId, requestParameters.stepId, requestParameters.follow, options).then((request) => request(axios, basePath)); }, /** * List scheduled tasks * @summary List scheduled tasks * @param {TaskApiListScheduledTasksRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listScheduledTasks(requestParameters: TaskApiListScheduledTasksRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.listScheduledTasks(requestParameters.provider, requestParameters.status, requestParameters.pageNumber, requestParameters.pageSize, options).then((request) => request(axios, basePath)); }, /** * List operation events whose recorded response contains the task ID. * @summary List operation events related to a task * @param {TaskApiListTaskEventsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listTaskEvents(requestParameters: TaskApiListTaskEventsRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.listTaskEvents(requestParameters.taskId, options).then((request) => request(axios, basePath)); }, /** * List task types * @summary List task types * @param {*} [options] Override http request option. * @throws {RequiredError} */ listTaskTypes(options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.listTaskTypes(options).then((request) => request(axios, basePath)); }, /** * List tasks * @summary List task * @param {TaskApiListTasksRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listTasks(requestParameters: TaskApiListTasksRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.listTasks(requestParameters.start, requestParameters.end, requestParameters.orgName, requestParameters.resourceId, requestParameters.resourceType, requestParameters.taskType, requestParameters.status, requestParameters.pageNumber, requestParameters.pageSize, options).then((request) => request(axios, basePath)); }, /** * Restart a failed or stopped task. Resume requires the task type to declare resume in allowActions. The default mode is restart, which reruns all steps; resume preserves successful steps. * @summary Retry a task * @param {TaskApiRetryTaskRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ retryTask(requestParameters: TaskApiRetryTaskRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.retryTask(requestParameters.taskId, requestParameters.mode, options).then((request) => request(axios, basePath)); }, /** * stop task * @summary Stop a task * @param {TaskApiStopTaskRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ stopTask(requestParameters: TaskApiStopTaskRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.stopTask(requestParameters.taskId, options).then((request) => request(axios, basePath)); }, }; }; /** * TaskApi - interface * @export * @interface TaskApi */ export interface TaskApiInterface { /** * Forcefully abort a running task. Pending steps or OpsRequests are cancelled, running ones are aborted. * @summary Force abort a task * @param {TaskApiAbortTaskRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApiInterface */ abortTask(requestParameters: TaskApiAbortTaskRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Cancel a task by taskID. * @summary Cancel a task * @param {TaskApiCancelTaskRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApiInterface */ cancelTask(requestParameters: TaskApiCancelTaskRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Get scheduled task details * @summary Get scheduled task * @param {TaskApiGetScheduledTaskRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApiInterface */ getScheduledTask(requestParameters: TaskApiGetScheduledTaskRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Get task * @summary Get task detail * @param {TaskApiGetTaskRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApiInterface */ getTask(requestParameters: TaskApiGetTaskRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary Get task log * @param {TaskApiGetTaskLogRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApiInterface */ getTaskLog(requestParameters: TaskApiGetTaskLogRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Get logs for a specific task step (supports job type steps) * @summary Get task step log * @param {TaskApiGetTaskStepLogRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApiInterface */ getTaskStepLog(requestParameters: TaskApiGetTaskStepLogRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * List scheduled tasks * @summary List scheduled tasks * @param {TaskApiListScheduledTasksRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApiInterface */ listScheduledTasks(requestParameters?: TaskApiListScheduledTasksRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * List operation events whose recorded response contains the task ID. * @summary List operation events related to a task * @param {TaskApiListTaskEventsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApiInterface */ listTaskEvents(requestParameters: TaskApiListTaskEventsRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * List task types * @summary List task types * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApiInterface */ listTaskTypes(options?: RawAxiosRequestConfig): AxiosPromise; /** * List tasks * @summary List task * @param {TaskApiListTasksRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApiInterface */ listTasks(requestParameters: TaskApiListTasksRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Restart a failed or stopped task. Resume requires the task type to declare resume in allowActions. The default mode is restart, which reruns all steps; resume preserves successful steps. * @summary Retry a task * @param {TaskApiRetryTaskRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApiInterface */ retryTask(requestParameters: TaskApiRetryTaskRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * stop task * @summary Stop a task * @param {TaskApiStopTaskRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApiInterface */ stopTask(requestParameters: TaskApiStopTaskRequest, options?: RawAxiosRequestConfig): AxiosPromise; } /** * Request parameters for abortTask operation in TaskApi. * @export * @interface TaskApiAbortTaskRequest */ export interface TaskApiAbortTaskRequest { /** * ID of the task * @type {string} * @memberof TaskApiAbortTask */ readonly taskId: string } /** * Request parameters for cancelTask operation in TaskApi. * @export * @interface TaskApiCancelTaskRequest */ export interface TaskApiCancelTaskRequest { /** * ID of the task * @type {string} * @memberof TaskApiCancelTask */ readonly taskId: string } /** * Request parameters for getScheduledTask operation in TaskApi. * @export * @interface TaskApiGetScheduledTaskRequest */ export interface TaskApiGetScheduledTaskRequest { /** * ID of the scheduled task * @type {string} * @memberof TaskApiGetScheduledTask */ readonly scheduledTaskId: string } /** * Request parameters for getTask operation in TaskApi. * @export * @interface TaskApiGetTaskRequest */ export interface TaskApiGetTaskRequest { /** * ID of the task * @type {string} * @memberof TaskApiGetTask */ readonly taskId: string } /** * Request parameters for getTaskLog operation in TaskApi. * @export * @interface TaskApiGetTaskLogRequest */ export interface TaskApiGetTaskLogRequest { /** * ID of the task * @type {string} * @memberof TaskApiGetTaskLog */ readonly taskId: string } /** * Request parameters for getTaskStepLog operation in TaskApi. * @export * @interface TaskApiGetTaskStepLogRequest */ export interface TaskApiGetTaskStepLogRequest { /** * ID of the task * @type {string} * @memberof TaskApiGetTaskStepLog */ readonly taskId: string /** * ID of the step * @type {string} * @memberof TaskApiGetTaskStepLog */ readonly stepId: string /** * Follow log stream (streaming mode for running steps) * @type {boolean} * @memberof TaskApiGetTaskStepLog */ readonly follow?: boolean } /** * Request parameters for listScheduledTasks operation in TaskApi. * @export * @interface TaskApiListScheduledTasksRequest */ export interface TaskApiListScheduledTasksRequest { /** * Filter by scheduler provider * @type {string} * @memberof TaskApiListScheduledTasks */ readonly provider?: string /** * Filter by scheduled task status * @type {ScheduledTaskStatus} * @memberof TaskApiListScheduledTasks */ readonly status?: ScheduledTaskStatus /** * Page number, starting from 1 * @type {number} * @memberof TaskApiListScheduledTasks */ readonly pageNumber?: number /** * Number of items per page * @type {number} * @memberof TaskApiListScheduledTasks */ readonly pageSize?: number } /** * Request parameters for listTaskEvents operation in TaskApi. * @export * @interface TaskApiListTaskEventsRequest */ export interface TaskApiListTaskEventsRequest { /** * ID of the task * @type {string} * @memberof TaskApiListTaskEvents */ readonly taskId: string } /** * Request parameters for listTasks operation in TaskApi. * @export * @interface TaskApiListTasksRequest */ export interface TaskApiListTasksRequest { /** * The start of the time range for the query, unit is seconds. * @type {number} * @memberof TaskApiListTasks */ readonly start: number /** * The end of the time range for the query, unit is seconds. * @type {number} * @memberof TaskApiListTasks */ readonly end: number /** * Filter by organization name * @type {string} * @memberof TaskApiListTasks */ readonly orgName?: string /** * Filter by resource ID (such as cluster ID, environment ID, etc.) * @type {string} * @memberof TaskApiListTasks */ readonly resourceId?: string /** * Filter by resource type * @type {string} * @memberof TaskApiListTasks */ readonly resourceType?: string /** * Filter by task type (supports multiple task types separated by commas, e.g., \"cluster-scale,cluster-upgrade\") * @type {string} * @memberof TaskApiListTasks */ readonly taskType?: string /** * Filter by task status (supports multiple statuses separated by commas, e.g., \"Running,Pending\") * @type {string} * @memberof TaskApiListTasks */ readonly status?: string /** * The pageNumber of the query * @type {number} * @memberof TaskApiListTasks */ readonly pageNumber?: number /** * The pageSize of the query * @type {number} * @memberof TaskApiListTasks */ readonly pageSize?: number } /** * Request parameters for retryTask operation in TaskApi. * @export * @interface TaskApiRetryTaskRequest */ export interface TaskApiRetryTaskRequest { /** * ID of the task * @type {string} * @memberof TaskApiRetryTask */ readonly taskId: string /** * restart reruns all steps; resume preserves successful steps and reruns unfinished steps and PreFinish hooks. * @type {TaskRetryMode} * @memberof TaskApiRetryTask */ readonly mode?: TaskRetryMode } /** * Request parameters for stopTask operation in TaskApi. * @export * @interface TaskApiStopTaskRequest */ export interface TaskApiStopTaskRequest { /** * ID of the task * @type {string} * @memberof TaskApiStopTask */ readonly taskId: string } /** * TaskApi - object-oriented interface * @export * @class TaskApi * @extends {BaseAPI} */ export class TaskApi extends BaseAPI implements TaskApiInterface { /** * Forcefully abort a running task. Pending steps or OpsRequests are cancelled, running ones are aborted. * @summary Force abort a task * @param {TaskApiAbortTaskRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApi */ public abortTask(requestParameters: TaskApiAbortTaskRequest, options?: RawAxiosRequestConfig) { return TaskApiFp(this.configuration).abortTask(requestParameters.taskId, options).then((request) => request(this.axios, this.basePath)); } /** * Cancel a task by taskID. * @summary Cancel a task * @param {TaskApiCancelTaskRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApi */ public cancelTask(requestParameters: TaskApiCancelTaskRequest, options?: RawAxiosRequestConfig) { return TaskApiFp(this.configuration).cancelTask(requestParameters.taskId, options).then((request) => request(this.axios, this.basePath)); } /** * Get scheduled task details * @summary Get scheduled task * @param {TaskApiGetScheduledTaskRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApi */ public getScheduledTask(requestParameters: TaskApiGetScheduledTaskRequest, options?: RawAxiosRequestConfig) { return TaskApiFp(this.configuration).getScheduledTask(requestParameters.scheduledTaskId, options).then((request) => request(this.axios, this.basePath)); } /** * Get task * @summary Get task detail * @param {TaskApiGetTaskRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApi */ public getTask(requestParameters: TaskApiGetTaskRequest, options?: RawAxiosRequestConfig) { return TaskApiFp(this.configuration).getTask(requestParameters.taskId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Get task log * @param {TaskApiGetTaskLogRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApi */ public getTaskLog(requestParameters: TaskApiGetTaskLogRequest, options?: RawAxiosRequestConfig) { return TaskApiFp(this.configuration).getTaskLog(requestParameters.taskId, options).then((request) => request(this.axios, this.basePath)); } /** * Get logs for a specific task step (supports job type steps) * @summary Get task step log * @param {TaskApiGetTaskStepLogRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApi */ public getTaskStepLog(requestParameters: TaskApiGetTaskStepLogRequest, options?: RawAxiosRequestConfig) { return TaskApiFp(this.configuration).getTaskStepLog(requestParameters.taskId, requestParameters.stepId, requestParameters.follow, options).then((request) => request(this.axios, this.basePath)); } /** * List scheduled tasks * @summary List scheduled tasks * @param {TaskApiListScheduledTasksRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApi */ public listScheduledTasks(requestParameters: TaskApiListScheduledTasksRequest = {}, options?: RawAxiosRequestConfig) { return TaskApiFp(this.configuration).listScheduledTasks(requestParameters.provider, requestParameters.status, requestParameters.pageNumber, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath)); } /** * List operation events whose recorded response contains the task ID. * @summary List operation events related to a task * @param {TaskApiListTaskEventsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApi */ public listTaskEvents(requestParameters: TaskApiListTaskEventsRequest, options?: RawAxiosRequestConfig) { return TaskApiFp(this.configuration).listTaskEvents(requestParameters.taskId, options).then((request) => request(this.axios, this.basePath)); } /** * List task types * @summary List task types * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApi */ public listTaskTypes(options?: RawAxiosRequestConfig) { return TaskApiFp(this.configuration).listTaskTypes(options).then((request) => request(this.axios, this.basePath)); } /** * List tasks * @summary List task * @param {TaskApiListTasksRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApi */ public listTasks(requestParameters: TaskApiListTasksRequest, options?: RawAxiosRequestConfig) { return TaskApiFp(this.configuration).listTasks(requestParameters.start, requestParameters.end, requestParameters.orgName, requestParameters.resourceId, requestParameters.resourceType, requestParameters.taskType, requestParameters.status, requestParameters.pageNumber, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath)); } /** * Restart a failed or stopped task. Resume requires the task type to declare resume in allowActions. The default mode is restart, which reruns all steps; resume preserves successful steps. * @summary Retry a task * @param {TaskApiRetryTaskRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApi */ public retryTask(requestParameters: TaskApiRetryTaskRequest, options?: RawAxiosRequestConfig) { return TaskApiFp(this.configuration).retryTask(requestParameters.taskId, requestParameters.mode, options).then((request) => request(this.axios, this.basePath)); } /** * stop task * @summary Stop a task * @param {TaskApiStopTaskRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaskApi */ public stopTask(requestParameters: TaskApiStopTaskRequest, options?: RawAxiosRequestConfig) { return TaskApiFp(this.configuration).stopTask(requestParameters.taskId, options).then((request) => request(this.axios, this.basePath)); } }