hostinger-api-sdk 2.14.2 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.14.2
6
+ * API Version: 2.16.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -7011,6 +7011,334 @@ export interface EcommerceV1VariantVariantResponseResource {
7011
7011
  */
7012
7012
  'data': EcommerceV1VariantVariantResource;
7013
7013
  }
7014
+ /**
7015
+ *
7016
+ * @export
7017
+ * @interface GPUV1ExposedServiceExposedServiceResource
7018
+ */
7019
+ export interface GPUV1ExposedServiceExposedServiceResource {
7020
+ /**
7021
+ * Exposed service ID
7022
+ * @type {number}
7023
+ * @memberof GPUV1ExposedServiceExposedServiceResource
7024
+ */
7025
+ 'id': number;
7026
+ /**
7027
+ *
7028
+ * @type {string}
7029
+ * @memberof GPUV1ExposedServiceExposedServiceResource
7030
+ */
7031
+ 'name': string;
7032
+ /**
7033
+ * Public hostname or IP address of the service
7034
+ * @type {string}
7035
+ * @memberof GPUV1ExposedServiceExposedServiceResource
7036
+ */
7037
+ 'hostname': string;
7038
+ /**
7039
+ * Port the service listens on inside the instance
7040
+ * @type {number}
7041
+ * @memberof GPUV1ExposedServiceExposedServiceResource
7042
+ */
7043
+ 'internal_port': number;
7044
+ /**
7045
+ * Public port the service is reachable on
7046
+ * @type {number}
7047
+ * @memberof GPUV1ExposedServiceExposedServiceResource
7048
+ */
7049
+ 'external_port': number;
7050
+ /**
7051
+ *
7052
+ * @type {string}
7053
+ * @memberof GPUV1ExposedServiceExposedServiceResource
7054
+ */
7055
+ 'protocol': GPUV1ExposedServiceExposedServiceResourceProtocolEnum;
7056
+ /**
7057
+ *
7058
+ * @type {string}
7059
+ * @memberof GPUV1ExposedServiceExposedServiceResource
7060
+ */
7061
+ 'type': GPUV1ExposedServiceExposedServiceResourceTypeEnum;
7062
+ }
7063
+
7064
+ export const GPUV1ExposedServiceExposedServiceResourceProtocolEnum = {
7065
+ Tcp: 'tcp',
7066
+ Udp: 'udp'
7067
+ } as const;
7068
+
7069
+ export type GPUV1ExposedServiceExposedServiceResourceProtocolEnum = typeof GPUV1ExposedServiceExposedServiceResourceProtocolEnum[keyof typeof GPUV1ExposedServiceExposedServiceResourceProtocolEnum];
7070
+ export const GPUV1ExposedServiceExposedServiceResourceTypeEnum = {
7071
+ Http: 'http',
7072
+ Https: 'https'
7073
+ } as const;
7074
+
7075
+ export type GPUV1ExposedServiceExposedServiceResourceTypeEnum = typeof GPUV1ExposedServiceExposedServiceResourceTypeEnum[keyof typeof GPUV1ExposedServiceExposedServiceResourceTypeEnum];
7076
+
7077
+ /**
7078
+ *
7079
+ * @export
7080
+ * @interface GPUV1ExposedServiceStoreRequest
7081
+ */
7082
+ export interface GPUV1ExposedServiceStoreRequest {
7083
+ /**
7084
+ * Service name, unique within the instance
7085
+ * @type {string}
7086
+ * @memberof GPUV1ExposedServiceStoreRequest
7087
+ */
7088
+ 'name': string;
7089
+ /**
7090
+ * Port the service listens on inside the instance, unique within the instance
7091
+ * @type {number}
7092
+ * @memberof GPUV1ExposedServiceStoreRequest
7093
+ */
7094
+ 'internal_port': number;
7095
+ /**
7096
+ *
7097
+ * @type {string}
7098
+ * @memberof GPUV1ExposedServiceStoreRequest
7099
+ */
7100
+ 'protocol': GPUV1ExposedServiceStoreRequestProtocolEnum;
7101
+ /**
7102
+ *
7103
+ * @type {string}
7104
+ * @memberof GPUV1ExposedServiceStoreRequest
7105
+ */
7106
+ 'type': GPUV1ExposedServiceStoreRequestTypeEnum;
7107
+ }
7108
+
7109
+ export const GPUV1ExposedServiceStoreRequestProtocolEnum = {
7110
+ Tcp: 'tcp',
7111
+ Udp: 'udp'
7112
+ } as const;
7113
+
7114
+ export type GPUV1ExposedServiceStoreRequestProtocolEnum = typeof GPUV1ExposedServiceStoreRequestProtocolEnum[keyof typeof GPUV1ExposedServiceStoreRequestProtocolEnum];
7115
+ export const GPUV1ExposedServiceStoreRequestTypeEnum = {
7116
+ Http: 'http',
7117
+ Https: 'https'
7118
+ } as const;
7119
+
7120
+ export type GPUV1ExposedServiceStoreRequestTypeEnum = typeof GPUV1ExposedServiceStoreRequestTypeEnum[keyof typeof GPUV1ExposedServiceStoreRequestTypeEnum];
7121
+
7122
+ /**
7123
+ *
7124
+ * @export
7125
+ * @interface GPUV1InstanceInstanceListResource
7126
+ */
7127
+ export interface GPUV1InstanceInstanceListResource {
7128
+ /**
7129
+ * GPU instance ID
7130
+ * @type {number}
7131
+ * @memberof GPUV1InstanceInstanceListResource
7132
+ */
7133
+ 'id': number;
7134
+ /**
7135
+ *
7136
+ * @type {string}
7137
+ * @memberof GPUV1InstanceInstanceListResource
7138
+ */
7139
+ 'name': string;
7140
+ /**
7141
+ *
7142
+ * @type {string}
7143
+ * @memberof GPUV1InstanceInstanceListResource
7144
+ */
7145
+ 'status': GPUV1InstanceInstanceListResourceStatusEnum;
7146
+ /**
7147
+ * Whether an action is in progress on the instance
7148
+ * @type {string}
7149
+ * @memberof GPUV1InstanceInstanceListResource
7150
+ */
7151
+ 'action_lock': GPUV1InstanceInstanceListResourceActionLockEnum;
7152
+ /**
7153
+ *
7154
+ * @type {GPUV1PoolPoolResource}
7155
+ * @memberof GPUV1InstanceInstanceListResource
7156
+ */
7157
+ 'pool': GPUV1PoolPoolResource;
7158
+ /**
7159
+ *
7160
+ * @type {GPUV1PoolPoolInstanceResource}
7161
+ * @memberof GPUV1InstanceInstanceListResource
7162
+ */
7163
+ 'pool_instance': GPUV1PoolPoolInstanceResource;
7164
+ /**
7165
+ *
7166
+ * @type {GPUV1OsTemplateOsTemplateResource}
7167
+ * @memberof GPUV1InstanceInstanceListResource
7168
+ */
7169
+ 'os_template': GPUV1OsTemplateOsTemplateResource;
7170
+ }
7171
+
7172
+ export const GPUV1InstanceInstanceListResourceStatusEnum = {
7173
+ Created: 'created',
7174
+ Creating: 'creating',
7175
+ Running: 'running',
7176
+ Stopped: 'stopped',
7177
+ Destroying: 'destroying',
7178
+ Destroyed: 'destroyed',
7179
+ InsufficientFunds: 'insufficient_funds',
7180
+ Error: 'error',
7181
+ Abuse: 'abuse'
7182
+ } as const;
7183
+
7184
+ export type GPUV1InstanceInstanceListResourceStatusEnum = typeof GPUV1InstanceInstanceListResourceStatusEnum[keyof typeof GPUV1InstanceInstanceListResourceStatusEnum];
7185
+ export const GPUV1InstanceInstanceListResourceActionLockEnum = {
7186
+ Unlocked: 'unlocked',
7187
+ Locked: 'locked'
7188
+ } as const;
7189
+
7190
+ export type GPUV1InstanceInstanceListResourceActionLockEnum = typeof GPUV1InstanceInstanceListResourceActionLockEnum[keyof typeof GPUV1InstanceInstanceListResourceActionLockEnum];
7191
+
7192
+ /**
7193
+ *
7194
+ * @export
7195
+ * @interface GPUV1InstanceInstanceResource
7196
+ */
7197
+ export interface GPUV1InstanceInstanceResource {
7198
+ /**
7199
+ * GPU instance ID
7200
+ * @type {number}
7201
+ * @memberof GPUV1InstanceInstanceResource
7202
+ */
7203
+ 'id': number;
7204
+ /**
7205
+ *
7206
+ * @type {string}
7207
+ * @memberof GPUV1InstanceInstanceResource
7208
+ */
7209
+ 'name': string;
7210
+ /**
7211
+ *
7212
+ * @type {string}
7213
+ * @memberof GPUV1InstanceInstanceResource
7214
+ */
7215
+ 'status': GPUV1InstanceInstanceResourceStatusEnum;
7216
+ /**
7217
+ * Whether an action is in progress on the instance
7218
+ * @type {string}
7219
+ * @memberof GPUV1InstanceInstanceResource
7220
+ */
7221
+ 'action_lock': GPUV1InstanceInstanceResourceActionLockEnum;
7222
+ /**
7223
+ *
7224
+ * @type {GPUV1PoolPoolResource}
7225
+ * @memberof GPUV1InstanceInstanceResource
7226
+ */
7227
+ 'pool': GPUV1PoolPoolResource;
7228
+ /**
7229
+ *
7230
+ * @type {GPUV1PoolPoolInstanceResource}
7231
+ * @memberof GPUV1InstanceInstanceResource
7232
+ */
7233
+ 'pool_instance': GPUV1PoolPoolInstanceResource;
7234
+ /**
7235
+ *
7236
+ * @type {GPUV1OsTemplateOsTemplateResource}
7237
+ * @memberof GPUV1InstanceInstanceResource
7238
+ */
7239
+ 'os_template': GPUV1OsTemplateOsTemplateResource;
7240
+ /**
7241
+ * Array of [`GPU.V1.SshKey.SshKeyResource`](#model/gpuv1sshkeysshkeyresource)
7242
+ * @type {Array<GPUV1SshKeySshKeyResource>}
7243
+ * @memberof GPUV1InstanceInstanceResource
7244
+ */
7245
+ 'ssh_keys': Array<GPUV1SshKeySshKeyResource>;
7246
+ }
7247
+
7248
+ export const GPUV1InstanceInstanceResourceStatusEnum = {
7249
+ Created: 'created',
7250
+ Creating: 'creating',
7251
+ Running: 'running',
7252
+ Stopped: 'stopped',
7253
+ Destroying: 'destroying',
7254
+ Destroyed: 'destroyed',
7255
+ InsufficientFunds: 'insufficient_funds',
7256
+ Error: 'error',
7257
+ Abuse: 'abuse'
7258
+ } as const;
7259
+
7260
+ export type GPUV1InstanceInstanceResourceStatusEnum = typeof GPUV1InstanceInstanceResourceStatusEnum[keyof typeof GPUV1InstanceInstanceResourceStatusEnum];
7261
+ export const GPUV1InstanceInstanceResourceActionLockEnum = {
7262
+ Unlocked: 'unlocked',
7263
+ Locked: 'locked'
7264
+ } as const;
7265
+
7266
+ export type GPUV1InstanceInstanceResourceActionLockEnum = typeof GPUV1InstanceInstanceResourceActionLockEnum[keyof typeof GPUV1InstanceInstanceResourceActionLockEnum];
7267
+
7268
+ /**
7269
+ *
7270
+ * @export
7271
+ * @interface GPUV1InstanceStoreRequest
7272
+ */
7273
+ export interface GPUV1InstanceStoreRequest {
7274
+ /**
7275
+ * Instance type ID from the pool instance types list
7276
+ * @type {number}
7277
+ * @memberof GPUV1InstanceStoreRequest
7278
+ */
7279
+ 'pool_instance_id': number;
7280
+ /**
7281
+ * OS template ID available for the selected instance type
7282
+ * @type {number}
7283
+ * @memberof GPUV1InstanceStoreRequest
7284
+ */
7285
+ 'os_template_id': number;
7286
+ /**
7287
+ * Instance name, unique among your instances. Letters, numbers, dashes and underscores only
7288
+ * @type {string}
7289
+ * @memberof GPUV1InstanceStoreRequest
7290
+ */
7291
+ 'name': string;
7292
+ /**
7293
+ * SSH public keys to add to the instance
7294
+ * @type {Array<string>}
7295
+ * @memberof GPUV1InstanceStoreRequest
7296
+ */
7297
+ 'public_keys': Array<string>;
7298
+ }
7299
+ /**
7300
+ *
7301
+ * @export
7302
+ * @interface GPUV1MetricsMetricsResource
7303
+ */
7304
+ export interface GPUV1MetricsMetricsResource {
7305
+ /**
7306
+ * Unix timestamp of the measurement
7307
+ * @type {number}
7308
+ * @memberof GPUV1MetricsMetricsResource
7309
+ */
7310
+ 'timestamp': number;
7311
+ /**
7312
+ * CPU utilisation in percent
7313
+ * @type {number}
7314
+ * @memberof GPUV1MetricsMetricsResource
7315
+ */
7316
+ 'cpu_percentage': number;
7317
+ /**
7318
+ * Used memory in bytes
7319
+ * @type {number}
7320
+ * @memberof GPUV1MetricsMetricsResource
7321
+ */
7322
+ 'memory_used': number;
7323
+ /**
7324
+ * GPU utilisation in percent
7325
+ * @type {number}
7326
+ * @memberof GPUV1MetricsMetricsResource
7327
+ */
7328
+ 'gpu_percentage': number;
7329
+ /**
7330
+ * Used GPU memory in bytes
7331
+ * @type {number}
7332
+ * @memberof GPUV1MetricsMetricsResource
7333
+ */
7334
+ 'gpu_memory_used': number;
7335
+ /**
7336
+ * GPU throughput in TFLOPS
7337
+ * @type {number}
7338
+ * @memberof GPUV1MetricsMetricsResource
7339
+ */
7340
+ 'gpu_tflops': number;
7341
+ }
7014
7342
  /**
7015
7343
  *
7016
7344
  * @export
@@ -7220,6 +7548,31 @@ export interface GPUV1RegionRegionResource {
7220
7548
  */
7221
7549
  'country': string;
7222
7550
  }
7551
+ /**
7552
+ *
7553
+ * @export
7554
+ * @interface GPUV1SshKeySshKeyResource
7555
+ */
7556
+ export interface GPUV1SshKeySshKeyResource {
7557
+ /**
7558
+ * SSH key ID
7559
+ * @type {number}
7560
+ * @memberof GPUV1SshKeySshKeyResource
7561
+ */
7562
+ 'id': number;
7563
+ /**
7564
+ *
7565
+ * @type {string}
7566
+ * @memberof GPUV1SshKeySshKeyResource
7567
+ */
7568
+ 'name': string | null;
7569
+ /**
7570
+ *
7571
+ * @type {string}
7572
+ * @memberof GPUV1SshKeySshKeyResource
7573
+ */
7574
+ 'public_key': string;
7575
+ }
7223
7576
  /**
7224
7577
  *
7225
7578
  * @export
@@ -31892,6 +32245,671 @@ export const GetPoolGroupsV1CurrencyEnum = {
31892
32245
  export type GetPoolGroupsV1CurrencyEnum = typeof GetPoolGroupsV1CurrencyEnum[keyof typeof GetPoolGroupsV1CurrencyEnum];
31893
32246
 
31894
32247
 
32248
+ /**
32249
+ * GPUExposedServicesApi - axios parameter creator
32250
+ * @export
32251
+ */
32252
+ export const GPUExposedServicesApiAxiosParamCreator = function (configuration?: Configuration) {
32253
+ return {
32254
+ /**
32255
+ * Expose a service running on a specified GPU instance to the internet. The service is exposed asynchronously: a successful request returns immediately, and the service appears in the exposed services list once it gets its public hostname and external port. Fails when the instance already has the maximum of 4 exposed services. Use this endpoint to make an application on your GPU instance publicly reachable.
32256
+ * @summary Create exposed service
32257
+ * @param {number} instanceId GPU instance ID
32258
+ * @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
32259
+ * @param {*} [options] Override http request option.
32260
+ * @throws {RequiredError}
32261
+ */
32262
+ createExposedServiceV1: async (instanceId: number, gPUV1ExposedServiceStoreRequest: GPUV1ExposedServiceStoreRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
32263
+ // verify required parameter 'instanceId' is not null or undefined
32264
+ assertParamExists('createExposedServiceV1', 'instanceId', instanceId)
32265
+ // verify required parameter 'gPUV1ExposedServiceStoreRequest' is not null or undefined
32266
+ assertParamExists('createExposedServiceV1', 'gPUV1ExposedServiceStoreRequest', gPUV1ExposedServiceStoreRequest)
32267
+ const localVarPath = `/api/gpu/v1/instances/{instanceId}/exposed-services`
32268
+ .replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId));
32269
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
32270
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
32271
+ let baseOptions;
32272
+ if (configuration) {
32273
+ baseOptions = configuration.baseOptions;
32274
+ }
32275
+
32276
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
32277
+ const localVarHeaderParameter = {} as any;
32278
+ const localVarQueryParameter = {} as any;
32279
+
32280
+ // authentication apiToken required
32281
+ // http bearer authentication required
32282
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
32283
+
32284
+
32285
+
32286
+ localVarHeaderParameter['Content-Type'] = 'application/json';
32287
+
32288
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
32289
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
32290
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
32291
+ localVarRequestOptions.data = serializeDataIfNeeded(gPUV1ExposedServiceStoreRequest, localVarRequestOptions, configuration)
32292
+
32293
+ return {
32294
+ url: toPathString(localVarUrlObj),
32295
+ options: localVarRequestOptions,
32296
+ };
32297
+ },
32298
+ /**
32299
+ * Delete a specified exposed service of a GPU instance. The service is removed asynchronously: a successful request returns immediately and the service stops being reachable from the internet shortly after. Use this endpoint to close public access to a service on your GPU instance.
32300
+ * @summary Delete exposed service
32301
+ * @param {number} instanceId GPU instance ID
32302
+ * @param {number} exposedServiceId Exposed service ID
32303
+ * @param {*} [options] Override http request option.
32304
+ * @throws {RequiredError}
32305
+ */
32306
+ deleteExposedServiceV1: async (instanceId: number, exposedServiceId: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
32307
+ // verify required parameter 'instanceId' is not null or undefined
32308
+ assertParamExists('deleteExposedServiceV1', 'instanceId', instanceId)
32309
+ // verify required parameter 'exposedServiceId' is not null or undefined
32310
+ assertParamExists('deleteExposedServiceV1', 'exposedServiceId', exposedServiceId)
32311
+ const localVarPath = `/api/gpu/v1/instances/{instanceId}/exposed-services/{exposedServiceId}`
32312
+ .replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId))
32313
+ .replace(`{${"exposedServiceId"}}`, encodePathParam('exposedServiceId', exposedServiceId));
32314
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
32315
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
32316
+ let baseOptions;
32317
+ if (configuration) {
32318
+ baseOptions = configuration.baseOptions;
32319
+ }
32320
+
32321
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
32322
+ const localVarHeaderParameter = {} as any;
32323
+ const localVarQueryParameter = {} as any;
32324
+
32325
+ // authentication apiToken required
32326
+ // http bearer authentication required
32327
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
32328
+
32329
+
32330
+
32331
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
32332
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
32333
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
32334
+
32335
+ return {
32336
+ url: toPathString(localVarUrlObj),
32337
+ options: localVarRequestOptions,
32338
+ };
32339
+ },
32340
+ /**
32341
+ * Retrieve the services exposed on a specified GPU instance. A newly created service is listed once it gets its public hostname and external port. Use this endpoint to find the public address of services running on your GPU instance.
32342
+ * @summary Get exposed services
32343
+ * @param {number} instanceId GPU instance ID
32344
+ * @param {*} [options] Override http request option.
32345
+ * @throws {RequiredError}
32346
+ */
32347
+ getExposedServicesV1: async (instanceId: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
32348
+ // verify required parameter 'instanceId' is not null or undefined
32349
+ assertParamExists('getExposedServicesV1', 'instanceId', instanceId)
32350
+ const localVarPath = `/api/gpu/v1/instances/{instanceId}/exposed-services`
32351
+ .replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId));
32352
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
32353
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
32354
+ let baseOptions;
32355
+ if (configuration) {
32356
+ baseOptions = configuration.baseOptions;
32357
+ }
32358
+
32359
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
32360
+ const localVarHeaderParameter = {} as any;
32361
+ const localVarQueryParameter = {} as any;
32362
+
32363
+ // authentication apiToken required
32364
+ // http bearer authentication required
32365
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
32366
+
32367
+
32368
+
32369
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
32370
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
32371
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
32372
+
32373
+ return {
32374
+ url: toPathString(localVarUrlObj),
32375
+ options: localVarRequestOptions,
32376
+ };
32377
+ },
32378
+ }
32379
+ };
32380
+
32381
+ /**
32382
+ * GPUExposedServicesApi - functional programming interface
32383
+ * @export
32384
+ */
32385
+ export const GPUExposedServicesApiFp = function(configuration?: Configuration) {
32386
+ const localVarAxiosParamCreator = GPUExposedServicesApiAxiosParamCreator(configuration)
32387
+ return {
32388
+ /**
32389
+ * Expose a service running on a specified GPU instance to the internet. The service is exposed asynchronously: a successful request returns immediately, and the service appears in the exposed services list once it gets its public hostname and external port. Fails when the instance already has the maximum of 4 exposed services. Use this endpoint to make an application on your GPU instance publicly reachable.
32390
+ * @summary Create exposed service
32391
+ * @param {number} instanceId GPU instance ID
32392
+ * @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
32393
+ * @param {*} [options] Override http request option.
32394
+ * @throws {RequiredError}
32395
+ */
32396
+ async createExposedServiceV1(instanceId: number, gPUV1ExposedServiceStoreRequest: GPUV1ExposedServiceStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
32397
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createExposedServiceV1(instanceId, gPUV1ExposedServiceStoreRequest, options);
32398
+ const localVarOperationServerBasePath = operationServerMap['GPUExposedServicesApi.createExposedServiceV1']?.[0]?.url;
32399
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
32400
+ },
32401
+ /**
32402
+ * Delete a specified exposed service of a GPU instance. The service is removed asynchronously: a successful request returns immediately and the service stops being reachable from the internet shortly after. Use this endpoint to close public access to a service on your GPU instance.
32403
+ * @summary Delete exposed service
32404
+ * @param {number} instanceId GPU instance ID
32405
+ * @param {number} exposedServiceId Exposed service ID
32406
+ * @param {*} [options] Override http request option.
32407
+ * @throws {RequiredError}
32408
+ */
32409
+ async deleteExposedServiceV1(instanceId: number, exposedServiceId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
32410
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteExposedServiceV1(instanceId, exposedServiceId, options);
32411
+ const localVarOperationServerBasePath = operationServerMap['GPUExposedServicesApi.deleteExposedServiceV1']?.[0]?.url;
32412
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
32413
+ },
32414
+ /**
32415
+ * Retrieve the services exposed on a specified GPU instance. A newly created service is listed once it gets its public hostname and external port. Use this endpoint to find the public address of services running on your GPU instance.
32416
+ * @summary Get exposed services
32417
+ * @param {number} instanceId GPU instance ID
32418
+ * @param {*} [options] Override http request option.
32419
+ * @throws {RequiredError}
32420
+ */
32421
+ async getExposedServicesV1(instanceId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<GPUV1ExposedServiceExposedServiceResource>>> {
32422
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getExposedServicesV1(instanceId, options);
32423
+ const localVarOperationServerBasePath = operationServerMap['GPUExposedServicesApi.getExposedServicesV1']?.[0]?.url;
32424
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
32425
+ },
32426
+ }
32427
+ };
32428
+
32429
+ /**
32430
+ * GPUExposedServicesApi - factory interface
32431
+ * @export
32432
+ */
32433
+ export const GPUExposedServicesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
32434
+ const localVarFp = GPUExposedServicesApiFp(configuration)
32435
+ return {
32436
+ /**
32437
+ * Expose a service running on a specified GPU instance to the internet. The service is exposed asynchronously: a successful request returns immediately, and the service appears in the exposed services list once it gets its public hostname and external port. Fails when the instance already has the maximum of 4 exposed services. Use this endpoint to make an application on your GPU instance publicly reachable.
32438
+ * @summary Create exposed service
32439
+ * @param {number} instanceId GPU instance ID
32440
+ * @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
32441
+ * @param {*} [options] Override http request option.
32442
+ * @throws {RequiredError}
32443
+ */
32444
+ createExposedServiceV1(instanceId: number, gPUV1ExposedServiceStoreRequest: GPUV1ExposedServiceStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
32445
+ return localVarFp.createExposedServiceV1(instanceId, gPUV1ExposedServiceStoreRequest, options).then((request) => request(axios, basePath));
32446
+ },
32447
+ /**
32448
+ * Delete a specified exposed service of a GPU instance. The service is removed asynchronously: a successful request returns immediately and the service stops being reachable from the internet shortly after. Use this endpoint to close public access to a service on your GPU instance.
32449
+ * @summary Delete exposed service
32450
+ * @param {number} instanceId GPU instance ID
32451
+ * @param {number} exposedServiceId Exposed service ID
32452
+ * @param {*} [options] Override http request option.
32453
+ * @throws {RequiredError}
32454
+ */
32455
+ deleteExposedServiceV1(instanceId: number, exposedServiceId: number, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
32456
+ return localVarFp.deleteExposedServiceV1(instanceId, exposedServiceId, options).then((request) => request(axios, basePath));
32457
+ },
32458
+ /**
32459
+ * Retrieve the services exposed on a specified GPU instance. A newly created service is listed once it gets its public hostname and external port. Use this endpoint to find the public address of services running on your GPU instance.
32460
+ * @summary Get exposed services
32461
+ * @param {number} instanceId GPU instance ID
32462
+ * @param {*} [options] Override http request option.
32463
+ * @throws {RequiredError}
32464
+ */
32465
+ getExposedServicesV1(instanceId: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<GPUV1ExposedServiceExposedServiceResource>> {
32466
+ return localVarFp.getExposedServicesV1(instanceId, options).then((request) => request(axios, basePath));
32467
+ },
32468
+ };
32469
+ };
32470
+
32471
+ /**
32472
+ * GPUExposedServicesApi - object-oriented interface
32473
+ * @export
32474
+ * @class GPUExposedServicesApi
32475
+ * @extends {BaseAPI}
32476
+ */
32477
+ export class GPUExposedServicesApi extends BaseAPI {
32478
+ /**
32479
+ * Expose a service running on a specified GPU instance to the internet. The service is exposed asynchronously: a successful request returns immediately, and the service appears in the exposed services list once it gets its public hostname and external port. Fails when the instance already has the maximum of 4 exposed services. Use this endpoint to make an application on your GPU instance publicly reachable.
32480
+ * @summary Create exposed service
32481
+ * @param {number} instanceId GPU instance ID
32482
+ * @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
32483
+ * @param {*} [options] Override http request option.
32484
+ * @throws {RequiredError}
32485
+ * @memberof GPUExposedServicesApi
32486
+ */
32487
+ public createExposedServiceV1(instanceId: number, gPUV1ExposedServiceStoreRequest: GPUV1ExposedServiceStoreRequest, options?: RawAxiosRequestConfig) {
32488
+ return GPUExposedServicesApiFp(this.configuration).createExposedServiceV1(instanceId, gPUV1ExposedServiceStoreRequest, options).then((request) => request(this.axios, this.basePath));
32489
+ }
32490
+
32491
+ /**
32492
+ * Delete a specified exposed service of a GPU instance. The service is removed asynchronously: a successful request returns immediately and the service stops being reachable from the internet shortly after. Use this endpoint to close public access to a service on your GPU instance.
32493
+ * @summary Delete exposed service
32494
+ * @param {number} instanceId GPU instance ID
32495
+ * @param {number} exposedServiceId Exposed service ID
32496
+ * @param {*} [options] Override http request option.
32497
+ * @throws {RequiredError}
32498
+ * @memberof GPUExposedServicesApi
32499
+ */
32500
+ public deleteExposedServiceV1(instanceId: number, exposedServiceId: number, options?: RawAxiosRequestConfig) {
32501
+ return GPUExposedServicesApiFp(this.configuration).deleteExposedServiceV1(instanceId, exposedServiceId, options).then((request) => request(this.axios, this.basePath));
32502
+ }
32503
+
32504
+ /**
32505
+ * Retrieve the services exposed on a specified GPU instance. A newly created service is listed once it gets its public hostname and external port. Use this endpoint to find the public address of services running on your GPU instance.
32506
+ * @summary Get exposed services
32507
+ * @param {number} instanceId GPU instance ID
32508
+ * @param {*} [options] Override http request option.
32509
+ * @throws {RequiredError}
32510
+ * @memberof GPUExposedServicesApi
32511
+ */
32512
+ public getExposedServicesV1(instanceId: number, options?: RawAxiosRequestConfig) {
32513
+ return GPUExposedServicesApiFp(this.configuration).getExposedServicesV1(instanceId, options).then((request) => request(this.axios, this.basePath));
32514
+ }
32515
+ }
32516
+
32517
+
32518
+
32519
+ /**
32520
+ * GPUInstancesApi - axios parameter creator
32521
+ * @export
32522
+ */
32523
+ export const GPUInstancesApiAxiosParamCreator = function (configuration?: Configuration) {
32524
+ return {
32525
+ /**
32526
+ * Create a new GPU instance. Pick `pool_instance_id` from the pool instance types list and `os_template_id` from the OS templates available for that instance type. Your account must have enough credits to run the instance for its first hour. The instance is created asynchronously: a successful request returns immediately, and the instance appears in the instance list while its `status` moves from `created` through `creating` to `running`. Use this endpoint to provision GPU compute.
32527
+ * @summary Create instance
32528
+ * @param {GPUV1InstanceStoreRequest} gPUV1InstanceStoreRequest
32529
+ * @param {*} [options] Override http request option.
32530
+ * @throws {RequiredError}
32531
+ */
32532
+ createInstanceV1: async (gPUV1InstanceStoreRequest: GPUV1InstanceStoreRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
32533
+ // verify required parameter 'gPUV1InstanceStoreRequest' is not null or undefined
32534
+ assertParamExists('createInstanceV1', 'gPUV1InstanceStoreRequest', gPUV1InstanceStoreRequest)
32535
+ const localVarPath = `/api/gpu/v1/instances`;
32536
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
32537
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
32538
+ let baseOptions;
32539
+ if (configuration) {
32540
+ baseOptions = configuration.baseOptions;
32541
+ }
32542
+
32543
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
32544
+ const localVarHeaderParameter = {} as any;
32545
+ const localVarQueryParameter = {} as any;
32546
+
32547
+ // authentication apiToken required
32548
+ // http bearer authentication required
32549
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
32550
+
32551
+
32552
+
32553
+ localVarHeaderParameter['Content-Type'] = 'application/json';
32554
+
32555
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
32556
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
32557
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
32558
+ localVarRequestOptions.data = serializeDataIfNeeded(gPUV1InstanceStoreRequest, localVarRequestOptions, configuration)
32559
+
32560
+ return {
32561
+ url: toPathString(localVarUrlObj),
32562
+ options: localVarRequestOptions,
32563
+ };
32564
+ },
32565
+ /**
32566
+ * Delete a specified GPU instance. The instance is destroyed asynchronously: a successful request returns immediately and the instance `status` moves to `destroying`. Deleting fails while the instance is in `created`, `destroying`, `destroyed` or `abuse` status, or while another action is in progress on it. Use this endpoint to stop billing for a GPU instance you no longer need.
32567
+ * @summary Delete instance
32568
+ * @param {number} instanceId GPU instance ID
32569
+ * @param {*} [options] Override http request option.
32570
+ * @throws {RequiredError}
32571
+ */
32572
+ deleteInstanceV1: async (instanceId: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
32573
+ // verify required parameter 'instanceId' is not null or undefined
32574
+ assertParamExists('deleteInstanceV1', 'instanceId', instanceId)
32575
+ const localVarPath = `/api/gpu/v1/instances/{instanceId}`
32576
+ .replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId));
32577
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
32578
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
32579
+ let baseOptions;
32580
+ if (configuration) {
32581
+ baseOptions = configuration.baseOptions;
32582
+ }
32583
+
32584
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
32585
+ const localVarHeaderParameter = {} as any;
32586
+ const localVarQueryParameter = {} as any;
32587
+
32588
+ // authentication apiToken required
32589
+ // http bearer authentication required
32590
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
32591
+
32592
+
32593
+
32594
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
32595
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
32596
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
32597
+
32598
+ return {
32599
+ url: toPathString(localVarUrlObj),
32600
+ options: localVarRequestOptions,
32601
+ };
32602
+ },
32603
+ /**
32604
+ * Retrieve detailed information about a specified GPU instance, including its SSH keys. Use this endpoint to follow the instance `status` after creating or deleting it.
32605
+ * @summary Get instance details
32606
+ * @param {number} instanceId GPU instance ID
32607
+ * @param {*} [options] Override http request option.
32608
+ * @throws {RequiredError}
32609
+ */
32610
+ getInstanceDetailsV1: async (instanceId: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
32611
+ // verify required parameter 'instanceId' is not null or undefined
32612
+ assertParamExists('getInstanceDetailsV1', 'instanceId', instanceId)
32613
+ const localVarPath = `/api/gpu/v1/instances/{instanceId}`
32614
+ .replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId));
32615
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
32616
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
32617
+ let baseOptions;
32618
+ if (configuration) {
32619
+ baseOptions = configuration.baseOptions;
32620
+ }
32621
+
32622
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
32623
+ const localVarHeaderParameter = {} as any;
32624
+ const localVarQueryParameter = {} as any;
32625
+
32626
+ // authentication apiToken required
32627
+ // http bearer authentication required
32628
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
32629
+
32630
+
32631
+
32632
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
32633
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
32634
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
32635
+
32636
+ return {
32637
+ url: toPathString(localVarUrlObj),
32638
+ options: localVarRequestOptions,
32639
+ };
32640
+ },
32641
+ /**
32642
+ * Retrieve utilisation metrics of a specified GPU instance for the last hour. Each data point contains CPU, memory and GPU utilisation, used GPU memory and GPU throughput. The list is empty until the instance is provisioned. Use this endpoint to monitor GPU instance load.
32643
+ * @summary Get instance metrics
32644
+ * @param {number} instanceId GPU instance ID
32645
+ * @param {*} [options] Override http request option.
32646
+ * @throws {RequiredError}
32647
+ */
32648
+ getInstanceMetricsV1: async (instanceId: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
32649
+ // verify required parameter 'instanceId' is not null or undefined
32650
+ assertParamExists('getInstanceMetricsV1', 'instanceId', instanceId)
32651
+ const localVarPath = `/api/gpu/v1/instances/{instanceId}/metrics`
32652
+ .replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId));
32653
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
32654
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
32655
+ let baseOptions;
32656
+ if (configuration) {
32657
+ baseOptions = configuration.baseOptions;
32658
+ }
32659
+
32660
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
32661
+ const localVarHeaderParameter = {} as any;
32662
+ const localVarQueryParameter = {} as any;
32663
+
32664
+ // authentication apiToken required
32665
+ // http bearer authentication required
32666
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
32667
+
32668
+
32669
+
32670
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
32671
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
32672
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
32673
+
32674
+ return {
32675
+ url: toPathString(localVarUrlObj),
32676
+ options: localVarRequestOptions,
32677
+ };
32678
+ },
32679
+ /**
32680
+ * Retrieve all GPU instances of your account. Use this endpoint to view your GPU instances with their status, pool, instance type and OS template.
32681
+ * @summary Get instances
32682
+ * @param {*} [options] Override http request option.
32683
+ * @throws {RequiredError}
32684
+ */
32685
+ getInstancesV1: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
32686
+ const localVarPath = `/api/gpu/v1/instances`;
32687
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
32688
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
32689
+ let baseOptions;
32690
+ if (configuration) {
32691
+ baseOptions = configuration.baseOptions;
32692
+ }
32693
+
32694
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
32695
+ const localVarHeaderParameter = {} as any;
32696
+ const localVarQueryParameter = {} as any;
32697
+
32698
+ // authentication apiToken required
32699
+ // http bearer authentication required
32700
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
32701
+
32702
+
32703
+
32704
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
32705
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
32706
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
32707
+
32708
+ return {
32709
+ url: toPathString(localVarUrlObj),
32710
+ options: localVarRequestOptions,
32711
+ };
32712
+ },
32713
+ }
32714
+ };
32715
+
32716
+ /**
32717
+ * GPUInstancesApi - functional programming interface
32718
+ * @export
32719
+ */
32720
+ export const GPUInstancesApiFp = function(configuration?: Configuration) {
32721
+ const localVarAxiosParamCreator = GPUInstancesApiAxiosParamCreator(configuration)
32722
+ return {
32723
+ /**
32724
+ * Create a new GPU instance. Pick `pool_instance_id` from the pool instance types list and `os_template_id` from the OS templates available for that instance type. Your account must have enough credits to run the instance for its first hour. The instance is created asynchronously: a successful request returns immediately, and the instance appears in the instance list while its `status` moves from `created` through `creating` to `running`. Use this endpoint to provision GPU compute.
32725
+ * @summary Create instance
32726
+ * @param {GPUV1InstanceStoreRequest} gPUV1InstanceStoreRequest
32727
+ * @param {*} [options] Override http request option.
32728
+ * @throws {RequiredError}
32729
+ */
32730
+ async createInstanceV1(gPUV1InstanceStoreRequest: GPUV1InstanceStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
32731
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createInstanceV1(gPUV1InstanceStoreRequest, options);
32732
+ const localVarOperationServerBasePath = operationServerMap['GPUInstancesApi.createInstanceV1']?.[0]?.url;
32733
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
32734
+ },
32735
+ /**
32736
+ * Delete a specified GPU instance. The instance is destroyed asynchronously: a successful request returns immediately and the instance `status` moves to `destroying`. Deleting fails while the instance is in `created`, `destroying`, `destroyed` or `abuse` status, or while another action is in progress on it. Use this endpoint to stop billing for a GPU instance you no longer need.
32737
+ * @summary Delete instance
32738
+ * @param {number} instanceId GPU instance ID
32739
+ * @param {*} [options] Override http request option.
32740
+ * @throws {RequiredError}
32741
+ */
32742
+ async deleteInstanceV1(instanceId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
32743
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteInstanceV1(instanceId, options);
32744
+ const localVarOperationServerBasePath = operationServerMap['GPUInstancesApi.deleteInstanceV1']?.[0]?.url;
32745
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
32746
+ },
32747
+ /**
32748
+ * Retrieve detailed information about a specified GPU instance, including its SSH keys. Use this endpoint to follow the instance `status` after creating or deleting it.
32749
+ * @summary Get instance details
32750
+ * @param {number} instanceId GPU instance ID
32751
+ * @param {*} [options] Override http request option.
32752
+ * @throws {RequiredError}
32753
+ */
32754
+ async getInstanceDetailsV1(instanceId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GPUV1InstanceInstanceResource>> {
32755
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getInstanceDetailsV1(instanceId, options);
32756
+ const localVarOperationServerBasePath = operationServerMap['GPUInstancesApi.getInstanceDetailsV1']?.[0]?.url;
32757
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
32758
+ },
32759
+ /**
32760
+ * Retrieve utilisation metrics of a specified GPU instance for the last hour. Each data point contains CPU, memory and GPU utilisation, used GPU memory and GPU throughput. The list is empty until the instance is provisioned. Use this endpoint to monitor GPU instance load.
32761
+ * @summary Get instance metrics
32762
+ * @param {number} instanceId GPU instance ID
32763
+ * @param {*} [options] Override http request option.
32764
+ * @throws {RequiredError}
32765
+ */
32766
+ async getInstanceMetricsV1(instanceId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<GPUV1MetricsMetricsResource>>> {
32767
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getInstanceMetricsV1(instanceId, options);
32768
+ const localVarOperationServerBasePath = operationServerMap['GPUInstancesApi.getInstanceMetricsV1']?.[0]?.url;
32769
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
32770
+ },
32771
+ /**
32772
+ * Retrieve all GPU instances of your account. Use this endpoint to view your GPU instances with their status, pool, instance type and OS template.
32773
+ * @summary Get instances
32774
+ * @param {*} [options] Override http request option.
32775
+ * @throws {RequiredError}
32776
+ */
32777
+ async getInstancesV1(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<GPUV1InstanceInstanceListResource>>> {
32778
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getInstancesV1(options);
32779
+ const localVarOperationServerBasePath = operationServerMap['GPUInstancesApi.getInstancesV1']?.[0]?.url;
32780
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
32781
+ },
32782
+ }
32783
+ };
32784
+
32785
+ /**
32786
+ * GPUInstancesApi - factory interface
32787
+ * @export
32788
+ */
32789
+ export const GPUInstancesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
32790
+ const localVarFp = GPUInstancesApiFp(configuration)
32791
+ return {
32792
+ /**
32793
+ * Create a new GPU instance. Pick `pool_instance_id` from the pool instance types list and `os_template_id` from the OS templates available for that instance type. Your account must have enough credits to run the instance for its first hour. The instance is created asynchronously: a successful request returns immediately, and the instance appears in the instance list while its `status` moves from `created` through `creating` to `running`. Use this endpoint to provision GPU compute.
32794
+ * @summary Create instance
32795
+ * @param {GPUV1InstanceStoreRequest} gPUV1InstanceStoreRequest
32796
+ * @param {*} [options] Override http request option.
32797
+ * @throws {RequiredError}
32798
+ */
32799
+ createInstanceV1(gPUV1InstanceStoreRequest: GPUV1InstanceStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
32800
+ return localVarFp.createInstanceV1(gPUV1InstanceStoreRequest, options).then((request) => request(axios, basePath));
32801
+ },
32802
+ /**
32803
+ * Delete a specified GPU instance. The instance is destroyed asynchronously: a successful request returns immediately and the instance `status` moves to `destroying`. Deleting fails while the instance is in `created`, `destroying`, `destroyed` or `abuse` status, or while another action is in progress on it. Use this endpoint to stop billing for a GPU instance you no longer need.
32804
+ * @summary Delete instance
32805
+ * @param {number} instanceId GPU instance ID
32806
+ * @param {*} [options] Override http request option.
32807
+ * @throws {RequiredError}
32808
+ */
32809
+ deleteInstanceV1(instanceId: number, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
32810
+ return localVarFp.deleteInstanceV1(instanceId, options).then((request) => request(axios, basePath));
32811
+ },
32812
+ /**
32813
+ * Retrieve detailed information about a specified GPU instance, including its SSH keys. Use this endpoint to follow the instance `status` after creating or deleting it.
32814
+ * @summary Get instance details
32815
+ * @param {number} instanceId GPU instance ID
32816
+ * @param {*} [options] Override http request option.
32817
+ * @throws {RequiredError}
32818
+ */
32819
+ getInstanceDetailsV1(instanceId: number, options?: RawAxiosRequestConfig): AxiosPromise<GPUV1InstanceInstanceResource> {
32820
+ return localVarFp.getInstanceDetailsV1(instanceId, options).then((request) => request(axios, basePath));
32821
+ },
32822
+ /**
32823
+ * Retrieve utilisation metrics of a specified GPU instance for the last hour. Each data point contains CPU, memory and GPU utilisation, used GPU memory and GPU throughput. The list is empty until the instance is provisioned. Use this endpoint to monitor GPU instance load.
32824
+ * @summary Get instance metrics
32825
+ * @param {number} instanceId GPU instance ID
32826
+ * @param {*} [options] Override http request option.
32827
+ * @throws {RequiredError}
32828
+ */
32829
+ getInstanceMetricsV1(instanceId: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<GPUV1MetricsMetricsResource>> {
32830
+ return localVarFp.getInstanceMetricsV1(instanceId, options).then((request) => request(axios, basePath));
32831
+ },
32832
+ /**
32833
+ * Retrieve all GPU instances of your account. Use this endpoint to view your GPU instances with their status, pool, instance type and OS template.
32834
+ * @summary Get instances
32835
+ * @param {*} [options] Override http request option.
32836
+ * @throws {RequiredError}
32837
+ */
32838
+ getInstancesV1(options?: RawAxiosRequestConfig): AxiosPromise<Array<GPUV1InstanceInstanceListResource>> {
32839
+ return localVarFp.getInstancesV1(options).then((request) => request(axios, basePath));
32840
+ },
32841
+ };
32842
+ };
32843
+
32844
+ /**
32845
+ * GPUInstancesApi - object-oriented interface
32846
+ * @export
32847
+ * @class GPUInstancesApi
32848
+ * @extends {BaseAPI}
32849
+ */
32850
+ export class GPUInstancesApi extends BaseAPI {
32851
+ /**
32852
+ * Create a new GPU instance. Pick `pool_instance_id` from the pool instance types list and `os_template_id` from the OS templates available for that instance type. Your account must have enough credits to run the instance for its first hour. The instance is created asynchronously: a successful request returns immediately, and the instance appears in the instance list while its `status` moves from `created` through `creating` to `running`. Use this endpoint to provision GPU compute.
32853
+ * @summary Create instance
32854
+ * @param {GPUV1InstanceStoreRequest} gPUV1InstanceStoreRequest
32855
+ * @param {*} [options] Override http request option.
32856
+ * @throws {RequiredError}
32857
+ * @memberof GPUInstancesApi
32858
+ */
32859
+ public createInstanceV1(gPUV1InstanceStoreRequest: GPUV1InstanceStoreRequest, options?: RawAxiosRequestConfig) {
32860
+ return GPUInstancesApiFp(this.configuration).createInstanceV1(gPUV1InstanceStoreRequest, options).then((request) => request(this.axios, this.basePath));
32861
+ }
32862
+
32863
+ /**
32864
+ * Delete a specified GPU instance. The instance is destroyed asynchronously: a successful request returns immediately and the instance `status` moves to `destroying`. Deleting fails while the instance is in `created`, `destroying`, `destroyed` or `abuse` status, or while another action is in progress on it. Use this endpoint to stop billing for a GPU instance you no longer need.
32865
+ * @summary Delete instance
32866
+ * @param {number} instanceId GPU instance ID
32867
+ * @param {*} [options] Override http request option.
32868
+ * @throws {RequiredError}
32869
+ * @memberof GPUInstancesApi
32870
+ */
32871
+ public deleteInstanceV1(instanceId: number, options?: RawAxiosRequestConfig) {
32872
+ return GPUInstancesApiFp(this.configuration).deleteInstanceV1(instanceId, options).then((request) => request(this.axios, this.basePath));
32873
+ }
32874
+
32875
+ /**
32876
+ * Retrieve detailed information about a specified GPU instance, including its SSH keys. Use this endpoint to follow the instance `status` after creating or deleting it.
32877
+ * @summary Get instance details
32878
+ * @param {number} instanceId GPU instance ID
32879
+ * @param {*} [options] Override http request option.
32880
+ * @throws {RequiredError}
32881
+ * @memberof GPUInstancesApi
32882
+ */
32883
+ public getInstanceDetailsV1(instanceId: number, options?: RawAxiosRequestConfig) {
32884
+ return GPUInstancesApiFp(this.configuration).getInstanceDetailsV1(instanceId, options).then((request) => request(this.axios, this.basePath));
32885
+ }
32886
+
32887
+ /**
32888
+ * Retrieve utilisation metrics of a specified GPU instance for the last hour. Each data point contains CPU, memory and GPU utilisation, used GPU memory and GPU throughput. The list is empty until the instance is provisioned. Use this endpoint to monitor GPU instance load.
32889
+ * @summary Get instance metrics
32890
+ * @param {number} instanceId GPU instance ID
32891
+ * @param {*} [options] Override http request option.
32892
+ * @throws {RequiredError}
32893
+ * @memberof GPUInstancesApi
32894
+ */
32895
+ public getInstanceMetricsV1(instanceId: number, options?: RawAxiosRequestConfig) {
32896
+ return GPUInstancesApiFp(this.configuration).getInstanceMetricsV1(instanceId, options).then((request) => request(this.axios, this.basePath));
32897
+ }
32898
+
32899
+ /**
32900
+ * Retrieve all GPU instances of your account. Use this endpoint to view your GPU instances with their status, pool, instance type and OS template.
32901
+ * @summary Get instances
32902
+ * @param {*} [options] Override http request option.
32903
+ * @throws {RequiredError}
32904
+ * @memberof GPUInstancesApi
32905
+ */
32906
+ public getInstancesV1(options?: RawAxiosRequestConfig) {
32907
+ return GPUInstancesApiFp(this.configuration).getInstancesV1(options).then((request) => request(this.axios, this.basePath));
32908
+ }
32909
+ }
32910
+
32911
+
32912
+
31895
32913
  /**
31896
32914
  * HorizonsWebsitesApi - axios parameter creator
31897
32915
  * @export