/* 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 { BlueGreenDeploymentCreation } from '../models'; // @ts-ignore import type { BlueGreenDeploymentItem } from '../models'; // @ts-ignore import type { BlueGreenDeploymentItemList } from '../models'; // @ts-ignore import type { BlueGreenDeploymentPreCheckResponse } from '../models'; // @ts-ignore import type { BlueGreenDeploymentSwitchResponse } from '../models'; // @ts-ignore import type { BlueGreenDeploymentTask } from '../models'; /** * BlueGreenDeploymentApi - axios parameter creator * @export */ export const BlueGreenDeploymentApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Create a blue-green deployment instance for the specified parent cluster. * @summary Create a new blue-green deployment instance * @param {string} parentClusterID The unique identifier of the parent database cluster * @param {string} orgName Name of the organization * @param {BlueGreenDeploymentCreation} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBlueGreenDeployment: async (parentClusterID: string, orgName: string, body: BlueGreenDeploymentCreation, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'parentClusterID' is not null or undefined assertParamExists('createBlueGreenDeployment', 'parentClusterID', parentClusterID) // verify required parameter 'orgName' is not null or undefined assertParamExists('createBlueGreenDeployment', 'orgName', orgName) // verify required parameter 'body' is not null or undefined assertParamExists('createBlueGreenDeployment', 'body', body) const localVarPath = `/api/v1/organizations/{orgName}/parent/{parentClusterID}/blueGreenDeployment` .replace(`{${"parentClusterID"}}`, encodeURIComponent(String(parentClusterID))) .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, }; }, /** * Trigger a precheck task to verify settings or readiness for blue-green deployment. * @summary Run a precheck for blue-green deployment * @param {string} orgName Name of the organization * @param {string} parentClusterID The unique identifier of the parent database cluster * @param {string} greenClusterVersion The version of the green cluster * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBlueGreenDeploymentPreCheck: async (orgName: string, parentClusterID: string, greenClusterVersion: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('createBlueGreenDeploymentPreCheck', 'orgName', orgName) // verify required parameter 'parentClusterID' is not null or undefined assertParamExists('createBlueGreenDeploymentPreCheck', 'parentClusterID', parentClusterID) // verify required parameter 'greenClusterVersion' is not null or undefined assertParamExists('createBlueGreenDeploymentPreCheck', 'greenClusterVersion', greenClusterVersion) const localVarPath = `/api/v1/organizations/{orgName}/parent/{parentClusterID}/blueGreenDeployment/precheck` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"parentClusterID"}}`, encodeURIComponent(String(parentClusterID))); // 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 (greenClusterVersion !== undefined) { localVarQueryParameter['greenClusterVersion'] = greenClusterVersion; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Delete a specified blue-green deployment instance. * @summary Delete a blue-green deployment instance * @param {string} deploymentID The unique identifier of the blue-green deployment instance * @param {string} orgName Name of the organization * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteBlueGreenDeployment: async (deploymentID: string, orgName: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'deploymentID' is not null or undefined assertParamExists('deleteBlueGreenDeployment', 'deploymentID', deploymentID) // verify required parameter 'orgName' is not null or undefined assertParamExists('deleteBlueGreenDeployment', 'orgName', orgName) const localVarPath = `/api/v1/organizations/{orgName}/blueGreenDeployment/{deploymentID}` .replace(`{${"deploymentID"}}`, encodeURIComponent(String(deploymentID))) .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: '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, }; }, /** * Retrieve details for a single blue-green deployment instance by parent cluster and organization. * @summary Get a blue-green deployment instance * @param {string} deploymentID The unique identifier of the blue-green deployment instance * @param {string} orgName Name of the organization * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBlueGreenDeployment: async (deploymentID: string, orgName: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'deploymentID' is not null or undefined assertParamExists('getBlueGreenDeployment', 'deploymentID', deploymentID) // verify required parameter 'orgName' is not null or undefined assertParamExists('getBlueGreenDeployment', 'orgName', orgName) const localVarPath = `/api/v1/organizations/{orgName}/blueGreenDeployment/{deploymentID}` .replace(`{${"deploymentID"}}`, encodeURIComponent(String(deploymentID))) .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) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve the details of a precheck task for a blue-green deployment. * @summary Get blue-green deployment precheck task detail * @param {string} preCheckID The unique identifier of the precheck task * @param {string} orgName Name of the organization * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBlueGreenDeploymentPreCheckDetail: async (preCheckID: string, orgName: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'preCheckID' is not null or undefined assertParamExists('getBlueGreenDeploymentPreCheckDetail', 'preCheckID', preCheckID) // verify required parameter 'orgName' is not null or undefined assertParamExists('getBlueGreenDeploymentPreCheckDetail', 'orgName', orgName) const localVarPath = `/api/v1/organizations/{orgName}/blueGreenDeployment/precheck/{preCheckID}` .replace(`{${"preCheckID"}}`, encodeURIComponent(String(preCheckID))) .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) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve detailed information about the switch-over operation for a blue-green deployment cluster. * @summary Get blue-green deployment switch job detail * @param {string} deploymentID The unique identifier of the blue-green deployment instance * @param {string} orgName Name of the organization * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBlueGreenDeploymentSwitchDetail: async (deploymentID: string, orgName: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'deploymentID' is not null or undefined assertParamExists('getBlueGreenDeploymentSwitchDetail', 'deploymentID', deploymentID) // verify required parameter 'orgName' is not null or undefined assertParamExists('getBlueGreenDeploymentSwitchDetail', 'orgName', orgName) const localVarPath = `/api/v1/organizations/{orgName}/blueGreenDeployment/{deploymentID}/switch` .replace(`{${"deploymentID"}}`, encodeURIComponent(String(deploymentID))) .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) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve a list of blue-green deployment instances associated with the given parent database cluster. * @summary List blue-green deployment instances for the specified parent cluster * @param {string} parentClusterID The unique identifier of the parent database cluster * @param {string} orgName Name of the organization * @param {*} [options] Override http request option. * @throws {RequiredError} */ listBlueGreenDeployments: async (parentClusterID: string, orgName: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'parentClusterID' is not null or undefined assertParamExists('listBlueGreenDeployments', 'parentClusterID', parentClusterID) // verify required parameter 'orgName' is not null or undefined assertParamExists('listBlueGreenDeployments', 'orgName', orgName) const localVarPath = `/api/v1/organizations/{orgName}/parent/{parentClusterID}/blueGreenDeployment` .replace(`{${"parentClusterID"}}`, encodeURIComponent(String(parentClusterID))) .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) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Switch the specified blue-green deployment cluster to act as the primary instance. * @summary Switch roles of blue-green deployment instances * @param {string} deploymentID The unique identifier of the blue-green deployment cluster * @param {string} orgName Name of the organization * @param {*} [options] Override http request option. * @throws {RequiredError} */ switchBlueGreenDeployment: async (deploymentID: string, orgName: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'deploymentID' is not null or undefined assertParamExists('switchBlueGreenDeployment', 'deploymentID', deploymentID) // verify required parameter 'orgName' is not null or undefined assertParamExists('switchBlueGreenDeployment', 'orgName', orgName) const localVarPath = `/api/v1/organizations/{orgName}/blueGreenDeployment/{deploymentID}/switch` .replace(`{${"deploymentID"}}`, encodeURIComponent(String(deploymentID))) .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) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * BlueGreenDeploymentApi - functional programming interface * @export */ export const BlueGreenDeploymentApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = BlueGreenDeploymentApiAxiosParamCreator(configuration) return { /** * Create a blue-green deployment instance for the specified parent cluster. * @summary Create a new blue-green deployment instance * @param {string} parentClusterID The unique identifier of the parent database cluster * @param {string} orgName Name of the organization * @param {BlueGreenDeploymentCreation} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createBlueGreenDeployment(parentClusterID: string, orgName: string, body: BlueGreenDeploymentCreation, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createBlueGreenDeployment(parentClusterID, orgName, body, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BlueGreenDeploymentApi.createBlueGreenDeployment']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Trigger a precheck task to verify settings or readiness for blue-green deployment. * @summary Run a precheck for blue-green deployment * @param {string} orgName Name of the organization * @param {string} parentClusterID The unique identifier of the parent database cluster * @param {string} greenClusterVersion The version of the green cluster * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createBlueGreenDeploymentPreCheck(orgName: string, parentClusterID: string, greenClusterVersion: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createBlueGreenDeploymentPreCheck(orgName, parentClusterID, greenClusterVersion, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BlueGreenDeploymentApi.createBlueGreenDeploymentPreCheck']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Delete a specified blue-green deployment instance. * @summary Delete a blue-green deployment instance * @param {string} deploymentID The unique identifier of the blue-green deployment instance * @param {string} orgName Name of the organization * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteBlueGreenDeployment(deploymentID: string, orgName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBlueGreenDeployment(deploymentID, orgName, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BlueGreenDeploymentApi.deleteBlueGreenDeployment']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Retrieve details for a single blue-green deployment instance by parent cluster and organization. * @summary Get a blue-green deployment instance * @param {string} deploymentID The unique identifier of the blue-green deployment instance * @param {string} orgName Name of the organization * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getBlueGreenDeployment(deploymentID: string, orgName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getBlueGreenDeployment(deploymentID, orgName, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BlueGreenDeploymentApi.getBlueGreenDeployment']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Retrieve the details of a precheck task for a blue-green deployment. * @summary Get blue-green deployment precheck task detail * @param {string} preCheckID The unique identifier of the precheck task * @param {string} orgName Name of the organization * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getBlueGreenDeploymentPreCheckDetail(preCheckID: string, orgName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getBlueGreenDeploymentPreCheckDetail(preCheckID, orgName, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BlueGreenDeploymentApi.getBlueGreenDeploymentPreCheckDetail']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Retrieve detailed information about the switch-over operation for a blue-green deployment cluster. * @summary Get blue-green deployment switch job detail * @param {string} deploymentID The unique identifier of the blue-green deployment instance * @param {string} orgName Name of the organization * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getBlueGreenDeploymentSwitchDetail(deploymentID: string, orgName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getBlueGreenDeploymentSwitchDetail(deploymentID, orgName, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BlueGreenDeploymentApi.getBlueGreenDeploymentSwitchDetail']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Retrieve a list of blue-green deployment instances associated with the given parent database cluster. * @summary List blue-green deployment instances for the specified parent cluster * @param {string} parentClusterID The unique identifier of the parent database cluster * @param {string} orgName Name of the organization * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listBlueGreenDeployments(parentClusterID: string, orgName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listBlueGreenDeployments(parentClusterID, orgName, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BlueGreenDeploymentApi.listBlueGreenDeployments']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Switch the specified blue-green deployment cluster to act as the primary instance. * @summary Switch roles of blue-green deployment instances * @param {string} deploymentID The unique identifier of the blue-green deployment cluster * @param {string} orgName Name of the organization * @param {*} [options] Override http request option. * @throws {RequiredError} */ async switchBlueGreenDeployment(deploymentID: string, orgName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.switchBlueGreenDeployment(deploymentID, orgName, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BlueGreenDeploymentApi.switchBlueGreenDeployment']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * BlueGreenDeploymentApi - factory interface * @export */ export const BlueGreenDeploymentApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = BlueGreenDeploymentApiFp(configuration) return { /** * Create a blue-green deployment instance for the specified parent cluster. * @summary Create a new blue-green deployment instance * @param {BlueGreenDeploymentApiCreateBlueGreenDeploymentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBlueGreenDeployment(requestParameters: BlueGreenDeploymentApiCreateBlueGreenDeploymentRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createBlueGreenDeployment(requestParameters.parentClusterID, requestParameters.orgName, requestParameters.body, options).then((request) => request(axios, basePath)); }, /** * Trigger a precheck task to verify settings or readiness for blue-green deployment. * @summary Run a precheck for blue-green deployment * @param {BlueGreenDeploymentApiCreateBlueGreenDeploymentPreCheckRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBlueGreenDeploymentPreCheck(requestParameters: BlueGreenDeploymentApiCreateBlueGreenDeploymentPreCheckRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createBlueGreenDeploymentPreCheck(requestParameters.orgName, requestParameters.parentClusterID, requestParameters.greenClusterVersion, options).then((request) => request(axios, basePath)); }, /** * Delete a specified blue-green deployment instance. * @summary Delete a blue-green deployment instance * @param {BlueGreenDeploymentApiDeleteBlueGreenDeploymentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteBlueGreenDeployment(requestParameters: BlueGreenDeploymentApiDeleteBlueGreenDeploymentRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteBlueGreenDeployment(requestParameters.deploymentID, requestParameters.orgName, options).then((request) => request(axios, basePath)); }, /** * Retrieve details for a single blue-green deployment instance by parent cluster and organization. * @summary Get a blue-green deployment instance * @param {BlueGreenDeploymentApiGetBlueGreenDeploymentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBlueGreenDeployment(requestParameters: BlueGreenDeploymentApiGetBlueGreenDeploymentRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getBlueGreenDeployment(requestParameters.deploymentID, requestParameters.orgName, options).then((request) => request(axios, basePath)); }, /** * Retrieve the details of a precheck task for a blue-green deployment. * @summary Get blue-green deployment precheck task detail * @param {BlueGreenDeploymentApiGetBlueGreenDeploymentPreCheckDetailRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBlueGreenDeploymentPreCheckDetail(requestParameters: BlueGreenDeploymentApiGetBlueGreenDeploymentPreCheckDetailRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getBlueGreenDeploymentPreCheckDetail(requestParameters.preCheckID, requestParameters.orgName, options).then((request) => request(axios, basePath)); }, /** * Retrieve detailed information about the switch-over operation for a blue-green deployment cluster. * @summary Get blue-green deployment switch job detail * @param {BlueGreenDeploymentApiGetBlueGreenDeploymentSwitchDetailRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBlueGreenDeploymentSwitchDetail(requestParameters: BlueGreenDeploymentApiGetBlueGreenDeploymentSwitchDetailRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getBlueGreenDeploymentSwitchDetail(requestParameters.deploymentID, requestParameters.orgName, options).then((request) => request(axios, basePath)); }, /** * Retrieve a list of blue-green deployment instances associated with the given parent database cluster. * @summary List blue-green deployment instances for the specified parent cluster * @param {BlueGreenDeploymentApiListBlueGreenDeploymentsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listBlueGreenDeployments(requestParameters: BlueGreenDeploymentApiListBlueGreenDeploymentsRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.listBlueGreenDeployments(requestParameters.parentClusterID, requestParameters.orgName, options).then((request) => request(axios, basePath)); }, /** * Switch the specified blue-green deployment cluster to act as the primary instance. * @summary Switch roles of blue-green deployment instances * @param {BlueGreenDeploymentApiSwitchBlueGreenDeploymentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ switchBlueGreenDeployment(requestParameters: BlueGreenDeploymentApiSwitchBlueGreenDeploymentRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.switchBlueGreenDeployment(requestParameters.deploymentID, requestParameters.orgName, options).then((request) => request(axios, basePath)); }, }; }; /** * BlueGreenDeploymentApi - interface * @export * @interface BlueGreenDeploymentApi */ export interface BlueGreenDeploymentApiInterface { /** * Create a blue-green deployment instance for the specified parent cluster. * @summary Create a new blue-green deployment instance * @param {BlueGreenDeploymentApiCreateBlueGreenDeploymentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlueGreenDeploymentApiInterface */ createBlueGreenDeployment(requestParameters: BlueGreenDeploymentApiCreateBlueGreenDeploymentRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Trigger a precheck task to verify settings or readiness for blue-green deployment. * @summary Run a precheck for blue-green deployment * @param {BlueGreenDeploymentApiCreateBlueGreenDeploymentPreCheckRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlueGreenDeploymentApiInterface */ createBlueGreenDeploymentPreCheck(requestParameters: BlueGreenDeploymentApiCreateBlueGreenDeploymentPreCheckRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Delete a specified blue-green deployment instance. * @summary Delete a blue-green deployment instance * @param {BlueGreenDeploymentApiDeleteBlueGreenDeploymentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlueGreenDeploymentApiInterface */ deleteBlueGreenDeployment(requestParameters: BlueGreenDeploymentApiDeleteBlueGreenDeploymentRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Retrieve details for a single blue-green deployment instance by parent cluster and organization. * @summary Get a blue-green deployment instance * @param {BlueGreenDeploymentApiGetBlueGreenDeploymentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlueGreenDeploymentApiInterface */ getBlueGreenDeployment(requestParameters: BlueGreenDeploymentApiGetBlueGreenDeploymentRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Retrieve the details of a precheck task for a blue-green deployment. * @summary Get blue-green deployment precheck task detail * @param {BlueGreenDeploymentApiGetBlueGreenDeploymentPreCheckDetailRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlueGreenDeploymentApiInterface */ getBlueGreenDeploymentPreCheckDetail(requestParameters: BlueGreenDeploymentApiGetBlueGreenDeploymentPreCheckDetailRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Retrieve detailed information about the switch-over operation for a blue-green deployment cluster. * @summary Get blue-green deployment switch job detail * @param {BlueGreenDeploymentApiGetBlueGreenDeploymentSwitchDetailRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlueGreenDeploymentApiInterface */ getBlueGreenDeploymentSwitchDetail(requestParameters: BlueGreenDeploymentApiGetBlueGreenDeploymentSwitchDetailRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Retrieve a list of blue-green deployment instances associated with the given parent database cluster. * @summary List blue-green deployment instances for the specified parent cluster * @param {BlueGreenDeploymentApiListBlueGreenDeploymentsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlueGreenDeploymentApiInterface */ listBlueGreenDeployments(requestParameters: BlueGreenDeploymentApiListBlueGreenDeploymentsRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Switch the specified blue-green deployment cluster to act as the primary instance. * @summary Switch roles of blue-green deployment instances * @param {BlueGreenDeploymentApiSwitchBlueGreenDeploymentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlueGreenDeploymentApiInterface */ switchBlueGreenDeployment(requestParameters: BlueGreenDeploymentApiSwitchBlueGreenDeploymentRequest, options?: RawAxiosRequestConfig): AxiosPromise; } /** * Request parameters for createBlueGreenDeployment operation in BlueGreenDeploymentApi. * @export * @interface BlueGreenDeploymentApiCreateBlueGreenDeploymentRequest */ export interface BlueGreenDeploymentApiCreateBlueGreenDeploymentRequest { /** * The unique identifier of the parent database cluster * @type {string} * @memberof BlueGreenDeploymentApiCreateBlueGreenDeployment */ readonly parentClusterID: string /** * Name of the organization * @type {string} * @memberof BlueGreenDeploymentApiCreateBlueGreenDeployment */ readonly orgName: string /** * * @type {BlueGreenDeploymentCreation} * @memberof BlueGreenDeploymentApiCreateBlueGreenDeployment */ readonly body: BlueGreenDeploymentCreation } /** * Request parameters for createBlueGreenDeploymentPreCheck operation in BlueGreenDeploymentApi. * @export * @interface BlueGreenDeploymentApiCreateBlueGreenDeploymentPreCheckRequest */ export interface BlueGreenDeploymentApiCreateBlueGreenDeploymentPreCheckRequest { /** * Name of the organization * @type {string} * @memberof BlueGreenDeploymentApiCreateBlueGreenDeploymentPreCheck */ readonly orgName: string /** * The unique identifier of the parent database cluster * @type {string} * @memberof BlueGreenDeploymentApiCreateBlueGreenDeploymentPreCheck */ readonly parentClusterID: string /** * The version of the green cluster * @type {string} * @memberof BlueGreenDeploymentApiCreateBlueGreenDeploymentPreCheck */ readonly greenClusterVersion: string } /** * Request parameters for deleteBlueGreenDeployment operation in BlueGreenDeploymentApi. * @export * @interface BlueGreenDeploymentApiDeleteBlueGreenDeploymentRequest */ export interface BlueGreenDeploymentApiDeleteBlueGreenDeploymentRequest { /** * The unique identifier of the blue-green deployment instance * @type {string} * @memberof BlueGreenDeploymentApiDeleteBlueGreenDeployment */ readonly deploymentID: string /** * Name of the organization * @type {string} * @memberof BlueGreenDeploymentApiDeleteBlueGreenDeployment */ readonly orgName: string } /** * Request parameters for getBlueGreenDeployment operation in BlueGreenDeploymentApi. * @export * @interface BlueGreenDeploymentApiGetBlueGreenDeploymentRequest */ export interface BlueGreenDeploymentApiGetBlueGreenDeploymentRequest { /** * The unique identifier of the blue-green deployment instance * @type {string} * @memberof BlueGreenDeploymentApiGetBlueGreenDeployment */ readonly deploymentID: string /** * Name of the organization * @type {string} * @memberof BlueGreenDeploymentApiGetBlueGreenDeployment */ readonly orgName: string } /** * Request parameters for getBlueGreenDeploymentPreCheckDetail operation in BlueGreenDeploymentApi. * @export * @interface BlueGreenDeploymentApiGetBlueGreenDeploymentPreCheckDetailRequest */ export interface BlueGreenDeploymentApiGetBlueGreenDeploymentPreCheckDetailRequest { /** * The unique identifier of the precheck task * @type {string} * @memberof BlueGreenDeploymentApiGetBlueGreenDeploymentPreCheckDetail */ readonly preCheckID: string /** * Name of the organization * @type {string} * @memberof BlueGreenDeploymentApiGetBlueGreenDeploymentPreCheckDetail */ readonly orgName: string } /** * Request parameters for getBlueGreenDeploymentSwitchDetail operation in BlueGreenDeploymentApi. * @export * @interface BlueGreenDeploymentApiGetBlueGreenDeploymentSwitchDetailRequest */ export interface BlueGreenDeploymentApiGetBlueGreenDeploymentSwitchDetailRequest { /** * The unique identifier of the blue-green deployment instance * @type {string} * @memberof BlueGreenDeploymentApiGetBlueGreenDeploymentSwitchDetail */ readonly deploymentID: string /** * Name of the organization * @type {string} * @memberof BlueGreenDeploymentApiGetBlueGreenDeploymentSwitchDetail */ readonly orgName: string } /** * Request parameters for listBlueGreenDeployments operation in BlueGreenDeploymentApi. * @export * @interface BlueGreenDeploymentApiListBlueGreenDeploymentsRequest */ export interface BlueGreenDeploymentApiListBlueGreenDeploymentsRequest { /** * The unique identifier of the parent database cluster * @type {string} * @memberof BlueGreenDeploymentApiListBlueGreenDeployments */ readonly parentClusterID: string /** * Name of the organization * @type {string} * @memberof BlueGreenDeploymentApiListBlueGreenDeployments */ readonly orgName: string } /** * Request parameters for switchBlueGreenDeployment operation in BlueGreenDeploymentApi. * @export * @interface BlueGreenDeploymentApiSwitchBlueGreenDeploymentRequest */ export interface BlueGreenDeploymentApiSwitchBlueGreenDeploymentRequest { /** * The unique identifier of the blue-green deployment cluster * @type {string} * @memberof BlueGreenDeploymentApiSwitchBlueGreenDeployment */ readonly deploymentID: string /** * Name of the organization * @type {string} * @memberof BlueGreenDeploymentApiSwitchBlueGreenDeployment */ readonly orgName: string } /** * BlueGreenDeploymentApi - object-oriented interface * @export * @class BlueGreenDeploymentApi * @extends {BaseAPI} */ export class BlueGreenDeploymentApi extends BaseAPI implements BlueGreenDeploymentApiInterface { /** * Create a blue-green deployment instance for the specified parent cluster. * @summary Create a new blue-green deployment instance * @param {BlueGreenDeploymentApiCreateBlueGreenDeploymentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlueGreenDeploymentApi */ public createBlueGreenDeployment(requestParameters: BlueGreenDeploymentApiCreateBlueGreenDeploymentRequest, options?: RawAxiosRequestConfig) { return BlueGreenDeploymentApiFp(this.configuration).createBlueGreenDeployment(requestParameters.parentClusterID, requestParameters.orgName, requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } /** * Trigger a precheck task to verify settings or readiness for blue-green deployment. * @summary Run a precheck for blue-green deployment * @param {BlueGreenDeploymentApiCreateBlueGreenDeploymentPreCheckRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlueGreenDeploymentApi */ public createBlueGreenDeploymentPreCheck(requestParameters: BlueGreenDeploymentApiCreateBlueGreenDeploymentPreCheckRequest, options?: RawAxiosRequestConfig) { return BlueGreenDeploymentApiFp(this.configuration).createBlueGreenDeploymentPreCheck(requestParameters.orgName, requestParameters.parentClusterID, requestParameters.greenClusterVersion, options).then((request) => request(this.axios, this.basePath)); } /** * Delete a specified blue-green deployment instance. * @summary Delete a blue-green deployment instance * @param {BlueGreenDeploymentApiDeleteBlueGreenDeploymentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlueGreenDeploymentApi */ public deleteBlueGreenDeployment(requestParameters: BlueGreenDeploymentApiDeleteBlueGreenDeploymentRequest, options?: RawAxiosRequestConfig) { return BlueGreenDeploymentApiFp(this.configuration).deleteBlueGreenDeployment(requestParameters.deploymentID, requestParameters.orgName, options).then((request) => request(this.axios, this.basePath)); } /** * Retrieve details for a single blue-green deployment instance by parent cluster and organization. * @summary Get a blue-green deployment instance * @param {BlueGreenDeploymentApiGetBlueGreenDeploymentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlueGreenDeploymentApi */ public getBlueGreenDeployment(requestParameters: BlueGreenDeploymentApiGetBlueGreenDeploymentRequest, options?: RawAxiosRequestConfig) { return BlueGreenDeploymentApiFp(this.configuration).getBlueGreenDeployment(requestParameters.deploymentID, requestParameters.orgName, options).then((request) => request(this.axios, this.basePath)); } /** * Retrieve the details of a precheck task for a blue-green deployment. * @summary Get blue-green deployment precheck task detail * @param {BlueGreenDeploymentApiGetBlueGreenDeploymentPreCheckDetailRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlueGreenDeploymentApi */ public getBlueGreenDeploymentPreCheckDetail(requestParameters: BlueGreenDeploymentApiGetBlueGreenDeploymentPreCheckDetailRequest, options?: RawAxiosRequestConfig) { return BlueGreenDeploymentApiFp(this.configuration).getBlueGreenDeploymentPreCheckDetail(requestParameters.preCheckID, requestParameters.orgName, options).then((request) => request(this.axios, this.basePath)); } /** * Retrieve detailed information about the switch-over operation for a blue-green deployment cluster. * @summary Get blue-green deployment switch job detail * @param {BlueGreenDeploymentApiGetBlueGreenDeploymentSwitchDetailRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlueGreenDeploymentApi */ public getBlueGreenDeploymentSwitchDetail(requestParameters: BlueGreenDeploymentApiGetBlueGreenDeploymentSwitchDetailRequest, options?: RawAxiosRequestConfig) { return BlueGreenDeploymentApiFp(this.configuration).getBlueGreenDeploymentSwitchDetail(requestParameters.deploymentID, requestParameters.orgName, options).then((request) => request(this.axios, this.basePath)); } /** * Retrieve a list of blue-green deployment instances associated with the given parent database cluster. * @summary List blue-green deployment instances for the specified parent cluster * @param {BlueGreenDeploymentApiListBlueGreenDeploymentsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlueGreenDeploymentApi */ public listBlueGreenDeployments(requestParameters: BlueGreenDeploymentApiListBlueGreenDeploymentsRequest, options?: RawAxiosRequestConfig) { return BlueGreenDeploymentApiFp(this.configuration).listBlueGreenDeployments(requestParameters.parentClusterID, requestParameters.orgName, options).then((request) => request(this.axios, this.basePath)); } /** * Switch the specified blue-green deployment cluster to act as the primary instance. * @summary Switch roles of blue-green deployment instances * @param {BlueGreenDeploymentApiSwitchBlueGreenDeploymentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlueGreenDeploymentApi */ public switchBlueGreenDeployment(requestParameters: BlueGreenDeploymentApiSwitchBlueGreenDeploymentRequest, options?: RawAxiosRequestConfig) { return BlueGreenDeploymentApiFp(this.configuration).switchBlueGreenDeployment(requestParameters.deploymentID, requestParameters.orgName, options).then((request) => request(this.axios, this.basePath)); } }