/* tslint:disable */ /* eslint-disable */ /** * Admin API * The Admin API is used to manage the ApeCloud platform. * * The version of the OpenAPI document: 1.0.0 * Contact: support@apecloud.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from '../configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore import type { APIErrorResponse } from '../models'; // @ts-ignore import type { Account } from '../models'; // @ts-ignore import type { AccountListItem } from '../models'; // @ts-ignore import type { BindSeaweedFSPoliciesRequest } from '../models'; // @ts-ignore import type { ListSeaweedFSPolicies200Response } from '../models'; // @ts-ignore import type { PrivilegeListItem } from '../models'; /** * SeaweedfsApi - axios parameter creator * @export */ export const SeaweedfsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Replaces named policy bindings. An empty policies array removes all direct bindings. Existing credentials, legacy actions and other identity attributes are preserved. * @summary bindSeaweedFSPolicies * @param {string} orgName * @param {string} clusterName * @param {string} accountName * @param {BindSeaweedFSPoliciesRequest} bindSeaweedFSPoliciesRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ bindSeaweedFSPolicies: async (orgName: string, clusterName: string, accountName: string, bindSeaweedFSPoliciesRequest: BindSeaweedFSPoliciesRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('bindSeaweedFSPolicies', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('bindSeaweedFSPolicies', 'clusterName', clusterName) // verify required parameter 'accountName' is not null or undefined assertParamExists('bindSeaweedFSPolicies', 'accountName', accountName) // verify required parameter 'bindSeaweedFSPoliciesRequest' is not null or undefined assertParamExists('bindSeaweedFSPolicies', 'bindSeaweedFSPoliciesRequest', bindSeaweedFSPoliciesRequest) const localVarPath = `/admin/v1/data/seaweedfs/organizations/{orgName}/clusters/{clusterName}/accounts/{accountName}/policies` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))) .replace(`{${"accountName"}}`, encodeURIComponent(String(accountName))); // 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: 'PUT', ...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(bindSeaweedFSPoliciesRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Creates a credential on the identity. Account.name must match accountName, role must be BASICUSER. Optional extra.accessKey and password select the access key and secret key; omitted or empty values are generated. The returned password is disclosed only in this response. * @summary createSeaweedFSAccessKey * @param {string} orgName * @param {string} clusterName * @param {string} accountName * @param {Account} account * @param {*} [options] Override http request option. * @throws {RequiredError} */ createSeaweedFSAccessKey: async (orgName: string, clusterName: string, accountName: string, account: Account, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('createSeaweedFSAccessKey', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('createSeaweedFSAccessKey', 'clusterName', clusterName) // verify required parameter 'accountName' is not null or undefined assertParamExists('createSeaweedFSAccessKey', 'accountName', accountName) // verify required parameter 'account' is not null or undefined assertParamExists('createSeaweedFSAccessKey', 'account', account) const localVarPath = `/admin/v1/data/seaweedfs/organizations/{orgName}/clusters/{clusterName}/accounts/{accountName}/access-keys` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))) .replace(`{${"accountName"}}`, encodeURIComponent(String(accountName))); // 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(account, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Creates a BASICUSER identity with named policies from extra.policies. Optional extra.accessKey and password select the credential; empty values are generated. The password is disclosed only in this response. * @summary createSeaweedFSAccount * @param {string} orgName name of the organization * @param {string} clusterName name of the cluster * @param {Account} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ createSeaweedFSAccount: async (orgName: string, clusterName: string, body: Account, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('createSeaweedFSAccount', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('createSeaweedFSAccount', 'clusterName', clusterName) // verify required parameter 'body' is not null or undefined assertParamExists('createSeaweedFSAccount', 'body', body) const localVarPath = `/admin/v1/data/seaweedfs/organizations/{orgName}/clusters/{clusterName}/accounts` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary deleteSeaweedFSAccessKey * @param {string} orgName * @param {string} clusterName * @param {string} accountName * @param {string} accessKey * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteSeaweedFSAccessKey: async (orgName: string, clusterName: string, accountName: string, accessKey: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('deleteSeaweedFSAccessKey', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('deleteSeaweedFSAccessKey', 'clusterName', clusterName) // verify required parameter 'accountName' is not null or undefined assertParamExists('deleteSeaweedFSAccessKey', 'accountName', accountName) // verify required parameter 'accessKey' is not null or undefined assertParamExists('deleteSeaweedFSAccessKey', 'accessKey', accessKey) const localVarPath = `/admin/v1/data/seaweedfs/organizations/{orgName}/clusters/{clusterName}/accounts/{accountName}/access-keys/{accessKey}` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))) .replace(`{${"accountName"}}`, encodeURIComponent(String(accountName))) .replace(`{${"accessKey"}}`, encodeURIComponent(String(accessKey))); // 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, }; }, /** * delete an account in cluster * @summary deleteSeaweedFSAccount * @param {string} orgName name of the organization * @param {string} clusterName name of the cluster * @param {string} accountName name of the account * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteSeaweedFSAccount: async (orgName: string, clusterName: string, accountName: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('deleteSeaweedFSAccount', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('deleteSeaweedFSAccount', 'clusterName', clusterName) // verify required parameter 'accountName' is not null or undefined assertParamExists('deleteSeaweedFSAccount', 'accountName', accountName) const localVarPath = `/admin/v1/data/seaweedfs/organizations/{orgName}/clusters/{clusterName}/accounts/{accountName}` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))) .replace(`{${"accountName"}}`, encodeURIComponent(String(accountName))); // 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, }; }, /** * Deletes an unused named policy. Attached policies are rejected; no identities or groups are implicitly changed. * @summary deleteSeaweedFSPolicy * @param {string} orgName * @param {string} clusterName * @param {string} policyName * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteSeaweedFSPolicy: async (orgName: string, clusterName: string, policyName: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('deleteSeaweedFSPolicy', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('deleteSeaweedFSPolicy', 'clusterName', clusterName) // verify required parameter 'policyName' is not null or undefined assertParamExists('deleteSeaweedFSPolicy', 'policyName', policyName) const localVarPath = `/admin/v1/data/seaweedfs/organizations/{orgName}/clusters/{clusterName}/policies/{policyName}` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))) .replace(`{${"policyName"}}`, encodeURIComponent(String(policyName))); // 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, }; }, /** * get root account password * @summary getRootSeaweedFSAccountPassword * @param {string} orgName name of the Org * @param {string} clusterName name of the Cluster * @param {string} accountName name of the account * @param {string} [component] name of the component * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRootSeaweedFSAccountPassword: async (orgName: string, clusterName: string, accountName: string, component?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('getRootSeaweedFSAccountPassword', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('getRootSeaweedFSAccountPassword', 'clusterName', clusterName) // verify required parameter 'accountName' is not null or undefined assertParamExists('getRootSeaweedFSAccountPassword', 'accountName', accountName) const localVarPath = `/admin/v1/data/seaweedfs/organizations/{orgName}/clusters/{clusterName}/root-password` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) if (accountName !== undefined) { localVarQueryParameter['accountName'] = accountName; } if (component !== undefined) { localVarQueryParameter['component'] = component; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists SeaweedFS identities and access-key metadata without secret keys. * @summary listSeaweedFSAccounts * @param {string} orgName name of the organization * @param {string} clusterName name of the cluster * @param {*} [options] Override http request option. * @throws {RequiredError} */ listSeaweedFSAccounts: async (orgName: string, clusterName: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('listSeaweedFSAccounts', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('listSeaweedFSAccounts', 'clusterName', clusterName) const localVarPath = `/admin/v1/data/seaweedfs/organizations/{orgName}/clusters/{clusterName}/accounts` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary listSeaweedFSPolicies * @param {string} orgName * @param {string} clusterName * @param {*} [options] Override http request option. * @throws {RequiredError} */ listSeaweedFSPolicies: async (orgName: string, clusterName: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('listSeaweedFSPolicies', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('listSeaweedFSPolicies', 'clusterName', clusterName) const localVarPath = `/admin/v1/data/seaweedfs/organizations/{orgName}/clusters/{clusterName}/policies` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Creates or replaces a named AWS IAM JSON policy document. Updates affect every identity and group that uses this policy. * @summary putSeaweedFSPolicy * @param {string} orgName * @param {string} clusterName * @param {string} policyName * @param {{ [key: string]: any; }} requestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ putSeaweedFSPolicy: async (orgName: string, clusterName: string, policyName: string, requestBody: { [key: string]: any; }, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('putSeaweedFSPolicy', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('putSeaweedFSPolicy', 'clusterName', clusterName) // verify required parameter 'policyName' is not null or undefined assertParamExists('putSeaweedFSPolicy', 'policyName', policyName) // verify required parameter 'requestBody' is not null or undefined assertParamExists('putSeaweedFSPolicy', 'requestBody', requestBody) const localVarPath = `/admin/v1/data/seaweedfs/organizations/{orgName}/clusters/{clusterName}/policies/{policyName}` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))) .replace(`{${"policyName"}}`, encodeURIComponent(String(policyName))); // 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: 'PUT', ...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(requestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Resets the secret for extra.accessKey. Account.name must match accountName. extra.accessKey is required. The returned password is disclosed only in this response. * @summary updateSeaweedFSAccount * @param {string} orgName name of the organization * @param {string} clusterName name of the cluster * @param {string} accountName name of the account * @param {Account} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateSeaweedFSAccount: async (orgName: string, clusterName: string, accountName: string, body: Account, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('updateSeaweedFSAccount', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('updateSeaweedFSAccount', 'clusterName', clusterName) // verify required parameter 'accountName' is not null or undefined assertParamExists('updateSeaweedFSAccount', 'accountName', accountName) // verify required parameter 'body' is not null or undefined assertParamExists('updateSeaweedFSAccount', 'body', body) const localVarPath = `/admin/v1/data/seaweedfs/organizations/{orgName}/clusters/{clusterName}/accounts/{accountName}` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))) .replace(`{${"accountName"}}`, encodeURIComponent(String(accountName))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Unsupported for SeaweedFS. Use the named policy binding API instead. * @summary updateSeaweedFSAccountPrivileges * @param {string} orgName name of the Org * @param {string} clusterName name of the Cluster * @param {string} accountName name of the account * @param {Array} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateSeaweedFSAccountPrivileges: async (orgName: string, clusterName: string, accountName: string, body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orgName' is not null or undefined assertParamExists('updateSeaweedFSAccountPrivileges', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('updateSeaweedFSAccountPrivileges', 'clusterName', clusterName) // verify required parameter 'accountName' is not null or undefined assertParamExists('updateSeaweedFSAccountPrivileges', 'accountName', accountName) // verify required parameter 'body' is not null or undefined assertParamExists('updateSeaweedFSAccountPrivileges', 'body', body) const localVarPath = `/admin/v1/data/seaweedfs/organizations/{orgName}/clusters/{clusterName}/accounts/{accountName}/privileges` .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))) .replace(`{${"accountName"}}`, encodeURIComponent(String(accountName))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * SeaweedfsApi - functional programming interface * @export */ export const SeaweedfsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = SeaweedfsApiAxiosParamCreator(configuration) return { /** * Replaces named policy bindings. An empty policies array removes all direct bindings. Existing credentials, legacy actions and other identity attributes are preserved. * @summary bindSeaweedFSPolicies * @param {string} orgName * @param {string} clusterName * @param {string} accountName * @param {BindSeaweedFSPoliciesRequest} bindSeaweedFSPoliciesRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async bindSeaweedFSPolicies(orgName: string, clusterName: string, accountName: string, bindSeaweedFSPoliciesRequest: BindSeaweedFSPoliciesRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.bindSeaweedFSPolicies(orgName, clusterName, accountName, bindSeaweedFSPoliciesRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SeaweedfsApi.bindSeaweedFSPolicies']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Creates a credential on the identity. Account.name must match accountName, role must be BASICUSER. Optional extra.accessKey and password select the access key and secret key; omitted or empty values are generated. The returned password is disclosed only in this response. * @summary createSeaweedFSAccessKey * @param {string} orgName * @param {string} clusterName * @param {string} accountName * @param {Account} account * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createSeaweedFSAccessKey(orgName: string, clusterName: string, accountName: string, account: Account, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createSeaweedFSAccessKey(orgName, clusterName, accountName, account, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SeaweedfsApi.createSeaweedFSAccessKey']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Creates a BASICUSER identity with named policies from extra.policies. Optional extra.accessKey and password select the credential; empty values are generated. The password is disclosed only in this response. * @summary createSeaweedFSAccount * @param {string} orgName name of the organization * @param {string} clusterName name of the cluster * @param {Account} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createSeaweedFSAccount(orgName: string, clusterName: string, body: Account, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createSeaweedFSAccount(orgName, clusterName, body, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SeaweedfsApi.createSeaweedFSAccount']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary deleteSeaweedFSAccessKey * @param {string} orgName * @param {string} clusterName * @param {string} accountName * @param {string} accessKey * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteSeaweedFSAccessKey(orgName: string, clusterName: string, accountName: string, accessKey: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSeaweedFSAccessKey(orgName, clusterName, accountName, accessKey, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SeaweedfsApi.deleteSeaweedFSAccessKey']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * delete an account in cluster * @summary deleteSeaweedFSAccount * @param {string} orgName name of the organization * @param {string} clusterName name of the cluster * @param {string} accountName name of the account * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteSeaweedFSAccount(orgName: string, clusterName: string, accountName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSeaweedFSAccount(orgName, clusterName, accountName, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SeaweedfsApi.deleteSeaweedFSAccount']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes an unused named policy. Attached policies are rejected; no identities or groups are implicitly changed. * @summary deleteSeaweedFSPolicy * @param {string} orgName * @param {string} clusterName * @param {string} policyName * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteSeaweedFSPolicy(orgName: string, clusterName: string, policyName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSeaweedFSPolicy(orgName, clusterName, policyName, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SeaweedfsApi.deleteSeaweedFSPolicy']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * get root account password * @summary getRootSeaweedFSAccountPassword * @param {string} orgName name of the Org * @param {string} clusterName name of the Cluster * @param {string} accountName name of the account * @param {string} [component] name of the component * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getRootSeaweedFSAccountPassword(orgName: string, clusterName: string, accountName: string, component?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getRootSeaweedFSAccountPassword(orgName, clusterName, accountName, component, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SeaweedfsApi.getRootSeaweedFSAccountPassword']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Lists SeaweedFS identities and access-key metadata without secret keys. * @summary listSeaweedFSAccounts * @param {string} orgName name of the organization * @param {string} clusterName name of the cluster * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listSeaweedFSAccounts(orgName: string, clusterName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listSeaweedFSAccounts(orgName, clusterName, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SeaweedfsApi.listSeaweedFSAccounts']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary listSeaweedFSPolicies * @param {string} orgName * @param {string} clusterName * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listSeaweedFSPolicies(orgName: string, clusterName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listSeaweedFSPolicies(orgName, clusterName, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SeaweedfsApi.listSeaweedFSPolicies']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Creates or replaces a named AWS IAM JSON policy document. Updates affect every identity and group that uses this policy. * @summary putSeaweedFSPolicy * @param {string} orgName * @param {string} clusterName * @param {string} policyName * @param {{ [key: string]: any; }} requestBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ async putSeaweedFSPolicy(orgName: string, clusterName: string, policyName: string, requestBody: { [key: string]: any; }, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.putSeaweedFSPolicy(orgName, clusterName, policyName, requestBody, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SeaweedfsApi.putSeaweedFSPolicy']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Resets the secret for extra.accessKey. Account.name must match accountName. extra.accessKey is required. The returned password is disclosed only in this response. * @summary updateSeaweedFSAccount * @param {string} orgName name of the organization * @param {string} clusterName name of the cluster * @param {string} accountName name of the account * @param {Account} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateSeaweedFSAccount(orgName: string, clusterName: string, accountName: string, body: Account, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateSeaweedFSAccount(orgName, clusterName, accountName, body, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SeaweedfsApi.updateSeaweedFSAccount']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Unsupported for SeaweedFS. Use the named policy binding API instead. * @summary updateSeaweedFSAccountPrivileges * @param {string} orgName name of the Org * @param {string} clusterName name of the Cluster * @param {string} accountName name of the account * @param {Array} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateSeaweedFSAccountPrivileges(orgName: string, clusterName: string, accountName: string, body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateSeaweedFSAccountPrivileges(orgName, clusterName, accountName, body, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SeaweedfsApi.updateSeaweedFSAccountPrivileges']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * SeaweedfsApi - factory interface * @export */ export const SeaweedfsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = SeaweedfsApiFp(configuration) return { /** * Replaces named policy bindings. An empty policies array removes all direct bindings. Existing credentials, legacy actions and other identity attributes are preserved. * @summary bindSeaweedFSPolicies * @param {SeaweedfsApiBindSeaweedFSPoliciesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ bindSeaweedFSPolicies(requestParameters: SeaweedfsApiBindSeaweedFSPoliciesRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.bindSeaweedFSPolicies(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.bindSeaweedFSPoliciesRequest, options).then((request) => request(axios, basePath)); }, /** * Creates a credential on the identity. Account.name must match accountName, role must be BASICUSER. Optional extra.accessKey and password select the access key and secret key; omitted or empty values are generated. The returned password is disclosed only in this response. * @summary createSeaweedFSAccessKey * @param {SeaweedfsApiCreateSeaweedFSAccessKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createSeaweedFSAccessKey(requestParameters: SeaweedfsApiCreateSeaweedFSAccessKeyRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createSeaweedFSAccessKey(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.account, options).then((request) => request(axios, basePath)); }, /** * Creates a BASICUSER identity with named policies from extra.policies. Optional extra.accessKey and password select the credential; empty values are generated. The password is disclosed only in this response. * @summary createSeaweedFSAccount * @param {SeaweedfsApiCreateSeaweedFSAccountRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createSeaweedFSAccount(requestParameters: SeaweedfsApiCreateSeaweedFSAccountRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createSeaweedFSAccount(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath)); }, /** * * @summary deleteSeaweedFSAccessKey * @param {SeaweedfsApiDeleteSeaweedFSAccessKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteSeaweedFSAccessKey(requestParameters: SeaweedfsApiDeleteSeaweedFSAccessKeyRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteSeaweedFSAccessKey(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.accessKey, options).then((request) => request(axios, basePath)); }, /** * delete an account in cluster * @summary deleteSeaweedFSAccount * @param {SeaweedfsApiDeleteSeaweedFSAccountRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteSeaweedFSAccount(requestParameters: SeaweedfsApiDeleteSeaweedFSAccountRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteSeaweedFSAccount(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, options).then((request) => request(axios, basePath)); }, /** * Deletes an unused named policy. Attached policies are rejected; no identities or groups are implicitly changed. * @summary deleteSeaweedFSPolicy * @param {SeaweedfsApiDeleteSeaweedFSPolicyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteSeaweedFSPolicy(requestParameters: SeaweedfsApiDeleteSeaweedFSPolicyRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteSeaweedFSPolicy(requestParameters.orgName, requestParameters.clusterName, requestParameters.policyName, options).then((request) => request(axios, basePath)); }, /** * get root account password * @summary getRootSeaweedFSAccountPassword * @param {SeaweedfsApiGetRootSeaweedFSAccountPasswordRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRootSeaweedFSAccountPassword(requestParameters: SeaweedfsApiGetRootSeaweedFSAccountPasswordRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getRootSeaweedFSAccountPassword(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.component, options).then((request) => request(axios, basePath)); }, /** * Lists SeaweedFS identities and access-key metadata without secret keys. * @summary listSeaweedFSAccounts * @param {SeaweedfsApiListSeaweedFSAccountsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listSeaweedFSAccounts(requestParameters: SeaweedfsApiListSeaweedFSAccountsRequest, options?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.listSeaweedFSAccounts(requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(axios, basePath)); }, /** * * @summary listSeaweedFSPolicies * @param {SeaweedfsApiListSeaweedFSPoliciesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listSeaweedFSPolicies(requestParameters: SeaweedfsApiListSeaweedFSPoliciesRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.listSeaweedFSPolicies(requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(axios, basePath)); }, /** * Creates or replaces a named AWS IAM JSON policy document. Updates affect every identity and group that uses this policy. * @summary putSeaweedFSPolicy * @param {SeaweedfsApiPutSeaweedFSPolicyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ putSeaweedFSPolicy(requestParameters: SeaweedfsApiPutSeaweedFSPolicyRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.putSeaweedFSPolicy(requestParameters.orgName, requestParameters.clusterName, requestParameters.policyName, requestParameters.requestBody, options).then((request) => request(axios, basePath)); }, /** * Resets the secret for extra.accessKey. Account.name must match accountName. extra.accessKey is required. The returned password is disclosed only in this response. * @summary updateSeaweedFSAccount * @param {SeaweedfsApiUpdateSeaweedFSAccountRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateSeaweedFSAccount(requestParameters: SeaweedfsApiUpdateSeaweedFSAccountRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.updateSeaweedFSAccount(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.body, options).then((request) => request(axios, basePath)); }, /** * Unsupported for SeaweedFS. Use the named policy binding API instead. * @summary updateSeaweedFSAccountPrivileges * @param {SeaweedfsApiUpdateSeaweedFSAccountPrivilegesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateSeaweedFSAccountPrivileges(requestParameters: SeaweedfsApiUpdateSeaweedFSAccountPrivilegesRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.updateSeaweedFSAccountPrivileges(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.body, options).then((request) => request(axios, basePath)); }, }; }; /** * SeaweedfsApi - interface * @export * @interface SeaweedfsApi */ export interface SeaweedfsApiInterface { /** * Replaces named policy bindings. An empty policies array removes all direct bindings. Existing credentials, legacy actions and other identity attributes are preserved. * @summary bindSeaweedFSPolicies * @param {SeaweedfsApiBindSeaweedFSPoliciesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApiInterface */ bindSeaweedFSPolicies(requestParameters: SeaweedfsApiBindSeaweedFSPoliciesRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Creates a credential on the identity. Account.name must match accountName, role must be BASICUSER. Optional extra.accessKey and password select the access key and secret key; omitted or empty values are generated. The returned password is disclosed only in this response. * @summary createSeaweedFSAccessKey * @param {SeaweedfsApiCreateSeaweedFSAccessKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApiInterface */ createSeaweedFSAccessKey(requestParameters: SeaweedfsApiCreateSeaweedFSAccessKeyRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Creates a BASICUSER identity with named policies from extra.policies. Optional extra.accessKey and password select the credential; empty values are generated. The password is disclosed only in this response. * @summary createSeaweedFSAccount * @param {SeaweedfsApiCreateSeaweedFSAccountRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApiInterface */ createSeaweedFSAccount(requestParameters: SeaweedfsApiCreateSeaweedFSAccountRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary deleteSeaweedFSAccessKey * @param {SeaweedfsApiDeleteSeaweedFSAccessKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApiInterface */ deleteSeaweedFSAccessKey(requestParameters: SeaweedfsApiDeleteSeaweedFSAccessKeyRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * delete an account in cluster * @summary deleteSeaweedFSAccount * @param {SeaweedfsApiDeleteSeaweedFSAccountRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApiInterface */ deleteSeaweedFSAccount(requestParameters: SeaweedfsApiDeleteSeaweedFSAccountRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Deletes an unused named policy. Attached policies are rejected; no identities or groups are implicitly changed. * @summary deleteSeaweedFSPolicy * @param {SeaweedfsApiDeleteSeaweedFSPolicyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApiInterface */ deleteSeaweedFSPolicy(requestParameters: SeaweedfsApiDeleteSeaweedFSPolicyRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * get root account password * @summary getRootSeaweedFSAccountPassword * @param {SeaweedfsApiGetRootSeaweedFSAccountPasswordRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApiInterface */ getRootSeaweedFSAccountPassword(requestParameters: SeaweedfsApiGetRootSeaweedFSAccountPasswordRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Lists SeaweedFS identities and access-key metadata without secret keys. * @summary listSeaweedFSAccounts * @param {SeaweedfsApiListSeaweedFSAccountsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApiInterface */ listSeaweedFSAccounts(requestParameters: SeaweedfsApiListSeaweedFSAccountsRequest, options?: RawAxiosRequestConfig): AxiosPromise>; /** * * @summary listSeaweedFSPolicies * @param {SeaweedfsApiListSeaweedFSPoliciesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApiInterface */ listSeaweedFSPolicies(requestParameters: SeaweedfsApiListSeaweedFSPoliciesRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Creates or replaces a named AWS IAM JSON policy document. Updates affect every identity and group that uses this policy. * @summary putSeaweedFSPolicy * @param {SeaweedfsApiPutSeaweedFSPolicyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApiInterface */ putSeaweedFSPolicy(requestParameters: SeaweedfsApiPutSeaweedFSPolicyRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Resets the secret for extra.accessKey. Account.name must match accountName. extra.accessKey is required. The returned password is disclosed only in this response. * @summary updateSeaweedFSAccount * @param {SeaweedfsApiUpdateSeaweedFSAccountRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApiInterface */ updateSeaweedFSAccount(requestParameters: SeaweedfsApiUpdateSeaweedFSAccountRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Unsupported for SeaweedFS. Use the named policy binding API instead. * @summary updateSeaweedFSAccountPrivileges * @param {SeaweedfsApiUpdateSeaweedFSAccountPrivilegesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApiInterface */ updateSeaweedFSAccountPrivileges(requestParameters: SeaweedfsApiUpdateSeaweedFSAccountPrivilegesRequest, options?: RawAxiosRequestConfig): AxiosPromise; } /** * Request parameters for bindSeaweedFSPolicies operation in SeaweedfsApi. * @export * @interface SeaweedfsApiBindSeaweedFSPoliciesRequest */ export interface SeaweedfsApiBindSeaweedFSPoliciesRequest { /** * * @type {string} * @memberof SeaweedfsApiBindSeaweedFSPolicies */ readonly orgName: string /** * * @type {string} * @memberof SeaweedfsApiBindSeaweedFSPolicies */ readonly clusterName: string /** * * @type {string} * @memberof SeaweedfsApiBindSeaweedFSPolicies */ readonly accountName: string /** * * @type {BindSeaweedFSPoliciesRequest} * @memberof SeaweedfsApiBindSeaweedFSPolicies */ readonly bindSeaweedFSPoliciesRequest: BindSeaweedFSPoliciesRequest } /** * Request parameters for createSeaweedFSAccessKey operation in SeaweedfsApi. * @export * @interface SeaweedfsApiCreateSeaweedFSAccessKeyRequest */ export interface SeaweedfsApiCreateSeaweedFSAccessKeyRequest { /** * * @type {string} * @memberof SeaweedfsApiCreateSeaweedFSAccessKey */ readonly orgName: string /** * * @type {string} * @memberof SeaweedfsApiCreateSeaweedFSAccessKey */ readonly clusterName: string /** * * @type {string} * @memberof SeaweedfsApiCreateSeaweedFSAccessKey */ readonly accountName: string /** * * @type {Account} * @memberof SeaweedfsApiCreateSeaweedFSAccessKey */ readonly account: Account } /** * Request parameters for createSeaweedFSAccount operation in SeaweedfsApi. * @export * @interface SeaweedfsApiCreateSeaweedFSAccountRequest */ export interface SeaweedfsApiCreateSeaweedFSAccountRequest { /** * name of the organization * @type {string} * @memberof SeaweedfsApiCreateSeaweedFSAccount */ readonly orgName: string /** * name of the cluster * @type {string} * @memberof SeaweedfsApiCreateSeaweedFSAccount */ readonly clusterName: string /** * * @type {Account} * @memberof SeaweedfsApiCreateSeaweedFSAccount */ readonly body: Account } /** * Request parameters for deleteSeaweedFSAccessKey operation in SeaweedfsApi. * @export * @interface SeaweedfsApiDeleteSeaweedFSAccessKeyRequest */ export interface SeaweedfsApiDeleteSeaweedFSAccessKeyRequest { /** * * @type {string} * @memberof SeaweedfsApiDeleteSeaweedFSAccessKey */ readonly orgName: string /** * * @type {string} * @memberof SeaweedfsApiDeleteSeaweedFSAccessKey */ readonly clusterName: string /** * * @type {string} * @memberof SeaweedfsApiDeleteSeaweedFSAccessKey */ readonly accountName: string /** * * @type {string} * @memberof SeaweedfsApiDeleteSeaweedFSAccessKey */ readonly accessKey: string } /** * Request parameters for deleteSeaweedFSAccount operation in SeaweedfsApi. * @export * @interface SeaweedfsApiDeleteSeaweedFSAccountRequest */ export interface SeaweedfsApiDeleteSeaweedFSAccountRequest { /** * name of the organization * @type {string} * @memberof SeaweedfsApiDeleteSeaweedFSAccount */ readonly orgName: string /** * name of the cluster * @type {string} * @memberof SeaweedfsApiDeleteSeaweedFSAccount */ readonly clusterName: string /** * name of the account * @type {string} * @memberof SeaweedfsApiDeleteSeaweedFSAccount */ readonly accountName: string } /** * Request parameters for deleteSeaweedFSPolicy operation in SeaweedfsApi. * @export * @interface SeaweedfsApiDeleteSeaweedFSPolicyRequest */ export interface SeaweedfsApiDeleteSeaweedFSPolicyRequest { /** * * @type {string} * @memberof SeaweedfsApiDeleteSeaweedFSPolicy */ readonly orgName: string /** * * @type {string} * @memberof SeaweedfsApiDeleteSeaweedFSPolicy */ readonly clusterName: string /** * * @type {string} * @memberof SeaweedfsApiDeleteSeaweedFSPolicy */ readonly policyName: string } /** * Request parameters for getRootSeaweedFSAccountPassword operation in SeaweedfsApi. * @export * @interface SeaweedfsApiGetRootSeaweedFSAccountPasswordRequest */ export interface SeaweedfsApiGetRootSeaweedFSAccountPasswordRequest { /** * name of the Org * @type {string} * @memberof SeaweedfsApiGetRootSeaweedFSAccountPassword */ readonly orgName: string /** * name of the Cluster * @type {string} * @memberof SeaweedfsApiGetRootSeaweedFSAccountPassword */ readonly clusterName: string /** * name of the account * @type {string} * @memberof SeaweedfsApiGetRootSeaweedFSAccountPassword */ readonly accountName: string /** * name of the component * @type {string} * @memberof SeaweedfsApiGetRootSeaweedFSAccountPassword */ readonly component?: string } /** * Request parameters for listSeaweedFSAccounts operation in SeaweedfsApi. * @export * @interface SeaweedfsApiListSeaweedFSAccountsRequest */ export interface SeaweedfsApiListSeaweedFSAccountsRequest { /** * name of the organization * @type {string} * @memberof SeaweedfsApiListSeaweedFSAccounts */ readonly orgName: string /** * name of the cluster * @type {string} * @memberof SeaweedfsApiListSeaweedFSAccounts */ readonly clusterName: string } /** * Request parameters for listSeaweedFSPolicies operation in SeaweedfsApi. * @export * @interface SeaweedfsApiListSeaweedFSPoliciesRequest */ export interface SeaweedfsApiListSeaweedFSPoliciesRequest { /** * * @type {string} * @memberof SeaweedfsApiListSeaweedFSPolicies */ readonly orgName: string /** * * @type {string} * @memberof SeaweedfsApiListSeaweedFSPolicies */ readonly clusterName: string } /** * Request parameters for putSeaweedFSPolicy operation in SeaweedfsApi. * @export * @interface SeaweedfsApiPutSeaweedFSPolicyRequest */ export interface SeaweedfsApiPutSeaweedFSPolicyRequest { /** * * @type {string} * @memberof SeaweedfsApiPutSeaweedFSPolicy */ readonly orgName: string /** * * @type {string} * @memberof SeaweedfsApiPutSeaweedFSPolicy */ readonly clusterName: string /** * * @type {string} * @memberof SeaweedfsApiPutSeaweedFSPolicy */ readonly policyName: string /** * * @type {{ [key: string]: any; }} * @memberof SeaweedfsApiPutSeaweedFSPolicy */ readonly requestBody: { [key: string]: any; } } /** * Request parameters for updateSeaweedFSAccount operation in SeaweedfsApi. * @export * @interface SeaweedfsApiUpdateSeaweedFSAccountRequest */ export interface SeaweedfsApiUpdateSeaweedFSAccountRequest { /** * name of the organization * @type {string} * @memberof SeaweedfsApiUpdateSeaweedFSAccount */ readonly orgName: string /** * name of the cluster * @type {string} * @memberof SeaweedfsApiUpdateSeaweedFSAccount */ readonly clusterName: string /** * name of the account * @type {string} * @memberof SeaweedfsApiUpdateSeaweedFSAccount */ readonly accountName: string /** * * @type {Account} * @memberof SeaweedfsApiUpdateSeaweedFSAccount */ readonly body: Account } /** * Request parameters for updateSeaweedFSAccountPrivileges operation in SeaweedfsApi. * @export * @interface SeaweedfsApiUpdateSeaweedFSAccountPrivilegesRequest */ export interface SeaweedfsApiUpdateSeaweedFSAccountPrivilegesRequest { /** * name of the Org * @type {string} * @memberof SeaweedfsApiUpdateSeaweedFSAccountPrivileges */ readonly orgName: string /** * name of the Cluster * @type {string} * @memberof SeaweedfsApiUpdateSeaweedFSAccountPrivileges */ readonly clusterName: string /** * name of the account * @type {string} * @memberof SeaweedfsApiUpdateSeaweedFSAccountPrivileges */ readonly accountName: string /** * * @type {Array} * @memberof SeaweedfsApiUpdateSeaweedFSAccountPrivileges */ readonly body: Array } /** * SeaweedfsApi - object-oriented interface * @export * @class SeaweedfsApi * @extends {BaseAPI} */ export class SeaweedfsApi extends BaseAPI implements SeaweedfsApiInterface { /** * Replaces named policy bindings. An empty policies array removes all direct bindings. Existing credentials, legacy actions and other identity attributes are preserved. * @summary bindSeaweedFSPolicies * @param {SeaweedfsApiBindSeaweedFSPoliciesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApi */ public bindSeaweedFSPolicies(requestParameters: SeaweedfsApiBindSeaweedFSPoliciesRequest, options?: RawAxiosRequestConfig) { return SeaweedfsApiFp(this.configuration).bindSeaweedFSPolicies(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.bindSeaweedFSPoliciesRequest, options).then((request) => request(this.axios, this.basePath)); } /** * Creates a credential on the identity. Account.name must match accountName, role must be BASICUSER. Optional extra.accessKey and password select the access key and secret key; omitted or empty values are generated. The returned password is disclosed only in this response. * @summary createSeaweedFSAccessKey * @param {SeaweedfsApiCreateSeaweedFSAccessKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApi */ public createSeaweedFSAccessKey(requestParameters: SeaweedfsApiCreateSeaweedFSAccessKeyRequest, options?: RawAxiosRequestConfig) { return SeaweedfsApiFp(this.configuration).createSeaweedFSAccessKey(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.account, options).then((request) => request(this.axios, this.basePath)); } /** * Creates a BASICUSER identity with named policies from extra.policies. Optional extra.accessKey and password select the credential; empty values are generated. The password is disclosed only in this response. * @summary createSeaweedFSAccount * @param {SeaweedfsApiCreateSeaweedFSAccountRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApi */ public createSeaweedFSAccount(requestParameters: SeaweedfsApiCreateSeaweedFSAccountRequest, options?: RawAxiosRequestConfig) { return SeaweedfsApiFp(this.configuration).createSeaweedFSAccount(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary deleteSeaweedFSAccessKey * @param {SeaweedfsApiDeleteSeaweedFSAccessKeyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApi */ public deleteSeaweedFSAccessKey(requestParameters: SeaweedfsApiDeleteSeaweedFSAccessKeyRequest, options?: RawAxiosRequestConfig) { return SeaweedfsApiFp(this.configuration).deleteSeaweedFSAccessKey(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.accessKey, options).then((request) => request(this.axios, this.basePath)); } /** * delete an account in cluster * @summary deleteSeaweedFSAccount * @param {SeaweedfsApiDeleteSeaweedFSAccountRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApi */ public deleteSeaweedFSAccount(requestParameters: SeaweedfsApiDeleteSeaweedFSAccountRequest, options?: RawAxiosRequestConfig) { return SeaweedfsApiFp(this.configuration).deleteSeaweedFSAccount(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, options).then((request) => request(this.axios, this.basePath)); } /** * Deletes an unused named policy. Attached policies are rejected; no identities or groups are implicitly changed. * @summary deleteSeaweedFSPolicy * @param {SeaweedfsApiDeleteSeaweedFSPolicyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApi */ public deleteSeaweedFSPolicy(requestParameters: SeaweedfsApiDeleteSeaweedFSPolicyRequest, options?: RawAxiosRequestConfig) { return SeaweedfsApiFp(this.configuration).deleteSeaweedFSPolicy(requestParameters.orgName, requestParameters.clusterName, requestParameters.policyName, options).then((request) => request(this.axios, this.basePath)); } /** * get root account password * @summary getRootSeaweedFSAccountPassword * @param {SeaweedfsApiGetRootSeaweedFSAccountPasswordRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApi */ public getRootSeaweedFSAccountPassword(requestParameters: SeaweedfsApiGetRootSeaweedFSAccountPasswordRequest, options?: RawAxiosRequestConfig) { return SeaweedfsApiFp(this.configuration).getRootSeaweedFSAccountPassword(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.component, options).then((request) => request(this.axios, this.basePath)); } /** * Lists SeaweedFS identities and access-key metadata without secret keys. * @summary listSeaweedFSAccounts * @param {SeaweedfsApiListSeaweedFSAccountsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApi */ public listSeaweedFSAccounts(requestParameters: SeaweedfsApiListSeaweedFSAccountsRequest, options?: RawAxiosRequestConfig) { return SeaweedfsApiFp(this.configuration).listSeaweedFSAccounts(requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary listSeaweedFSPolicies * @param {SeaweedfsApiListSeaweedFSPoliciesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApi */ public listSeaweedFSPolicies(requestParameters: SeaweedfsApiListSeaweedFSPoliciesRequest, options?: RawAxiosRequestConfig) { return SeaweedfsApiFp(this.configuration).listSeaweedFSPolicies(requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(this.axios, this.basePath)); } /** * Creates or replaces a named AWS IAM JSON policy document. Updates affect every identity and group that uses this policy. * @summary putSeaweedFSPolicy * @param {SeaweedfsApiPutSeaweedFSPolicyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApi */ public putSeaweedFSPolicy(requestParameters: SeaweedfsApiPutSeaweedFSPolicyRequest, options?: RawAxiosRequestConfig) { return SeaweedfsApiFp(this.configuration).putSeaweedFSPolicy(requestParameters.orgName, requestParameters.clusterName, requestParameters.policyName, requestParameters.requestBody, options).then((request) => request(this.axios, this.basePath)); } /** * Resets the secret for extra.accessKey. Account.name must match accountName. extra.accessKey is required. The returned password is disclosed only in this response. * @summary updateSeaweedFSAccount * @param {SeaweedfsApiUpdateSeaweedFSAccountRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApi */ public updateSeaweedFSAccount(requestParameters: SeaweedfsApiUpdateSeaweedFSAccountRequest, options?: RawAxiosRequestConfig) { return SeaweedfsApiFp(this.configuration).updateSeaweedFSAccount(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } /** * Unsupported for SeaweedFS. Use the named policy binding API instead. * @summary updateSeaweedFSAccountPrivileges * @param {SeaweedfsApiUpdateSeaweedFSAccountPrivilegesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SeaweedfsApi */ public updateSeaweedFSAccountPrivileges(requestParameters: SeaweedfsApiUpdateSeaweedFSAccountPrivilegesRequest, options?: RawAxiosRequestConfig) { return SeaweedfsApiFp(this.configuration).updateSeaweedFSAccountPrivileges(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } }