@scaleway/sdk 1.34.0 → 1.36.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.
@@ -3,7 +3,7 @@ import { API as API$1 } from '../../../scw/api.js';
3
3
  import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
4
4
  import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
5
5
  import { VOLUME_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES } from './content.gen.js';
6
- import { unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, marshalCreateVolumeRequest, unmarshalVolume, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalSnapshot, marshalCreateSnapshotRequest, marshalUpdateSnapshotRequest } from './marshalling.gen.js';
6
+ import { unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, marshalCreateVolumeRequest, unmarshalVolume, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalSnapshot, marshalCreateSnapshotRequest, marshalImportSnapshotFromS3Request, marshalUpdateSnapshotRequest } from './marshalling.gen.js';
7
7
 
8
8
  // This file was automatically generated. DO NOT EDIT.
9
9
  // If you have any remark or suggestion do not hesitate to open an issue.
@@ -12,10 +12,10 @@ const jsonContentHeaders = {
12
12
  };
13
13
 
14
14
  /**
15
- * Scaleway Block Storage (SBS) API.
15
+ * Scaleway Block Storage API.
16
16
  *
17
17
  * This API allows you to use and manage your Block Storage volumes. Scaleway
18
- * Block Storage (SBS) API.
18
+ * Block Storage API.
19
19
  */
20
20
  class API extends API$1 {
21
21
  /** Lists the available zones of the API. */
@@ -66,8 +66,8 @@ class API extends API$1 {
66
66
 
67
67
  /**
68
68
  * List volumes. List all existing volumes in a specified zone. By default,
69
- * the volume listed are ordered by creation date in ascending order. This can
70
- * be modified via the `order_by` field.
69
+ * the volumes listed are ordered by creation date in ascending order. This
70
+ * can be modified via the `order_by` field.
71
71
  *
72
72
  * @param request - The request {@link ListVolumesRequest}
73
73
  * @returns A Promise of ListVolumesResponse
@@ -83,13 +83,12 @@ class API extends API$1 {
83
83
  })();
84
84
 
85
85
  /**
86
- * Create a new empty volume by specifying the `size`. To create a volume from
87
- * an existing snapshot, specify the `snapshot_id` in the request payload
86
+ * Create a volume. To create a new volume from scratch, you must specify
87
+ * `from_empty` and the `size`. To create a volume from an existing snapshot,
88
+ * specify `from_snapshot` and the `snapshot_id` in the request payload
88
89
  * instead, size is optional and can be specified if you need to extend the
89
- * original size. In that case the created volume will have the same volume
90
- * class (and underlying IOPS limitations) as the originating snapshot. You
91
- * can specify the desired performance of the volume by setting `requirements`
92
- * accordingly.
90
+ * original size. The volume will take on the same volume class and underlying
91
+ * IOPS limitations as the original snapshot.
93
92
  *
94
93
  * @param request - The request {@link CreateVolumeRequest}
95
94
  * @returns A Promise of Volume
@@ -134,10 +133,10 @@ class API extends API$1 {
134
133
  });
135
134
 
136
135
  /**
137
- * Update a volume. Update technical details about a volume, such as its name,
138
- * tags, or its new size and `volume_type` (within the same Block Storage
139
- * class). You can only resize a volume to a larger size. It is not possible
140
- * for now to change your Block Storage Class.
136
+ * Update a volume. Update the technical details of a volume, such as its
137
+ * name, tags, or its new size and `volume_type` (within the same Block
138
+ * Storage class). You can only resize a volume to a larger size. It is
139
+ * currently not possible to change your Block Storage Class.
141
140
  *
142
141
  * @param request - The request {@link UpdateVolumeRequest}
143
142
  * @returns A Promise of Volume
@@ -216,6 +215,12 @@ class API extends API$1 {
216
215
  method: 'POST',
217
216
  path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots`
218
217
  }, unmarshalSnapshot);
218
+ importSnapshotFromS3 = request => this.client.fetch({
219
+ body: JSON.stringify(marshalImportSnapshotFromS3Request(request, this.client.settings)),
220
+ headers: jsonContentHeaders,
221
+ method: 'POST',
222
+ path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/import-from-s3`
223
+ }, unmarshalSnapshot);
219
224
 
220
225
  /**
221
226
  * Delete a snapshot. You must specify the `snapshot_id` of the snapshot you
@@ -229,7 +234,7 @@ class API extends API$1 {
229
234
  });
230
235
 
231
236
  /**
232
- * Update a snapshot. Update name or tags of the snapshot.
237
+ * Update a snapshot. Update the name or tags of the snapshot.
233
238
  *
234
239
  * @param request - The request {@link UpdateSnapshotRequest}
235
240
  * @returns A Promise of Snapshot
@@ -161,6 +161,13 @@ const marshalCreateVolumeRequest = (request, defaults) => ({
161
161
  value: request.perfIops
162
162
  }], true)
163
163
  });
164
+ const marshalImportSnapshotFromS3Request = (request, defaults) => ({
165
+ bucket: request.bucket,
166
+ key: request.key,
167
+ name: request.name,
168
+ project_id: request.projectId ?? defaults.defaultProjectId,
169
+ tags: request.tags
170
+ });
164
171
  const marshalUpdateSnapshotRequest = (request, defaults) => ({
165
172
  name: request.name,
166
173
  tags: request.tags
@@ -172,4 +179,4 @@ const marshalUpdateVolumeRequest = (request, defaults) => ({
172
179
  tags: request.tags
173
180
  });
174
181
 
175
- export { marshalCreateSnapshotRequest, marshalCreateVolumeRequest, marshalUpdateSnapshotRequest, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, unmarshalSnapshot, unmarshalVolume };
182
+ export { marshalCreateSnapshotRequest, marshalCreateVolumeRequest, marshalImportSnapshotFromS3Request, marshalUpdateSnapshotRequest, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, unmarshalSnapshot, unmarshalVolume };
@@ -11,6 +11,11 @@ const CreateVolumeRequest = {
11
11
  minLength: 1
12
12
  }
13
13
  };
14
+ const ImportSnapshotFromS3Request = {
15
+ name: {
16
+ minLength: 1
17
+ }
18
+ };
14
19
  const ListSnapshotsRequest = {
15
20
  page: {
16
21
  greaterThan: 0
@@ -39,4 +44,4 @@ const ListVolumesRequest = {
39
44
  }
40
45
  };
41
46
 
42
- export { CreateSnapshotRequest, CreateVolumeRequest, ListSnapshotsRequest, ListVolumeTypesRequest, ListVolumesRequest };
47
+ export { CreateSnapshotRequest, CreateVolumeRequest, ImportSnapshotFromS3Request, ListSnapshotsRequest, ListVolumeTypesRequest, ListVolumesRequest };
@@ -3,7 +3,7 @@ import { API as API$1 } from '../../../scw/api.js';
3
3
  import { urlParams, validatePathParam } from '../../../helpers/marshalling.js';
4
4
  import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
5
5
  import { COCKPIT_TRANSIENT_STATUSES } from './content.gen.js';
6
- import { marshalActivateCockpitRequest, unmarshalCockpit, unmarshalCockpitMetrics, marshalDeactivateCockpitRequest, marshalResetCockpitGrafanaRequest, marshalCreateDatasourceRequest, unmarshalDatasource, marshalCreateTokenRequest, unmarshalToken, unmarshalListTokensResponse, marshalCreateContactPointRequest, unmarshalContactPoint, unmarshalListContactPointsResponse, marshalDeleteContactPointRequest, marshalEnableManagedAlertsRequest, marshalDisableManagedAlertsRequest, marshalTriggerTestAlertRequest, marshalCreateGrafanaUserRequest, unmarshalGrafanaUser, unmarshalListGrafanaUsersResponse, marshalDeleteGrafanaUserRequest, marshalResetGrafanaUserPasswordRequest, unmarshalListPlansResponse, marshalSelectPlanRequest, unmarshalSelectPlanResponse } from './marshalling.gen.js';
6
+ import { marshalActivateCockpitRequest, unmarshalCockpit, unmarshalCockpitMetrics, marshalDeactivateCockpitRequest, marshalResetCockpitGrafanaRequest, marshalCreateDatasourceRequest, unmarshalDatasource, unmarshalListDatasourcesResponse, marshalCreateTokenRequest, unmarshalToken, unmarshalListTokensResponse, marshalCreateContactPointRequest, unmarshalContactPoint, unmarshalListContactPointsResponse, marshalDeleteContactPointRequest, marshalEnableManagedAlertsRequest, marshalDisableManagedAlertsRequest, marshalTriggerTestAlertRequest, marshalCreateGrafanaUserRequest, unmarshalGrafanaUser, unmarshalListGrafanaUsersResponse, marshalDeleteGrafanaUserRequest, marshalResetGrafanaUserPasswordRequest, unmarshalListPlansResponse, marshalSelectPlanRequest, unmarshalSelectPlanResponse, unmarshalListGrafanaProductDashboardsResponse, unmarshalGrafanaProductDashboard } from './marshalling.gen.js';
7
7
 
8
8
  // This file was automatically generated. DO NOT EDIT.
9
9
  // If you have any remark or suggestion do not hesitate to open an issue.
@@ -151,6 +151,35 @@ class API extends API$1 {
151
151
  method: 'POST',
152
152
  path: `/cockpit/v1beta1/datasources`
153
153
  }, unmarshalDatasource);
154
+ pageOfListDatasources = (() => {
155
+ var _this7 = this;
156
+ return function (request) {
157
+ if (request === void 0) {
158
+ request = {};
159
+ }
160
+ return _this7.client.fetch({
161
+ method: 'GET',
162
+ path: `/cockpit/v1beta1/datasources`,
163
+ urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this7.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this7.client.settings.defaultProjectId], ['types', request.types])
164
+ }, unmarshalListDatasourcesResponse);
165
+ };
166
+ })();
167
+
168
+ /**
169
+ * Get a list of datasources for the specified Project ID.
170
+ *
171
+ * @param request - The request {@link ListDatasourcesRequest}
172
+ * @returns A Promise of ListDatasourcesResponse
173
+ */
174
+ listDatasources = (() => {
175
+ var _this8 = this;
176
+ return function (request) {
177
+ if (request === void 0) {
178
+ request = {};
179
+ }
180
+ return enrichForPagination('datasources', _this8.pageOfListDatasources, request);
181
+ };
182
+ })();
154
183
 
155
184
  /**
156
185
  * Create a token associated with the specified Project ID.
@@ -159,13 +188,13 @@ class API extends API$1 {
159
188
  * @returns A Promise of Token
160
189
  */
161
190
  createToken = (() => {
162
- var _this7 = this;
191
+ var _this9 = this;
163
192
  return function (request) {
164
193
  if (request === void 0) {
165
194
  request = {};
166
195
  }
167
- return _this7.client.fetch({
168
- body: JSON.stringify(marshalCreateTokenRequest(request, _this7.client.settings)),
196
+ return _this9.client.fetch({
197
+ body: JSON.stringify(marshalCreateTokenRequest(request, _this9.client.settings)),
169
198
  headers: jsonContentHeaders,
170
199
  method: 'POST',
171
200
  path: `/cockpit/v1beta1/tokens`
@@ -173,15 +202,15 @@ class API extends API$1 {
173
202
  };
174
203
  })();
175
204
  pageOfListTokens = (() => {
176
- var _this8 = this;
205
+ var _this10 = this;
177
206
  return function (request) {
178
207
  if (request === void 0) {
179
208
  request = {};
180
209
  }
181
- return _this8.client.fetch({
210
+ return _this10.client.fetch({
182
211
  method: 'GET',
183
212
  path: `/cockpit/v1beta1/tokens`,
184
- urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this8.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this8.client.settings.defaultProjectId])
213
+ urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this10.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this10.client.settings.defaultProjectId])
185
214
  }, unmarshalListTokensResponse);
186
215
  };
187
216
  })();
@@ -193,12 +222,12 @@ class API extends API$1 {
193
222
  * @returns A Promise of ListTokensResponse
194
223
  */
195
224
  listTokens = (() => {
196
- var _this9 = this;
225
+ var _this11 = this;
197
226
  return function (request) {
198
227
  if (request === void 0) {
199
228
  request = {};
200
229
  }
201
- return enrichForPagination('tokens', _this9.pageOfListTokens, request);
230
+ return enrichForPagination('tokens', _this11.pageOfListTokens, request);
202
231
  };
203
232
  })();
204
233
 
@@ -230,13 +259,13 @@ class API extends API$1 {
230
259
  * @returns A Promise of ContactPoint
231
260
  */
232
261
  createContactPoint = (() => {
233
- var _this10 = this;
262
+ var _this12 = this;
234
263
  return function (request) {
235
264
  if (request === void 0) {
236
265
  request = {};
237
266
  }
238
- return _this10.client.fetch({
239
- body: JSON.stringify(marshalCreateContactPointRequest(request, _this10.client.settings)),
267
+ return _this12.client.fetch({
268
+ body: JSON.stringify(marshalCreateContactPointRequest(request, _this12.client.settings)),
240
269
  headers: jsonContentHeaders,
241
270
  method: 'POST',
242
271
  path: `/cockpit/v1beta1/contact-points`
@@ -244,15 +273,15 @@ class API extends API$1 {
244
273
  };
245
274
  })();
246
275
  pageOfListContactPoints = (() => {
247
- var _this11 = this;
276
+ var _this13 = this;
248
277
  return function (request) {
249
278
  if (request === void 0) {
250
279
  request = {};
251
280
  }
252
- return _this11.client.fetch({
281
+ return _this13.client.fetch({
253
282
  method: 'GET',
254
283
  path: `/cockpit/v1beta1/contact-points`,
255
- urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this11.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this11.client.settings.defaultProjectId])
284
+ urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this13.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this13.client.settings.defaultProjectId])
256
285
  }, unmarshalListContactPointsResponse);
257
286
  };
258
287
  })();
@@ -265,12 +294,12 @@ class API extends API$1 {
265
294
  * @returns A Promise of ListContactPointsResponse
266
295
  */
267
296
  listContactPoints = (() => {
268
- var _this12 = this;
297
+ var _this14 = this;
269
298
  return function (request) {
270
299
  if (request === void 0) {
271
300
  request = {};
272
301
  }
273
- return enrichForPagination('contactPoints', _this12.pageOfListContactPoints, request);
302
+ return enrichForPagination('contactPoints', _this14.pageOfListContactPoints, request);
274
303
  };
275
304
  })();
276
305
 
@@ -280,13 +309,13 @@ class API extends API$1 {
280
309
  * @param request - The request {@link DeleteContactPointRequest}
281
310
  */
282
311
  deleteContactPoint = (() => {
283
- var _this13 = this;
312
+ var _this15 = this;
284
313
  return function (request) {
285
314
  if (request === void 0) {
286
315
  request = {};
287
316
  }
288
- return _this13.client.fetch({
289
- body: JSON.stringify(marshalDeleteContactPointRequest(request, _this13.client.settings)),
317
+ return _this15.client.fetch({
318
+ body: JSON.stringify(marshalDeleteContactPointRequest(request, _this15.client.settings)),
290
319
  headers: jsonContentHeaders,
291
320
  method: 'POST',
292
321
  path: `/cockpit/v1beta1/delete-contact-point`
@@ -300,13 +329,13 @@ class API extends API$1 {
300
329
  * @param request - The request {@link EnableManagedAlertsRequest}
301
330
  */
302
331
  enableManagedAlerts = (() => {
303
- var _this14 = this;
332
+ var _this16 = this;
304
333
  return function (request) {
305
334
  if (request === void 0) {
306
335
  request = {};
307
336
  }
308
- return _this14.client.fetch({
309
- body: JSON.stringify(marshalEnableManagedAlertsRequest(request, _this14.client.settings)),
337
+ return _this16.client.fetch({
338
+ body: JSON.stringify(marshalEnableManagedAlertsRequest(request, _this16.client.settings)),
310
339
  headers: jsonContentHeaders,
311
340
  method: 'POST',
312
341
  path: `/cockpit/v1beta1/enable-managed-alerts`
@@ -320,13 +349,13 @@ class API extends API$1 {
320
349
  * @param request - The request {@link DisableManagedAlertsRequest}
321
350
  */
322
351
  disableManagedAlerts = (() => {
323
- var _this15 = this;
352
+ var _this17 = this;
324
353
  return function (request) {
325
354
  if (request === void 0) {
326
355
  request = {};
327
356
  }
328
- return _this15.client.fetch({
329
- body: JSON.stringify(marshalDisableManagedAlertsRequest(request, _this15.client.settings)),
357
+ return _this17.client.fetch({
358
+ body: JSON.stringify(marshalDisableManagedAlertsRequest(request, _this17.client.settings)),
330
359
  headers: jsonContentHeaders,
331
360
  method: 'POST',
332
361
  path: `/cockpit/v1beta1/disable-managed-alerts`
@@ -340,13 +369,13 @@ class API extends API$1 {
340
369
  * @param request - The request {@link TriggerTestAlertRequest}
341
370
  */
342
371
  triggerTestAlert = (() => {
343
- var _this16 = this;
372
+ var _this18 = this;
344
373
  return function (request) {
345
374
  if (request === void 0) {
346
375
  request = {};
347
376
  }
348
- return _this16.client.fetch({
349
- body: JSON.stringify(marshalTriggerTestAlertRequest(request, _this16.client.settings)),
377
+ return _this18.client.fetch({
378
+ body: JSON.stringify(marshalTriggerTestAlertRequest(request, _this18.client.settings)),
350
379
  headers: jsonContentHeaders,
351
380
  method: 'POST',
352
381
  path: `/cockpit/v1beta1/trigger-test-alert`
@@ -368,15 +397,15 @@ class API extends API$1 {
368
397
  path: `/cockpit/v1beta1/grafana-users`
369
398
  }, unmarshalGrafanaUser);
370
399
  pageOfListGrafanaUsers = (() => {
371
- var _this17 = this;
400
+ var _this19 = this;
372
401
  return function (request) {
373
402
  if (request === void 0) {
374
403
  request = {};
375
404
  }
376
- return _this17.client.fetch({
405
+ return _this19.client.fetch({
377
406
  method: 'GET',
378
407
  path: `/cockpit/v1beta1/grafana-users`,
379
- urlParams: urlParams(['order_by', request.orderBy ?? 'login_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this17.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this17.client.settings.defaultProjectId])
408
+ urlParams: urlParams(['order_by', request.orderBy ?? 'login_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this19.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this19.client.settings.defaultProjectId])
380
409
  }, unmarshalListGrafanaUsersResponse);
381
410
  };
382
411
  })();
@@ -389,12 +418,12 @@ class API extends API$1 {
389
418
  * @returns A Promise of ListGrafanaUsersResponse
390
419
  */
391
420
  listGrafanaUsers = (() => {
392
- var _this18 = this;
421
+ var _this20 = this;
393
422
  return function (request) {
394
423
  if (request === void 0) {
395
424
  request = {};
396
425
  }
397
- return enrichForPagination('grafanaUsers', _this18.pageOfListGrafanaUsers, request);
426
+ return enrichForPagination('grafanaUsers', _this20.pageOfListGrafanaUsers, request);
398
427
  };
399
428
  })();
400
429
 
@@ -425,15 +454,15 @@ class API extends API$1 {
425
454
  path: `/cockpit/v1beta1/grafana-users/${validatePathParam('grafanaUserId', request.grafanaUserId)}/reset-password`
426
455
  }, unmarshalGrafanaUser);
427
456
  pageOfListPlans = (() => {
428
- var _this19 = this;
457
+ var _this21 = this;
429
458
  return function (request) {
430
459
  if (request === void 0) {
431
460
  request = {};
432
461
  }
433
- return _this19.client.fetch({
462
+ return _this21.client.fetch({
434
463
  method: 'GET',
435
464
  path: `/cockpit/v1beta1/plans`,
436
- urlParams: urlParams(['order_by', request.orderBy ?? 'name_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this19.client.settings.defaultPageSize])
465
+ urlParams: urlParams(['order_by', request.orderBy ?? 'name_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this21.client.settings.defaultPageSize])
437
466
  }, unmarshalListPlansResponse);
438
467
  };
439
468
  })();
@@ -445,12 +474,12 @@ class API extends API$1 {
445
474
  * @returns A Promise of ListPlansResponse
446
475
  */
447
476
  listPlans = (() => {
448
- var _this20 = this;
477
+ var _this22 = this;
449
478
  return function (request) {
450
479
  if (request === void 0) {
451
480
  request = {};
452
481
  }
453
- return enrichForPagination('plans', _this20.pageOfListPlans, request);
482
+ return enrichForPagination('plans', _this22.pageOfListPlans, request);
454
483
  };
455
484
  })();
456
485
 
@@ -467,6 +496,48 @@ class API extends API$1 {
467
496
  method: 'POST',
468
497
  path: `/cockpit/v1beta1/select-plan`
469
498
  }, unmarshalSelectPlanResponse);
499
+ pageOfListGrafanaProductDashboards = (() => {
500
+ var _this23 = this;
501
+ return function (request) {
502
+ if (request === void 0) {
503
+ request = {};
504
+ }
505
+ return _this23.client.fetch({
506
+ method: 'GET',
507
+ path: `/cockpit/v1beta1/grafana-product-dashboards`,
508
+ urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this23.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this23.client.settings.defaultProjectId], ['tags', request.tags])
509
+ }, unmarshalListGrafanaProductDashboardsResponse);
510
+ };
511
+ })();
512
+
513
+ /**
514
+ * List product dashboards. Get a list of available product dashboards.
515
+ *
516
+ * @param request - The request {@link ListGrafanaProductDashboardsRequest}
517
+ * @returns A Promise of ListGrafanaProductDashboardsResponse
518
+ */
519
+ listGrafanaProductDashboards = (() => {
520
+ var _this24 = this;
521
+ return function (request) {
522
+ if (request === void 0) {
523
+ request = {};
524
+ }
525
+ return enrichForPagination('dashboards', _this24.pageOfListGrafanaProductDashboards, request);
526
+ };
527
+ })();
528
+
529
+ /**
530
+ * Get a product dashboard. Get a product dashboard specified by the dashboard
531
+ * ID.
532
+ *
533
+ * @param request - The request {@link GetGrafanaProductDashboardRequest}
534
+ * @returns A Promise of GrafanaProductDashboard
535
+ */
536
+ getGrafanaProductDashboard = request => this.client.fetch({
537
+ method: 'GET',
538
+ path: `/cockpit/v1beta1/grafana-product-dashboards/${validatePathParam('dashboardName', request.dashboardName)}`,
539
+ urlParams: urlParams(['project_id', request.projectId ?? this.client.settings.defaultProjectId])
540
+ }, unmarshalGrafanaProductDashboard);
470
541
  }
471
542
 
472
543
  export { API };
@@ -48,6 +48,30 @@ const unmarshalContactPoint = data => {
48
48
  email: data.email ? unmarshalContactPointEmail(data.email) : undefined
49
49
  };
50
50
  };
51
+ const unmarshalDatasource = data => {
52
+ if (!isJSONObject(data)) {
53
+ throw new TypeError(`Unmarshalling the type 'Datasource' failed as data isn't a dictionary.`);
54
+ }
55
+ return {
56
+ id: data.id,
57
+ name: data.name,
58
+ projectId: data.project_id,
59
+ type: data.type,
60
+ url: data.url
61
+ };
62
+ };
63
+ const unmarshalGrafanaProductDashboard = data => {
64
+ if (!isJSONObject(data)) {
65
+ throw new TypeError(`Unmarshalling the type 'GrafanaProductDashboard' failed as data isn't a dictionary.`);
66
+ }
67
+ return {
68
+ dashboardName: data.dashboard_name,
69
+ tags: data.tags,
70
+ title: data.title,
71
+ url: data.url,
72
+ variables: data.variables
73
+ };
74
+ };
51
75
  const unmarshalGrafanaUser = data => {
52
76
  if (!isJSONObject(data)) {
53
77
  throw new TypeError(`Unmarshalling the type 'GrafanaUser' failed as data isn't a dictionary.`);
@@ -109,18 +133,6 @@ const unmarshalCockpitMetrics = data => {
109
133
  timeseries: unmarshalArrayOfObject(data.timeseries, unmarshalTimeSeries)
110
134
  };
111
135
  };
112
- const unmarshalDatasource = data => {
113
- if (!isJSONObject(data)) {
114
- throw new TypeError(`Unmarshalling the type 'Datasource' failed as data isn't a dictionary.`);
115
- }
116
- return {
117
- id: data.id,
118
- name: data.name,
119
- projectId: data.project_id,
120
- type: data.type,
121
- url: data.url
122
- };
123
- };
124
136
  const unmarshalListContactPointsResponse = data => {
125
137
  if (!isJSONObject(data)) {
126
138
  throw new TypeError(`Unmarshalling the type 'ListContactPointsResponse' failed as data isn't a dictionary.`);
@@ -132,6 +144,24 @@ const unmarshalListContactPointsResponse = data => {
132
144
  totalCount: data.total_count
133
145
  };
134
146
  };
147
+ const unmarshalListDatasourcesResponse = data => {
148
+ if (!isJSONObject(data)) {
149
+ throw new TypeError(`Unmarshalling the type 'ListDatasourcesResponse' failed as data isn't a dictionary.`);
150
+ }
151
+ return {
152
+ datasources: unmarshalArrayOfObject(data.datasources, unmarshalDatasource),
153
+ totalCount: data.total_count
154
+ };
155
+ };
156
+ const unmarshalListGrafanaProductDashboardsResponse = data => {
157
+ if (!isJSONObject(data)) {
158
+ throw new TypeError(`Unmarshalling the type 'ListGrafanaProductDashboardsResponse' failed as data isn't a dictionary.`);
159
+ }
160
+ return {
161
+ dashboards: unmarshalArrayOfObject(data.dashboards, unmarshalGrafanaProductDashboard),
162
+ totalCount: data.total_count
163
+ };
164
+ };
135
165
  const unmarshalListGrafanaUsersResponse = data => {
136
166
  if (!isJSONObject(data)) {
137
167
  throw new TypeError(`Unmarshalling the type 'ListGrafanaUsersResponse' failed as data isn't a dictionary.`);
@@ -237,4 +267,4 @@ const marshalTriggerTestAlertRequest = (request, defaults) => ({
237
267
  project_id: request.projectId ?? defaults.defaultProjectId
238
268
  });
239
269
 
240
- export { marshalActivateCockpitRequest, marshalCreateContactPointRequest, marshalCreateDatasourceRequest, marshalCreateGrafanaUserRequest, marshalCreateTokenRequest, marshalDeactivateCockpitRequest, marshalDeleteContactPointRequest, marshalDeleteGrafanaUserRequest, marshalDisableManagedAlertsRequest, marshalEnableManagedAlertsRequest, marshalResetCockpitGrafanaRequest, marshalResetGrafanaUserPasswordRequest, marshalSelectPlanRequest, marshalTriggerTestAlertRequest, unmarshalCockpit, unmarshalCockpitMetrics, unmarshalContactPoint, unmarshalDatasource, unmarshalGrafanaUser, unmarshalListContactPointsResponse, unmarshalListGrafanaUsersResponse, unmarshalListPlansResponse, unmarshalListTokensResponse, unmarshalSelectPlanResponse, unmarshalToken };
270
+ export { marshalActivateCockpitRequest, marshalCreateContactPointRequest, marshalCreateDatasourceRequest, marshalCreateGrafanaUserRequest, marshalCreateTokenRequest, marshalDeactivateCockpitRequest, marshalDeleteContactPointRequest, marshalDeleteGrafanaUserRequest, marshalDisableManagedAlertsRequest, marshalEnableManagedAlertsRequest, marshalResetCockpitGrafanaRequest, marshalResetGrafanaUserPasswordRequest, marshalSelectPlanRequest, marshalTriggerTestAlertRequest, unmarshalCockpit, unmarshalCockpitMetrics, unmarshalContactPoint, unmarshalDatasource, unmarshalGrafanaProductDashboard, unmarshalGrafanaUser, unmarshalListContactPointsResponse, unmarshalListDatasourcesResponse, unmarshalListGrafanaProductDashboardsResponse, unmarshalListGrafanaUsersResponse, unmarshalListPlansResponse, unmarshalListTokensResponse, unmarshalSelectPlanResponse, unmarshalToken };
@@ -231,6 +231,7 @@ const unmarshalListTriggersResponse = data => {
231
231
  };
232
232
  const marshalCreateTriggerRequestMnqNatsClientConfig = (request, defaults) => ({
233
233
  mnq_namespace_id: request.mnqNamespaceId,
234
+ mnq_nats_account_id: request.mnqNatsAccountId,
234
235
  mnq_project_id: request.mnqProjectId,
235
236
  mnq_region: request.mnqRegion,
236
237
  subject: request.subject
@@ -275,6 +275,7 @@ const unmarshalUploadURL = data => {
275
275
  };
276
276
  const marshalCreateTriggerRequestMnqNatsClientConfig = (request, defaults) => ({
277
277
  mnq_namespace_id: request.mnqNamespaceId,
278
+ mnq_nats_account_id: request.mnqNatsAccountId,
278
279
  mnq_project_id: request.mnqProjectId,
279
280
  mnq_region: request.mnqRegion,
280
281
  subject: request.subject
@@ -152,7 +152,8 @@ const unmarshalServerIp = data => {
152
152
  gateway: data.gateway,
153
153
  id: data.id,
154
154
  netmask: data.netmask,
155
- provisioningMode: data.provisioning_mode
155
+ provisioningMode: data.provisioning_mode,
156
+ tags: data.tags
156
157
  };
157
158
  };
158
159
  const unmarshalServerIpv6 = data => {
@@ -994,7 +995,8 @@ const marshalServerIp = (request, defaults) => ({
994
995
  gateway: request.gateway,
995
996
  id: request.id,
996
997
  netmask: request.netmask,
997
- provisioning_mode: request.provisioningMode
998
+ provisioning_mode: request.provisioningMode,
999
+ tags: request.tags
998
1000
  });
999
1001
  const marshalServerIpv6 = (request, defaults) => ({
1000
1002
  address: request.address,
@@ -1388,9 +1390,9 @@ const marshalUpdateServerRequest = (request, defaults) => ({
1388
1390
  enable_ipv6: request.enableIpv6,
1389
1391
  name: request.name,
1390
1392
  placement_group: request.placementGroup,
1391
- private_nics: request.privateNics ? request.privateNics.map(elt => marshalPrivateNIC(elt)) : undefined,
1393
+ private_nics: request.privateNics,
1392
1394
  protected: request.protected,
1393
- public_ips: request.publicIps ? request.publicIps.map(elt => marshalServerIp(elt)) : undefined,
1395
+ public_ips: request.publicIps,
1394
1396
  routed_ip_enabled: request.routedIpEnabled,
1395
1397
  security_group: request.securityGroup ? marshalSecurityGroupTemplate(request.securityGroup) : undefined,
1396
1398
  tags: request.tags,
@@ -147,6 +147,7 @@ const unmarshalPool = data => {
147
147
  name: data.name,
148
148
  nodeType: data.node_type,
149
149
  placementGroupId: data.placement_group_id,
150
+ publicIpDisabled: data.public_ip_disabled,
150
151
  region: data.region,
151
152
  rootVolumeSize: data.root_volume_size,
152
153
  rootVolumeType: data.root_volume_type,
@@ -294,6 +295,7 @@ const marshalCreateClusterRequestPoolConfig = (request, defaults) => ({
294
295
  name: request.name,
295
296
  node_type: request.nodeType,
296
297
  placement_group_id: request.placementGroupId,
298
+ public_ip_disabled: request.publicIpDisabled,
297
299
  root_volume_size: request.rootVolumeSize,
298
300
  root_volume_type: request.rootVolumeType,
299
301
  size: request.size,
@@ -371,6 +373,7 @@ const marshalCreatePoolRequest = (request, defaults) => ({
371
373
  name: request.name || randomName('pool'),
372
374
  node_type: request.nodeType,
373
375
  placement_group_id: request.placementGroupId,
376
+ public_ip_disabled: request.publicIpDisabled,
374
377
  root_volume_size: request.rootVolumeSize,
375
378
  root_volume_type: request.rootVolumeType ?? 'default_volume_type',
376
379
  size: request.size,
@@ -1,2 +1,4 @@
1
1
  import * as index_gen from './v1alpha1/index.gen.js';
2
2
  export { index_gen as v1alpha1 };
3
+ import * as index_gen$1 from './v1beta1/index.gen.js';
4
+ export { index_gen$1 as v1beta1 };