/* tslint:disable */ /* eslint-disable */ /** * Kafka Management API * Kafka Management API is a REST API to manage Kafka instances * * The version of the OpenAPI document: 1.16.0 * Contact: rhosak-support@redhat.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 globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '../configuration'; // 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, RequestArgs, BaseAPI, RequiredError } from '../base'; // @ts-ignore import { CloudProviderList } from '../model'; // @ts-ignore import { CloudRegionList } from '../model'; // @ts-ignore import { KafkaPromoteRequest } from '../model'; // @ts-ignore import { KafkaRequest } from '../model'; // @ts-ignore import { KafkaRequestList } from '../model'; // @ts-ignore import { KafkaRequestPayload } from '../model'; // @ts-ignore import { KafkaUpdateRequest } from '../model'; // @ts-ignore import { MetricsInstantQueryList } from '../model'; // @ts-ignore import { MetricsRangeQueryList } from '../model'; // @ts-ignore import { SupportedKafkaInstanceTypesList } from '../model'; // @ts-ignore import { VersionMetadata } from '../model'; /** * DefaultApi - axios parameter creator * @export */ export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Creates a Kafka request * @param {boolean} async Perform the action in an asynchronous manner * @param {KafkaRequestPayload} kafkaRequestPayload Kafka data * @param {*} [options] Override http request option. * @throws {RequiredError} */ createKafka: async (async: boolean, kafkaRequestPayload: KafkaRequestPayload, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'async' is not null or undefined assertParamExists('createKafka', 'async', async) // verify required parameter 'kafkaRequestPayload' is not null or undefined assertParamExists('createKafka', 'kafkaRequestPayload', kafkaRequestPayload) const localVarPath = `/api/kafkas_mgmt/v1/kafkas`; // 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 Bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (async !== undefined) { localVarQueryParameter['async'] = async; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(kafkaRequestPayload, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Deletes a Kafka request by ID * @param {string} id The ID of record * @param {boolean} async Perform the action in an asynchronous manner * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteKafkaById: async (id: string, async: boolean, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('deleteKafkaById', 'id', id) // verify required parameter 'async' is not null or undefined assertParamExists('deleteKafkaById', 'async', async) const localVarPath = `/api/kafkas_mgmt/v1/kafkas/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // 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 Bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (async !== undefined) { localVarQueryParameter['async'] = async; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns all metrics in scrapeable format for a given kafka id * @param {string} id The ID of record * @param {*} [options] Override http request option. * @throws {RequiredError} */ federateMetrics: async (id: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('federateMetrics', 'id', id) const localVarPath = `/api/kafkas_mgmt/v1/kafkas/{id}/metrics/federate` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // 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 Bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns the list of supported regions of the supported cloud provider * @param {string} id The ID of record * @param {string} [page] Page index * @param {string} [size] Number of items in each page * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCloudProviderRegions: async (id: string, page?: string, size?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getCloudProviderRegions', 'id', id) const localVarPath = `/api/kafkas_mgmt/v1/cloud_providers/{id}/regions` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // 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 Bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (page !== undefined) { localVarQueryParameter['page'] = page; } if (size !== undefined) { localVarQueryParameter['size'] = size; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns the list of supported cloud providers * @param {string} [page] Page index * @param {string} [size] Number of items in each page * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCloudProviders: async (page?: string, size?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/kafkas_mgmt/v1/cloud_providers`; // 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 Bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (page !== undefined) { localVarQueryParameter['page'] = page; } if (size !== undefined) { localVarQueryParameter['size'] = size; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns the list of supported Kafka instance types and sizes filtered by cloud provider and region * @param {string} cloudProvider ID of the supported cloud provider * @param {string} cloudRegion Name of the supported cloud provider region * @param {*} [options] Override http request option. * @throws {RequiredError} */ getInstanceTypesByCloudProviderAndRegion: async (cloudProvider: string, cloudRegion: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'cloudProvider' is not null or undefined assertParamExists('getInstanceTypesByCloudProviderAndRegion', 'cloudProvider', cloudProvider) // verify required parameter 'cloudRegion' is not null or undefined assertParamExists('getInstanceTypesByCloudProviderAndRegion', 'cloudRegion', cloudRegion) const localVarPath = `/api/kafkas_mgmt/v1/instance_types/{cloud_provider}/{cloud_region}` .replace(`{${"cloud_provider"}}`, encodeURIComponent(String(cloudProvider))) .replace(`{${"cloud_region"}}`, encodeURIComponent(String(cloudRegion))); // 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 Bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns a Kafka request by ID * @param {string} id The ID of record * @param {*} [options] Override http request option. * @throws {RequiredError} */ getKafkaById: async (id: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getKafkaById', 'id', id) const localVarPath = `/api/kafkas_mgmt/v1/kafkas/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // 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 Bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns a list of Kafka requests * @param {string} [page] Page index * @param {string} [size] Number of items in each page * @param {string} [orderBy] Specifies the order by criteria. The syntax of this parameter is similar to the syntax of the `order by` clause of an SQL statement. Each query can be ordered by any of the following `kafkaRequests` fields: * bootstrap_server_host * admin_api_server_url * cloud_provider * cluster_id * created_at * href * id * instance_type * multi_az * name * organisation_id * owner * reauthentication_enabled * region * status * updated_at * version For example, to return all Kafka instances ordered by their name, use the following syntax: ```sql name asc ``` To return all Kafka instances ordered by their name _and_ created date, use the following syntax: ```sql name asc, created_at asc ``` If the parameter isn\'t provided, or if the value is empty, then the results are ordered by name. * @param {string} [search] Search criteria. The syntax of this parameter is similar to the syntax of the `where` clause of an SQL statement. Allowed fields in the search are `cloud_provider`, `name`, `owner`, `region`, `status`, `instance_type`, and `cluster_id`. Allowed comparators are `<>`, `=`, `IN`, `NOT IN`, `LIKE`, or `ILIKE`. Allowed joins are `AND` and `OR`. However, you can use a maximum of 10 joins in a search query. Examples: To return a Kafka instance with the name `my-kafka` and the region `aws`, use the following syntax: ``` name = my-kafka and cloud_provider = aws ``` To return a Kafka instance with a name that starts with `my`, use the following syntax: ``` name like my%25 ``` To return a Kafka instance with a name containing `test` matching any character case combinations, use the following syntax: ``` name ilike %25test%25 ``` If the parameter isn\'t provided, or if the value is empty, then all the Kafka instances that the user has permission to see are returned. Note. If the query is invalid, an error is returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getKafkas: async (page?: string, size?: string, orderBy?: string, search?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/kafkas_mgmt/v1/kafkas`; // 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 Bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (page !== undefined) { localVarQueryParameter['page'] = page; } if (size !== undefined) { localVarQueryParameter['size'] = size; } if (orderBy !== undefined) { localVarQueryParameter['orderBy'] = orderBy; } if (search !== undefined) { localVarQueryParameter['search'] = search; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns metrics with instant query by Kafka ID * @param {string} id The ID of record * @param {Array} [filters] List of metrics to fetch. Fetch all metrics when empty. List entries are Kafka internal metric names. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getMetricsByInstantQuery: async (id: string, filters?: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getMetricsByInstantQuery', 'id', id) const localVarPath = `/api/kafkas_mgmt/v1/kafkas/{id}/metrics/query` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // 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 Bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (filters) { localVarQueryParameter['filters'] = filters; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns metrics with timeseries range query by Kafka ID * @param {string} id The ID of record * @param {number} duration The length of time in minutes for which to return the metrics * @param {number} interval The interval in seconds between data points * @param {Array} [filters] List of metrics to fetch. Fetch all metrics when empty. List entries are Kafka internal metric names. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getMetricsByRangeQuery: async (id: string, duration: number, interval: number, filters?: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getMetricsByRangeQuery', 'id', id) // verify required parameter 'duration' is not null or undefined assertParamExists('getMetricsByRangeQuery', 'duration', duration) // verify required parameter 'interval' is not null or undefined assertParamExists('getMetricsByRangeQuery', 'interval', interval) const localVarPath = `/api/kafkas_mgmt/v1/kafkas/{id}/metrics/query_range` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // 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 Bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (duration !== undefined) { localVarQueryParameter['duration'] = duration; } if (interval !== undefined) { localVarQueryParameter['interval'] = interval; } if (filters) { localVarQueryParameter['filters'] = filters; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns the kafka Service Fleet Manager API version metadata * @param {*} [options] Override http request option. * @throws {RequiredError} */ getVersionMetadata: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/kafkas_mgmt/v1`; // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Promote a Kafka instance. Promotion is performed asynchronously. The `async` query parameter has to be set to `true`. Only kafka instances with an `eval` billing_model are supported * @param {string} id The ID of record * @param {boolean} async Perform the action in an asynchronous manner. False by default. * @param {KafkaPromoteRequest} kafkaPromoteRequest Kafka promotion request * @param {*} [options] Override http request option. * @throws {RequiredError} */ promoteKafka: async (id: string, async: boolean, kafkaPromoteRequest: KafkaPromoteRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('promoteKafka', 'id', id) // verify required parameter 'async' is not null or undefined assertParamExists('promoteKafka', 'async', async) // verify required parameter 'kafkaPromoteRequest' is not null or undefined assertParamExists('promoteKafka', 'kafkaPromoteRequest', kafkaPromoteRequest) const localVarPath = `/api/kafkas_mgmt/v1/kafkas/{id}/promote` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // 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 Bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (async !== undefined) { localVarQueryParameter['async'] = async; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(kafkaPromoteRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Update a Kafka instance by id * @param {string} id The ID of record * @param {KafkaUpdateRequest} kafkaUpdateRequest Update owner of kafka * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateKafkaById: async (id: string, kafkaUpdateRequest: KafkaUpdateRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('updateKafkaById', 'id', id) // verify required parameter 'kafkaUpdateRequest' is not null or undefined assertParamExists('updateKafkaById', 'kafkaUpdateRequest', kafkaUpdateRequest) const localVarPath = `/api/kafkas_mgmt/v1/kafkas/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // 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 Bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, 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(kafkaUpdateRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * DefaultApi - functional programming interface * @export */ export const DefaultApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) return { /** * Creates a Kafka request * @param {boolean} async Perform the action in an asynchronous manner * @param {KafkaRequestPayload} kafkaRequestPayload Kafka data * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createKafka(async: boolean, kafkaRequestPayload: KafkaRequestPayload, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createKafka(async, kafkaRequestPayload, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Deletes a Kafka request by ID * @param {string} id The ID of record * @param {boolean} async Perform the action in an asynchronous manner * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteKafkaById(id: string, async: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteKafkaById(id, async, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns all metrics in scrapeable format for a given kafka id * @param {string} id The ID of record * @param {*} [options] Override http request option. * @throws {RequiredError} */ async federateMetrics(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.federateMetrics(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns the list of supported regions of the supported cloud provider * @param {string} id The ID of record * @param {string} [page] Page index * @param {string} [size] Number of items in each page * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCloudProviderRegions(id: string, page?: string, size?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getCloudProviderRegions(id, page, size, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns the list of supported cloud providers * @param {string} [page] Page index * @param {string} [size] Number of items in each page * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCloudProviders(page?: string, size?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getCloudProviders(page, size, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns the list of supported Kafka instance types and sizes filtered by cloud provider and region * @param {string} cloudProvider ID of the supported cloud provider * @param {string} cloudRegion Name of the supported cloud provider region * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getInstanceTypesByCloudProviderAndRegion(cloudProvider: string, cloudRegion: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInstanceTypesByCloudProviderAndRegion(cloudProvider, cloudRegion, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns a Kafka request by ID * @param {string} id The ID of record * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getKafkaById(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getKafkaById(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns a list of Kafka requests * @param {string} [page] Page index * @param {string} [size] Number of items in each page * @param {string} [orderBy] Specifies the order by criteria. The syntax of this parameter is similar to the syntax of the `order by` clause of an SQL statement. Each query can be ordered by any of the following `kafkaRequests` fields: * bootstrap_server_host * admin_api_server_url * cloud_provider * cluster_id * created_at * href * id * instance_type * multi_az * name * organisation_id * owner * reauthentication_enabled * region * status * updated_at * version For example, to return all Kafka instances ordered by their name, use the following syntax: ```sql name asc ``` To return all Kafka instances ordered by their name _and_ created date, use the following syntax: ```sql name asc, created_at asc ``` If the parameter isn\'t provided, or if the value is empty, then the results are ordered by name. * @param {string} [search] Search criteria. The syntax of this parameter is similar to the syntax of the `where` clause of an SQL statement. Allowed fields in the search are `cloud_provider`, `name`, `owner`, `region`, `status`, `instance_type`, and `cluster_id`. Allowed comparators are `<>`, `=`, `IN`, `NOT IN`, `LIKE`, or `ILIKE`. Allowed joins are `AND` and `OR`. However, you can use a maximum of 10 joins in a search query. Examples: To return a Kafka instance with the name `my-kafka` and the region `aws`, use the following syntax: ``` name = my-kafka and cloud_provider = aws ``` To return a Kafka instance with a name that starts with `my`, use the following syntax: ``` name like my%25 ``` To return a Kafka instance with a name containing `test` matching any character case combinations, use the following syntax: ``` name ilike %25test%25 ``` If the parameter isn\'t provided, or if the value is empty, then all the Kafka instances that the user has permission to see are returned. Note. If the query is invalid, an error is returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getKafkas(page?: string, size?: string, orderBy?: string, search?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getKafkas(page, size, orderBy, search, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns metrics with instant query by Kafka ID * @param {string} id The ID of record * @param {Array} [filters] List of metrics to fetch. Fetch all metrics when empty. List entries are Kafka internal metric names. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getMetricsByInstantQuery(id: string, filters?: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getMetricsByInstantQuery(id, filters, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns metrics with timeseries range query by Kafka ID * @param {string} id The ID of record * @param {number} duration The length of time in minutes for which to return the metrics * @param {number} interval The interval in seconds between data points * @param {Array} [filters] List of metrics to fetch. Fetch all metrics when empty. List entries are Kafka internal metric names. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getMetricsByRangeQuery(id: string, duration: number, interval: number, filters?: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getMetricsByRangeQuery(id, duration, interval, filters, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns the kafka Service Fleet Manager API version metadata * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getVersionMetadata(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getVersionMetadata(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Promote a Kafka instance. Promotion is performed asynchronously. The `async` query parameter has to be set to `true`. Only kafka instances with an `eval` billing_model are supported * @param {string} id The ID of record * @param {boolean} async Perform the action in an asynchronous manner. False by default. * @param {KafkaPromoteRequest} kafkaPromoteRequest Kafka promotion request * @param {*} [options] Override http request option. * @throws {RequiredError} */ async promoteKafka(id: string, async: boolean, kafkaPromoteRequest: KafkaPromoteRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.promoteKafka(id, async, kafkaPromoteRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Update a Kafka instance by id * @param {string} id The ID of record * @param {KafkaUpdateRequest} kafkaUpdateRequest Update owner of kafka * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateKafkaById(id: string, kafkaUpdateRequest: KafkaUpdateRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateKafkaById(id, kafkaUpdateRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * DefaultApi - factory interface * @export */ export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = DefaultApiFp(configuration) return { /** * Creates a Kafka request * @param {boolean} async Perform the action in an asynchronous manner * @param {KafkaRequestPayload} kafkaRequestPayload Kafka data * @param {*} [options] Override http request option. * @throws {RequiredError} */ createKafka(async: boolean, kafkaRequestPayload: KafkaRequestPayload, options?: any): AxiosPromise { return localVarFp.createKafka(async, kafkaRequestPayload, options).then((request) => request(axios, basePath)); }, /** * Deletes a Kafka request by ID * @param {string} id The ID of record * @param {boolean} async Perform the action in an asynchronous manner * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteKafkaById(id: string, async: boolean, options?: any): AxiosPromise { return localVarFp.deleteKafkaById(id, async, options).then((request) => request(axios, basePath)); }, /** * Returns all metrics in scrapeable format for a given kafka id * @param {string} id The ID of record * @param {*} [options] Override http request option. * @throws {RequiredError} */ federateMetrics(id: string, options?: any): AxiosPromise { return localVarFp.federateMetrics(id, options).then((request) => request(axios, basePath)); }, /** * Returns the list of supported regions of the supported cloud provider * @param {string} id The ID of record * @param {string} [page] Page index * @param {string} [size] Number of items in each page * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCloudProviderRegions(id: string, page?: string, size?: string, options?: any): AxiosPromise { return localVarFp.getCloudProviderRegions(id, page, size, options).then((request) => request(axios, basePath)); }, /** * Returns the list of supported cloud providers * @param {string} [page] Page index * @param {string} [size] Number of items in each page * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCloudProviders(page?: string, size?: string, options?: any): AxiosPromise { return localVarFp.getCloudProviders(page, size, options).then((request) => request(axios, basePath)); }, /** * Returns the list of supported Kafka instance types and sizes filtered by cloud provider and region * @param {string} cloudProvider ID of the supported cloud provider * @param {string} cloudRegion Name of the supported cloud provider region * @param {*} [options] Override http request option. * @throws {RequiredError} */ getInstanceTypesByCloudProviderAndRegion(cloudProvider: string, cloudRegion: string, options?: any): AxiosPromise { return localVarFp.getInstanceTypesByCloudProviderAndRegion(cloudProvider, cloudRegion, options).then((request) => request(axios, basePath)); }, /** * Returns a Kafka request by ID * @param {string} id The ID of record * @param {*} [options] Override http request option. * @throws {RequiredError} */ getKafkaById(id: string, options?: any): AxiosPromise { return localVarFp.getKafkaById(id, options).then((request) => request(axios, basePath)); }, /** * Returns a list of Kafka requests * @param {string} [page] Page index * @param {string} [size] Number of items in each page * @param {string} [orderBy] Specifies the order by criteria. The syntax of this parameter is similar to the syntax of the `order by` clause of an SQL statement. Each query can be ordered by any of the following `kafkaRequests` fields: * bootstrap_server_host * admin_api_server_url * cloud_provider * cluster_id * created_at * href * id * instance_type * multi_az * name * organisation_id * owner * reauthentication_enabled * region * status * updated_at * version For example, to return all Kafka instances ordered by their name, use the following syntax: ```sql name asc ``` To return all Kafka instances ordered by their name _and_ created date, use the following syntax: ```sql name asc, created_at asc ``` If the parameter isn\'t provided, or if the value is empty, then the results are ordered by name. * @param {string} [search] Search criteria. The syntax of this parameter is similar to the syntax of the `where` clause of an SQL statement. Allowed fields in the search are `cloud_provider`, `name`, `owner`, `region`, `status`, `instance_type`, and `cluster_id`. Allowed comparators are `<>`, `=`, `IN`, `NOT IN`, `LIKE`, or `ILIKE`. Allowed joins are `AND` and `OR`. However, you can use a maximum of 10 joins in a search query. Examples: To return a Kafka instance with the name `my-kafka` and the region `aws`, use the following syntax: ``` name = my-kafka and cloud_provider = aws ``` To return a Kafka instance with a name that starts with `my`, use the following syntax: ``` name like my%25 ``` To return a Kafka instance with a name containing `test` matching any character case combinations, use the following syntax: ``` name ilike %25test%25 ``` If the parameter isn\'t provided, or if the value is empty, then all the Kafka instances that the user has permission to see are returned. Note. If the query is invalid, an error is returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getKafkas(page?: string, size?: string, orderBy?: string, search?: string, options?: any): AxiosPromise { return localVarFp.getKafkas(page, size, orderBy, search, options).then((request) => request(axios, basePath)); }, /** * Returns metrics with instant query by Kafka ID * @param {string} id The ID of record * @param {Array} [filters] List of metrics to fetch. Fetch all metrics when empty. List entries are Kafka internal metric names. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getMetricsByInstantQuery(id: string, filters?: Array, options?: any): AxiosPromise { return localVarFp.getMetricsByInstantQuery(id, filters, options).then((request) => request(axios, basePath)); }, /** * Returns metrics with timeseries range query by Kafka ID * @param {string} id The ID of record * @param {number} duration The length of time in minutes for which to return the metrics * @param {number} interval The interval in seconds between data points * @param {Array} [filters] List of metrics to fetch. Fetch all metrics when empty. List entries are Kafka internal metric names. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getMetricsByRangeQuery(id: string, duration: number, interval: number, filters?: Array, options?: any): AxiosPromise { return localVarFp.getMetricsByRangeQuery(id, duration, interval, filters, options).then((request) => request(axios, basePath)); }, /** * Returns the kafka Service Fleet Manager API version metadata * @param {*} [options] Override http request option. * @throws {RequiredError} */ getVersionMetadata(options?: any): AxiosPromise { return localVarFp.getVersionMetadata(options).then((request) => request(axios, basePath)); }, /** * Promote a Kafka instance. Promotion is performed asynchronously. The `async` query parameter has to be set to `true`. Only kafka instances with an `eval` billing_model are supported * @param {string} id The ID of record * @param {boolean} async Perform the action in an asynchronous manner. False by default. * @param {KafkaPromoteRequest} kafkaPromoteRequest Kafka promotion request * @param {*} [options] Override http request option. * @throws {RequiredError} */ promoteKafka(id: string, async: boolean, kafkaPromoteRequest: KafkaPromoteRequest, options?: any): AxiosPromise { return localVarFp.promoteKafka(id, async, kafkaPromoteRequest, options).then((request) => request(axios, basePath)); }, /** * Update a Kafka instance by id * @param {string} id The ID of record * @param {KafkaUpdateRequest} kafkaUpdateRequest Update owner of kafka * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateKafkaById(id: string, kafkaUpdateRequest: KafkaUpdateRequest, options?: any): AxiosPromise { return localVarFp.updateKafkaById(id, kafkaUpdateRequest, options).then((request) => request(axios, basePath)); }, }; }; /** * DefaultApi - interface * @export * @interface DefaultApi */ export interface DefaultApiInterface { /** * Creates a Kafka request * @param {boolean} async Perform the action in an asynchronous manner * @param {KafkaRequestPayload} kafkaRequestPayload Kafka data * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface */ createKafka(async: boolean, kafkaRequestPayload: KafkaRequestPayload, options?: AxiosRequestConfig): AxiosPromise; /** * Deletes a Kafka request by ID * @param {string} id The ID of record * @param {boolean} async Perform the action in an asynchronous manner * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface */ deleteKafkaById(id: string, async: boolean, options?: AxiosRequestConfig): AxiosPromise; /** * Returns all metrics in scrapeable format for a given kafka id * @param {string} id The ID of record * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface */ federateMetrics(id: string, options?: AxiosRequestConfig): AxiosPromise; /** * Returns the list of supported regions of the supported cloud provider * @param {string} id The ID of record * @param {string} [page] Page index * @param {string} [size] Number of items in each page * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface */ getCloudProviderRegions(id: string, page?: string, size?: string, options?: AxiosRequestConfig): AxiosPromise; /** * Returns the list of supported cloud providers * @param {string} [page] Page index * @param {string} [size] Number of items in each page * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface */ getCloudProviders(page?: string, size?: string, options?: AxiosRequestConfig): AxiosPromise; /** * Returns the list of supported Kafka instance types and sizes filtered by cloud provider and region * @param {string} cloudProvider ID of the supported cloud provider * @param {string} cloudRegion Name of the supported cloud provider region * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface */ getInstanceTypesByCloudProviderAndRegion(cloudProvider: string, cloudRegion: string, options?: AxiosRequestConfig): AxiosPromise; /** * Returns a Kafka request by ID * @param {string} id The ID of record * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface */ getKafkaById(id: string, options?: AxiosRequestConfig): AxiosPromise; /** * Returns a list of Kafka requests * @param {string} [page] Page index * @param {string} [size] Number of items in each page * @param {string} [orderBy] Specifies the order by criteria. The syntax of this parameter is similar to the syntax of the `order by` clause of an SQL statement. Each query can be ordered by any of the following `kafkaRequests` fields: * bootstrap_server_host * admin_api_server_url * cloud_provider * cluster_id * created_at * href * id * instance_type * multi_az * name * organisation_id * owner * reauthentication_enabled * region * status * updated_at * version For example, to return all Kafka instances ordered by their name, use the following syntax: ```sql name asc ``` To return all Kafka instances ordered by their name _and_ created date, use the following syntax: ```sql name asc, created_at asc ``` If the parameter isn\'t provided, or if the value is empty, then the results are ordered by name. * @param {string} [search] Search criteria. The syntax of this parameter is similar to the syntax of the `where` clause of an SQL statement. Allowed fields in the search are `cloud_provider`, `name`, `owner`, `region`, `status`, `instance_type`, and `cluster_id`. Allowed comparators are `<>`, `=`, `IN`, `NOT IN`, `LIKE`, or `ILIKE`. Allowed joins are `AND` and `OR`. However, you can use a maximum of 10 joins in a search query. Examples: To return a Kafka instance with the name `my-kafka` and the region `aws`, use the following syntax: ``` name = my-kafka and cloud_provider = aws ``` To return a Kafka instance with a name that starts with `my`, use the following syntax: ``` name like my%25 ``` To return a Kafka instance with a name containing `test` matching any character case combinations, use the following syntax: ``` name ilike %25test%25 ``` If the parameter isn\'t provided, or if the value is empty, then all the Kafka instances that the user has permission to see are returned. Note. If the query is invalid, an error is returned. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface */ getKafkas(page?: string, size?: string, orderBy?: string, search?: string, options?: AxiosRequestConfig): AxiosPromise; /** * Returns metrics with instant query by Kafka ID * @param {string} id The ID of record * @param {Array} [filters] List of metrics to fetch. Fetch all metrics when empty. List entries are Kafka internal metric names. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface */ getMetricsByInstantQuery(id: string, filters?: Array, options?: AxiosRequestConfig): AxiosPromise; /** * Returns metrics with timeseries range query by Kafka ID * @param {string} id The ID of record * @param {number} duration The length of time in minutes for which to return the metrics * @param {number} interval The interval in seconds between data points * @param {Array} [filters] List of metrics to fetch. Fetch all metrics when empty. List entries are Kafka internal metric names. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface */ getMetricsByRangeQuery(id: string, duration: number, interval: number, filters?: Array, options?: AxiosRequestConfig): AxiosPromise; /** * Returns the kafka Service Fleet Manager API version metadata * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface */ getVersionMetadata(options?: AxiosRequestConfig): AxiosPromise; /** * Promote a Kafka instance. Promotion is performed asynchronously. The `async` query parameter has to be set to `true`. Only kafka instances with an `eval` billing_model are supported * @param {string} id The ID of record * @param {boolean} async Perform the action in an asynchronous manner. False by default. * @param {KafkaPromoteRequest} kafkaPromoteRequest Kafka promotion request * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface */ promoteKafka(id: string, async: boolean, kafkaPromoteRequest: KafkaPromoteRequest, options?: AxiosRequestConfig): AxiosPromise; /** * Update a Kafka instance by id * @param {string} id The ID of record * @param {KafkaUpdateRequest} kafkaUpdateRequest Update owner of kafka * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface */ updateKafkaById(id: string, kafkaUpdateRequest: KafkaUpdateRequest, options?: AxiosRequestConfig): AxiosPromise; } /** * DefaultApi - object-oriented interface * @export * @class DefaultApi * @extends {BaseAPI} */ export class DefaultApi extends BaseAPI implements DefaultApiInterface { /** * Creates a Kafka request * @param {boolean} async Perform the action in an asynchronous manner * @param {KafkaRequestPayload} kafkaRequestPayload Kafka data * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ public createKafka(async: boolean, kafkaRequestPayload: KafkaRequestPayload, options?: AxiosRequestConfig) { return DefaultApiFp(this.configuration).createKafka(async, kafkaRequestPayload, options).then((request) => request(this.axios, this.basePath)); } /** * Deletes a Kafka request by ID * @param {string} id The ID of record * @param {boolean} async Perform the action in an asynchronous manner * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ public deleteKafkaById(id: string, async: boolean, options?: AxiosRequestConfig) { return DefaultApiFp(this.configuration).deleteKafkaById(id, async, options).then((request) => request(this.axios, this.basePath)); } /** * Returns all metrics in scrapeable format for a given kafka id * @param {string} id The ID of record * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ public federateMetrics(id: string, options?: AxiosRequestConfig) { return DefaultApiFp(this.configuration).federateMetrics(id, options).then((request) => request(this.axios, this.basePath)); } /** * Returns the list of supported regions of the supported cloud provider * @param {string} id The ID of record * @param {string} [page] Page index * @param {string} [size] Number of items in each page * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ public getCloudProviderRegions(id: string, page?: string, size?: string, options?: AxiosRequestConfig) { return DefaultApiFp(this.configuration).getCloudProviderRegions(id, page, size, options).then((request) => request(this.axios, this.basePath)); } /** * Returns the list of supported cloud providers * @param {string} [page] Page index * @param {string} [size] Number of items in each page * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ public getCloudProviders(page?: string, size?: string, options?: AxiosRequestConfig) { return DefaultApiFp(this.configuration).getCloudProviders(page, size, options).then((request) => request(this.axios, this.basePath)); } /** * Returns the list of supported Kafka instance types and sizes filtered by cloud provider and region * @param {string} cloudProvider ID of the supported cloud provider * @param {string} cloudRegion Name of the supported cloud provider region * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ public getInstanceTypesByCloudProviderAndRegion(cloudProvider: string, cloudRegion: string, options?: AxiosRequestConfig) { return DefaultApiFp(this.configuration).getInstanceTypesByCloudProviderAndRegion(cloudProvider, cloudRegion, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a Kafka request by ID * @param {string} id The ID of record * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ public getKafkaById(id: string, options?: AxiosRequestConfig) { return DefaultApiFp(this.configuration).getKafkaById(id, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a list of Kafka requests * @param {string} [page] Page index * @param {string} [size] Number of items in each page * @param {string} [orderBy] Specifies the order by criteria. The syntax of this parameter is similar to the syntax of the `order by` clause of an SQL statement. Each query can be ordered by any of the following `kafkaRequests` fields: * bootstrap_server_host * admin_api_server_url * cloud_provider * cluster_id * created_at * href * id * instance_type * multi_az * name * organisation_id * owner * reauthentication_enabled * region * status * updated_at * version For example, to return all Kafka instances ordered by their name, use the following syntax: ```sql name asc ``` To return all Kafka instances ordered by their name _and_ created date, use the following syntax: ```sql name asc, created_at asc ``` If the parameter isn\'t provided, or if the value is empty, then the results are ordered by name. * @param {string} [search] Search criteria. The syntax of this parameter is similar to the syntax of the `where` clause of an SQL statement. Allowed fields in the search are `cloud_provider`, `name`, `owner`, `region`, `status`, `instance_type`, and `cluster_id`. Allowed comparators are `<>`, `=`, `IN`, `NOT IN`, `LIKE`, or `ILIKE`. Allowed joins are `AND` and `OR`. However, you can use a maximum of 10 joins in a search query. Examples: To return a Kafka instance with the name `my-kafka` and the region `aws`, use the following syntax: ``` name = my-kafka and cloud_provider = aws ``` To return a Kafka instance with a name that starts with `my`, use the following syntax: ``` name like my%25 ``` To return a Kafka instance with a name containing `test` matching any character case combinations, use the following syntax: ``` name ilike %25test%25 ``` If the parameter isn\'t provided, or if the value is empty, then all the Kafka instances that the user has permission to see are returned. Note. If the query is invalid, an error is returned. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ public getKafkas(page?: string, size?: string, orderBy?: string, search?: string, options?: AxiosRequestConfig) { return DefaultApiFp(this.configuration).getKafkas(page, size, orderBy, search, options).then((request) => request(this.axios, this.basePath)); } /** * Returns metrics with instant query by Kafka ID * @param {string} id The ID of record * @param {Array} [filters] List of metrics to fetch. Fetch all metrics when empty. List entries are Kafka internal metric names. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ public getMetricsByInstantQuery(id: string, filters?: Array, options?: AxiosRequestConfig) { return DefaultApiFp(this.configuration).getMetricsByInstantQuery(id, filters, options).then((request) => request(this.axios, this.basePath)); } /** * Returns metrics with timeseries range query by Kafka ID * @param {string} id The ID of record * @param {number} duration The length of time in minutes for which to return the metrics * @param {number} interval The interval in seconds between data points * @param {Array} [filters] List of metrics to fetch. Fetch all metrics when empty. List entries are Kafka internal metric names. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ public getMetricsByRangeQuery(id: string, duration: number, interval: number, filters?: Array, options?: AxiosRequestConfig) { return DefaultApiFp(this.configuration).getMetricsByRangeQuery(id, duration, interval, filters, options).then((request) => request(this.axios, this.basePath)); } /** * Returns the kafka Service Fleet Manager API version metadata * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ public getVersionMetadata(options?: AxiosRequestConfig) { return DefaultApiFp(this.configuration).getVersionMetadata(options).then((request) => request(this.axios, this.basePath)); } /** * Promote a Kafka instance. Promotion is performed asynchronously. The `async` query parameter has to be set to `true`. Only kafka instances with an `eval` billing_model are supported * @param {string} id The ID of record * @param {boolean} async Perform the action in an asynchronous manner. False by default. * @param {KafkaPromoteRequest} kafkaPromoteRequest Kafka promotion request * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ public promoteKafka(id: string, async: boolean, kafkaPromoteRequest: KafkaPromoteRequest, options?: AxiosRequestConfig) { return DefaultApiFp(this.configuration).promoteKafka(id, async, kafkaPromoteRequest, options).then((request) => request(this.axios, this.basePath)); } /** * Update a Kafka instance by id * @param {string} id The ID of record * @param {KafkaUpdateRequest} kafkaUpdateRequest Update owner of kafka * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ public updateKafkaById(id: string, kafkaUpdateRequest: KafkaUpdateRequest, options?: AxiosRequestConfig) { return DefaultApiFp(this.configuration).updateKafkaById(id, kafkaUpdateRequest, options).then((request) => request(this.axios, this.basePath)); } }