@nexgencloud/hyperstack-sdk-typescript 1.54.7-alpha → 1.55.1-alpha

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 CHANGED
@@ -1,4 +1,4 @@
1
- ## @nexgencloud/hyperstack-sdk-typescript@v1.54.7-alpha
1
+ ## @nexgencloud/hyperstack-sdk-typescript@v1.55.1-alpha
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @nexgencloud/hyperstack-sdk-typescript@v1.54.7-alpha --save
39
+ npm install @nexgencloud/hyperstack-sdk-typescript@v1.55.1-alpha --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
package/api.ts CHANGED
@@ -2696,6 +2696,12 @@ export interface CreateInstancesPayload {
2696
2696
  * @memberof CreateInstancesPayload
2697
2697
  */
2698
2698
  'enable_port_randomization'?: boolean;
2699
+ /**
2700
+ * When true, the Hyperstack VM Agent is opted in for this VM and metrics ingestion is allowed by the prom-gateway. The agent must still be installed on the VM (typically via user_data cloud-init).
2701
+ * @type {boolean}
2702
+ * @memberof CreateInstancesPayload
2703
+ */
2704
+ 'enhanced_monitoring_enabled'?: boolean;
2699
2705
  /**
2700
2706
  * The name of the [environment](https://docs.hyperstack.cloud/docs/api-reference/core-resources/environments/) in which the virtual machine is to be created.
2701
2707
  * @type {string}
@@ -4994,6 +5000,19 @@ export interface Instance {
4994
5000
  */
4995
5001
  'status'?: boolean;
4996
5002
  }
5003
+ /**
5004
+ *
5005
+ * @export
5006
+ * @interface InstanceEnhancedMetricsFields
5007
+ */
5008
+ export interface InstanceEnhancedMetricsFields {
5009
+ /**
5010
+ *
5011
+ * @type {boolean}
5012
+ * @memberof InstanceEnhancedMetricsFields
5013
+ */
5014
+ 'enabled'?: boolean;
5015
+ }
4997
5016
  /**
4998
5017
  *
4999
5018
  * @export
@@ -5135,6 +5154,12 @@ export interface InstanceFields {
5135
5154
  * @memberof InstanceFields
5136
5155
  */
5137
5156
  'created_at'?: string;
5157
+ /**
5158
+ *
5159
+ * @type {InstanceEnhancedMetricsFields}
5160
+ * @memberof InstanceFields
5161
+ */
5162
+ 'enhanced_metrics'?: InstanceEnhancedMetricsFields;
5138
5163
  /**
5139
5164
  *
5140
5165
  * @type {InstanceEnvironmentFields}
@@ -10200,6 +10225,63 @@ export interface UserDefaultChoicesForUserResponse {
10200
10225
  */
10201
10226
  'user_default_choices'?: Array<UserDefaultChoiceForUserFields>;
10202
10227
  }
10228
+ /**
10229
+ *
10230
+ * @export
10231
+ * @interface UserEnhancedMetricsPayload
10232
+ */
10233
+ export interface UserEnhancedMetricsPayload {
10234
+ /**
10235
+ * Set to true to opt this VM into Enhanced Metrics, false to opt out.
10236
+ * @type {boolean}
10237
+ * @memberof UserEnhancedMetricsPayload
10238
+ */
10239
+ 'enabled': boolean;
10240
+ }
10241
+ /**
10242
+ *
10243
+ * @export
10244
+ * @interface UserEnhancedMetricsResponse
10245
+ */
10246
+ export interface UserEnhancedMetricsResponse {
10247
+ /**
10248
+ * One-liner the user can run inside the VM to install the agent when enabling. Omitted when disabling.
10249
+ * @type {string}
10250
+ * @memberof UserEnhancedMetricsResponse
10251
+ */
10252
+ 'install_command'?: string;
10253
+ /**
10254
+ *
10255
+ * @type {string}
10256
+ * @memberof UserEnhancedMetricsResponse
10257
+ */
10258
+ 'message'?: string;
10259
+ /**
10260
+ *
10261
+ * @type {UserEnhancedMetricsResponseFields}
10262
+ * @memberof UserEnhancedMetricsResponse
10263
+ */
10264
+ 'metrics'?: UserEnhancedMetricsResponseFields;
10265
+ /**
10266
+ *
10267
+ * @type {boolean}
10268
+ * @memberof UserEnhancedMetricsResponse
10269
+ */
10270
+ 'status'?: boolean;
10271
+ }
10272
+ /**
10273
+ *
10274
+ * @export
10275
+ * @interface UserEnhancedMetricsResponseFields
10276
+ */
10277
+ export interface UserEnhancedMetricsResponseFields {
10278
+ /**
10279
+ *
10280
+ * @type {boolean}
10281
+ * @memberof UserEnhancedMetricsResponseFields
10282
+ */
10283
+ 'enabled'?: boolean;
10284
+ }
10203
10285
  /**
10204
10286
  *
10205
10287
  * @export
@@ -28441,6 +28523,49 @@ export const VirtualMachineApiAxiosParamCreator = function (configuration?: Conf
28441
28523
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
28442
28524
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
28443
28525
 
28526
+ return {
28527
+ url: toPathString(localVarUrlObj),
28528
+ options: localVarRequestOptions,
28529
+ };
28530
+ },
28531
+ /**
28532
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
28533
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
28534
+ * @param {number} vmId
28535
+ * @param {UserEnhancedMetricsPayload} payload
28536
+ * @param {*} [options] Override http request option.
28537
+ * @throws {RequiredError}
28538
+ */
28539
+ toggleEnhancedMetricsForAVM: async (vmId: number, payload: UserEnhancedMetricsPayload, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
28540
+ // verify required parameter 'vmId' is not null or undefined
28541
+ assertParamExists('toggleEnhancedMetricsForAVM', 'vmId', vmId)
28542
+ // verify required parameter 'payload' is not null or undefined
28543
+ assertParamExists('toggleEnhancedMetricsForAVM', 'payload', payload)
28544
+ const localVarPath = `/core/virtual-machines/{vm_id}/enhanced-metrics`
28545
+ .replace(`{${"vm_id"}}`, encodeURIComponent(String(vmId)));
28546
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
28547
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
28548
+ let baseOptions;
28549
+ if (configuration) {
28550
+ baseOptions = configuration.baseOptions;
28551
+ }
28552
+
28553
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
28554
+ const localVarHeaderParameter = {} as any;
28555
+ const localVarQueryParameter = {} as any;
28556
+
28557
+ // authentication apiKey required
28558
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
28559
+
28560
+
28561
+
28562
+ localVarHeaderParameter['Content-Type'] = 'application/json';
28563
+
28564
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
28565
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
28566
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
28567
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration)
28568
+
28444
28569
  return {
28445
28570
  url: toPathString(localVarUrlObj),
28446
28571
  options: localVarRequestOptions,
@@ -28735,6 +28860,20 @@ export const VirtualMachineApiFp = function(configuration?: Configuration) {
28735
28860
  const localVarOperationServerBasePath = operationServerMap['VirtualMachineApi.stopVM']?.[localVarOperationServerIndex]?.url;
28736
28861
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
28737
28862
  },
28863
+ /**
28864
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
28865
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
28866
+ * @param {number} vmId
28867
+ * @param {UserEnhancedMetricsPayload} payload
28868
+ * @param {*} [options] Override http request option.
28869
+ * @throws {RequiredError}
28870
+ */
28871
+ async toggleEnhancedMetricsForAVM(vmId: number, payload: UserEnhancedMetricsPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserEnhancedMetricsResponse>> {
28872
+ const localVarAxiosArgs = await localVarAxiosParamCreator.toggleEnhancedMetricsForAVM(vmId, payload, options);
28873
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
28874
+ const localVarOperationServerBasePath = operationServerMap['VirtualMachineApi.toggleEnhancedMetricsForAVM']?.[localVarOperationServerIndex]?.url;
28875
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
28876
+ },
28738
28877
  }
28739
28878
  };
28740
28879
 
@@ -28964,6 +29103,17 @@ export const VirtualMachineApiFactory = function (configuration?: Configuration,
28964
29103
  stopVM(vmId: number, options?: RawAxiosRequestConfig): AxiosPromise<ResponseModel> {
28965
29104
  return localVarFp.stopVM(vmId, options).then((request) => request(axios, basePath));
28966
29105
  },
29106
+ /**
29107
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
29108
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
29109
+ * @param {number} vmId
29110
+ * @param {UserEnhancedMetricsPayload} payload
29111
+ * @param {*} [options] Override http request option.
29112
+ * @throws {RequiredError}
29113
+ */
29114
+ toggleEnhancedMetricsForAVM(vmId: number, payload: UserEnhancedMetricsPayload, options?: RawAxiosRequestConfig): AxiosPromise<UserEnhancedMetricsResponse> {
29115
+ return localVarFp.toggleEnhancedMetricsForAVM(vmId, payload, options).then((request) => request(axios, basePath));
29116
+ },
28967
29117
  };
28968
29118
  };
28969
29119
 
@@ -29232,6 +29382,19 @@ export class VirtualMachineApi extends BaseAPI {
29232
29382
  public stopVM(vmId: number, options?: RawAxiosRequestConfig) {
29233
29383
  return VirtualMachineApiFp(this.configuration).stopVM(vmId, options).then((request) => request(this.axios, this.basePath));
29234
29384
  }
29385
+
29386
+ /**
29387
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
29388
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
29389
+ * @param {number} vmId
29390
+ * @param {UserEnhancedMetricsPayload} payload
29391
+ * @param {*} [options] Override http request option.
29392
+ * @throws {RequiredError}
29393
+ * @memberof VirtualMachineApi
29394
+ */
29395
+ public toggleEnhancedMetricsForAVM(vmId: number, payload: UserEnhancedMetricsPayload, options?: RawAxiosRequestConfig) {
29396
+ return VirtualMachineApiFp(this.configuration).toggleEnhancedMetricsForAVM(vmId, payload, options).then((request) => request(this.axios, this.basePath));
29397
+ }
29235
29398
  }
29236
29399
 
29237
29400
  /**
package/dist/api.d.ts CHANGED
@@ -2665,6 +2665,12 @@ export interface CreateInstancesPayload {
2665
2665
  * @memberof CreateInstancesPayload
2666
2666
  */
2667
2667
  'enable_port_randomization'?: boolean;
2668
+ /**
2669
+ * When true, the Hyperstack VM Agent is opted in for this VM and metrics ingestion is allowed by the prom-gateway. The agent must still be installed on the VM (typically via user_data cloud-init).
2670
+ * @type {boolean}
2671
+ * @memberof CreateInstancesPayload
2672
+ */
2673
+ 'enhanced_monitoring_enabled'?: boolean;
2668
2674
  /**
2669
2675
  * The name of the [environment](https://docs.hyperstack.cloud/docs/api-reference/core-resources/environments/) in which the virtual machine is to be created.
2670
2676
  * @type {string}
@@ -4959,6 +4965,19 @@ export interface Instance {
4959
4965
  */
4960
4966
  'status'?: boolean;
4961
4967
  }
4968
+ /**
4969
+ *
4970
+ * @export
4971
+ * @interface InstanceEnhancedMetricsFields
4972
+ */
4973
+ export interface InstanceEnhancedMetricsFields {
4974
+ /**
4975
+ *
4976
+ * @type {boolean}
4977
+ * @memberof InstanceEnhancedMetricsFields
4978
+ */
4979
+ 'enabled'?: boolean;
4980
+ }
4962
4981
  /**
4963
4982
  *
4964
4983
  * @export
@@ -5100,6 +5119,12 @@ export interface InstanceFields {
5100
5119
  * @memberof InstanceFields
5101
5120
  */
5102
5121
  'created_at'?: string;
5122
+ /**
5123
+ *
5124
+ * @type {InstanceEnhancedMetricsFields}
5125
+ * @memberof InstanceFields
5126
+ */
5127
+ 'enhanced_metrics'?: InstanceEnhancedMetricsFields;
5103
5128
  /**
5104
5129
  *
5105
5130
  * @type {InstanceEnvironmentFields}
@@ -10140,6 +10165,63 @@ export interface UserDefaultChoicesForUserResponse {
10140
10165
  */
10141
10166
  'user_default_choices'?: Array<UserDefaultChoiceForUserFields>;
10142
10167
  }
10168
+ /**
10169
+ *
10170
+ * @export
10171
+ * @interface UserEnhancedMetricsPayload
10172
+ */
10173
+ export interface UserEnhancedMetricsPayload {
10174
+ /**
10175
+ * Set to true to opt this VM into Enhanced Metrics, false to opt out.
10176
+ * @type {boolean}
10177
+ * @memberof UserEnhancedMetricsPayload
10178
+ */
10179
+ 'enabled': boolean;
10180
+ }
10181
+ /**
10182
+ *
10183
+ * @export
10184
+ * @interface UserEnhancedMetricsResponse
10185
+ */
10186
+ export interface UserEnhancedMetricsResponse {
10187
+ /**
10188
+ * One-liner the user can run inside the VM to install the agent when enabling. Omitted when disabling.
10189
+ * @type {string}
10190
+ * @memberof UserEnhancedMetricsResponse
10191
+ */
10192
+ 'install_command'?: string;
10193
+ /**
10194
+ *
10195
+ * @type {string}
10196
+ * @memberof UserEnhancedMetricsResponse
10197
+ */
10198
+ 'message'?: string;
10199
+ /**
10200
+ *
10201
+ * @type {UserEnhancedMetricsResponseFields}
10202
+ * @memberof UserEnhancedMetricsResponse
10203
+ */
10204
+ 'metrics'?: UserEnhancedMetricsResponseFields;
10205
+ /**
10206
+ *
10207
+ * @type {boolean}
10208
+ * @memberof UserEnhancedMetricsResponse
10209
+ */
10210
+ 'status'?: boolean;
10211
+ }
10212
+ /**
10213
+ *
10214
+ * @export
10215
+ * @interface UserEnhancedMetricsResponseFields
10216
+ */
10217
+ export interface UserEnhancedMetricsResponseFields {
10218
+ /**
10219
+ *
10220
+ * @type {boolean}
10221
+ * @memberof UserEnhancedMetricsResponseFields
10222
+ */
10223
+ 'enabled'?: boolean;
10224
+ }
10143
10225
  /**
10144
10226
  *
10145
10227
  * @export
@@ -19085,6 +19167,15 @@ export declare const VirtualMachineApiAxiosParamCreator: (configuration?: Config
19085
19167
  * @throws {RequiredError}
19086
19168
  */
19087
19169
  stopVM: (vmId: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
19170
+ /**
19171
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
19172
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
19173
+ * @param {number} vmId
19174
+ * @param {UserEnhancedMetricsPayload} payload
19175
+ * @param {*} [options] Override http request option.
19176
+ * @throws {RequiredError}
19177
+ */
19178
+ toggleEnhancedMetricsForAVM: (vmId: number, payload: UserEnhancedMetricsPayload, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
19088
19179
  };
19089
19180
  /**
19090
19181
  * VirtualMachineApi - functional programming interface
@@ -19270,6 +19361,15 @@ export declare const VirtualMachineApiFp: (configuration?: Configuration) => {
19270
19361
  * @throws {RequiredError}
19271
19362
  */
19272
19363
  stopVM(vmId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ResponseModel>>;
19364
+ /**
19365
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
19366
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
19367
+ * @param {number} vmId
19368
+ * @param {UserEnhancedMetricsPayload} payload
19369
+ * @param {*} [options] Override http request option.
19370
+ * @throws {RequiredError}
19371
+ */
19372
+ toggleEnhancedMetricsForAVM(vmId: number, payload: UserEnhancedMetricsPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserEnhancedMetricsResponse>>;
19273
19373
  };
19274
19374
  /**
19275
19375
  * VirtualMachineApi - factory interface
@@ -19455,6 +19555,15 @@ export declare const VirtualMachineApiFactory: (configuration?: Configuration, b
19455
19555
  * @throws {RequiredError}
19456
19556
  */
19457
19557
  stopVM(vmId: number, options?: RawAxiosRequestConfig): AxiosPromise<ResponseModel>;
19558
+ /**
19559
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
19560
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
19561
+ * @param {number} vmId
19562
+ * @param {UserEnhancedMetricsPayload} payload
19563
+ * @param {*} [options] Override http request option.
19564
+ * @throws {RequiredError}
19565
+ */
19566
+ toggleEnhancedMetricsForAVM(vmId: number, payload: UserEnhancedMetricsPayload, options?: RawAxiosRequestConfig): AxiosPromise<UserEnhancedMetricsResponse>;
19458
19567
  };
19459
19568
  /**
19460
19569
  * VirtualMachineApi - object-oriented interface
@@ -19662,6 +19771,16 @@ export declare class VirtualMachineApi extends BaseAPI {
19662
19771
  * @memberof VirtualMachineApi
19663
19772
  */
19664
19773
  stopVM(vmId: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ResponseModel, any, {}, any>>;
19774
+ /**
19775
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
19776
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
19777
+ * @param {number} vmId
19778
+ * @param {UserEnhancedMetricsPayload} payload
19779
+ * @param {*} [options] Override http request option.
19780
+ * @throws {RequiredError}
19781
+ * @memberof VirtualMachineApi
19782
+ */
19783
+ toggleEnhancedMetricsForAVM(vmId: number, payload: UserEnhancedMetricsPayload, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<UserEnhancedMetricsResponse, any, {}, any>>;
19665
19784
  }
19666
19785
  /**
19667
19786
  * @export
package/dist/api.js CHANGED
@@ -16466,6 +16466,42 @@ const VirtualMachineApiAxiosParamCreator = function (configuration) {
16466
16466
  options: localVarRequestOptions,
16467
16467
  };
16468
16468
  }),
16469
+ /**
16470
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
16471
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
16472
+ * @param {number} vmId
16473
+ * @param {UserEnhancedMetricsPayload} payload
16474
+ * @param {*} [options] Override http request option.
16475
+ * @throws {RequiredError}
16476
+ */
16477
+ toggleEnhancedMetricsForAVM: (vmId_1, payload_1, ...args_1) => __awaiter(this, [vmId_1, payload_1, ...args_1], void 0, function* (vmId, payload, options = {}) {
16478
+ // verify required parameter 'vmId' is not null or undefined
16479
+ (0, common_1.assertParamExists)('toggleEnhancedMetricsForAVM', 'vmId', vmId);
16480
+ // verify required parameter 'payload' is not null or undefined
16481
+ (0, common_1.assertParamExists)('toggleEnhancedMetricsForAVM', 'payload', payload);
16482
+ const localVarPath = `/core/virtual-machines/{vm_id}/enhanced-metrics`
16483
+ .replace(`{${"vm_id"}}`, encodeURIComponent(String(vmId)));
16484
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
16485
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
16486
+ let baseOptions;
16487
+ if (configuration) {
16488
+ baseOptions = configuration.baseOptions;
16489
+ }
16490
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
16491
+ const localVarHeaderParameter = {};
16492
+ const localVarQueryParameter = {};
16493
+ // authentication apiKey required
16494
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "api_key", configuration);
16495
+ localVarHeaderParameter['Content-Type'] = 'application/json';
16496
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
16497
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
16498
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
16499
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(payload, localVarRequestOptions, configuration);
16500
+ return {
16501
+ url: (0, common_1.toPathString)(localVarUrlObj),
16502
+ options: localVarRequestOptions,
16503
+ };
16504
+ }),
16469
16505
  };
16470
16506
  };
16471
16507
  exports.VirtualMachineApiAxiosParamCreator = VirtualMachineApiAxiosParamCreator;
@@ -16815,6 +16851,23 @@ const VirtualMachineApiFp = function (configuration) {
16815
16851
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
16816
16852
  });
16817
16853
  },
16854
+ /**
16855
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
16856
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
16857
+ * @param {number} vmId
16858
+ * @param {UserEnhancedMetricsPayload} payload
16859
+ * @param {*} [options] Override http request option.
16860
+ * @throws {RequiredError}
16861
+ */
16862
+ toggleEnhancedMetricsForAVM(vmId, payload, options) {
16863
+ return __awaiter(this, void 0, void 0, function* () {
16864
+ var _a, _b, _c;
16865
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.toggleEnhancedMetricsForAVM(vmId, payload, options);
16866
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
16867
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['VirtualMachineApi.toggleEnhancedMetricsForAVM']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
16868
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
16869
+ });
16870
+ },
16818
16871
  };
16819
16872
  };
16820
16873
  exports.VirtualMachineApiFp = VirtualMachineApiFp;
@@ -17044,6 +17097,17 @@ const VirtualMachineApiFactory = function (configuration, basePath, axios) {
17044
17097
  stopVM(vmId, options) {
17045
17098
  return localVarFp.stopVM(vmId, options).then((request) => request(axios, basePath));
17046
17099
  },
17100
+ /**
17101
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
17102
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
17103
+ * @param {number} vmId
17104
+ * @param {UserEnhancedMetricsPayload} payload
17105
+ * @param {*} [options] Override http request option.
17106
+ * @throws {RequiredError}
17107
+ */
17108
+ toggleEnhancedMetricsForAVM(vmId, payload, options) {
17109
+ return localVarFp.toggleEnhancedMetricsForAVM(vmId, payload, options).then((request) => request(axios, basePath));
17110
+ },
17047
17111
  };
17048
17112
  };
17049
17113
  exports.VirtualMachineApiFactory = VirtualMachineApiFactory;
@@ -17293,6 +17357,18 @@ class VirtualMachineApi extends base_1.BaseAPI {
17293
17357
  stopVM(vmId, options) {
17294
17358
  return (0, exports.VirtualMachineApiFp)(this.configuration).stopVM(vmId, options).then((request) => request(this.axios, this.basePath));
17295
17359
  }
17360
+ /**
17361
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
17362
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
17363
+ * @param {number} vmId
17364
+ * @param {UserEnhancedMetricsPayload} payload
17365
+ * @param {*} [options] Override http request option.
17366
+ * @throws {RequiredError}
17367
+ * @memberof VirtualMachineApi
17368
+ */
17369
+ toggleEnhancedMetricsForAVM(vmId, payload, options) {
17370
+ return (0, exports.VirtualMachineApiFp)(this.configuration).toggleEnhancedMetricsForAVM(vmId, payload, options).then((request) => request(this.axios, this.basePath));
17371
+ }
17296
17372
  }
17297
17373
  exports.VirtualMachineApi = VirtualMachineApi;
17298
17374
  /**
package/dist/esm/api.d.ts CHANGED
@@ -2665,6 +2665,12 @@ export interface CreateInstancesPayload {
2665
2665
  * @memberof CreateInstancesPayload
2666
2666
  */
2667
2667
  'enable_port_randomization'?: boolean;
2668
+ /**
2669
+ * When true, the Hyperstack VM Agent is opted in for this VM and metrics ingestion is allowed by the prom-gateway. The agent must still be installed on the VM (typically via user_data cloud-init).
2670
+ * @type {boolean}
2671
+ * @memberof CreateInstancesPayload
2672
+ */
2673
+ 'enhanced_monitoring_enabled'?: boolean;
2668
2674
  /**
2669
2675
  * The name of the [environment](https://docs.hyperstack.cloud/docs/api-reference/core-resources/environments/) in which the virtual machine is to be created.
2670
2676
  * @type {string}
@@ -4959,6 +4965,19 @@ export interface Instance {
4959
4965
  */
4960
4966
  'status'?: boolean;
4961
4967
  }
4968
+ /**
4969
+ *
4970
+ * @export
4971
+ * @interface InstanceEnhancedMetricsFields
4972
+ */
4973
+ export interface InstanceEnhancedMetricsFields {
4974
+ /**
4975
+ *
4976
+ * @type {boolean}
4977
+ * @memberof InstanceEnhancedMetricsFields
4978
+ */
4979
+ 'enabled'?: boolean;
4980
+ }
4962
4981
  /**
4963
4982
  *
4964
4983
  * @export
@@ -5100,6 +5119,12 @@ export interface InstanceFields {
5100
5119
  * @memberof InstanceFields
5101
5120
  */
5102
5121
  'created_at'?: string;
5122
+ /**
5123
+ *
5124
+ * @type {InstanceEnhancedMetricsFields}
5125
+ * @memberof InstanceFields
5126
+ */
5127
+ 'enhanced_metrics'?: InstanceEnhancedMetricsFields;
5103
5128
  /**
5104
5129
  *
5105
5130
  * @type {InstanceEnvironmentFields}
@@ -10140,6 +10165,63 @@ export interface UserDefaultChoicesForUserResponse {
10140
10165
  */
10141
10166
  'user_default_choices'?: Array<UserDefaultChoiceForUserFields>;
10142
10167
  }
10168
+ /**
10169
+ *
10170
+ * @export
10171
+ * @interface UserEnhancedMetricsPayload
10172
+ */
10173
+ export interface UserEnhancedMetricsPayload {
10174
+ /**
10175
+ * Set to true to opt this VM into Enhanced Metrics, false to opt out.
10176
+ * @type {boolean}
10177
+ * @memberof UserEnhancedMetricsPayload
10178
+ */
10179
+ 'enabled': boolean;
10180
+ }
10181
+ /**
10182
+ *
10183
+ * @export
10184
+ * @interface UserEnhancedMetricsResponse
10185
+ */
10186
+ export interface UserEnhancedMetricsResponse {
10187
+ /**
10188
+ * One-liner the user can run inside the VM to install the agent when enabling. Omitted when disabling.
10189
+ * @type {string}
10190
+ * @memberof UserEnhancedMetricsResponse
10191
+ */
10192
+ 'install_command'?: string;
10193
+ /**
10194
+ *
10195
+ * @type {string}
10196
+ * @memberof UserEnhancedMetricsResponse
10197
+ */
10198
+ 'message'?: string;
10199
+ /**
10200
+ *
10201
+ * @type {UserEnhancedMetricsResponseFields}
10202
+ * @memberof UserEnhancedMetricsResponse
10203
+ */
10204
+ 'metrics'?: UserEnhancedMetricsResponseFields;
10205
+ /**
10206
+ *
10207
+ * @type {boolean}
10208
+ * @memberof UserEnhancedMetricsResponse
10209
+ */
10210
+ 'status'?: boolean;
10211
+ }
10212
+ /**
10213
+ *
10214
+ * @export
10215
+ * @interface UserEnhancedMetricsResponseFields
10216
+ */
10217
+ export interface UserEnhancedMetricsResponseFields {
10218
+ /**
10219
+ *
10220
+ * @type {boolean}
10221
+ * @memberof UserEnhancedMetricsResponseFields
10222
+ */
10223
+ 'enabled'?: boolean;
10224
+ }
10143
10225
  /**
10144
10226
  *
10145
10227
  * @export
@@ -19085,6 +19167,15 @@ export declare const VirtualMachineApiAxiosParamCreator: (configuration?: Config
19085
19167
  * @throws {RequiredError}
19086
19168
  */
19087
19169
  stopVM: (vmId: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
19170
+ /**
19171
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
19172
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
19173
+ * @param {number} vmId
19174
+ * @param {UserEnhancedMetricsPayload} payload
19175
+ * @param {*} [options] Override http request option.
19176
+ * @throws {RequiredError}
19177
+ */
19178
+ toggleEnhancedMetricsForAVM: (vmId: number, payload: UserEnhancedMetricsPayload, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
19088
19179
  };
19089
19180
  /**
19090
19181
  * VirtualMachineApi - functional programming interface
@@ -19270,6 +19361,15 @@ export declare const VirtualMachineApiFp: (configuration?: Configuration) => {
19270
19361
  * @throws {RequiredError}
19271
19362
  */
19272
19363
  stopVM(vmId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ResponseModel>>;
19364
+ /**
19365
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
19366
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
19367
+ * @param {number} vmId
19368
+ * @param {UserEnhancedMetricsPayload} payload
19369
+ * @param {*} [options] Override http request option.
19370
+ * @throws {RequiredError}
19371
+ */
19372
+ toggleEnhancedMetricsForAVM(vmId: number, payload: UserEnhancedMetricsPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserEnhancedMetricsResponse>>;
19273
19373
  };
19274
19374
  /**
19275
19375
  * VirtualMachineApi - factory interface
@@ -19455,6 +19555,15 @@ export declare const VirtualMachineApiFactory: (configuration?: Configuration, b
19455
19555
  * @throws {RequiredError}
19456
19556
  */
19457
19557
  stopVM(vmId: number, options?: RawAxiosRequestConfig): AxiosPromise<ResponseModel>;
19558
+ /**
19559
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
19560
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
19561
+ * @param {number} vmId
19562
+ * @param {UserEnhancedMetricsPayload} payload
19563
+ * @param {*} [options] Override http request option.
19564
+ * @throws {RequiredError}
19565
+ */
19566
+ toggleEnhancedMetricsForAVM(vmId: number, payload: UserEnhancedMetricsPayload, options?: RawAxiosRequestConfig): AxiosPromise<UserEnhancedMetricsResponse>;
19458
19567
  };
19459
19568
  /**
19460
19569
  * VirtualMachineApi - object-oriented interface
@@ -19662,6 +19771,16 @@ export declare class VirtualMachineApi extends BaseAPI {
19662
19771
  * @memberof VirtualMachineApi
19663
19772
  */
19664
19773
  stopVM(vmId: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ResponseModel, any, {}, any>>;
19774
+ /**
19775
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
19776
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
19777
+ * @param {number} vmId
19778
+ * @param {UserEnhancedMetricsPayload} payload
19779
+ * @param {*} [options] Override http request option.
19780
+ * @throws {RequiredError}
19781
+ * @memberof VirtualMachineApi
19782
+ */
19783
+ toggleEnhancedMetricsForAVM(vmId: number, payload: UserEnhancedMetricsPayload, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<UserEnhancedMetricsResponse, any, {}, any>>;
19665
19784
  }
19666
19785
  /**
19667
19786
  * @export
package/dist/esm/api.js CHANGED
@@ -16259,6 +16259,42 @@ export const VirtualMachineApiAxiosParamCreator = function (configuration) {
16259
16259
  options: localVarRequestOptions,
16260
16260
  };
16261
16261
  }),
16262
+ /**
16263
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
16264
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
16265
+ * @param {number} vmId
16266
+ * @param {UserEnhancedMetricsPayload} payload
16267
+ * @param {*} [options] Override http request option.
16268
+ * @throws {RequiredError}
16269
+ */
16270
+ toggleEnhancedMetricsForAVM: (vmId_1, payload_1, ...args_1) => __awaiter(this, [vmId_1, payload_1, ...args_1], void 0, function* (vmId, payload, options = {}) {
16271
+ // verify required parameter 'vmId' is not null or undefined
16272
+ assertParamExists('toggleEnhancedMetricsForAVM', 'vmId', vmId);
16273
+ // verify required parameter 'payload' is not null or undefined
16274
+ assertParamExists('toggleEnhancedMetricsForAVM', 'payload', payload);
16275
+ const localVarPath = `/core/virtual-machines/{vm_id}/enhanced-metrics`
16276
+ .replace(`{${"vm_id"}}`, encodeURIComponent(String(vmId)));
16277
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
16278
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
16279
+ let baseOptions;
16280
+ if (configuration) {
16281
+ baseOptions = configuration.baseOptions;
16282
+ }
16283
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
16284
+ const localVarHeaderParameter = {};
16285
+ const localVarQueryParameter = {};
16286
+ // authentication apiKey required
16287
+ yield setApiKeyToObject(localVarHeaderParameter, "api_key", configuration);
16288
+ localVarHeaderParameter['Content-Type'] = 'application/json';
16289
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
16290
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
16291
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
16292
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
16293
+ return {
16294
+ url: toPathString(localVarUrlObj),
16295
+ options: localVarRequestOptions,
16296
+ };
16297
+ }),
16262
16298
  };
16263
16299
  };
16264
16300
  /**
@@ -16607,6 +16643,23 @@ export const VirtualMachineApiFp = function (configuration) {
16607
16643
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
16608
16644
  });
16609
16645
  },
16646
+ /**
16647
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
16648
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
16649
+ * @param {number} vmId
16650
+ * @param {UserEnhancedMetricsPayload} payload
16651
+ * @param {*} [options] Override http request option.
16652
+ * @throws {RequiredError}
16653
+ */
16654
+ toggleEnhancedMetricsForAVM(vmId, payload, options) {
16655
+ return __awaiter(this, void 0, void 0, function* () {
16656
+ var _a, _b, _c;
16657
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.toggleEnhancedMetricsForAVM(vmId, payload, options);
16658
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
16659
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['VirtualMachineApi.toggleEnhancedMetricsForAVM']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
16660
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
16661
+ });
16662
+ },
16610
16663
  };
16611
16664
  };
16612
16665
  /**
@@ -16835,6 +16888,17 @@ export const VirtualMachineApiFactory = function (configuration, basePath, axios
16835
16888
  stopVM(vmId, options) {
16836
16889
  return localVarFp.stopVM(vmId, options).then((request) => request(axios, basePath));
16837
16890
  },
16891
+ /**
16892
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
16893
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
16894
+ * @param {number} vmId
16895
+ * @param {UserEnhancedMetricsPayload} payload
16896
+ * @param {*} [options] Override http request option.
16897
+ * @throws {RequiredError}
16898
+ */
16899
+ toggleEnhancedMetricsForAVM(vmId, payload, options) {
16900
+ return localVarFp.toggleEnhancedMetricsForAVM(vmId, payload, options).then((request) => request(axios, basePath));
16901
+ },
16838
16902
  };
16839
16903
  };
16840
16904
  /**
@@ -17083,6 +17147,18 @@ export class VirtualMachineApi extends BaseAPI {
17083
17147
  stopVM(vmId, options) {
17084
17148
  return VirtualMachineApiFp(this.configuration).stopVM(vmId, options).then((request) => request(this.axios, this.basePath));
17085
17149
  }
17150
+ /**
17151
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
17152
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
17153
+ * @param {number} vmId
17154
+ * @param {UserEnhancedMetricsPayload} payload
17155
+ * @param {*} [options] Override http request option.
17156
+ * @throws {RequiredError}
17157
+ * @memberof VirtualMachineApi
17158
+ */
17159
+ toggleEnhancedMetricsForAVM(vmId, payload, options) {
17160
+ return VirtualMachineApiFp(this.configuration).toggleEnhancedMetricsForAVM(vmId, payload, options).then((request) => request(this.axios, this.basePath));
17161
+ }
17086
17162
  }
17087
17163
  /**
17088
17164
  * @export
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexgencloud/hyperstack-sdk-typescript",
3
- "version": "v1.54.7-alpha",
3
+ "version": "v1.55.1-alpha",
4
4
  "description": "Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {