/* tslint:disable */ /* eslint-disable */ /** * KubeBlocks Cloud API * KubeBlocks Cloud API is a RESTful API for managing KubeBlocks Cloud resources. The API is organized around REST. Our API has predictable resource-oriented URLs, accepts `JSON-encoded` request bodies, returns `JSON-encoded` responses, and uses standard HTTP response codes, authentication, and verbs. We use standard HTTP authentication and provide API keys to identify who you are. Your API keys carry many privileges, so be sure to keep them secret! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth. * * 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 { Backup } from '../models'; // @ts-ignore import type { BackupBatchDelete } from '../models'; // @ts-ignore import type { BackupCreate } from '../models'; // @ts-ignore import type { BackupDownload } from '../models'; // @ts-ignore import type { BackupList } from '../models'; // @ts-ignore import type { BackupLog } from '../models'; // @ts-ignore import type { BackupPolicy } from '../models'; // @ts-ignore import type { BackupSchedule } from '../models'; // @ts-ignore import type { BackupScheduleCreate } from '../models'; // @ts-ignore import type { BackupScheduleList } from '../models'; // @ts-ignore import type { BackupScheduleUpdate } from '../models'; // @ts-ignore import type { BackupStats } from '../models'; // @ts-ignore import type { BackupView } from '../models'; // @ts-ignore import type { BuildBackupObjRequest } from '../models'; // @ts-ignore import type { FileEntryList } from '../models'; // @ts-ignore import type { SelectiveObjectTreeNode } from '../models'; /** * BackupApi - axios parameter creator * @export */ export const BackupApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Delete multiple backups in a single request. Backups which cannot be deleted are reported in the error response and do not roll back the backups that were already deleted. * @summary Batch delete backups * @param {string} orgName name of the Org * @param {BackupBatchDelete} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchDeleteBackups: async (orgName: string, body: BackupBatchDelete, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('batchDeleteBackups', 'orgName', orgName) // verify required parameter 'body' is not null or undefined assertParamExists('batchDeleteBackups', 'body', body) const localVarPath = `/api/v1/organizations/{orgName}/backups/batch-delete` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))); // 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) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary build backup object with a existing backup directory * @param {string} orgName name of the Org * @param {string} environmentName name of the environment * @param {string} engineName name of the engine * @param {BuildBackupObjRequest} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ buildBackupObj: async (orgName: string, environmentName: string, engineName: string, body: BuildBackupObjRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('buildBackupObj', 'orgName', orgName) // verify required parameter 'environmentName' is not null or undefined assertParamExists('buildBackupObj', 'environmentName', environmentName) // verify required parameter 'engineName' is not null or undefined assertParamExists('buildBackupObj', 'engineName', engineName) // verify required parameter 'body' is not null or undefined assertParamExists('buildBackupObj', 'body', body) const localVarPath = `/api/v1/environments/{environmentName}/organizations/{orgName}/engines/{engineName}/buildBackup` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"environmentName"}}`, encodeURIComponent(String(environmentName))) .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName))); // 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) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Create backup schedule * @param {string} orgName name of the org * @param {string} clusterName name of the cluster * @param {BackupScheduleCreate} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBackupSchedule: async (orgName: string, clusterName: string, body: BackupScheduleCreate, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('createBackupSchedule', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('createBackupSchedule', 'clusterName', clusterName) // verify required parameter 'body' is not null or undefined assertParamExists('createBackupSchedule', 'body', body) const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/backupSchedules` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))); // 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) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Create backup * @param {string} orgName name of the Org * @param {string} clusterName name of the KubeBlocks cluster * @param {BackupCreate} body * @param {string} [component] name of the component * @param {*} [options] Override http request option. * @throws {RequiredError} */ createClusterBackup: async (orgName: string, clusterName: string, body: BackupCreate, component?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('createClusterBackup', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('createClusterBackup', 'clusterName', clusterName) // verify required parameter 'body' is not null or undefined assertParamExists('createClusterBackup', 'body', body) const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/backups` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))); // 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) if (component !== undefined) { localVarQueryParameter['component'] = component; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Delete backup * @param {string} orgName name of the Org * @param {string} backupId id of the Backup * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteBackup: async (orgName: string, backupId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('deleteBackup', 'orgName', orgName) // verify required parameter 'backupId' is not null or undefined assertParamExists('deleteBackup', 'backupId', backupId) const localVarPath = `/api/v1/organizations/{orgName}/backups/{backupId}` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"backupId"}}`, encodeURIComponent(String(backupId))); // 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: 'DELETE', ...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 Delete backup schedule * @param {string} orgName name of the org * @param {string} clusterName name of the cluster * @param {string} scheduleName name of the backup schedule * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteBackupSchedule: async (orgName: string, clusterName: string, scheduleName: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('deleteBackupSchedule', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('deleteBackupSchedule', 'clusterName', clusterName) // verify required parameter 'scheduleName' is not null or undefined assertParamExists('deleteBackupSchedule', 'scheduleName', scheduleName) const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/backupSchedules/{scheduleName}` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))) .replace(`{${"scheduleName"}}`, encodeURIComponent(String(scheduleName))); // 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: 'DELETE', ...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 Download full backup * @param {string} orgName name of the org * @param {string} backupId the id of backup * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadBackup: async (orgName: string, backupId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('downloadBackup', 'orgName', orgName) // verify required parameter 'backupId' is not null or undefined assertParamExists('downloadBackup', 'backupId', backupId) const localVarPath = `/api/v1/organizations/{orgName}/backups/{backupId}/download` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"backupId"}}`, encodeURIComponent(String(backupId))); // 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 Download multiple backup files * @param {string} orgName name of the org * @param {string} backupId the id of backup * @param {BackupDownload} backupDownload * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadMultipleBackups: async (orgName: string, backupId: string, backupDownload: BackupDownload, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('downloadMultipleBackups', 'orgName', orgName) // verify required parameter 'backupId' is not null or undefined assertParamExists('downloadMultipleBackups', 'backupId', backupId) // verify required parameter 'backupDownload' is not null or undefined assertParamExists('downloadMultipleBackups', 'backupDownload', backupDownload) const localVarPath = `/api/v1/organizations/{orgName}/backups/{backupId}/download` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"backupId"}}`, encodeURIComponent(String(backupId))); // 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) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(backupDownload, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get backup * @param {string} orgName name of the Org * @param {string} backupId id of the Backup * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBackup: async (orgName: string, backupId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('getBackup', 'orgName', orgName) // verify required parameter 'backupId' is not null or undefined assertParamExists('getBackup', 'backupId', backupId) const localVarPath = `/api/v1/organizations/{orgName}/backups/{backupId}` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"backupId"}}`, encodeURIComponent(String(backupId))); // 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 backup log * @param {string} orgName name of the Org * @param {string} backupId id of the Backup * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBackupLog: async (orgName: string, backupId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('getBackupLog', 'orgName', orgName) // verify required parameter 'backupId' is not null or undefined assertParamExists('getBackupLog', 'backupId', backupId) const localVarPath = `/api/v1/organizations/{orgName}/backups/{backupId}/logs` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"backupId"}}`, encodeURIComponent(String(backupId))); // 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 backup statistics * @param {string} orgName name of the Org * @param {string} [clusterID] id of the Cluster * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBackupStats: async (orgName: string, clusterID?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('getBackupStats', 'orgName', orgName) const localVarPath = `/api/v1/organizations/{orgName}/backupStats` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))); // 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 (clusterID !== undefined) { localVarQueryParameter['clusterID'] = clusterID; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get backup policy * @param {string} orgName name of the Org * @param {string} clusterName name of the KubeBlocks cluster * @param {boolean} [useVolumeSnapshot] use volume snapshot to back up * @param {*} [options] Override http request option. * @throws {RequiredError} */ getClusterBackupPolicy: async (orgName: string, clusterName: string, useVolumeSnapshot?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('getClusterBackupPolicy', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('getClusterBackupPolicy', 'clusterName', clusterName) const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/backupPolicy` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))); // 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 (useVolumeSnapshot !== undefined) { localVarQueryParameter['useVolumeSnapshot'] = useVolumeSnapshot; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary List backup schedules * @param {string} orgName name of the org * @param {string} clusterName name of the cluster * @param {string} [backupMethod] filter by backup method * @param {*} [options] Override http request option. * @throws {RequiredError} */ listBackupSchedules: async (orgName: string, clusterName: string, backupMethod?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('listBackupSchedules', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('listBackupSchedules', 'clusterName', clusterName) const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/backupSchedules` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))); // 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 (backupMethod !== undefined) { localVarQueryParameter['backupMethod'] = backupMethod; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary List backups * @param {string} orgName name of the Org * @param {string} [clusterName] cluster name of the Backup * @param {string} [clusterID] cluster ID of the Backup * @param {string} [backupRepo] backup repo of the Backup * @param {boolean} [fetchWithDeletedCluster] defined whether to search for deleted clusters. if not set, returns all backups * @param {boolean} [withDeletedBackups] defined whether to search for deleted backups. if not set, only return backups that are not deleted * @param {boolean} [withRestoreCluster] defined whether to search for restore backups. * @param {string} [backupType] type of the backup * @param {boolean} [withRebuildInstance] defined whether to search for rebuilding instance. * @param {boolean} [withHScale] defined whether to search for hScale instance. * @param {string} [componentName] get the backups belong to the component * @param {number} [page] page number * @param {number} [pageSize] page size * @param {*} [options] Override http request option. * @throws {RequiredError} */ listBackups: async (orgName: string, clusterName?: string, clusterID?: string, backupRepo?: string, fetchWithDeletedCluster?: boolean, withDeletedBackups?: boolean, withRestoreCluster?: boolean, backupType?: string, withRebuildInstance?: boolean, withHScale?: boolean, componentName?: string, page?: number, pageSize?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('listBackups', 'orgName', orgName) const localVarPath = `/api/v1/organizations/{orgName}/backups` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))); // 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 (clusterName !== undefined) { localVarQueryParameter['clusterName'] = clusterName; } if (clusterID !== undefined) { localVarQueryParameter['clusterID'] = clusterID; } if (backupRepo !== undefined) { localVarQueryParameter['backupRepo'] = backupRepo; } if (fetchWithDeletedCluster !== undefined) { localVarQueryParameter['fetchWithDeletedCluster'] = fetchWithDeletedCluster; } if (withDeletedBackups !== undefined) { localVarQueryParameter['withDeletedBackups'] = withDeletedBackups; } if (withRestoreCluster !== undefined) { localVarQueryParameter['withRestoreCluster'] = withRestoreCluster; } if (backupType !== undefined) { localVarQueryParameter['backupType'] = backupType; } if (withRebuildInstance !== undefined) { localVarQueryParameter['withRebuildInstance'] = withRebuildInstance; } if (withHScale !== undefined) { localVarQueryParameter['withHScale'] = withHScale; } if (componentName !== undefined) { localVarQueryParameter['componentName'] = componentName; } if (page !== undefined) { localVarQueryParameter['page'] = page; } 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, }; }, /** * * @summary List objects tree for selective backup * @param {string} orgName name of the org * @param {string} clusterName name of the cluster * @param {string} [database] Database name for engines configured to switch the object tree by database. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listObjectsTreeForSelectiveBackup: async (orgName: string, clusterName: string, database?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('listObjectsTreeForSelectiveBackup', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('listObjectsTreeForSelectiveBackup', 'clusterName', clusterName) const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/listObjectsForSelectiveBackup` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))); // 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 (database !== undefined) { localVarQueryParameter['database'] = database; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * partially update the specified Backup Policy * @summary Update backup policy * @param {string} orgName name of the Org * @param {string} clusterName name of the KubeBlocks cluster * @param {BackupPolicy} body * @param {boolean} [useVolumeSnapshot] use volume snapshot to back up * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateBackupPolicy: async (orgName: string, clusterName: string, body: BackupPolicy, useVolumeSnapshot?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('updateBackupPolicy', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('updateBackupPolicy', 'clusterName', clusterName) // verify required parameter 'body' is not null or undefined assertParamExists('updateBackupPolicy', 'body', body) const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/backupPolicy` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))); // 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 (useVolumeSnapshot !== undefined) { localVarQueryParameter['useVolumeSnapshot'] = useVolumeSnapshot; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Update backup schedule * @param {string} orgName name of the org * @param {string} clusterName name of the cluster * @param {string} scheduleName name of the backup schedule * @param {BackupScheduleUpdate} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateBackupSchedule: async (orgName: string, clusterName: string, scheduleName: string, body: BackupScheduleUpdate, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('updateBackupSchedule', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('updateBackupSchedule', 'clusterName', clusterName) // verify required parameter 'scheduleName' is not null or undefined assertParamExists('updateBackupSchedule', 'scheduleName', scheduleName) // verify required parameter 'body' is not null or undefined assertParamExists('updateBackupSchedule', 'body', body) const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/backupSchedules/{scheduleName}` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))) .replace(`{${"scheduleName"}}`, encodeURIComponent(String(scheduleName))); // 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) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary view backup info * @param {string} orgName name of the org * @param {string} backupId the id of backup * @param {BackupView} [backupView] * @param {*} [options] Override http request option. * @throws {RequiredError} */ viewBackup: async (orgName: string, backupId: string, backupView?: BackupView, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('viewBackup', 'orgName', orgName) // verify required parameter 'backupId' is not null or undefined assertParamExists('viewBackup', 'backupId', backupId) const localVarPath = `/api/v1/organizations/{orgName}/backups/{backupId}/view` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"backupId"}}`, encodeURIComponent(String(backupId))); // 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) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(backupView, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * BackupApi - functional programming interface * @export */ export const BackupApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = BackupApiAxiosParamCreator(configuration) return { /** * Delete multiple backups in a single request. Backups which cannot be deleted are reported in the error response and do not roll back the backups that were already deleted. * @summary Batch delete backups * @param {string} orgName name of the Org * @param {BackupBatchDelete} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ async batchDeleteBackups(orgName: string, body: BackupBatchDelete, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.batchDeleteBackups(orgName, body, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.batchDeleteBackups']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary build backup object with a existing backup directory * @param {string} orgName name of the Org * @param {string} environmentName name of the environment * @param {string} engineName name of the engine * @param {BuildBackupObjRequest} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ async buildBackupObj(orgName: string, environmentName: string, engineName: string, body: BuildBackupObjRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.buildBackupObj(orgName, environmentName, engineName, body, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.buildBackupObj']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Create backup schedule * @param {string} orgName name of the org * @param {string} clusterName name of the cluster * @param {BackupScheduleCreate} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createBackupSchedule(orgName: string, clusterName: string, body: BackupScheduleCreate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createBackupSchedule(orgName, clusterName, body, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.createBackupSchedule']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Create backup * @param {string} orgName name of the Org * @param {string} clusterName name of the KubeBlocks cluster * @param {BackupCreate} body * @param {string} [component] name of the component * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createClusterBackup(orgName: string, clusterName: string, body: BackupCreate, component?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createClusterBackup(orgName, clusterName, body, component, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.createClusterBackup']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Delete backup * @param {string} orgName name of the Org * @param {string} backupId id of the Backup * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteBackup(orgName: string, backupId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBackup(orgName, backupId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.deleteBackup']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Delete backup schedule * @param {string} orgName name of the org * @param {string} clusterName name of the cluster * @param {string} scheduleName name of the backup schedule * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteBackupSchedule(orgName: string, clusterName: string, scheduleName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBackupSchedule(orgName, clusterName, scheduleName, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.deleteBackupSchedule']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Download full backup * @param {string} orgName name of the org * @param {string} backupId the id of backup * @param {*} [options] Override http request option. * @throws {RequiredError} */ async downloadBackup(orgName: string, backupId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.downloadBackup(orgName, backupId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.downloadBackup']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Download multiple backup files * @param {string} orgName name of the org * @param {string} backupId the id of backup * @param {BackupDownload} backupDownload * @param {*} [options] Override http request option. * @throws {RequiredError} */ async downloadMultipleBackups(orgName: string, backupId: string, backupDownload: BackupDownload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.downloadMultipleBackups(orgName, backupId, backupDownload, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.downloadMultipleBackups']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get backup * @param {string} orgName name of the Org * @param {string} backupId id of the Backup * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getBackup(orgName: string, backupId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getBackup(orgName, backupId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.getBackup']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get backup log * @param {string} orgName name of the Org * @param {string} backupId id of the Backup * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getBackupLog(orgName: string, backupId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getBackupLog(orgName, backupId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.getBackupLog']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get backup statistics * @param {string} orgName name of the Org * @param {string} [clusterID] id of the Cluster * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getBackupStats(orgName: string, clusterID?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getBackupStats(orgName, clusterID, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.getBackupStats']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get backup policy * @param {string} orgName name of the Org * @param {string} clusterName name of the KubeBlocks cluster * @param {boolean} [useVolumeSnapshot] use volume snapshot to back up * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getClusterBackupPolicy(orgName: string, clusterName: string, useVolumeSnapshot?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getClusterBackupPolicy(orgName, clusterName, useVolumeSnapshot, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.getClusterBackupPolicy']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary List backup schedules * @param {string} orgName name of the org * @param {string} clusterName name of the cluster * @param {string} [backupMethod] filter by backup method * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listBackupSchedules(orgName: string, clusterName: string, backupMethod?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listBackupSchedules(orgName, clusterName, backupMethod, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.listBackupSchedules']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary List backups * @param {string} orgName name of the Org * @param {string} [clusterName] cluster name of the Backup * @param {string} [clusterID] cluster ID of the Backup * @param {string} [backupRepo] backup repo of the Backup * @param {boolean} [fetchWithDeletedCluster] defined whether to search for deleted clusters. if not set, returns all backups * @param {boolean} [withDeletedBackups] defined whether to search for deleted backups. if not set, only return backups that are not deleted * @param {boolean} [withRestoreCluster] defined whether to search for restore backups. * @param {string} [backupType] type of the backup * @param {boolean} [withRebuildInstance] defined whether to search for rebuilding instance. * @param {boolean} [withHScale] defined whether to search for hScale instance. * @param {string} [componentName] get the backups belong to the component * @param {number} [page] page number * @param {number} [pageSize] page size * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listBackups(orgName: string, clusterName?: string, clusterID?: string, backupRepo?: string, fetchWithDeletedCluster?: boolean, withDeletedBackups?: boolean, withRestoreCluster?: boolean, backupType?: string, withRebuildInstance?: boolean, withHScale?: boolean, componentName?: string, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listBackups(orgName, clusterName, clusterID, backupRepo, fetchWithDeletedCluster, withDeletedBackups, withRestoreCluster, backupType, withRebuildInstance, withHScale, componentName, page, pageSize, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.listBackups']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary List objects tree for selective backup * @param {string} orgName name of the org * @param {string} clusterName name of the cluster * @param {string} [database] Database name for engines configured to switch the object tree by database. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listObjectsTreeForSelectiveBackup(orgName: string, clusterName: string, database?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listObjectsTreeForSelectiveBackup(orgName, clusterName, database, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.listObjectsTreeForSelectiveBackup']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * partially update the specified Backup Policy * @summary Update backup policy * @param {string} orgName name of the Org * @param {string} clusterName name of the KubeBlocks cluster * @param {BackupPolicy} body * @param {boolean} [useVolumeSnapshot] use volume snapshot to back up * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateBackupPolicy(orgName: string, clusterName: string, body: BackupPolicy, useVolumeSnapshot?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateBackupPolicy(orgName, clusterName, body, useVolumeSnapshot, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.updateBackupPolicy']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Update backup schedule * @param {string} orgName name of the org * @param {string} clusterName name of the cluster * @param {string} scheduleName name of the backup schedule * @param {BackupScheduleUpdate} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateBackupSchedule(orgName: string, clusterName: string, scheduleName: string, body: BackupScheduleUpdate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateBackupSchedule(orgName, clusterName, scheduleName, body, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.updateBackupSchedule']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary view backup info * @param {string} orgName name of the org * @param {string} backupId the id of backup * @param {BackupView} [backupView] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async viewBackup(orgName: string, backupId: string, backupView?: BackupView, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.viewBackup(orgName, backupId, backupView, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.viewBackup']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * BackupApi - factory interface * @export */ export const BackupApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = BackupApiFp(configuration) return { /** * Delete multiple backups in a single request. Backups which cannot be deleted are reported in the error response and do not roll back the backups that were already deleted. * @summary Batch delete backups * @param {BackupApiBatchDeleteBackupsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchDeleteBackups(requestParameters: BackupApiBatchDeleteBackupsRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.batchDeleteBackups(requestParameters.orgName, requestParameters.body, options).then((request) => request(axios, basePath)); }, /** * * @summary build backup object with a existing backup directory * @param {BackupApiBuildBackupObjRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ buildBackupObj(requestParameters: BackupApiBuildBackupObjRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.buildBackupObj(requestParameters.orgName, requestParameters.environmentName, requestParameters.engineName, requestParameters.body, options).then((request) => request(axios, basePath)); }, /** * * @summary Create backup schedule * @param {BackupApiCreateBackupScheduleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBackupSchedule(requestParameters: BackupApiCreateBackupScheduleRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createBackupSchedule(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath)); }, /** * * @summary Create backup * @param {BackupApiCreateClusterBackupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createClusterBackup(requestParameters: BackupApiCreateClusterBackupRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createClusterBackup(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, requestParameters.component, options).then((request) => request(axios, basePath)); }, /** * * @summary Delete backup * @param {BackupApiDeleteBackupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteBackup(requestParameters: BackupApiDeleteBackupRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteBackup(requestParameters.orgName, requestParameters.backupId, options).then((request) => request(axios, basePath)); }, /** * * @summary Delete backup schedule * @param {BackupApiDeleteBackupScheduleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteBackupSchedule(requestParameters: BackupApiDeleteBackupScheduleRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteBackupSchedule(requestParameters.orgName, requestParameters.clusterName, requestParameters.scheduleName, options).then((request) => request(axios, basePath)); }, /** * * @summary Download full backup * @param {BackupApiDownloadBackupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadBackup(requestParameters: BackupApiDownloadBackupRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.downloadBackup(requestParameters.orgName, requestParameters.backupId, options).then((request) => request(axios, basePath)); }, /** * * @summary Download multiple backup files * @param {BackupApiDownloadMultipleBackupsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadMultipleBackups(requestParameters: BackupApiDownloadMultipleBackupsRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.downloadMultipleBackups(requestParameters.orgName, requestParameters.backupId, requestParameters.backupDownload, options).then((request) => request(axios, basePath)); }, /** * * @summary Get backup * @param {BackupApiGetBackupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBackup(requestParameters: BackupApiGetBackupRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getBackup(requestParameters.orgName, requestParameters.backupId, options).then((request) => request(axios, basePath)); }, /** * * @summary Get backup log * @param {BackupApiGetBackupLogRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBackupLog(requestParameters: BackupApiGetBackupLogRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getBackupLog(requestParameters.orgName, requestParameters.backupId, options).then((request) => request(axios, basePath)); }, /** * * @summary Get backup statistics * @param {BackupApiGetBackupStatsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBackupStats(requestParameters: BackupApiGetBackupStatsRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getBackupStats(requestParameters.orgName, requestParameters.clusterID, options).then((request) => request(axios, basePath)); }, /** * * @summary Get backup policy * @param {BackupApiGetClusterBackupPolicyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getClusterBackupPolicy(requestParameters: BackupApiGetClusterBackupPolicyRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getClusterBackupPolicy(requestParameters.orgName, requestParameters.clusterName, requestParameters.useVolumeSnapshot, options).then((request) => request(axios, basePath)); }, /** * * @summary List backup schedules * @param {BackupApiListBackupSchedulesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listBackupSchedules(requestParameters: BackupApiListBackupSchedulesRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.listBackupSchedules(requestParameters.orgName, requestParameters.clusterName, requestParameters.backupMethod, options).then((request) => request(axios, basePath)); }, /** * * @summary List backups * @param {BackupApiListBackupsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listBackups(requestParameters: BackupApiListBackupsRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.listBackups(requestParameters.orgName, requestParameters.clusterName, requestParameters.clusterID, requestParameters.backupRepo, requestParameters.fetchWithDeletedCluster, requestParameters.withDeletedBackups, requestParameters.withRestoreCluster, requestParameters.backupType, requestParameters.withRebuildInstance, requestParameters.withHScale, requestParameters.componentName, requestParameters.page, requestParameters.pageSize, options).then((request) => request(axios, basePath)); }, /** * * @summary List objects tree for selective backup * @param {BackupApiListObjectsTreeForSelectiveBackupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listObjectsTreeForSelectiveBackup(requestParameters: BackupApiListObjectsTreeForSelectiveBackupRequest, options?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.listObjectsTreeForSelectiveBackup(requestParameters.orgName, requestParameters.clusterName, requestParameters.database, options).then((request) => request(axios, basePath)); }, /** * partially update the specified Backup Policy * @summary Update backup policy * @param {BackupApiUpdateBackupPolicyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateBackupPolicy(requestParameters: BackupApiUpdateBackupPolicyRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.updateBackupPolicy(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, requestParameters.useVolumeSnapshot, options).then((request) => request(axios, basePath)); }, /** * * @summary Update backup schedule * @param {BackupApiUpdateBackupScheduleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateBackupSchedule(requestParameters: BackupApiUpdateBackupScheduleRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.updateBackupSchedule(requestParameters.orgName, requestParameters.clusterName, requestParameters.scheduleName, requestParameters.body, options).then((request) => request(axios, basePath)); }, /** * * @summary view backup info * @param {BackupApiViewBackupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ viewBackup(requestParameters: BackupApiViewBackupRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.viewBackup(requestParameters.orgName, requestParameters.backupId, requestParameters.backupView, options).then((request) => request(axios, basePath)); }, }; }; /** * BackupApi - interface * @export * @interface BackupApi */ export interface BackupApiInterface { /** * Delete multiple backups in a single request. Backups which cannot be deleted are reported in the error response and do not roll back the backups that were already deleted. * @summary Batch delete backups * @param {BackupApiBatchDeleteBackupsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApiInterface */ batchDeleteBackups(requestParameters: BackupApiBatchDeleteBackupsRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary build backup object with a existing backup directory * @param {BackupApiBuildBackupObjRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApiInterface */ buildBackupObj(requestParameters: BackupApiBuildBackupObjRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary Create backup schedule * @param {BackupApiCreateBackupScheduleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApiInterface */ createBackupSchedule(requestParameters: BackupApiCreateBackupScheduleRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary Create backup * @param {BackupApiCreateClusterBackupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApiInterface */ createClusterBackup(requestParameters: BackupApiCreateClusterBackupRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary Delete backup * @param {BackupApiDeleteBackupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApiInterface */ deleteBackup(requestParameters: BackupApiDeleteBackupRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary Delete backup schedule * @param {BackupApiDeleteBackupScheduleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApiInterface */ deleteBackupSchedule(requestParameters: BackupApiDeleteBackupScheduleRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary Download full backup * @param {BackupApiDownloadBackupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApiInterface */ downloadBackup(requestParameters: BackupApiDownloadBackupRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary Download multiple backup files * @param {BackupApiDownloadMultipleBackupsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApiInterface */ downloadMultipleBackups(requestParameters: BackupApiDownloadMultipleBackupsRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary Get backup * @param {BackupApiGetBackupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApiInterface */ getBackup(requestParameters: BackupApiGetBackupRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary Get backup log * @param {BackupApiGetBackupLogRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApiInterface */ getBackupLog(requestParameters: BackupApiGetBackupLogRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary Get backup statistics * @param {BackupApiGetBackupStatsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApiInterface */ getBackupStats(requestParameters: BackupApiGetBackupStatsRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary Get backup policy * @param {BackupApiGetClusterBackupPolicyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApiInterface */ getClusterBackupPolicy(requestParameters: BackupApiGetClusterBackupPolicyRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary List backup schedules * @param {BackupApiListBackupSchedulesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApiInterface */ listBackupSchedules(requestParameters: BackupApiListBackupSchedulesRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary List backups * @param {BackupApiListBackupsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApiInterface */ listBackups(requestParameters: BackupApiListBackupsRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary List objects tree for selective backup * @param {BackupApiListObjectsTreeForSelectiveBackupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApiInterface */ listObjectsTreeForSelectiveBackup(requestParameters: BackupApiListObjectsTreeForSelectiveBackupRequest, options?: RawAxiosRequestConfig): AxiosPromise>; /** * partially update the specified Backup Policy * @summary Update backup policy * @param {BackupApiUpdateBackupPolicyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApiInterface */ updateBackupPolicy(requestParameters: BackupApiUpdateBackupPolicyRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary Update backup schedule * @param {BackupApiUpdateBackupScheduleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApiInterface */ updateBackupSchedule(requestParameters: BackupApiUpdateBackupScheduleRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary view backup info * @param {BackupApiViewBackupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApiInterface */ viewBackup(requestParameters: BackupApiViewBackupRequest, options?: RawAxiosRequestConfig): AxiosPromise; } /** * Request parameters for batchDeleteBackups operation in BackupApi. * @export * @interface BackupApiBatchDeleteBackupsRequest */ export interface BackupApiBatchDeleteBackupsRequest { /** * name of the Org * @type {string} * @memberof BackupApiBatchDeleteBackups */ readonly orgName: string /** * * @type {BackupBatchDelete} * @memberof BackupApiBatchDeleteBackups */ readonly body: BackupBatchDelete } /** * Request parameters for buildBackupObj operation in BackupApi. * @export * @interface BackupApiBuildBackupObjRequest */ export interface BackupApiBuildBackupObjRequest { /** * name of the Org * @type {string} * @memberof BackupApiBuildBackupObj */ readonly orgName: string /** * name of the environment * @type {string} * @memberof BackupApiBuildBackupObj */ readonly environmentName: string /** * name of the engine * @type {string} * @memberof BackupApiBuildBackupObj */ readonly engineName: string /** * * @type {BuildBackupObjRequest} * @memberof BackupApiBuildBackupObj */ readonly body: BuildBackupObjRequest } /** * Request parameters for createBackupSchedule operation in BackupApi. * @export * @interface BackupApiCreateBackupScheduleRequest */ export interface BackupApiCreateBackupScheduleRequest { /** * name of the org * @type {string} * @memberof BackupApiCreateBackupSchedule */ readonly orgName: string /** * name of the cluster * @type {string} * @memberof BackupApiCreateBackupSchedule */ readonly clusterName: string /** * * @type {BackupScheduleCreate} * @memberof BackupApiCreateBackupSchedule */ readonly body: BackupScheduleCreate } /** * Request parameters for createClusterBackup operation in BackupApi. * @export * @interface BackupApiCreateClusterBackupRequest */ export interface BackupApiCreateClusterBackupRequest { /** * name of the Org * @type {string} * @memberof BackupApiCreateClusterBackup */ readonly orgName: string /** * name of the KubeBlocks cluster * @type {string} * @memberof BackupApiCreateClusterBackup */ readonly clusterName: string /** * * @type {BackupCreate} * @memberof BackupApiCreateClusterBackup */ readonly body: BackupCreate /** * name of the component * @type {string} * @memberof BackupApiCreateClusterBackup */ readonly component?: string } /** * Request parameters for deleteBackup operation in BackupApi. * @export * @interface BackupApiDeleteBackupRequest */ export interface BackupApiDeleteBackupRequest { /** * name of the Org * @type {string} * @memberof BackupApiDeleteBackup */ readonly orgName: string /** * id of the Backup * @type {string} * @memberof BackupApiDeleteBackup */ readonly backupId: string } /** * Request parameters for deleteBackupSchedule operation in BackupApi. * @export * @interface BackupApiDeleteBackupScheduleRequest */ export interface BackupApiDeleteBackupScheduleRequest { /** * name of the org * @type {string} * @memberof BackupApiDeleteBackupSchedule */ readonly orgName: string /** * name of the cluster * @type {string} * @memberof BackupApiDeleteBackupSchedule */ readonly clusterName: string /** * name of the backup schedule * @type {string} * @memberof BackupApiDeleteBackupSchedule */ readonly scheduleName: string } /** * Request parameters for downloadBackup operation in BackupApi. * @export * @interface BackupApiDownloadBackupRequest */ export interface BackupApiDownloadBackupRequest { /** * name of the org * @type {string} * @memberof BackupApiDownloadBackup */ readonly orgName: string /** * the id of backup * @type {string} * @memberof BackupApiDownloadBackup */ readonly backupId: string } /** * Request parameters for downloadMultipleBackups operation in BackupApi. * @export * @interface BackupApiDownloadMultipleBackupsRequest */ export interface BackupApiDownloadMultipleBackupsRequest { /** * name of the org * @type {string} * @memberof BackupApiDownloadMultipleBackups */ readonly orgName: string /** * the id of backup * @type {string} * @memberof BackupApiDownloadMultipleBackups */ readonly backupId: string /** * * @type {BackupDownload} * @memberof BackupApiDownloadMultipleBackups */ readonly backupDownload: BackupDownload } /** * Request parameters for getBackup operation in BackupApi. * @export * @interface BackupApiGetBackupRequest */ export interface BackupApiGetBackupRequest { /** * name of the Org * @type {string} * @memberof BackupApiGetBackup */ readonly orgName: string /** * id of the Backup * @type {string} * @memberof BackupApiGetBackup */ readonly backupId: string } /** * Request parameters for getBackupLog operation in BackupApi. * @export * @interface BackupApiGetBackupLogRequest */ export interface BackupApiGetBackupLogRequest { /** * name of the Org * @type {string} * @memberof BackupApiGetBackupLog */ readonly orgName: string /** * id of the Backup * @type {string} * @memberof BackupApiGetBackupLog */ readonly backupId: string } /** * Request parameters for getBackupStats operation in BackupApi. * @export * @interface BackupApiGetBackupStatsRequest */ export interface BackupApiGetBackupStatsRequest { /** * name of the Org * @type {string} * @memberof BackupApiGetBackupStats */ readonly orgName: string /** * id of the Cluster * @type {string} * @memberof BackupApiGetBackupStats */ readonly clusterID?: string } /** * Request parameters for getClusterBackupPolicy operation in BackupApi. * @export * @interface BackupApiGetClusterBackupPolicyRequest */ export interface BackupApiGetClusterBackupPolicyRequest { /** * name of the Org * @type {string} * @memberof BackupApiGetClusterBackupPolicy */ readonly orgName: string /** * name of the KubeBlocks cluster * @type {string} * @memberof BackupApiGetClusterBackupPolicy */ readonly clusterName: string /** * use volume snapshot to back up * @type {boolean} * @memberof BackupApiGetClusterBackupPolicy */ readonly useVolumeSnapshot?: boolean } /** * Request parameters for listBackupSchedules operation in BackupApi. * @export * @interface BackupApiListBackupSchedulesRequest */ export interface BackupApiListBackupSchedulesRequest { /** * name of the org * @type {string} * @memberof BackupApiListBackupSchedules */ readonly orgName: string /** * name of the cluster * @type {string} * @memberof BackupApiListBackupSchedules */ readonly clusterName: string /** * filter by backup method * @type {string} * @memberof BackupApiListBackupSchedules */ readonly backupMethod?: string } /** * Request parameters for listBackups operation in BackupApi. * @export * @interface BackupApiListBackupsRequest */ export interface BackupApiListBackupsRequest { /** * name of the Org * @type {string} * @memberof BackupApiListBackups */ readonly orgName: string /** * cluster name of the Backup * @type {string} * @memberof BackupApiListBackups */ readonly clusterName?: string /** * cluster ID of the Backup * @type {string} * @memberof BackupApiListBackups */ readonly clusterID?: string /** * backup repo of the Backup * @type {string} * @memberof BackupApiListBackups */ readonly backupRepo?: string /** * defined whether to search for deleted clusters. if not set, returns all backups * @type {boolean} * @memberof BackupApiListBackups */ readonly fetchWithDeletedCluster?: boolean /** * defined whether to search for deleted backups. if not set, only return backups that are not deleted * @type {boolean} * @memberof BackupApiListBackups */ readonly withDeletedBackups?: boolean /** * defined whether to search for restore backups. * @type {boolean} * @memberof BackupApiListBackups */ readonly withRestoreCluster?: boolean /** * type of the backup * @type {string} * @memberof BackupApiListBackups */ readonly backupType?: string /** * defined whether to search for rebuilding instance. * @type {boolean} * @memberof BackupApiListBackups */ readonly withRebuildInstance?: boolean /** * defined whether to search for hScale instance. * @type {boolean} * @memberof BackupApiListBackups */ readonly withHScale?: boolean /** * get the backups belong to the component * @type {string} * @memberof BackupApiListBackups */ readonly componentName?: string /** * page number * @type {number} * @memberof BackupApiListBackups */ readonly page?: number /** * page size * @type {number} * @memberof BackupApiListBackups */ readonly pageSize?: number } /** * Request parameters for listObjectsTreeForSelectiveBackup operation in BackupApi. * @export * @interface BackupApiListObjectsTreeForSelectiveBackupRequest */ export interface BackupApiListObjectsTreeForSelectiveBackupRequest { /** * name of the org * @type {string} * @memberof BackupApiListObjectsTreeForSelectiveBackup */ readonly orgName: string /** * name of the cluster * @type {string} * @memberof BackupApiListObjectsTreeForSelectiveBackup */ readonly clusterName: string /** * Database name for engines configured to switch the object tree by database. * @type {string} * @memberof BackupApiListObjectsTreeForSelectiveBackup */ readonly database?: string } /** * Request parameters for updateBackupPolicy operation in BackupApi. * @export * @interface BackupApiUpdateBackupPolicyRequest */ export interface BackupApiUpdateBackupPolicyRequest { /** * name of the Org * @type {string} * @memberof BackupApiUpdateBackupPolicy */ readonly orgName: string /** * name of the KubeBlocks cluster * @type {string} * @memberof BackupApiUpdateBackupPolicy */ readonly clusterName: string /** * * @type {BackupPolicy} * @memberof BackupApiUpdateBackupPolicy */ readonly body: BackupPolicy /** * use volume snapshot to back up * @type {boolean} * @memberof BackupApiUpdateBackupPolicy */ readonly useVolumeSnapshot?: boolean } /** * Request parameters for updateBackupSchedule operation in BackupApi. * @export * @interface BackupApiUpdateBackupScheduleRequest */ export interface BackupApiUpdateBackupScheduleRequest { /** * name of the org * @type {string} * @memberof BackupApiUpdateBackupSchedule */ readonly orgName: string /** * name of the cluster * @type {string} * @memberof BackupApiUpdateBackupSchedule */ readonly clusterName: string /** * name of the backup schedule * @type {string} * @memberof BackupApiUpdateBackupSchedule */ readonly scheduleName: string /** * * @type {BackupScheduleUpdate} * @memberof BackupApiUpdateBackupSchedule */ readonly body: BackupScheduleUpdate } /** * Request parameters for viewBackup operation in BackupApi. * @export * @interface BackupApiViewBackupRequest */ export interface BackupApiViewBackupRequest { /** * name of the org * @type {string} * @memberof BackupApiViewBackup */ readonly orgName: string /** * the id of backup * @type {string} * @memberof BackupApiViewBackup */ readonly backupId: string /** * * @type {BackupView} * @memberof BackupApiViewBackup */ readonly backupView?: BackupView } /** * BackupApi - object-oriented interface * @export * @class BackupApi * @extends {BaseAPI} */ export class BackupApi extends BaseAPI implements BackupApiInterface { /** * Delete multiple backups in a single request. Backups which cannot be deleted are reported in the error response and do not roll back the backups that were already deleted. * @summary Batch delete backups * @param {BackupApiBatchDeleteBackupsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public batchDeleteBackups(requestParameters: BackupApiBatchDeleteBackupsRequest, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).batchDeleteBackups(requestParameters.orgName, requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary build backup object with a existing backup directory * @param {BackupApiBuildBackupObjRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public buildBackupObj(requestParameters: BackupApiBuildBackupObjRequest, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).buildBackupObj(requestParameters.orgName, requestParameters.environmentName, requestParameters.engineName, requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Create backup schedule * @param {BackupApiCreateBackupScheduleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public createBackupSchedule(requestParameters: BackupApiCreateBackupScheduleRequest, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).createBackupSchedule(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Create backup * @param {BackupApiCreateClusterBackupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public createClusterBackup(requestParameters: BackupApiCreateClusterBackupRequest, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).createClusterBackup(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, requestParameters.component, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Delete backup * @param {BackupApiDeleteBackupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public deleteBackup(requestParameters: BackupApiDeleteBackupRequest, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).deleteBackup(requestParameters.orgName, requestParameters.backupId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Delete backup schedule * @param {BackupApiDeleteBackupScheduleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public deleteBackupSchedule(requestParameters: BackupApiDeleteBackupScheduleRequest, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).deleteBackupSchedule(requestParameters.orgName, requestParameters.clusterName, requestParameters.scheduleName, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Download full backup * @param {BackupApiDownloadBackupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public downloadBackup(requestParameters: BackupApiDownloadBackupRequest, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).downloadBackup(requestParameters.orgName, requestParameters.backupId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Download multiple backup files * @param {BackupApiDownloadMultipleBackupsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public downloadMultipleBackups(requestParameters: BackupApiDownloadMultipleBackupsRequest, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).downloadMultipleBackups(requestParameters.orgName, requestParameters.backupId, requestParameters.backupDownload, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Get backup * @param {BackupApiGetBackupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public getBackup(requestParameters: BackupApiGetBackupRequest, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).getBackup(requestParameters.orgName, requestParameters.backupId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Get backup log * @param {BackupApiGetBackupLogRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public getBackupLog(requestParameters: BackupApiGetBackupLogRequest, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).getBackupLog(requestParameters.orgName, requestParameters.backupId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Get backup statistics * @param {BackupApiGetBackupStatsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public getBackupStats(requestParameters: BackupApiGetBackupStatsRequest, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).getBackupStats(requestParameters.orgName, requestParameters.clusterID, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Get backup policy * @param {BackupApiGetClusterBackupPolicyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public getClusterBackupPolicy(requestParameters: BackupApiGetClusterBackupPolicyRequest, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).getClusterBackupPolicy(requestParameters.orgName, requestParameters.clusterName, requestParameters.useVolumeSnapshot, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary List backup schedules * @param {BackupApiListBackupSchedulesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public listBackupSchedules(requestParameters: BackupApiListBackupSchedulesRequest, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).listBackupSchedules(requestParameters.orgName, requestParameters.clusterName, requestParameters.backupMethod, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary List backups * @param {BackupApiListBackupsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public listBackups(requestParameters: BackupApiListBackupsRequest, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).listBackups(requestParameters.orgName, requestParameters.clusterName, requestParameters.clusterID, requestParameters.backupRepo, requestParameters.fetchWithDeletedCluster, requestParameters.withDeletedBackups, requestParameters.withRestoreCluster, requestParameters.backupType, requestParameters.withRebuildInstance, requestParameters.withHScale, requestParameters.componentName, requestParameters.page, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary List objects tree for selective backup * @param {BackupApiListObjectsTreeForSelectiveBackupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public listObjectsTreeForSelectiveBackup(requestParameters: BackupApiListObjectsTreeForSelectiveBackupRequest, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).listObjectsTreeForSelectiveBackup(requestParameters.orgName, requestParameters.clusterName, requestParameters.database, options).then((request) => request(this.axios, this.basePath)); } /** * partially update the specified Backup Policy * @summary Update backup policy * @param {BackupApiUpdateBackupPolicyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public updateBackupPolicy(requestParameters: BackupApiUpdateBackupPolicyRequest, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).updateBackupPolicy(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, requestParameters.useVolumeSnapshot, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Update backup schedule * @param {BackupApiUpdateBackupScheduleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public updateBackupSchedule(requestParameters: BackupApiUpdateBackupScheduleRequest, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).updateBackupSchedule(requestParameters.orgName, requestParameters.clusterName, requestParameters.scheduleName, requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary view backup info * @param {BackupApiViewBackupRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public viewBackup(requestParameters: BackupApiViewBackupRequest, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).viewBackup(requestParameters.orgName, requestParameters.backupId, requestParameters.backupView, options).then((request) => request(this.axios, this.basePath)); } }