|
3 | 3 | /** |
4 | 4 | * Hostinger API |
5 | 5 | * |
6 | | - * API Version: 3.7.0 |
| 6 | + * API Version: 3.8.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 |
@@ -7503,6 +7503,37 @@ export const GPUV1ExposedServiceStoreRequestTypeEnum = { |
7503 | 7503 |
|
7504 | 7504 | export type GPUV1ExposedServiceStoreRequestTypeEnum = typeof GPUV1ExposedServiceStoreRequestTypeEnum[keyof typeof GPUV1ExposedServiceStoreRequestTypeEnum]; |
7505 | 7505 |
|
| 7506 | +/** |
| 7507 | + * |
| 7508 | + * @export |
| 7509 | + * @interface GPUV1InstanceCredentialsResource |
| 7510 | + */ |
| 7511 | +export interface GPUV1InstanceCredentialsResource { |
| 7512 | + /** |
| 7513 | + * SSH host |
| 7514 | + * @type {string} |
| 7515 | + * @memberof GPUV1InstanceCredentialsResource |
| 7516 | + */ |
| 7517 | + 'hostname': string; |
| 7518 | + /** |
| 7519 | + * SSH port |
| 7520 | + * @type {number} |
| 7521 | + * @memberof GPUV1InstanceCredentialsResource |
| 7522 | + */ |
| 7523 | + 'port': number; |
| 7524 | + /** |
| 7525 | + * SSH username |
| 7526 | + * @type {string} |
| 7527 | + * @memberof GPUV1InstanceCredentialsResource |
| 7528 | + */ |
| 7529 | + 'username': string; |
| 7530 | + /** |
| 7531 | + * SSH password |
| 7532 | + * @type {string} |
| 7533 | + * @memberof GPUV1InstanceCredentialsResource |
| 7534 | + */ |
| 7535 | + 'password': string; |
| 7536 | +} |
7506 | 7537 | /** |
7507 | 7538 | * |
7508 | 7539 | * @export |
@@ -33546,6 +33577,44 @@ export const GPUInstancesApiAxiosParamCreator = function (configuration?: Config |
33546 | 33577 |
|
33547 | 33578 |
|
33548 | 33579 |
|
| 33580 | + setSearchParams(localVarUrlObj, localVarQueryParameter); |
| 33581 | + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; |
| 33582 | + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; |
| 33583 | + |
| 33584 | + return { |
| 33585 | + url: toPathString(localVarUrlObj), |
| 33586 | + options: localVarRequestOptions, |
| 33587 | + }; |
| 33588 | + }, |
| 33589 | + /** |
| 33590 | + * Retrieve SSH connection credentials (hostname, port, username and password) of a specified GPU instance. Credentials become available once the instance is provisioned; until then the endpoint responds with `409 Conflict`, so retry later. Use this endpoint to connect to a GPU instance over SSH. |
| 33591 | + * @summary Get instance credentials |
| 33592 | + * @param {number} instanceId GPU instance ID |
| 33593 | + * @param {*} [options] Override http request option. |
| 33594 | + * @throws {RequiredError} |
| 33595 | + */ |
| 33596 | + getInstanceCredentialsV1: async (instanceId: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { |
| 33597 | + // verify required parameter 'instanceId' is not null or undefined |
| 33598 | + assertParamExists('getInstanceCredentialsV1', 'instanceId', instanceId) |
| 33599 | + const localVarPath = `/api/gpu/v1/instances/{instanceId}/credentials` |
| 33600 | + .replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId)); |
| 33601 | + // use dummy base URL string because the URL constructor only accepts absolute URLs. |
| 33602 | + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); |
| 33603 | + let baseOptions; |
| 33604 | + if (configuration) { |
| 33605 | + baseOptions = configuration.baseOptions; |
| 33606 | + } |
| 33607 | + |
| 33608 | + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; |
| 33609 | + const localVarHeaderParameter = {} as any; |
| 33610 | + const localVarQueryParameter = {} as any; |
| 33611 | + |
| 33612 | + // authentication apiToken required |
| 33613 | + // http bearer authentication required |
| 33614 | + await setBearerAuthToObject(localVarHeaderParameter, configuration) |
| 33615 | + |
| 33616 | + |
| 33617 | + |
33549 | 33618 | setSearchParams(localVarUrlObj, localVarQueryParameter); |
33550 | 33619 | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; |
33551 | 33620 | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; |
@@ -33699,6 +33768,18 @@ export const GPUInstancesApiFp = function(configuration?: Configuration) { |
33699 | 33768 | const localVarOperationServerBasePath = operationServerMap['GPUInstancesApi.deleteInstanceV1']?.[0]?.url; |
33700 | 33769 | return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); |
33701 | 33770 | }, |
| 33771 | + /** |
| 33772 | + * Retrieve SSH connection credentials (hostname, port, username and password) of a specified GPU instance. Credentials become available once the instance is provisioned; until then the endpoint responds with `409 Conflict`, so retry later. Use this endpoint to connect to a GPU instance over SSH. |
| 33773 | + * @summary Get instance credentials |
| 33774 | + * @param {number} instanceId GPU instance ID |
| 33775 | + * @param {*} [options] Override http request option. |
| 33776 | + * @throws {RequiredError} |
| 33777 | + */ |
| 33778 | + async getInstanceCredentialsV1(instanceId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GPUV1InstanceCredentialsResource>> { |
| 33779 | + const localVarAxiosArgs = await localVarAxiosParamCreator.getInstanceCredentialsV1(instanceId, options); |
| 33780 | + const localVarOperationServerBasePath = operationServerMap['GPUInstancesApi.getInstanceCredentialsV1']?.[0]?.url; |
| 33781 | + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); |
| 33782 | + }, |
33702 | 33783 | /** |
33703 | 33784 | * 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. |
33704 | 33785 | * @summary Get instance details |
@@ -33764,6 +33845,16 @@ export const GPUInstancesApiFactory = function (configuration?: Configuration, b |
33764 | 33845 | deleteInstanceV1(instanceId: number, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> { |
33765 | 33846 | return localVarFp.deleteInstanceV1(instanceId, options).then((request) => request(axios, basePath)); |
33766 | 33847 | }, |
| 33848 | + /** |
| 33849 | + * Retrieve SSH connection credentials (hostname, port, username and password) of a specified GPU instance. Credentials become available once the instance is provisioned; until then the endpoint responds with `409 Conflict`, so retry later. Use this endpoint to connect to a GPU instance over SSH. |
| 33850 | + * @summary Get instance credentials |
| 33851 | + * @param {number} instanceId GPU instance ID |
| 33852 | + * @param {*} [options] Override http request option. |
| 33853 | + * @throws {RequiredError} |
| 33854 | + */ |
| 33855 | + getInstanceCredentialsV1(instanceId: number, options?: RawAxiosRequestConfig): AxiosPromise<GPUV1InstanceCredentialsResource> { |
| 33856 | + return localVarFp.getInstanceCredentialsV1(instanceId, options).then((request) => request(axios, basePath)); |
| 33857 | + }, |
33767 | 33858 | /** |
33768 | 33859 | * 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. |
33769 | 33860 | * @summary Get instance details |
@@ -33827,6 +33918,18 @@ export class GPUInstancesApi extends BaseAPI { |
33827 | 33918 | return GPUInstancesApiFp(this.configuration).deleteInstanceV1(instanceId, options).then((request) => request(this.axios, this.basePath)); |
33828 | 33919 | } |
33829 | 33920 |
|
| 33921 | + /** |
| 33922 | + * Retrieve SSH connection credentials (hostname, port, username and password) of a specified GPU instance. Credentials become available once the instance is provisioned; until then the endpoint responds with `409 Conflict`, so retry later. Use this endpoint to connect to a GPU instance over SSH. |
| 33923 | + * @summary Get instance credentials |
| 33924 | + * @param {number} instanceId GPU instance ID |
| 33925 | + * @param {*} [options] Override http request option. |
| 33926 | + * @throws {RequiredError} |
| 33927 | + * @memberof GPUInstancesApi |
| 33928 | + */ |
| 33929 | + public getInstanceCredentialsV1(instanceId: number, options?: RawAxiosRequestConfig) { |
| 33930 | + return GPUInstancesApiFp(this.configuration).getInstanceCredentialsV1(instanceId, options).then((request) => request(this.axios, this.basePath)); |
| 33931 | + } |
| 33932 | + |
33830 | 33933 | /** |
33831 | 33934 | * 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. |
33832 | 33935 | * @summary Get instance details |
|
0 commit comments