jack-service-accounts-sdk
Version:
RHOAS Service Accounts SDK
618 lines (553 loc) • 32.1 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* sso.redhat.com API documentation
* This is the API documentation for sso.redhat.com
*
* The version of the OpenAPI document: 5.0.19-SNAPSHOT
* Contact: it-user-team-list@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 { RedHatErrorRepresentation } from '../model';
// @ts-ignore
import { ServiceAccountCreateRequestData } from '../model';
// @ts-ignore
import { ServiceAccountData } from '../model';
// @ts-ignore
import { ServiceAccountRequestData } from '../model';
// @ts-ignore
import { ValidationExceptionData } from '../model';
/**
* ServiceAccountsApi - axios parameter creator
* @export
*/
export const ServiceAccountsApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* Create a service account. Created service account is associated with the user defined in the bearer token.
* @summary Create service account
* @param {ServiceAccountCreateRequestData} serviceAccountCreateRequestData \'name\' and \'description\' of the service account
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createServiceAccount: async (serviceAccountCreateRequestData: ServiceAccountCreateRequestData, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'serviceAccountCreateRequestData' is not null or undefined
assertParamExists('createServiceAccount', 'serviceAccountCreateRequestData', serviceAccountCreateRequestData)
const localVarPath = `/apis/service_accounts/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: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication authFlow required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "authFlow", ["api.iam.service_accounts"], configuration)
// authentication serviceAccounts required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "serviceAccounts", ["api.iam.service_accounts"], 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(serviceAccountCreateRequestData, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Delete service account by id. Throws not found exception if the service account is not found or the user does not have access to this service account
* @summary Delete service account by id
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteServiceAccount: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('deleteServiceAccount', 'id', id)
const localVarPath = `/apis/service_accounts/v1/{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 authFlow required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "authFlow", ["api.iam.service_accounts"], configuration)
// authentication serviceAccounts required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "serviceAccounts", ["api.iam.service_accounts"], configuration)
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns service account by id. Throws not found exception if the service account is not found or the user does not have access to this service account
* @summary Get service account by id
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getServiceAccount: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('getServiceAccount', 'id', id)
const localVarPath = `/apis/service_accounts/v1/{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 authFlow required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "authFlow", ["api.iam.service_accounts"], configuration)
// authentication serviceAccounts required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "serviceAccounts", ["api.iam.service_accounts"], 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 service accounts created by a user. User information is obtained from the bearer token. The list is paginated with starting index as \'first\' and page size as \'max\'.
* @summary List all service accounts
* @param {number} [first]
* @param {number} [max]
* @param {Set<string>} [clientId]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getServiceAccounts: async (first?: number, max?: number, clientId?: Set<string>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/apis/service_accounts/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;
// authentication authFlow required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "authFlow", ["api.iam.service_accounts"], configuration)
// authentication serviceAccounts required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "serviceAccounts", ["api.iam.service_accounts"], configuration)
if (first !== undefined) {
localVarQueryParameter['first'] = first;
}
if (max !== undefined) {
localVarQueryParameter['max'] = max;
}
if (clientId) {
localVarQueryParameter['clientId'] = Array.from(clientId);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Reset service account secret by id . Throws not found exception if the service account is not found or the user does not have access to this service account
* @summary Reset service account secret by id
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resetServiceAccountSecret: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('resetServiceAccountSecret', 'id', id)
const localVarPath = `/apis/service_accounts/v1/{id}/resetSecret`
.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 authFlow required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "authFlow", ["api.iam.service_accounts"], configuration)
// authentication serviceAccounts required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "serviceAccounts", ["api.iam.service_accounts"], configuration)
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Update a service account by id.
* @summary Update service account
* @param {string} id
* @param {ServiceAccountRequestData} serviceAccountRequestData \'name\' and \'description\' of the service account
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateServiceAccount: async (id: string, serviceAccountRequestData: ServiceAccountRequestData, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('updateServiceAccount', 'id', id)
// verify required parameter 'serviceAccountRequestData' is not null or undefined
assertParamExists('updateServiceAccount', 'serviceAccountRequestData', serviceAccountRequestData)
const localVarPath = `/apis/service_accounts/v1/{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 authFlow required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "authFlow", ["api.iam.service_accounts"], configuration)
// authentication serviceAccounts required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "serviceAccounts", ["api.iam.service_accounts"], 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(serviceAccountRequestData, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* ServiceAccountsApi - functional programming interface
* @export
*/
export const ServiceAccountsApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = ServiceAccountsApiAxiosParamCreator(configuration)
return {
/**
* Create a service account. Created service account is associated with the user defined in the bearer token.
* @summary Create service account
* @param {ServiceAccountCreateRequestData} serviceAccountCreateRequestData \'name\' and \'description\' of the service account
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createServiceAccount(serviceAccountCreateRequestData: ServiceAccountCreateRequestData, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ServiceAccountData>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.createServiceAccount(serviceAccountCreateRequestData, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Delete service account by id. Throws not found exception if the service account is not found or the user does not have access to this service account
* @summary Delete service account by id
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteServiceAccount(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteServiceAccount(id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Returns service account by id. Throws not found exception if the service account is not found or the user does not have access to this service account
* @summary Get service account by id
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getServiceAccount(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ServiceAccountData>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getServiceAccount(id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Returns a list of service accounts created by a user. User information is obtained from the bearer token. The list is paginated with starting index as \'first\' and page size as \'max\'.
* @summary List all service accounts
* @param {number} [first]
* @param {number} [max]
* @param {Set<string>} [clientId]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getServiceAccounts(first?: number, max?: number, clientId?: Set<string>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ServiceAccountData>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getServiceAccounts(first, max, clientId, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Reset service account secret by id . Throws not found exception if the service account is not found or the user does not have access to this service account
* @summary Reset service account secret by id
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async resetServiceAccountSecret(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ServiceAccountData>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.resetServiceAccountSecret(id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Update a service account by id.
* @summary Update service account
* @param {string} id
* @param {ServiceAccountRequestData} serviceAccountRequestData \'name\' and \'description\' of the service account
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updateServiceAccount(id: string, serviceAccountRequestData: ServiceAccountRequestData, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ServiceAccountData>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.updateServiceAccount(id, serviceAccountRequestData, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
/**
* ServiceAccountsApi - factory interface
* @export
*/
export const ServiceAccountsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = ServiceAccountsApiFp(configuration)
return {
/**
* Create a service account. Created service account is associated with the user defined in the bearer token.
* @summary Create service account
* @param {ServiceAccountCreateRequestData} serviceAccountCreateRequestData \'name\' and \'description\' of the service account
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createServiceAccount(serviceAccountCreateRequestData: ServiceAccountCreateRequestData, options?: any): AxiosPromise<ServiceAccountData> {
return localVarFp.createServiceAccount(serviceAccountCreateRequestData, options).then((request) => request(axios, basePath));
},
/**
* Delete service account by id. Throws not found exception if the service account is not found or the user does not have access to this service account
* @summary Delete service account by id
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteServiceAccount(id: string, options?: any): AxiosPromise<void> {
return localVarFp.deleteServiceAccount(id, options).then((request) => request(axios, basePath));
},
/**
* Returns service account by id. Throws not found exception if the service account is not found or the user does not have access to this service account
* @summary Get service account by id
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getServiceAccount(id: string, options?: any): AxiosPromise<ServiceAccountData> {
return localVarFp.getServiceAccount(id, options).then((request) => request(axios, basePath));
},
/**
* Returns a list of service accounts created by a user. User information is obtained from the bearer token. The list is paginated with starting index as \'first\' and page size as \'max\'.
* @summary List all service accounts
* @param {number} [first]
* @param {number} [max]
* @param {Set<string>} [clientId]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getServiceAccounts(first?: number, max?: number, clientId?: Set<string>, options?: any): AxiosPromise<Array<ServiceAccountData>> {
return localVarFp.getServiceAccounts(first, max, clientId, options).then((request) => request(axios, basePath));
},
/**
* Reset service account secret by id . Throws not found exception if the service account is not found or the user does not have access to this service account
* @summary Reset service account secret by id
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resetServiceAccountSecret(id: string, options?: any): AxiosPromise<ServiceAccountData> {
return localVarFp.resetServiceAccountSecret(id, options).then((request) => request(axios, basePath));
},
/**
* Update a service account by id.
* @summary Update service account
* @param {string} id
* @param {ServiceAccountRequestData} serviceAccountRequestData \'name\' and \'description\' of the service account
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateServiceAccount(id: string, serviceAccountRequestData: ServiceAccountRequestData, options?: any): AxiosPromise<ServiceAccountData> {
return localVarFp.updateServiceAccount(id, serviceAccountRequestData, options).then((request) => request(axios, basePath));
},
};
};
/**
* ServiceAccountsApi - interface
* @export
* @interface ServiceAccountsApi
*/
export interface ServiceAccountsApiInterface {
/**
* Create a service account. Created service account is associated with the user defined in the bearer token.
* @summary Create service account
* @param {ServiceAccountCreateRequestData} serviceAccountCreateRequestData \'name\' and \'description\' of the service account
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ServiceAccountsApiInterface
*/
createServiceAccount(serviceAccountCreateRequestData: ServiceAccountCreateRequestData, options?: AxiosRequestConfig): AxiosPromise<ServiceAccountData>;
/**
* Delete service account by id. Throws not found exception if the service account is not found or the user does not have access to this service account
* @summary Delete service account by id
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ServiceAccountsApiInterface
*/
deleteServiceAccount(id: string, options?: AxiosRequestConfig): AxiosPromise<void>;
/**
* Returns service account by id. Throws not found exception if the service account is not found or the user does not have access to this service account
* @summary Get service account by id
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ServiceAccountsApiInterface
*/
getServiceAccount(id: string, options?: AxiosRequestConfig): AxiosPromise<ServiceAccountData>;
/**
* Returns a list of service accounts created by a user. User information is obtained from the bearer token. The list is paginated with starting index as \'first\' and page size as \'max\'.
* @summary List all service accounts
* @param {number} [first]
* @param {number} [max]
* @param {Set<string>} [clientId]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ServiceAccountsApiInterface
*/
getServiceAccounts(first?: number, max?: number, clientId?: Set<string>, options?: AxiosRequestConfig): AxiosPromise<Array<ServiceAccountData>>;
/**
* Reset service account secret by id . Throws not found exception if the service account is not found or the user does not have access to this service account
* @summary Reset service account secret by id
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ServiceAccountsApiInterface
*/
resetServiceAccountSecret(id: string, options?: AxiosRequestConfig): AxiosPromise<ServiceAccountData>;
/**
* Update a service account by id.
* @summary Update service account
* @param {string} id
* @param {ServiceAccountRequestData} serviceAccountRequestData \'name\' and \'description\' of the service account
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ServiceAccountsApiInterface
*/
updateServiceAccount(id: string, serviceAccountRequestData: ServiceAccountRequestData, options?: AxiosRequestConfig): AxiosPromise<ServiceAccountData>;
}
/**
* ServiceAccountsApi - object-oriented interface
* @export
* @class ServiceAccountsApi
* @extends {BaseAPI}
*/
export class ServiceAccountsApi extends BaseAPI implements ServiceAccountsApiInterface {
/**
* Create a service account. Created service account is associated with the user defined in the bearer token.
* @summary Create service account
* @param {ServiceAccountCreateRequestData} serviceAccountCreateRequestData \'name\' and \'description\' of the service account
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ServiceAccountsApi
*/
public createServiceAccount(serviceAccountCreateRequestData: ServiceAccountCreateRequestData, options?: AxiosRequestConfig) {
return ServiceAccountsApiFp(this.configuration).createServiceAccount(serviceAccountCreateRequestData, options).then((request) => request(this.axios, this.basePath));
}
/**
* Delete service account by id. Throws not found exception if the service account is not found or the user does not have access to this service account
* @summary Delete service account by id
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ServiceAccountsApi
*/
public deleteServiceAccount(id: string, options?: AxiosRequestConfig) {
return ServiceAccountsApiFp(this.configuration).deleteServiceAccount(id, options).then((request) => request(this.axios, this.basePath));
}
/**
* Returns service account by id. Throws not found exception if the service account is not found or the user does not have access to this service account
* @summary Get service account by id
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ServiceAccountsApi
*/
public getServiceAccount(id: string, options?: AxiosRequestConfig) {
return ServiceAccountsApiFp(this.configuration).getServiceAccount(id, options).then((request) => request(this.axios, this.basePath));
}
/**
* Returns a list of service accounts created by a user. User information is obtained from the bearer token. The list is paginated with starting index as \'first\' and page size as \'max\'.
* @summary List all service accounts
* @param {number} [first]
* @param {number} [max]
* @param {Set<string>} [clientId]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ServiceAccountsApi
*/
public getServiceAccounts(first?: number, max?: number, clientId?: Set<string>, options?: AxiosRequestConfig) {
return ServiceAccountsApiFp(this.configuration).getServiceAccounts(first, max, clientId, options).then((request) => request(this.axios, this.basePath));
}
/**
* Reset service account secret by id . Throws not found exception if the service account is not found or the user does not have access to this service account
* @summary Reset service account secret by id
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ServiceAccountsApi
*/
public resetServiceAccountSecret(id: string, options?: AxiosRequestConfig) {
return ServiceAccountsApiFp(this.configuration).resetServiceAccountSecret(id, options).then((request) => request(this.axios, this.basePath));
}
/**
* Update a service account by id.
* @summary Update service account
* @param {string} id
* @param {ServiceAccountRequestData} serviceAccountRequestData \'name\' and \'description\' of the service account
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ServiceAccountsApi
*/
public updateServiceAccount(id: string, serviceAccountRequestData: ServiceAccountRequestData, options?: AxiosRequestConfig) {
return ServiceAccountsApiFp(this.configuration).updateServiceAccount(id, serviceAccountRequestData, options).then((request) => request(this.axios, this.basePath));
}
}