hostinger-api-sdk 2.14.2 → 2.15.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/README.md +2 -2
- package/api.ts +640 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +425 -1
- package/dist/api.js +416 -14
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +425 -1
- package/dist/esm/api.js +399 -1
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/GPUInstancesApi.md +272 -0
- package/docs/GPUV1InstanceInstanceListResource.md +32 -0
- package/docs/GPUV1InstanceInstanceResource.md +34 -0
- package/docs/GPUV1InstanceStoreRequest.md +26 -0
- package/docs/GPUV1MetricsMetricsResource.md +30 -0
- package/docs/GPUV1SshKeySshKeyResource.md +24 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/esm/api.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.
|
|
6
|
+
* API Version: 2.15.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
|
|
@@ -313,6 +313,36 @@ export const EcommerceV1StoreStoreCreationResourceSalesChannelTypeEnum = {
|
|
|
313
313
|
export const EcommerceV1StoreStoreRequestSalesChannelTypeEnum = {
|
|
314
314
|
Custom: 'custom'
|
|
315
315
|
};
|
|
316
|
+
export const GPUV1InstanceInstanceListResourceStatusEnum = {
|
|
317
|
+
Created: 'created',
|
|
318
|
+
Creating: 'creating',
|
|
319
|
+
Running: 'running',
|
|
320
|
+
Stopped: 'stopped',
|
|
321
|
+
Destroying: 'destroying',
|
|
322
|
+
Destroyed: 'destroyed',
|
|
323
|
+
InsufficientFunds: 'insufficient_funds',
|
|
324
|
+
Error: 'error',
|
|
325
|
+
Abuse: 'abuse'
|
|
326
|
+
};
|
|
327
|
+
export const GPUV1InstanceInstanceListResourceActionLockEnum = {
|
|
328
|
+
Unlocked: 'unlocked',
|
|
329
|
+
Locked: 'locked'
|
|
330
|
+
};
|
|
331
|
+
export const GPUV1InstanceInstanceResourceStatusEnum = {
|
|
332
|
+
Created: 'created',
|
|
333
|
+
Creating: 'creating',
|
|
334
|
+
Running: 'running',
|
|
335
|
+
Stopped: 'stopped',
|
|
336
|
+
Destroying: 'destroying',
|
|
337
|
+
Destroyed: 'destroyed',
|
|
338
|
+
InsufficientFunds: 'insufficient_funds',
|
|
339
|
+
Error: 'error',
|
|
340
|
+
Abuse: 'abuse'
|
|
341
|
+
};
|
|
342
|
+
export const GPUV1InstanceInstanceResourceActionLockEnum = {
|
|
343
|
+
Unlocked: 'unlocked',
|
|
344
|
+
Locked: 'locked'
|
|
345
|
+
};
|
|
316
346
|
export const HorizonsV1WebsitesCreateWebsiteRequestMessageInnerTypeEnum = {
|
|
317
347
|
Text: 'text'
|
|
318
348
|
};
|
|
@@ -12606,6 +12636,374 @@ export const GetPoolGroupsV1CurrencyEnum = {
|
|
|
12606
12636
|
Vnd: 'VND',
|
|
12607
12637
|
Zar: 'ZAR'
|
|
12608
12638
|
};
|
|
12639
|
+
/**
|
|
12640
|
+
* GPUInstancesApi - axios parameter creator
|
|
12641
|
+
* @export
|
|
12642
|
+
*/
|
|
12643
|
+
export const GPUInstancesApiAxiosParamCreator = function (configuration) {
|
|
12644
|
+
return {
|
|
12645
|
+
/**
|
|
12646
|
+
* 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.
|
|
12647
|
+
* @summary Create instance
|
|
12648
|
+
* @param {GPUV1InstanceStoreRequest} gPUV1InstanceStoreRequest
|
|
12649
|
+
* @param {*} [options] Override http request option.
|
|
12650
|
+
* @throws {RequiredError}
|
|
12651
|
+
*/
|
|
12652
|
+
createInstanceV1: (gPUV1InstanceStoreRequest_1, ...args_1) => __awaiter(this, [gPUV1InstanceStoreRequest_1, ...args_1], void 0, function* (gPUV1InstanceStoreRequest, options = {}) {
|
|
12653
|
+
// verify required parameter 'gPUV1InstanceStoreRequest' is not null or undefined
|
|
12654
|
+
assertParamExists('createInstanceV1', 'gPUV1InstanceStoreRequest', gPUV1InstanceStoreRequest);
|
|
12655
|
+
const localVarPath = `/api/gpu/v1/instances`;
|
|
12656
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12657
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12658
|
+
let baseOptions;
|
|
12659
|
+
if (configuration) {
|
|
12660
|
+
baseOptions = configuration.baseOptions;
|
|
12661
|
+
}
|
|
12662
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
12663
|
+
const localVarHeaderParameter = {};
|
|
12664
|
+
const localVarQueryParameter = {};
|
|
12665
|
+
// authentication apiToken required
|
|
12666
|
+
// http bearer authentication required
|
|
12667
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12668
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
12669
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12670
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12671
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12672
|
+
localVarRequestOptions.data = serializeDataIfNeeded(gPUV1InstanceStoreRequest, localVarRequestOptions, configuration);
|
|
12673
|
+
return {
|
|
12674
|
+
url: toPathString(localVarUrlObj),
|
|
12675
|
+
options: localVarRequestOptions,
|
|
12676
|
+
};
|
|
12677
|
+
}),
|
|
12678
|
+
/**
|
|
12679
|
+
* 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.
|
|
12680
|
+
* @summary Delete instance
|
|
12681
|
+
* @param {number} instanceId GPU instance ID
|
|
12682
|
+
* @param {*} [options] Override http request option.
|
|
12683
|
+
* @throws {RequiredError}
|
|
12684
|
+
*/
|
|
12685
|
+
deleteInstanceV1: (instanceId_1, ...args_1) => __awaiter(this, [instanceId_1, ...args_1], void 0, function* (instanceId, options = {}) {
|
|
12686
|
+
// verify required parameter 'instanceId' is not null or undefined
|
|
12687
|
+
assertParamExists('deleteInstanceV1', 'instanceId', instanceId);
|
|
12688
|
+
const localVarPath = `/api/gpu/v1/instances/{instanceId}`
|
|
12689
|
+
.replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId));
|
|
12690
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12691
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12692
|
+
let baseOptions;
|
|
12693
|
+
if (configuration) {
|
|
12694
|
+
baseOptions = configuration.baseOptions;
|
|
12695
|
+
}
|
|
12696
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
12697
|
+
const localVarHeaderParameter = {};
|
|
12698
|
+
const localVarQueryParameter = {};
|
|
12699
|
+
// authentication apiToken required
|
|
12700
|
+
// http bearer authentication required
|
|
12701
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12702
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12703
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12704
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12705
|
+
return {
|
|
12706
|
+
url: toPathString(localVarUrlObj),
|
|
12707
|
+
options: localVarRequestOptions,
|
|
12708
|
+
};
|
|
12709
|
+
}),
|
|
12710
|
+
/**
|
|
12711
|
+
* 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.
|
|
12712
|
+
* @summary Get instance details
|
|
12713
|
+
* @param {number} instanceId GPU instance ID
|
|
12714
|
+
* @param {*} [options] Override http request option.
|
|
12715
|
+
* @throws {RequiredError}
|
|
12716
|
+
*/
|
|
12717
|
+
getInstanceDetailsV1: (instanceId_1, ...args_1) => __awaiter(this, [instanceId_1, ...args_1], void 0, function* (instanceId, options = {}) {
|
|
12718
|
+
// verify required parameter 'instanceId' is not null or undefined
|
|
12719
|
+
assertParamExists('getInstanceDetailsV1', 'instanceId', instanceId);
|
|
12720
|
+
const localVarPath = `/api/gpu/v1/instances/{instanceId}`
|
|
12721
|
+
.replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId));
|
|
12722
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12723
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12724
|
+
let baseOptions;
|
|
12725
|
+
if (configuration) {
|
|
12726
|
+
baseOptions = configuration.baseOptions;
|
|
12727
|
+
}
|
|
12728
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
12729
|
+
const localVarHeaderParameter = {};
|
|
12730
|
+
const localVarQueryParameter = {};
|
|
12731
|
+
// authentication apiToken required
|
|
12732
|
+
// http bearer authentication required
|
|
12733
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12734
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12735
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12736
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12737
|
+
return {
|
|
12738
|
+
url: toPathString(localVarUrlObj),
|
|
12739
|
+
options: localVarRequestOptions,
|
|
12740
|
+
};
|
|
12741
|
+
}),
|
|
12742
|
+
/**
|
|
12743
|
+
* 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.
|
|
12744
|
+
* @summary Get instance metrics
|
|
12745
|
+
* @param {number} instanceId GPU instance ID
|
|
12746
|
+
* @param {*} [options] Override http request option.
|
|
12747
|
+
* @throws {RequiredError}
|
|
12748
|
+
*/
|
|
12749
|
+
getInstanceMetricsV1: (instanceId_1, ...args_1) => __awaiter(this, [instanceId_1, ...args_1], void 0, function* (instanceId, options = {}) {
|
|
12750
|
+
// verify required parameter 'instanceId' is not null or undefined
|
|
12751
|
+
assertParamExists('getInstanceMetricsV1', 'instanceId', instanceId);
|
|
12752
|
+
const localVarPath = `/api/gpu/v1/instances/{instanceId}/metrics`
|
|
12753
|
+
.replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId));
|
|
12754
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12755
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12756
|
+
let baseOptions;
|
|
12757
|
+
if (configuration) {
|
|
12758
|
+
baseOptions = configuration.baseOptions;
|
|
12759
|
+
}
|
|
12760
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
12761
|
+
const localVarHeaderParameter = {};
|
|
12762
|
+
const localVarQueryParameter = {};
|
|
12763
|
+
// authentication apiToken required
|
|
12764
|
+
// http bearer authentication required
|
|
12765
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12766
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12767
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12768
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12769
|
+
return {
|
|
12770
|
+
url: toPathString(localVarUrlObj),
|
|
12771
|
+
options: localVarRequestOptions,
|
|
12772
|
+
};
|
|
12773
|
+
}),
|
|
12774
|
+
/**
|
|
12775
|
+
* Retrieve all GPU instances of your account. Use this endpoint to view your GPU instances with their status, pool, instance type and OS template.
|
|
12776
|
+
* @summary Get instances
|
|
12777
|
+
* @param {*} [options] Override http request option.
|
|
12778
|
+
* @throws {RequiredError}
|
|
12779
|
+
*/
|
|
12780
|
+
getInstancesV1: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
12781
|
+
const localVarPath = `/api/gpu/v1/instances`;
|
|
12782
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12783
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12784
|
+
let baseOptions;
|
|
12785
|
+
if (configuration) {
|
|
12786
|
+
baseOptions = configuration.baseOptions;
|
|
12787
|
+
}
|
|
12788
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
12789
|
+
const localVarHeaderParameter = {};
|
|
12790
|
+
const localVarQueryParameter = {};
|
|
12791
|
+
// authentication apiToken required
|
|
12792
|
+
// http bearer authentication required
|
|
12793
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12794
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12795
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12796
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12797
|
+
return {
|
|
12798
|
+
url: toPathString(localVarUrlObj),
|
|
12799
|
+
options: localVarRequestOptions,
|
|
12800
|
+
};
|
|
12801
|
+
}),
|
|
12802
|
+
};
|
|
12803
|
+
};
|
|
12804
|
+
/**
|
|
12805
|
+
* GPUInstancesApi - functional programming interface
|
|
12806
|
+
* @export
|
|
12807
|
+
*/
|
|
12808
|
+
export const GPUInstancesApiFp = function (configuration) {
|
|
12809
|
+
const localVarAxiosParamCreator = GPUInstancesApiAxiosParamCreator(configuration);
|
|
12810
|
+
return {
|
|
12811
|
+
/**
|
|
12812
|
+
* 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.
|
|
12813
|
+
* @summary Create instance
|
|
12814
|
+
* @param {GPUV1InstanceStoreRequest} gPUV1InstanceStoreRequest
|
|
12815
|
+
* @param {*} [options] Override http request option.
|
|
12816
|
+
* @throws {RequiredError}
|
|
12817
|
+
*/
|
|
12818
|
+
createInstanceV1(gPUV1InstanceStoreRequest, options) {
|
|
12819
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12820
|
+
var _a, _b;
|
|
12821
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createInstanceV1(gPUV1InstanceStoreRequest, options);
|
|
12822
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['GPUInstancesApi.createInstanceV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
12823
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
12824
|
+
});
|
|
12825
|
+
},
|
|
12826
|
+
/**
|
|
12827
|
+
* 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.
|
|
12828
|
+
* @summary Delete instance
|
|
12829
|
+
* @param {number} instanceId GPU instance ID
|
|
12830
|
+
* @param {*} [options] Override http request option.
|
|
12831
|
+
* @throws {RequiredError}
|
|
12832
|
+
*/
|
|
12833
|
+
deleteInstanceV1(instanceId, options) {
|
|
12834
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12835
|
+
var _a, _b;
|
|
12836
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteInstanceV1(instanceId, options);
|
|
12837
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['GPUInstancesApi.deleteInstanceV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
12838
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
12839
|
+
});
|
|
12840
|
+
},
|
|
12841
|
+
/**
|
|
12842
|
+
* 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.
|
|
12843
|
+
* @summary Get instance details
|
|
12844
|
+
* @param {number} instanceId GPU instance ID
|
|
12845
|
+
* @param {*} [options] Override http request option.
|
|
12846
|
+
* @throws {RequiredError}
|
|
12847
|
+
*/
|
|
12848
|
+
getInstanceDetailsV1(instanceId, options) {
|
|
12849
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12850
|
+
var _a, _b;
|
|
12851
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getInstanceDetailsV1(instanceId, options);
|
|
12852
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['GPUInstancesApi.getInstanceDetailsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
12853
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
12854
|
+
});
|
|
12855
|
+
},
|
|
12856
|
+
/**
|
|
12857
|
+
* 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.
|
|
12858
|
+
* @summary Get instance metrics
|
|
12859
|
+
* @param {number} instanceId GPU instance ID
|
|
12860
|
+
* @param {*} [options] Override http request option.
|
|
12861
|
+
* @throws {RequiredError}
|
|
12862
|
+
*/
|
|
12863
|
+
getInstanceMetricsV1(instanceId, options) {
|
|
12864
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12865
|
+
var _a, _b;
|
|
12866
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getInstanceMetricsV1(instanceId, options);
|
|
12867
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['GPUInstancesApi.getInstanceMetricsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
12868
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
12869
|
+
});
|
|
12870
|
+
},
|
|
12871
|
+
/**
|
|
12872
|
+
* Retrieve all GPU instances of your account. Use this endpoint to view your GPU instances with their status, pool, instance type and OS template.
|
|
12873
|
+
* @summary Get instances
|
|
12874
|
+
* @param {*} [options] Override http request option.
|
|
12875
|
+
* @throws {RequiredError}
|
|
12876
|
+
*/
|
|
12877
|
+
getInstancesV1(options) {
|
|
12878
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12879
|
+
var _a, _b;
|
|
12880
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getInstancesV1(options);
|
|
12881
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['GPUInstancesApi.getInstancesV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
12882
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
12883
|
+
});
|
|
12884
|
+
},
|
|
12885
|
+
};
|
|
12886
|
+
};
|
|
12887
|
+
/**
|
|
12888
|
+
* GPUInstancesApi - factory interface
|
|
12889
|
+
* @export
|
|
12890
|
+
*/
|
|
12891
|
+
export const GPUInstancesApiFactory = function (configuration, basePath, axios) {
|
|
12892
|
+
const localVarFp = GPUInstancesApiFp(configuration);
|
|
12893
|
+
return {
|
|
12894
|
+
/**
|
|
12895
|
+
* 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.
|
|
12896
|
+
* @summary Create instance
|
|
12897
|
+
* @param {GPUV1InstanceStoreRequest} gPUV1InstanceStoreRequest
|
|
12898
|
+
* @param {*} [options] Override http request option.
|
|
12899
|
+
* @throws {RequiredError}
|
|
12900
|
+
*/
|
|
12901
|
+
createInstanceV1(gPUV1InstanceStoreRequest, options) {
|
|
12902
|
+
return localVarFp.createInstanceV1(gPUV1InstanceStoreRequest, options).then((request) => request(axios, basePath));
|
|
12903
|
+
},
|
|
12904
|
+
/**
|
|
12905
|
+
* 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.
|
|
12906
|
+
* @summary Delete instance
|
|
12907
|
+
* @param {number} instanceId GPU instance ID
|
|
12908
|
+
* @param {*} [options] Override http request option.
|
|
12909
|
+
* @throws {RequiredError}
|
|
12910
|
+
*/
|
|
12911
|
+
deleteInstanceV1(instanceId, options) {
|
|
12912
|
+
return localVarFp.deleteInstanceV1(instanceId, options).then((request) => request(axios, basePath));
|
|
12913
|
+
},
|
|
12914
|
+
/**
|
|
12915
|
+
* 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.
|
|
12916
|
+
* @summary Get instance details
|
|
12917
|
+
* @param {number} instanceId GPU instance ID
|
|
12918
|
+
* @param {*} [options] Override http request option.
|
|
12919
|
+
* @throws {RequiredError}
|
|
12920
|
+
*/
|
|
12921
|
+
getInstanceDetailsV1(instanceId, options) {
|
|
12922
|
+
return localVarFp.getInstanceDetailsV1(instanceId, options).then((request) => request(axios, basePath));
|
|
12923
|
+
},
|
|
12924
|
+
/**
|
|
12925
|
+
* 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.
|
|
12926
|
+
* @summary Get instance metrics
|
|
12927
|
+
* @param {number} instanceId GPU instance ID
|
|
12928
|
+
* @param {*} [options] Override http request option.
|
|
12929
|
+
* @throws {RequiredError}
|
|
12930
|
+
*/
|
|
12931
|
+
getInstanceMetricsV1(instanceId, options) {
|
|
12932
|
+
return localVarFp.getInstanceMetricsV1(instanceId, options).then((request) => request(axios, basePath));
|
|
12933
|
+
},
|
|
12934
|
+
/**
|
|
12935
|
+
* Retrieve all GPU instances of your account. Use this endpoint to view your GPU instances with their status, pool, instance type and OS template.
|
|
12936
|
+
* @summary Get instances
|
|
12937
|
+
* @param {*} [options] Override http request option.
|
|
12938
|
+
* @throws {RequiredError}
|
|
12939
|
+
*/
|
|
12940
|
+
getInstancesV1(options) {
|
|
12941
|
+
return localVarFp.getInstancesV1(options).then((request) => request(axios, basePath));
|
|
12942
|
+
},
|
|
12943
|
+
};
|
|
12944
|
+
};
|
|
12945
|
+
/**
|
|
12946
|
+
* GPUInstancesApi - object-oriented interface
|
|
12947
|
+
* @export
|
|
12948
|
+
* @class GPUInstancesApi
|
|
12949
|
+
* @extends {BaseAPI}
|
|
12950
|
+
*/
|
|
12951
|
+
export class GPUInstancesApi extends BaseAPI {
|
|
12952
|
+
/**
|
|
12953
|
+
* 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.
|
|
12954
|
+
* @summary Create instance
|
|
12955
|
+
* @param {GPUV1InstanceStoreRequest} gPUV1InstanceStoreRequest
|
|
12956
|
+
* @param {*} [options] Override http request option.
|
|
12957
|
+
* @throws {RequiredError}
|
|
12958
|
+
* @memberof GPUInstancesApi
|
|
12959
|
+
*/
|
|
12960
|
+
createInstanceV1(gPUV1InstanceStoreRequest, options) {
|
|
12961
|
+
return GPUInstancesApiFp(this.configuration).createInstanceV1(gPUV1InstanceStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
12962
|
+
}
|
|
12963
|
+
/**
|
|
12964
|
+
* 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.
|
|
12965
|
+
* @summary Delete instance
|
|
12966
|
+
* @param {number} instanceId GPU instance ID
|
|
12967
|
+
* @param {*} [options] Override http request option.
|
|
12968
|
+
* @throws {RequiredError}
|
|
12969
|
+
* @memberof GPUInstancesApi
|
|
12970
|
+
*/
|
|
12971
|
+
deleteInstanceV1(instanceId, options) {
|
|
12972
|
+
return GPUInstancesApiFp(this.configuration).deleteInstanceV1(instanceId, options).then((request) => request(this.axios, this.basePath));
|
|
12973
|
+
}
|
|
12974
|
+
/**
|
|
12975
|
+
* 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.
|
|
12976
|
+
* @summary Get instance details
|
|
12977
|
+
* @param {number} instanceId GPU instance ID
|
|
12978
|
+
* @param {*} [options] Override http request option.
|
|
12979
|
+
* @throws {RequiredError}
|
|
12980
|
+
* @memberof GPUInstancesApi
|
|
12981
|
+
*/
|
|
12982
|
+
getInstanceDetailsV1(instanceId, options) {
|
|
12983
|
+
return GPUInstancesApiFp(this.configuration).getInstanceDetailsV1(instanceId, options).then((request) => request(this.axios, this.basePath));
|
|
12984
|
+
}
|
|
12985
|
+
/**
|
|
12986
|
+
* 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.
|
|
12987
|
+
* @summary Get instance metrics
|
|
12988
|
+
* @param {number} instanceId GPU instance ID
|
|
12989
|
+
* @param {*} [options] Override http request option.
|
|
12990
|
+
* @throws {RequiredError}
|
|
12991
|
+
* @memberof GPUInstancesApi
|
|
12992
|
+
*/
|
|
12993
|
+
getInstanceMetricsV1(instanceId, options) {
|
|
12994
|
+
return GPUInstancesApiFp(this.configuration).getInstanceMetricsV1(instanceId, options).then((request) => request(this.axios, this.basePath));
|
|
12995
|
+
}
|
|
12996
|
+
/**
|
|
12997
|
+
* Retrieve all GPU instances of your account. Use this endpoint to view your GPU instances with their status, pool, instance type and OS template.
|
|
12998
|
+
* @summary Get instances
|
|
12999
|
+
* @param {*} [options] Override http request option.
|
|
13000
|
+
* @throws {RequiredError}
|
|
13001
|
+
* @memberof GPUInstancesApi
|
|
13002
|
+
*/
|
|
13003
|
+
getInstancesV1(options) {
|
|
13004
|
+
return GPUInstancesApiFp(this.configuration).getInstancesV1(options).then((request) => request(this.axios, this.basePath));
|
|
13005
|
+
}
|
|
13006
|
+
}
|
|
12609
13007
|
/**
|
|
12610
13008
|
* HorizonsWebsitesApi - axios parameter creator
|
|
12611
13009
|
* @export
|
package/dist/esm/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.
|
|
4
|
+
* API Version: 2.15.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/base.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.
|
|
6
|
+
* API Version: 2.15.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
|
package/dist/esm/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.
|
|
4
|
+
* API Version: 2.15.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/common.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.
|
|
6
|
+
* API Version: 2.15.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
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.
|
|
4
|
+
* API Version: 2.15.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.
|
|
6
|
+
* API Version: 2.15.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
|
|
@@ -13,7 +13,7 @@ export class Configuration {
|
|
|
13
13
|
var _a;
|
|
14
14
|
this.accessToken = param.accessToken;
|
|
15
15
|
this.basePath = param.basePath;
|
|
16
|
-
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/2.
|
|
16
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/2.15.0" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
17
17
|
this.formDataCtor = param.formDataCtor;
|
|
18
18
|
}
|
|
19
19
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.
|
|
4
|
+
* API Version: 2.15.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.
|
|
6
|
+
* API Version: 2.15.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
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.
|
|
4
|
+
* API Version: 2.15.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 2.
|
|
7
|
+
* API Version: 2.15.0
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|