@scaleway/sdk 2.23.0 → 2.25.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/dist/index.cjs CHANGED
@@ -497,7 +497,7 @@ const assertValidSettings = obj => {
497
497
  }
498
498
  };
499
499
 
500
- const version = 'v2.22.0';
500
+ const version = 'v2.24.0';
501
501
  const userAgent = `scaleway-sdk-js/${version}`;
502
502
 
503
503
  const isBrowser = () =>
@@ -2068,7 +2068,7 @@ const marshalUpdateProjectRequest = (request, defaults) => ({
2068
2068
 
2069
2069
  // This file was automatically generated. DO NOT EDIT.
2070
2070
  // If you have any remark or suggestion do not hesitate to open an issue.
2071
- const jsonContentHeaders$x = {
2071
+ const jsonContentHeaders$y = {
2072
2072
  'Content-Type': 'application/json; charset=utf-8'
2073
2073
  };
2074
2074
 
@@ -2089,7 +2089,7 @@ let API$y = class API extends API$z {
2089
2089
  */
2090
2090
  createProject = (request = {}) => this.client.fetch({
2091
2091
  body: JSON.stringify(marshalCreateProjectRequest(request, this.client.settings)),
2092
- headers: jsonContentHeaders$x,
2092
+ headers: jsonContentHeaders$y,
2093
2093
  method: 'POST',
2094
2094
  path: `/account/v2/projects`
2095
2095
  }, unmarshalProject$1);
@@ -2153,7 +2153,7 @@ let API$y = class API extends API$z {
2153
2153
  */
2154
2154
  updateProject = (request = {}) => this.client.fetch({
2155
2155
  body: JSON.stringify(marshalUpdateProjectRequest(request, this.client.settings)),
2156
- headers: jsonContentHeaders$x,
2156
+ headers: jsonContentHeaders$y,
2157
2157
  method: 'PATCH',
2158
2158
  path: `/account/v2/projects/${validatePathParam('projectId', request.projectId ?? this.client.settings.defaultProjectId)}`
2159
2159
  }, unmarshalProject$1);
@@ -2162,7 +2162,7 @@ let API$y = class API extends API$z {
2162
2162
  // This file was automatically generated. DO NOT EDIT.
2163
2163
  // If you have any remark or suggestion do not hesitate to open an issue.
2164
2164
 
2165
- var index_gen$x = /*#__PURE__*/Object.freeze({
2165
+ var index_gen$y = /*#__PURE__*/Object.freeze({
2166
2166
  __proto__: null,
2167
2167
  API: API$y
2168
2168
  });
@@ -2203,7 +2203,7 @@ const marshalProjectApiUpdateProjectRequest = (request, defaults) => ({
2203
2203
 
2204
2204
  // This file was automatically generated. DO NOT EDIT.
2205
2205
  // If you have any remark or suggestion do not hesitate to open an issue.
2206
- const jsonContentHeaders$w = {
2206
+ const jsonContentHeaders$x = {
2207
2207
  'Content-Type': 'application/json; charset=utf-8'
2208
2208
  };
2209
2209
 
@@ -2222,7 +2222,7 @@ class ProjectAPI extends API$z {
2222
2222
  */
2223
2223
  createProject = request => this.client.fetch({
2224
2224
  body: JSON.stringify(marshalProjectApiCreateProjectRequest(request, this.client.settings)),
2225
- headers: jsonContentHeaders$w,
2225
+ headers: jsonContentHeaders$x,
2226
2226
  method: 'POST',
2227
2227
  path: `/account/v3/projects`
2228
2228
  }, unmarshalProject);
@@ -2278,7 +2278,7 @@ class ProjectAPI extends API$z {
2278
2278
  */
2279
2279
  updateProject = (request = {}) => this.client.fetch({
2280
2280
  body: JSON.stringify(marshalProjectApiUpdateProjectRequest(request, this.client.settings)),
2281
- headers: jsonContentHeaders$w,
2281
+ headers: jsonContentHeaders$x,
2282
2282
  method: 'PATCH',
2283
2283
  path: `/account/v3/projects/${validatePathParam('projectId', request.projectId ?? this.client.settings.defaultProjectId)}`
2284
2284
  }, unmarshalProject);
@@ -2322,7 +2322,7 @@ const ProjectApiUpdateProjectRequest = {
2322
2322
  }
2323
2323
  };
2324
2324
 
2325
- var validationRules_gen$g = /*#__PURE__*/Object.freeze({
2325
+ var validationRules_gen$i = /*#__PURE__*/Object.freeze({
2326
2326
  __proto__: null,
2327
2327
  ProjectApiCreateProjectRequest: ProjectApiCreateProjectRequest,
2328
2328
  ProjectApiListProjectsRequest: ProjectApiListProjectsRequest,
@@ -2332,16 +2332,16 @@ var validationRules_gen$g = /*#__PURE__*/Object.freeze({
2332
2332
  // This file was automatically generated. DO NOT EDIT.
2333
2333
  // If you have any remark or suggestion do not hesitate to open an issue.
2334
2334
 
2335
- var index_gen$w = /*#__PURE__*/Object.freeze({
2335
+ var index_gen$x = /*#__PURE__*/Object.freeze({
2336
2336
  __proto__: null,
2337
2337
  ProjectAPI: ProjectAPI,
2338
- ValidationRules: validationRules_gen$g
2338
+ ValidationRules: validationRules_gen$i
2339
2339
  });
2340
2340
 
2341
2341
  var index$A = /*#__PURE__*/Object.freeze({
2342
2342
  __proto__: null,
2343
- v2: index_gen$x,
2344
- v3: index_gen$w
2343
+ v2: index_gen$y,
2344
+ v3: index_gen$x
2345
2345
  });
2346
2346
 
2347
2347
  // This file was automatically generated. DO NOT EDIT.
@@ -2460,7 +2460,7 @@ const marshalUpdateServerRequest$3 = (request, defaults) => ({
2460
2460
 
2461
2461
  // This file was automatically generated. DO NOT EDIT.
2462
2462
  // If you have any remark or suggestion do not hesitate to open an issue.
2463
- const jsonContentHeaders$v = {
2463
+ const jsonContentHeaders$w = {
2464
2464
  'Content-Type': 'application/json; charset=utf-8'
2465
2465
  };
2466
2466
 
@@ -2503,7 +2503,7 @@ let API$x = class API extends API$z {
2503
2503
  */
2504
2504
  createServer = request => this.client.fetch({
2505
2505
  body: JSON.stringify(marshalCreateServerRequest$3(request, this.client.settings)),
2506
- headers: jsonContentHeaders$v,
2506
+ headers: jsonContentHeaders$w,
2507
2507
  method: 'POST',
2508
2508
  path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers`
2509
2509
  }, unmarshalServer$3);
@@ -2581,7 +2581,7 @@ let API$x = class API extends API$z {
2581
2581
  */
2582
2582
  updateServer = request => this.client.fetch({
2583
2583
  body: JSON.stringify(marshalUpdateServerRequest$3(request, this.client.settings)),
2584
- headers: jsonContentHeaders$v,
2584
+ headers: jsonContentHeaders$w,
2585
2585
  method: 'PATCH',
2586
2586
  path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
2587
2587
  }, unmarshalServer$3);
@@ -2608,7 +2608,7 @@ let API$x = class API extends API$z {
2608
2608
  */
2609
2609
  rebootServer = request => this.client.fetch({
2610
2610
  body: '{}',
2611
- headers: jsonContentHeaders$v,
2611
+ headers: jsonContentHeaders$w,
2612
2612
  method: 'POST',
2613
2613
  path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/reboot`
2614
2614
  }, unmarshalServer$3);
@@ -2624,7 +2624,7 @@ let API$x = class API extends API$z {
2624
2624
  */
2625
2625
  reinstallServer = request => this.client.fetch({
2626
2626
  body: '{}',
2627
- headers: jsonContentHeaders$v,
2627
+ headers: jsonContentHeaders$w,
2628
2628
  method: 'POST',
2629
2629
  path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/reinstall`
2630
2630
  }, unmarshalServer$3);
@@ -2633,7 +2633,7 @@ let API$x = class API extends API$z {
2633
2633
  // This file was automatically generated. DO NOT EDIT.
2634
2634
  // If you have any remark or suggestion do not hesitate to open an issue.
2635
2635
 
2636
- var index_gen$v = /*#__PURE__*/Object.freeze({
2636
+ var index_gen$w = /*#__PURE__*/Object.freeze({
2637
2637
  __proto__: null,
2638
2638
  API: API$x,
2639
2639
  SERVER_TRANSIENT_STATUSES: SERVER_TRANSIENT_STATUSES$3
@@ -2641,7 +2641,7 @@ var index_gen$v = /*#__PURE__*/Object.freeze({
2641
2641
 
2642
2642
  var index$z = /*#__PURE__*/Object.freeze({
2643
2643
  __proto__: null,
2644
- v1alpha1: index_gen$v
2644
+ v1alpha1: index_gen$w
2645
2645
  });
2646
2646
 
2647
2647
  // This file was automatically generated. DO NOT EDIT.
@@ -3059,7 +3059,7 @@ const marshalUpdateSettingRequest = (request, defaults) => ({
3059
3059
 
3060
3060
  // This file was automatically generated. DO NOT EDIT.
3061
3061
  // If you have any remark or suggestion do not hesitate to open an issue.
3062
- const jsonContentHeaders$u = {
3062
+ const jsonContentHeaders$v = {
3063
3063
  'Content-Type': 'application/json; charset=utf-8'
3064
3064
  };
3065
3065
 
@@ -3116,7 +3116,7 @@ let API$w = class API extends API$z {
3116
3116
  */
3117
3117
  createServer = request => this.client.fetch({
3118
3118
  body: JSON.stringify(marshalCreateServerRequest$2(request, this.client.settings)),
3119
- headers: jsonContentHeaders$u,
3119
+ headers: jsonContentHeaders$v,
3120
3120
  method: 'POST',
3121
3121
  path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers`
3122
3122
  }, unmarshalServer$2);
@@ -3131,7 +3131,7 @@ let API$w = class API extends API$z {
3131
3131
  */
3132
3132
  updateServer = request => this.client.fetch({
3133
3133
  body: JSON.stringify(marshalUpdateServerRequest$2(request, this.client.settings)),
3134
- headers: jsonContentHeaders$u,
3134
+ headers: jsonContentHeaders$v,
3135
3135
  method: 'PATCH',
3136
3136
  path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
3137
3137
  }, unmarshalServer$2);
@@ -3145,7 +3145,7 @@ let API$w = class API extends API$z {
3145
3145
  */
3146
3146
  installServer = request => this.client.fetch({
3147
3147
  body: JSON.stringify(marshalInstallServerRequest$1(request, this.client.settings)),
3148
- headers: jsonContentHeaders$u,
3148
+ headers: jsonContentHeaders$v,
3149
3149
  method: 'POST',
3150
3150
  path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/install`
3151
3151
  }, unmarshalServer$2);
@@ -3183,7 +3183,7 @@ let API$w = class API extends API$z {
3183
3183
  */
3184
3184
  rebootServer = request => this.client.fetch({
3185
3185
  body: JSON.stringify(marshalRebootServerRequest(request, this.client.settings)),
3186
- headers: jsonContentHeaders$u,
3186
+ headers: jsonContentHeaders$v,
3187
3187
  method: 'POST',
3188
3188
  path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/reboot`
3189
3189
  }, unmarshalServer$2);
@@ -3196,7 +3196,7 @@ let API$w = class API extends API$z {
3196
3196
  */
3197
3197
  startServer = request => this.client.fetch({
3198
3198
  body: JSON.stringify(marshalStartServerRequest(request, this.client.settings)),
3199
- headers: jsonContentHeaders$u,
3199
+ headers: jsonContentHeaders$v,
3200
3200
  method: 'POST',
3201
3201
  path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/start`
3202
3202
  }, unmarshalServer$2);
@@ -3211,7 +3211,7 @@ let API$w = class API extends API$z {
3211
3211
  */
3212
3212
  stopServer = request => this.client.fetch({
3213
3213
  body: '{}',
3214
- headers: jsonContentHeaders$u,
3214
+ headers: jsonContentHeaders$v,
3215
3215
  method: 'POST',
3216
3216
  path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/stop`
3217
3217
  }, unmarshalServer$2);
@@ -3249,7 +3249,7 @@ let API$w = class API extends API$z {
3249
3249
  */
3250
3250
  startBMCAccess = request => this.client.fetch({
3251
3251
  body: JSON.stringify(marshalStartBMCAccessRequest$1(request, this.client.settings)),
3252
- headers: jsonContentHeaders$u,
3252
+ headers: jsonContentHeaders$v,
3253
3253
  method: 'POST',
3254
3254
  path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/bmc-access`
3255
3255
  }, unmarshalBMCAccess$1);
@@ -3287,7 +3287,7 @@ let API$w = class API extends API$z {
3287
3287
  */
3288
3288
  updateIP = request => this.client.fetch({
3289
3289
  body: JSON.stringify(marshalUpdateIPRequest$2(request, this.client.settings)),
3290
- headers: jsonContentHeaders$u,
3290
+ headers: jsonContentHeaders$v,
3291
3291
  method: 'PATCH',
3292
3292
  path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/ips/${validatePathParam('ipId', request.ipId)}`
3293
3293
  }, unmarshalIP$3);
@@ -3301,7 +3301,7 @@ let API$w = class API extends API$z {
3301
3301
  */
3302
3302
  addOptionServer = request => this.client.fetch({
3303
3303
  body: JSON.stringify(marshalAddOptionServerRequest(request, this.client.settings)),
3304
- headers: jsonContentHeaders$u,
3304
+ headers: jsonContentHeaders$v,
3305
3305
  method: 'POST',
3306
3306
  path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/options/${validatePathParam('optionId', request.optionId)}`
3307
3307
  }, unmarshalServer$2);
@@ -3386,7 +3386,7 @@ let API$w = class API extends API$z {
3386
3386
  */
3387
3387
  updateSetting = request => this.client.fetch({
3388
3388
  body: JSON.stringify(marshalUpdateSettingRequest(request, this.client.settings)),
3389
- headers: jsonContentHeaders$u,
3389
+ headers: jsonContentHeaders$v,
3390
3390
  method: 'PATCH',
3391
3391
  path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/settings/${validatePathParam('settingId', request.settingId)}`
3392
3392
  }, unmarshalSetting);
@@ -3431,7 +3431,7 @@ class PrivateNetworkAPI extends API$z {
3431
3431
  */
3432
3432
  addServerPrivateNetwork = request => this.client.fetch({
3433
3433
  body: JSON.stringify(marshalPrivateNetworkApiAddServerPrivateNetworkRequest(request, this.client.settings)),
3434
- headers: jsonContentHeaders$u,
3434
+ headers: jsonContentHeaders$v,
3435
3435
  method: 'POST',
3436
3436
  path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private-networks`
3437
3437
  }, unmarshalServerPrivateNetwork);
@@ -3445,7 +3445,7 @@ class PrivateNetworkAPI extends API$z {
3445
3445
  */
3446
3446
  setServerPrivateNetworks = request => this.client.fetch({
3447
3447
  body: JSON.stringify(marshalPrivateNetworkApiSetServerPrivateNetworksRequest(request, this.client.settings)),
3448
- headers: jsonContentHeaders$u,
3448
+ headers: jsonContentHeaders$v,
3449
3449
  method: 'PUT',
3450
3450
  path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private-networks`
3451
3451
  }, unmarshalSetServerPrivateNetworksResponse);
@@ -3606,7 +3606,7 @@ const UpdateServerRequest$1 = {
3606
3606
  }
3607
3607
  };
3608
3608
 
3609
- var validationRules_gen$f = /*#__PURE__*/Object.freeze({
3609
+ var validationRules_gen$h = /*#__PURE__*/Object.freeze({
3610
3610
  __proto__: null,
3611
3611
  CreateServerRequest: CreateServerRequest,
3612
3612
  CreateServerRequestInstall: CreateServerRequestInstall,
@@ -3627,7 +3627,7 @@ var index$y = /*#__PURE__*/Object.freeze({
3627
3627
  SERVER_INSTALL_TRANSIENT_STATUSES: SERVER_INSTALL_TRANSIENT_STATUSES$1,
3628
3628
  SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES: SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES,
3629
3629
  SERVER_TRANSIENT_STATUSES: SERVER_TRANSIENT_STATUSES$2,
3630
- ValidationRules: validationRules_gen$f
3630
+ ValidationRules: validationRules_gen$h
3631
3631
  });
3632
3632
 
3633
3633
  var index$x = /*#__PURE__*/Object.freeze({
@@ -3796,7 +3796,7 @@ let API$v = class API extends API$z {
3796
3796
  // This file was automatically generated. DO NOT EDIT.
3797
3797
  // If you have any remark or suggestion do not hesitate to open an issue.
3798
3798
 
3799
- var index_gen$u = /*#__PURE__*/Object.freeze({
3799
+ var index_gen$v = /*#__PURE__*/Object.freeze({
3800
3800
  __proto__: null,
3801
3801
  API: API$v
3802
3802
  });
@@ -4044,15 +4044,15 @@ let API$u = class API extends API$z {
4044
4044
  // This file was automatically generated. DO NOT EDIT.
4045
4045
  // If you have any remark or suggestion do not hesitate to open an issue.
4046
4046
 
4047
- var index_gen$t = /*#__PURE__*/Object.freeze({
4047
+ var index_gen$u = /*#__PURE__*/Object.freeze({
4048
4048
  __proto__: null,
4049
4049
  API: API$u
4050
4050
  });
4051
4051
 
4052
4052
  var index$w = /*#__PURE__*/Object.freeze({
4053
4053
  __proto__: null,
4054
- v2alpha1: index_gen$u,
4055
- v2beta1: index_gen$t
4054
+ v2alpha1: index_gen$v,
4055
+ v2beta1: index_gen$u
4056
4056
  });
4057
4057
 
4058
4058
  // This file was automatically generated. DO NOT EDIT.
@@ -4222,7 +4222,7 @@ const marshalUpdateVolumeRequest$2 = (request, defaults) => ({
4222
4222
 
4223
4223
  // This file was automatically generated. DO NOT EDIT.
4224
4224
  // If you have any remark or suggestion do not hesitate to open an issue.
4225
- const jsonContentHeaders$t = {
4225
+ const jsonContentHeaders$u = {
4226
4226
  'Content-Type': 'application/json; charset=utf-8'
4227
4227
  };
4228
4228
 
@@ -4265,202 +4265,972 @@ let API$t = class API extends API$z {
4265
4265
  listVolumes = (request = {}) => enrichForPagination('volumes', this.pageOfListVolumes, request);
4266
4266
 
4267
4267
  /**
4268
- * Create a volume. To create a new volume from scratch, you must specify
4269
- * `from_empty` and the `size`. To create a volume from an existing snapshot,
4270
- * specify `from_snapshot` and the `snapshot_id` in the request payload
4271
- * instead, size is optional and can be specified if you need to extend the
4272
- * original size. The volume will take on the same volume class and underlying
4273
- * IOPS limitations as the original snapshot.
4268
+ * Create a volume. To create a new volume from scratch, you must specify
4269
+ * `from_empty` and the `size`. To create a volume from an existing snapshot,
4270
+ * specify `from_snapshot` and the `snapshot_id` in the request payload
4271
+ * instead, size is optional and can be specified if you need to extend the
4272
+ * original size. The volume will take on the same volume class and underlying
4273
+ * IOPS limitations as the original snapshot.
4274
+ *
4275
+ * @param request - The request {@link CreateVolumeRequest}
4276
+ * @returns A Promise of Volume
4277
+ */
4278
+ createVolume = request => this.client.fetch({
4279
+ body: JSON.stringify(marshalCreateVolumeRequest$2(request, this.client.settings)),
4280
+ headers: jsonContentHeaders$u,
4281
+ method: 'POST',
4282
+ path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes`
4283
+ }, unmarshalVolume$4);
4284
+
4285
+ /**
4286
+ * Get a volume. Retrieve technical information about a specific volume.
4287
+ * Details such as size, type, and status are returned in the response.
4288
+ *
4289
+ * @param request - The request {@link GetVolumeRequest}
4290
+ * @returns A Promise of Volume
4291
+ */
4292
+ getVolume = request => this.client.fetch({
4293
+ method: 'GET',
4294
+ path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
4295
+ }, unmarshalVolume$4);
4296
+
4297
+ /**
4298
+ * Waits for {@link Volume} to be in a final state.
4299
+ *
4300
+ * @param request - The request {@link GetVolumeRequest}
4301
+ * @param options - The waiting options
4302
+ * @returns A Promise of Volume
4303
+ */
4304
+ waitForVolume = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!VOLUME_TRANSIENT_STATUSES$1.includes(res.status))), this.getVolume, request, options);
4305
+
4306
+ /**
4307
+ * Delete a detached volume. You must specify the `volume_id` of the volume
4308
+ * you want to delete. The volume must not be in the `in_use` status.
4309
+ *
4310
+ * @param request - The request {@link DeleteVolumeRequest}
4311
+ */
4312
+ deleteVolume = request => this.client.fetch({
4313
+ method: 'DELETE',
4314
+ path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
4315
+ });
4316
+
4317
+ /**
4318
+ * Update a volume. Update the technical details of a volume, such as its
4319
+ * name, tags, or its new size and `volume_type` (within the same Block
4320
+ * Storage class). You can only resize a volume to a larger size. It is
4321
+ * currently not possible to change your Block Storage Class.
4322
+ *
4323
+ * @param request - The request {@link UpdateVolumeRequest}
4324
+ * @returns A Promise of Volume
4325
+ */
4326
+ updateVolume = request => this.client.fetch({
4327
+ body: JSON.stringify(marshalUpdateVolumeRequest$2(request, this.client.settings)),
4328
+ headers: jsonContentHeaders$u,
4329
+ method: 'PATCH',
4330
+ path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
4331
+ }, unmarshalVolume$4);
4332
+ pageOfListSnapshots = (request = {}) => this.client.fetch({
4333
+ method: 'GET',
4334
+ path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots`,
4335
+ urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId], ['volume_id', request.volumeId])
4336
+ }, unmarshalListSnapshotsResponse$3);
4337
+
4338
+ /**
4339
+ * List all snapshots. List all available snapshots in a specified zone. By
4340
+ * default, the snapshots listed are ordered by creation date in ascending
4341
+ * order. This can be modified via the `order_by` field.
4342
+ *
4343
+ * @param request - The request {@link ListSnapshotsRequest}
4344
+ * @returns A Promise of ListSnapshotsResponse
4345
+ */
4346
+ listSnapshots = (request = {}) => enrichForPagination('snapshots', this.pageOfListSnapshots, request);
4347
+
4348
+ /**
4349
+ * Get a snapshot. Retrieve technical information about a specific snapshot.
4350
+ * Details such as size, volume type, and status are returned in the
4351
+ * response.
4352
+ *
4353
+ * @param request - The request {@link GetSnapshotRequest}
4354
+ * @returns A Promise of Snapshot
4355
+ */
4356
+ getSnapshot = request => this.client.fetch({
4357
+ method: 'GET',
4358
+ path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
4359
+ }, unmarshalSnapshot$3);
4360
+
4361
+ /**
4362
+ * Waits for {@link Snapshot} to be in a final state.
4363
+ *
4364
+ * @param request - The request {@link GetSnapshotRequest}
4365
+ * @param options - The waiting options
4366
+ * @returns A Promise of Snapshot
4367
+ */
4368
+ waitForSnapshot = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!SNAPSHOT_TRANSIENT_STATUSES$3.includes(res.status))), this.getSnapshot, request, options);
4369
+
4370
+ /**
4371
+ * Create a snapshot of a volume. To create a snapshot, the volume must be in
4372
+ * the `in_use` or the `available` status. If your volume is in a transient
4373
+ * state, you need to wait until the end of the current operation.
4374
+ *
4375
+ * @param request - The request {@link CreateSnapshotRequest}
4376
+ * @returns A Promise of Snapshot
4377
+ */
4378
+ createSnapshot = request => this.client.fetch({
4379
+ body: JSON.stringify(marshalCreateSnapshotRequest$3(request, this.client.settings)),
4380
+ headers: jsonContentHeaders$u,
4381
+ method: 'POST',
4382
+ path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots`
4383
+ }, unmarshalSnapshot$3);
4384
+
4385
+ /**
4386
+ * Delete a snapshot. You must specify the `snapshot_id` of the snapshot you
4387
+ * want to delete. The snapshot must not be in use.
4388
+ *
4389
+ * @param request - The request {@link DeleteSnapshotRequest}
4390
+ */
4391
+ deleteSnapshot = request => this.client.fetch({
4392
+ method: 'DELETE',
4393
+ path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
4394
+ });
4395
+
4396
+ /**
4397
+ * Update a snapshot. Update the name or tags of the snapshot.
4398
+ *
4399
+ * @param request - The request {@link UpdateSnapshotRequest}
4400
+ * @returns A Promise of Snapshot
4401
+ */
4402
+ updateSnapshot = request => this.client.fetch({
4403
+ body: JSON.stringify(marshalUpdateSnapshotRequest$3(request, this.client.settings)),
4404
+ headers: jsonContentHeaders$u,
4405
+ method: 'PATCH',
4406
+ path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
4407
+ }, unmarshalSnapshot$3);
4408
+ };
4409
+
4410
+ // This file was automatically generated. DO NOT EDIT.
4411
+ // If you have any remark or suggestion do not hesitate to open an issue.
4412
+
4413
+ const CreateSnapshotRequest = {
4414
+ name: {
4415
+ minLength: 1
4416
+ }
4417
+ };
4418
+ const CreateVolumeRequest = {
4419
+ name: {
4420
+ minLength: 1
4421
+ }
4422
+ };
4423
+ const ListSnapshotsRequest = {
4424
+ page: {
4425
+ greaterThan: 0
4426
+ },
4427
+ pageSize: {
4428
+ greaterThan: 0,
4429
+ lessThanOrEqual: 100
4430
+ }
4431
+ };
4432
+ const ListVolumeTypesRequest = {
4433
+ page: {
4434
+ greaterThan: 0
4435
+ },
4436
+ pageSize: {
4437
+ greaterThan: 0,
4438
+ lessThanOrEqual: 100
4439
+ }
4440
+ };
4441
+ const ListVolumesRequest = {
4442
+ page: {
4443
+ greaterThan: 0
4444
+ },
4445
+ pageSize: {
4446
+ greaterThan: 0,
4447
+ lessThanOrEqual: 100
4448
+ }
4449
+ };
4450
+ const Reference = {
4451
+ productResourceType: {
4452
+ minLength: 1
4453
+ }
4454
+ };
4455
+
4456
+ var validationRules_gen$g = /*#__PURE__*/Object.freeze({
4457
+ __proto__: null,
4458
+ CreateSnapshotRequest: CreateSnapshotRequest,
4459
+ CreateVolumeRequest: CreateVolumeRequest,
4460
+ ListSnapshotsRequest: ListSnapshotsRequest,
4461
+ ListVolumeTypesRequest: ListVolumeTypesRequest,
4462
+ ListVolumesRequest: ListVolumesRequest,
4463
+ Reference: Reference
4464
+ });
4465
+
4466
+ // This file was automatically generated. DO NOT EDIT.
4467
+ // If you have any remark or suggestion do not hesitate to open an issue.
4468
+
4469
+ var index_gen$t = /*#__PURE__*/Object.freeze({
4470
+ __proto__: null,
4471
+ API: API$t,
4472
+ REFERENCE_TRANSIENT_STATUSES: REFERENCE_TRANSIENT_STATUSES,
4473
+ SNAPSHOT_TRANSIENT_STATUSES: SNAPSHOT_TRANSIENT_STATUSES$3,
4474
+ VOLUME_TRANSIENT_STATUSES: VOLUME_TRANSIENT_STATUSES$1,
4475
+ ValidationRules: validationRules_gen$g
4476
+ });
4477
+
4478
+ var index$v = /*#__PURE__*/Object.freeze({
4479
+ __proto__: null,
4480
+ v1alpha1: index_gen$t
4481
+ });
4482
+
4483
+ // This file was automatically generated. DO NOT EDIT.
4484
+ // If you have any remark or suggestion do not hesitate to open an issue.
4485
+ const unmarshalContactPointEmail$1 = data => {
4486
+ if (!isJSONObject(data)) {
4487
+ throw new TypeError(`Unmarshalling the type 'ContactPointEmail' failed as data isn't a dictionary.`);
4488
+ }
4489
+ return {
4490
+ to: data.to
4491
+ };
4492
+ };
4493
+ const unmarshalContactPoint$1 = data => {
4494
+ if (!isJSONObject(data)) {
4495
+ throw new TypeError(`Unmarshalling the type 'ContactPoint' failed as data isn't a dictionary.`);
4496
+ }
4497
+ return {
4498
+ email: data.email ? unmarshalContactPointEmail$1(data.email) : undefined,
4499
+ region: data.region
4500
+ };
4501
+ };
4502
+ const unmarshalDataSource = data => {
4503
+ if (!isJSONObject(data)) {
4504
+ throw new TypeError(`Unmarshalling the type 'DataSource' failed as data isn't a dictionary.`);
4505
+ }
4506
+ return {
4507
+ createdAt: unmarshalDate(data.created_at),
4508
+ id: data.id,
4509
+ name: data.name,
4510
+ origin: data.origin,
4511
+ projectId: data.project_id,
4512
+ region: data.region,
4513
+ synchronizedWithGrafana: data.synchronized_with_grafana,
4514
+ type: data.type,
4515
+ updatedAt: unmarshalDate(data.updated_at),
4516
+ url: data.url
4517
+ };
4518
+ };
4519
+ const unmarshalGrafanaProductDashboard$1 = data => {
4520
+ if (!isJSONObject(data)) {
4521
+ throw new TypeError(`Unmarshalling the type 'GrafanaProductDashboard' failed as data isn't a dictionary.`);
4522
+ }
4523
+ return {
4524
+ name: data.name,
4525
+ tags: data.tags,
4526
+ title: data.title,
4527
+ url: data.url,
4528
+ variables: data.variables
4529
+ };
4530
+ };
4531
+ const unmarshalGrafanaUser$1 = data => {
4532
+ if (!isJSONObject(data)) {
4533
+ throw new TypeError(`Unmarshalling the type 'GrafanaUser' failed as data isn't a dictionary.`);
4534
+ }
4535
+ return {
4536
+ id: data.id,
4537
+ login: data.login,
4538
+ password: data.password,
4539
+ role: data.role
4540
+ };
4541
+ };
4542
+ const unmarshalPlan$1 = data => {
4543
+ if (!isJSONObject(data)) {
4544
+ throw new TypeError(`Unmarshalling the type 'Plan' failed as data isn't a dictionary.`);
4545
+ }
4546
+ return {
4547
+ logsIngestionPrice: data.logs_ingestion_price,
4548
+ monthlyPrice: data.monthly_price,
4549
+ name: data.name,
4550
+ retentionLogsInterval: data.retention_logs_interval,
4551
+ retentionMetricsInterval: data.retention_metrics_interval,
4552
+ retentionTracesInterval: data.retention_traces_interval,
4553
+ sampleIngestionPrice: data.sample_ingestion_price,
4554
+ tracesIngestionPrice: data.traces_ingestion_price
4555
+ };
4556
+ };
4557
+ const unmarshalToken$3 = data => {
4558
+ if (!isJSONObject(data)) {
4559
+ throw new TypeError(`Unmarshalling the type 'Token' failed as data isn't a dictionary.`);
4560
+ }
4561
+ return {
4562
+ createdAt: unmarshalDate(data.created_at),
4563
+ id: data.id,
4564
+ name: data.name,
4565
+ projectId: data.project_id,
4566
+ region: data.region,
4567
+ scopes: data.scopes,
4568
+ secretKey: data.secret_key,
4569
+ updatedAt: unmarshalDate(data.updated_at)
4570
+ };
4571
+ };
4572
+ const unmarshalAlertManager = data => {
4573
+ if (!isJSONObject(data)) {
4574
+ throw new TypeError(`Unmarshalling the type 'AlertManager' failed as data isn't a dictionary.`);
4575
+ }
4576
+ return {
4577
+ alertManagerEnabled: data.alert_manager_enabled,
4578
+ alertManagerUrl: data.alert_manager_url,
4579
+ managedAlertsEnabled: data.managed_alerts_enabled,
4580
+ region: data.region
4581
+ };
4582
+ };
4583
+ const unmarshalGrafana = data => {
4584
+ if (!isJSONObject(data)) {
4585
+ throw new TypeError(`Unmarshalling the type 'Grafana' failed as data isn't a dictionary.`);
4586
+ }
4587
+ return {
4588
+ grafanaUrl: data.grafana_url
4589
+ };
4590
+ };
4591
+ const unmarshalListContactPointsResponse$1 = data => {
4592
+ if (!isJSONObject(data)) {
4593
+ throw new TypeError(`Unmarshalling the type 'ListContactPointsResponse' failed as data isn't a dictionary.`);
4594
+ }
4595
+ return {
4596
+ contactPoints: unmarshalArrayOfObject(data.contact_points, unmarshalContactPoint$1),
4597
+ hasAdditionalContactPoints: data.has_additional_contact_points,
4598
+ hasAdditionalReceivers: data.has_additional_receivers,
4599
+ totalCount: data.total_count
4600
+ };
4601
+ };
4602
+ const unmarshalListDataSourcesResponse = data => {
4603
+ if (!isJSONObject(data)) {
4604
+ throw new TypeError(`Unmarshalling the type 'ListDataSourcesResponse' failed as data isn't a dictionary.`);
4605
+ }
4606
+ return {
4607
+ dataSources: unmarshalArrayOfObject(data.data_sources, unmarshalDataSource),
4608
+ totalCount: data.total_count
4609
+ };
4610
+ };
4611
+ const unmarshalListGrafanaProductDashboardsResponse$1 = data => {
4612
+ if (!isJSONObject(data)) {
4613
+ throw new TypeError(`Unmarshalling the type 'ListGrafanaProductDashboardsResponse' failed as data isn't a dictionary.`);
4614
+ }
4615
+ return {
4616
+ dashboards: unmarshalArrayOfObject(data.dashboards, unmarshalGrafanaProductDashboard$1),
4617
+ totalCount: data.total_count
4618
+ };
4619
+ };
4620
+ const unmarshalListGrafanaUsersResponse$1 = data => {
4621
+ if (!isJSONObject(data)) {
4622
+ throw new TypeError(`Unmarshalling the type 'ListGrafanaUsersResponse' failed as data isn't a dictionary.`);
4623
+ }
4624
+ return {
4625
+ grafanaUsers: unmarshalArrayOfObject(data.grafana_users, unmarshalGrafanaUser$1),
4626
+ totalCount: data.total_count
4627
+ };
4628
+ };
4629
+ const unmarshalListPlansResponse$1 = data => {
4630
+ if (!isJSONObject(data)) {
4631
+ throw new TypeError(`Unmarshalling the type 'ListPlansResponse' failed as data isn't a dictionary.`);
4632
+ }
4633
+ return {
4634
+ plans: unmarshalArrayOfObject(data.plans, unmarshalPlan$1),
4635
+ totalCount: data.total_count
4636
+ };
4637
+ };
4638
+ const unmarshalListTokensResponse$3 = data => {
4639
+ if (!isJSONObject(data)) {
4640
+ throw new TypeError(`Unmarshalling the type 'ListTokensResponse' failed as data isn't a dictionary.`);
4641
+ }
4642
+ return {
4643
+ tokens: unmarshalArrayOfObject(data.tokens, unmarshalToken$3),
4644
+ totalCount: data.total_count
4645
+ };
4646
+ };
4647
+ const unmarshalUsage = data => {
4648
+ if (!isJSONObject(data)) {
4649
+ throw new TypeError(`Unmarshalling the type 'Usage' failed as data isn't a dictionary.`);
4650
+ }
4651
+ return {
4652
+ dataSourceId: data.data_source_id,
4653
+ dataSourceOrigin: data.data_source_origin,
4654
+ dataSourceType: data.data_source_type,
4655
+ interval: data.interval,
4656
+ projectId: data.project_id,
4657
+ quantityOverInterval: data.quantity_over_interval,
4658
+ region: data.region,
4659
+ unit: data.unit
4660
+ };
4661
+ };
4662
+ const unmarshalUsageOverview = data => {
4663
+ if (!isJSONObject(data)) {
4664
+ throw new TypeError(`Unmarshalling the type 'UsageOverview' failed as data isn't a dictionary.`);
4665
+ }
4666
+ return {
4667
+ externalLogsUsage: data.external_logs_usage ? unmarshalUsage(data.external_logs_usage) : undefined,
4668
+ externalMetricsUsage: data.external_metrics_usage ? unmarshalUsage(data.external_metrics_usage) : undefined,
4669
+ externalTracesUsage: data.external_traces_usage ? unmarshalUsage(data.external_traces_usage) : undefined,
4670
+ scalewayLogsUsage: data.scaleway_logs_usage ? unmarshalUsage(data.scaleway_logs_usage) : undefined,
4671
+ scalewayMetricsUsage: data.scaleway_metrics_usage ? unmarshalUsage(data.scaleway_metrics_usage) : undefined
4672
+ };
4673
+ };
4674
+ const marshalGlobalApiCreateGrafanaUserRequest = (request, defaults) => ({
4675
+ login: request.login,
4676
+ project_id: request.projectId ?? defaults.defaultProjectId,
4677
+ role: request.role
4678
+ });
4679
+ const marshalGlobalApiResetGrafanaUserPasswordRequest = (request, defaults) => ({
4680
+ project_id: request.projectId ?? defaults.defaultProjectId
4681
+ });
4682
+ const marshalGlobalApiSelectPlanRequest = (request, defaults) => ({
4683
+ plan_name: request.planName,
4684
+ project_id: request.projectId ?? defaults.defaultProjectId
4685
+ });
4686
+ const marshalGlobalApiSyncGrafanaDataSourcesRequest = (request, defaults) => ({
4687
+ project_id: request.projectId ?? defaults.defaultProjectId
4688
+ });
4689
+ const marshalContactPointEmail$1 = (request, defaults) => ({
4690
+ to: request.to
4691
+ });
4692
+ const marshalRegionalApiCreateContactPointRequest = (request, defaults) => ({
4693
+ project_id: request.projectId ?? defaults.defaultProjectId,
4694
+ ...resolveOneOf([{
4695
+ param: 'email',
4696
+ value: request.email !== undefined ? marshalContactPointEmail$1(request.email) : undefined
4697
+ }])
4698
+ });
4699
+ const marshalRegionalApiCreateDataSourceRequest = (request, defaults) => ({
4700
+ name: request.name,
4701
+ project_id: request.projectId ?? defaults.defaultProjectId,
4702
+ type: request.type
4703
+ });
4704
+ const marshalRegionalApiCreateTokenRequest = (request, defaults) => ({
4705
+ name: request.name,
4706
+ project_id: request.projectId ?? defaults.defaultProjectId,
4707
+ token_scopes: request.tokenScopes !== undefined ? request.tokenScopes : undefined
4708
+ });
4709
+ const marshalRegionalApiDeleteContactPointRequest = (request, defaults) => ({
4710
+ project_id: request.projectId ?? defaults.defaultProjectId,
4711
+ ...resolveOneOf([{
4712
+ param: 'email',
4713
+ value: request.email !== undefined ? marshalContactPointEmail$1(request.email) : undefined
4714
+ }])
4715
+ });
4716
+ const marshalRegionalApiDisableAlertManagerRequest = (request, defaults) => ({
4717
+ project_id: request.projectId ?? defaults.defaultProjectId
4718
+ });
4719
+ const marshalRegionalApiDisableManagedAlertsRequest = (request, defaults) => ({
4720
+ project_id: request.projectId ?? defaults.defaultProjectId
4721
+ });
4722
+ const marshalRegionalApiEnableAlertManagerRequest = (request, defaults) => ({
4723
+ project_id: request.projectId ?? defaults.defaultProjectId
4724
+ });
4725
+ const marshalRegionalApiEnableManagedAlertsRequest = (request, defaults) => ({
4726
+ project_id: request.projectId ?? defaults.defaultProjectId
4727
+ });
4728
+ const marshalRegionalApiTriggerTestAlertRequest = (request, defaults) => ({
4729
+ project_id: request.projectId ?? defaults.defaultProjectId
4730
+ });
4731
+
4732
+ // This file was automatically generated. DO NOT EDIT.
4733
+ // If you have any remark or suggestion do not hesitate to open an issue.
4734
+ const jsonContentHeaders$t = {
4735
+ 'Content-Type': 'application/json; charset=utf-8'
4736
+ };
4737
+
4738
+ /**
4739
+ * Cockpit Global API.
4740
+ *
4741
+ * The Cockpit Global API allows you to manage your Cockpit's Grafana and plans.
4742
+ */
4743
+ class GlobalAPI extends API$z {
4744
+ /**
4745
+ * Get your Cockpit's Grafana. Retrieve information on your Cockpit's Grafana,
4746
+ * specified by the ID of the Project the Cockpit belongs to. The output
4747
+ * returned displays the URL to access your Cockpit's Grafana.
4748
+ *
4749
+ * @param request - The request {@link GlobalApiGetGrafanaRequest}
4750
+ * @returns A Promise of Grafana
4751
+ */
4752
+ getGrafana = (request = {}) => this.client.fetch({
4753
+ method: 'GET',
4754
+ path: `/cockpit/v1/grafana`,
4755
+ urlParams: urlParams(['project_id', request.projectId ?? this.client.settings.defaultProjectId])
4756
+ }, unmarshalGrafana);
4757
+
4758
+ /**
4759
+ * Synchronize Grafana data sources. Trigger the synchronization of all your
4760
+ * data sources and the alert manager in the relevant regions. The alert
4761
+ * manager will only be synchronized if you have enabled it.
4762
+ *
4763
+ * @param request - The request {@link GlobalApiSyncGrafanaDataSourcesRequest}
4764
+ */
4765
+ syncGrafanaDataSources = (request = {}) => this.client.fetch({
4766
+ body: JSON.stringify(marshalGlobalApiSyncGrafanaDataSourcesRequest(request, this.client.settings)),
4767
+ headers: jsonContentHeaders$t,
4768
+ method: 'POST',
4769
+ path: `/cockpit/v1/grafana/sync-data-sources`
4770
+ });
4771
+
4772
+ /**
4773
+ * Create a Grafana user. Create a Grafana user to connect to your Cockpit's
4774
+ * Grafana. Upon creation, your user password displays only once, so make sure
4775
+ * that you save it. Each Grafana user is associated with a role: viewer or
4776
+ * editor. A viewer can only view dashboards, whereas an editor can create and
4777
+ * edit dashboards. Note that the `admin` username is not available for
4778
+ * creation.
4779
+ *
4780
+ * @param request - The request {@link GlobalApiCreateGrafanaUserRequest}
4781
+ * @returns A Promise of GrafanaUser
4782
+ */
4783
+ createGrafanaUser = request => this.client.fetch({
4784
+ body: JSON.stringify(marshalGlobalApiCreateGrafanaUserRequest(request, this.client.settings)),
4785
+ headers: jsonContentHeaders$t,
4786
+ method: 'POST',
4787
+ path: `/cockpit/v1/grafana/users`
4788
+ }, unmarshalGrafanaUser$1);
4789
+ pageOfListGrafanaUsers = (request = {}) => this.client.fetch({
4790
+ method: 'GET',
4791
+ path: `/cockpit/v1/grafana/users`,
4792
+ urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId ?? this.client.settings.defaultProjectId])
4793
+ }, unmarshalListGrafanaUsersResponse$1);
4794
+
4795
+ /**
4796
+ * List Grafana users. List all Grafana users created in your Cockpit's
4797
+ * Grafana. By default, the Grafana users returned in the list are ordered in
4798
+ * ascending order.
4799
+ *
4800
+ * @param request - The request {@link GlobalApiListGrafanaUsersRequest}
4801
+ * @returns A Promise of ListGrafanaUsersResponse
4802
+ */
4803
+ listGrafanaUsers = (request = {}) => enrichForPagination('grafanaUsers', this.pageOfListGrafanaUsers, request);
4804
+
4805
+ /**
4806
+ * Delete a Grafana user. Delete a Grafana user from your Cockpit's Grafana,
4807
+ * specified by the ID of the Project the Cockpit belongs to, and the ID of
4808
+ * the Grafana user.
4809
+ *
4810
+ * @param request - The request {@link GlobalApiDeleteGrafanaUserRequest}
4811
+ */
4812
+ deleteGrafanaUser = request => this.client.fetch({
4813
+ method: 'DELETE',
4814
+ path: `/cockpit/v1/grafana/users/${validatePathParam('grafanaUserId', request.grafanaUserId)}`,
4815
+ urlParams: urlParams(['project_id', request.projectId ?? this.client.settings.defaultProjectId])
4816
+ });
4817
+
4818
+ /**
4819
+ * Reset a Grafana user password. Reset the password of a Grafana user,
4820
+ * specified by the ID of the Project the Cockpit belongs to, and the ID of
4821
+ * the Grafana user. A new password regenerates and only displays once. Make
4822
+ * sure that you save it.
4823
+ *
4824
+ * @param request - The request
4825
+ * {@link GlobalApiResetGrafanaUserPasswordRequest}
4826
+ * @returns A Promise of GrafanaUser
4827
+ */
4828
+ resetGrafanaUserPassword = request => this.client.fetch({
4829
+ body: JSON.stringify(marshalGlobalApiResetGrafanaUserPasswordRequest(request, this.client.settings)),
4830
+ headers: jsonContentHeaders$t,
4831
+ method: 'POST',
4832
+ path: `/cockpit/v1/grafana/users/${validatePathParam('grafanaUserId', request.grafanaUserId)}/reset-password`
4833
+ }, unmarshalGrafanaUser$1);
4834
+ pageOfListGrafanaProductDashboards = (request = {}) => this.client.fetch({
4835
+ method: 'GET',
4836
+ path: `/cockpit/v1/grafana/product-dashboards`,
4837
+ urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId ?? this.client.settings.defaultProjectId], ['tags', request.tags])
4838
+ }, unmarshalListGrafanaProductDashboardsResponse$1);
4839
+
4840
+ /**
4841
+ * List Scaleway resources dashboards. Retrieve a list of available dashboards
4842
+ * in Grafana, for all Scaleway resources which are integrated with Cockpit.
4843
+ *
4844
+ * @param request - The request
4845
+ * {@link GlobalApiListGrafanaProductDashboardsRequest}
4846
+ * @returns A Promise of ListGrafanaProductDashboardsResponse
4847
+ */
4848
+ listGrafanaProductDashboards = (request = {}) => enrichForPagination('dashboards', this.pageOfListGrafanaProductDashboards, request);
4849
+
4850
+ /**
4851
+ * Get Scaleway resource dashboard. Retrieve information about the dashboard
4852
+ * of a Scaleway resource in Grafana, specified by the ID of the Project the
4853
+ * Cockpit belongs to, and the name of the dashboard.
4854
+ *
4855
+ * @param request - The request
4856
+ * {@link GlobalApiGetGrafanaProductDashboardRequest}
4857
+ * @returns A Promise of GrafanaProductDashboard
4858
+ */
4859
+ getGrafanaProductDashboard = request => this.client.fetch({
4860
+ method: 'GET',
4861
+ path: `/cockpit/v1/grafana/product-dashboards/${validatePathParam('dashboardName', request.dashboardName)}`,
4862
+ urlParams: urlParams(['project_id', request.projectId ?? this.client.settings.defaultProjectId])
4863
+ }, unmarshalGrafanaProductDashboard$1);
4864
+ pageOfListPlans = (request = {}) => this.client.fetch({
4865
+ method: 'GET',
4866
+ path: `/cockpit/v1/plans`,
4867
+ urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
4868
+ }, unmarshalListPlansResponse$1);
4869
+
4870
+ /**
4871
+ * List plan types. Retrieve a list of available pricing plan types.
4872
+ *
4873
+ * @param request - The request {@link GlobalApiListPlansRequest}
4874
+ * @returns A Promise of ListPlansResponse
4875
+ */
4876
+ listPlans = (request = {}) => enrichForPagination('plans', this.pageOfListPlans, request);
4877
+
4878
+ /**
4879
+ * Apply a pricing plan. Apply a pricing plan on a given Project. You must
4880
+ * specify the ID of the pricing plan type. Note that you will be billed for
4881
+ * the plan you apply.
4882
+ *
4883
+ * @param request - The request {@link GlobalApiSelectPlanRequest}
4884
+ * @returns A Promise of Plan
4885
+ */
4886
+ selectPlan = (request = {}) => this.client.fetch({
4887
+ body: JSON.stringify(marshalGlobalApiSelectPlanRequest(request, this.client.settings)),
4888
+ headers: jsonContentHeaders$t,
4889
+ method: 'PATCH',
4890
+ path: `/cockpit/v1/plans`
4891
+ }, unmarshalPlan$1);
4892
+
4893
+ /**
4894
+ * Get current plan. Retrieve a pricing plan for the given Project, specified
4895
+ * by the ID of the Project.
4896
+ *
4897
+ * @param request - The request {@link GlobalApiGetCurrentPlanRequest}
4898
+ * @returns A Promise of Plan
4899
+ */
4900
+ getCurrentPlan = (request = {}) => this.client.fetch({
4901
+ method: 'GET',
4902
+ path: `/cockpit/v1/current-plan`,
4903
+ urlParams: urlParams(['project_id', request.projectId ?? this.client.settings.defaultProjectId])
4904
+ }, unmarshalPlan$1);
4905
+ }
4906
+
4907
+ /**
4908
+ * Cockpit Regional API.
4909
+ *
4910
+ * The Cockpit Regional API allows you to create data sources and tokens to
4911
+ * store and query data types such as metrics, logs, and traces. You can also
4912
+ * push your data into Cockpit, and send alerts to your contact points when your
4913
+ * resources may require your attention, using the regional Alert manager.
4914
+ */
4915
+ class RegionalAPI extends API$z {
4916
+ /** Lists the available regions of the API. */
4917
+ static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
4918
+
4919
+ /**
4920
+ * Create a data source. You must specify the data source type upon creation.
4921
+ * Available data source types include:
4922
+ *
4923
+ * - Metrics
4924
+ * - Logs
4925
+ * - Traces The name of the data source will then be used as reference to name
4926
+ * the associated Grafana data source.
4927
+ *
4928
+ * @param request - The request {@link RegionalApiCreateDataSourceRequest}
4929
+ * @returns A Promise of DataSource
4930
+ */
4931
+ createDataSource = request => this.client.fetch({
4932
+ body: JSON.stringify(marshalRegionalApiCreateDataSourceRequest(request, this.client.settings)),
4933
+ headers: jsonContentHeaders$t,
4934
+ method: 'POST',
4935
+ path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/data-sources`
4936
+ }, unmarshalDataSource);
4937
+
4938
+ /**
4939
+ * Get a data source. Retrieve information about a given data source,
4940
+ * specified by the data source ID. The data source's information such as its
4941
+ * name, type, URL, origin, and retention period, is returned.
4942
+ *
4943
+ * @param request - The request {@link RegionalApiGetDataSourceRequest}
4944
+ * @returns A Promise of DataSource
4945
+ */
4946
+ getDataSource = request => this.client.fetch({
4947
+ method: 'GET',
4948
+ path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/data-sources/${validatePathParam('dataSourceId', request.dataSourceId)}`
4949
+ }, unmarshalDataSource);
4950
+
4951
+ /**
4952
+ * Delete a data source. Delete a given data source, specified by the data
4953
+ * source ID. Note that deleting a data source is irreversible, and cannot be
4954
+ * undone.
4955
+ *
4956
+ * @param request - The request {@link RegionalApiDeleteDataSourceRequest}
4957
+ */
4958
+ deleteDataSource = request => this.client.fetch({
4959
+ method: 'DELETE',
4960
+ path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/data-sources/${validatePathParam('dataSourceId', request.dataSourceId)}`
4961
+ });
4962
+ pageOfListDataSources = (request = {}) => this.client.fetch({
4963
+ method: 'GET',
4964
+ path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/data-sources`,
4965
+ urlParams: urlParams(['order_by', request.orderBy], ['origin', request.origin], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId ?? this.client.settings.defaultProjectId], ['types', request.types])
4966
+ }, unmarshalListDataSourcesResponse);
4967
+
4968
+ /**
4969
+ * List data sources. Retrieve the list of data sources available in the
4970
+ * specified region. By default, the data sources returned in the list are
4971
+ * ordered by creation date, in ascending order. You can list data sources by
4972
+ * Project, type and origin.
4973
+ *
4974
+ * @param request - The request {@link RegionalApiListDataSourcesRequest}
4975
+ * @returns A Promise of ListDataSourcesResponse
4976
+ */
4977
+ listDataSources = (request = {}) => enrichForPagination('dataSources', this.pageOfListDataSources, request);
4978
+
4979
+ /**
4980
+ * Get data source usage overview. Retrieve the data source usage overview per
4981
+ * type for the specified Project.
4982
+ *
4983
+ * @param request - The request {@link RegionalApiGetUsageOverviewRequest}
4984
+ * @returns A Promise of UsageOverview
4985
+ */
4986
+ getUsageOverview = (request = {}) => this.client.fetch({
4987
+ method: 'GET',
4988
+ path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/usage-overview`,
4989
+ urlParams: urlParams(['interval', request.interval], ['project_id', request.projectId ?? this.client.settings.defaultProjectId])
4990
+ }, unmarshalUsageOverview);
4991
+
4992
+ /**
4993
+ * Create a token. Give your token the relevant scopes to ensure it has the
4994
+ * right permissions to interact with your data sources and the Alert manager.
4995
+ * Make sure that you create your token in the same regions as the data
4996
+ * sources you want to use it for. Upon creation, your token's secret key
4997
+ * display only once. Make sure that you save it.
4274
4998
  *
4275
- * @param request - The request {@link CreateVolumeRequest}
4276
- * @returns A Promise of Volume
4999
+ * @param request - The request {@link RegionalApiCreateTokenRequest}
5000
+ * @returns A Promise of Token
4277
5001
  */
4278
- createVolume = request => this.client.fetch({
4279
- body: JSON.stringify(marshalCreateVolumeRequest$2(request, this.client.settings)),
5002
+ createToken = request => this.client.fetch({
5003
+ body: JSON.stringify(marshalRegionalApiCreateTokenRequest(request, this.client.settings)),
4280
5004
  headers: jsonContentHeaders$t,
4281
5005
  method: 'POST',
4282
- path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes`
4283
- }, unmarshalVolume$4);
5006
+ path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens`
5007
+ }, unmarshalToken$3);
5008
+ pageOfListTokens = (request = {}) => this.client.fetch({
5009
+ method: 'GET',
5010
+ path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens`,
5011
+ urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId ?? this.client.settings.defaultProjectId], ['token_scopes', request.tokenScopes])
5012
+ }, unmarshalListTokensResponse$3);
4284
5013
 
4285
5014
  /**
4286
- * Get a volume. Retrieve technical information about a specific volume.
4287
- * Details such as size, type, and status are returned in the response.
5015
+ * List tokens. Retrieve a list of all tokens in the specified region. By
5016
+ * default, tokens returned in the list are ordered by creation date, in
5017
+ * ascending order. You can filter tokens by Project ID and token scopes.
4288
5018
  *
4289
- * @param request - The request {@link GetVolumeRequest}
4290
- * @returns A Promise of Volume
5019
+ * @param request - The request {@link RegionalApiListTokensRequest}
5020
+ * @returns A Promise of ListTokensResponse
4291
5021
  */
4292
- getVolume = request => this.client.fetch({
4293
- method: 'GET',
4294
- path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
4295
- }, unmarshalVolume$4);
5022
+ listTokens = (request = {}) => enrichForPagination('tokens', this.pageOfListTokens, request);
4296
5023
 
4297
5024
  /**
4298
- * Waits for {@link Volume} to be in a final state.
5025
+ * Get a token. Retrieve information about a given token, specified by the
5026
+ * token ID. The token's information such as its scopes, is returned.
4299
5027
  *
4300
- * @param request - The request {@link GetVolumeRequest}
4301
- * @param options - The waiting options
4302
- * @returns A Promise of Volume
5028
+ * @param request - The request {@link RegionalApiGetTokenRequest}
5029
+ * @returns A Promise of Token
4303
5030
  */
4304
- waitForVolume = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!VOLUME_TRANSIENT_STATUSES$1.includes(res.status))), this.getVolume, request, options);
5031
+ getToken = request => this.client.fetch({
5032
+ method: 'GET',
5033
+ path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
5034
+ }, unmarshalToken$3);
4305
5035
 
4306
5036
  /**
4307
- * Delete a detached volume. You must specify the `volume_id` of the volume
4308
- * you want to delete. The volume must not be in the `in_use` status.
5037
+ * Delete a token. Delete a given token, specified by the token ID. Deleting a
5038
+ * token is irreversible and cannot be undone.
4309
5039
  *
4310
- * @param request - The request {@link DeleteVolumeRequest}
5040
+ * @param request - The request {@link RegionalApiDeleteTokenRequest}
4311
5041
  */
4312
- deleteVolume = request => this.client.fetch({
5042
+ deleteToken = request => this.client.fetch({
4313
5043
  method: 'DELETE',
4314
- path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
5044
+ path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
4315
5045
  });
4316
5046
 
4317
5047
  /**
4318
- * Update a volume. Update the technical details of a volume, such as its
4319
- * name, tags, or its new size and `volume_type` (within the same Block
4320
- * Storage class). You can only resize a volume to a larger size. It is
4321
- * currently not possible to change your Block Storage Class.
5048
+ * Get the Alert manager. Retrieve information about the Alert manager which
5049
+ * is unique per Project and region. By default the Alert manager is disabled.
5050
+ * The output returned displays a URL to access the Alert manager, and whether
5051
+ * the Alert manager and managed alerts are enabled.
4322
5052
  *
4323
- * @param request - The request {@link UpdateVolumeRequest}
4324
- * @returns A Promise of Volume
5053
+ * @param request - The request {@link RegionalApiGetAlertManagerRequest}
5054
+ * @returns A Promise of AlertManager
4325
5055
  */
4326
- updateVolume = request => this.client.fetch({
4327
- body: JSON.stringify(marshalUpdateVolumeRequest$2(request, this.client.settings)),
4328
- headers: jsonContentHeaders$t,
4329
- method: 'PATCH',
4330
- path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
4331
- }, unmarshalVolume$4);
4332
- pageOfListSnapshots = (request = {}) => this.client.fetch({
5056
+ getAlertManager = (request = {}) => this.client.fetch({
4333
5057
  method: 'GET',
4334
- path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots`,
4335
- urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId], ['volume_id', request.volumeId])
4336
- }, unmarshalListSnapshotsResponse$3);
5058
+ path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager`,
5059
+ urlParams: urlParams(['project_id', request.projectId ?? this.client.settings.defaultProjectId])
5060
+ }, unmarshalAlertManager);
4337
5061
 
4338
5062
  /**
4339
- * List all snapshots. List all available snapshots in a specified zone. By
4340
- * default, the snapshots listed are ordered by creation date in ascending
4341
- * order. This can be modified via the `order_by` field.
5063
+ * Enable the Alert manager. Enabling the Alert manager allows you to enable
5064
+ * managed alerts and create contact points in the specified Project and
5065
+ * region, to be notified when your Scaleway resources may require your
5066
+ * attention.
4342
5067
  *
4343
- * @param request - The request {@link ListSnapshotsRequest}
4344
- * @returns A Promise of ListSnapshotsResponse
5068
+ * @param request - The request {@link RegionalApiEnableAlertManagerRequest}
5069
+ * @returns A Promise of AlertManager
4345
5070
  */
4346
- listSnapshots = (request = {}) => enrichForPagination('snapshots', this.pageOfListSnapshots, request);
5071
+ enableAlertManager = (request = {}) => this.client.fetch({
5072
+ body: JSON.stringify(marshalRegionalApiEnableAlertManagerRequest(request, this.client.settings)),
5073
+ headers: jsonContentHeaders$t,
5074
+ method: 'POST',
5075
+ path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/enable`
5076
+ }, unmarshalAlertManager);
4347
5077
 
4348
5078
  /**
4349
- * Get a snapshot. Retrieve technical information about a specific snapshot.
4350
- * Details such as size, volume type, and status are returned in the
4351
- * response.
5079
+ * Disable the Alert manager. Disabling the Alert manager deletes the contact
5080
+ * points you have created and disables managed alerts in the specified
5081
+ * Project and region.
4352
5082
  *
4353
- * @param request - The request {@link GetSnapshotRequest}
4354
- * @returns A Promise of Snapshot
5083
+ * @param request - The request {@link RegionalApiDisableAlertManagerRequest}
5084
+ * @returns A Promise of AlertManager
4355
5085
  */
4356
- getSnapshot = request => this.client.fetch({
5086
+ disableAlertManager = (request = {}) => this.client.fetch({
5087
+ body: JSON.stringify(marshalRegionalApiDisableAlertManagerRequest(request, this.client.settings)),
5088
+ headers: jsonContentHeaders$t,
5089
+ method: 'POST',
5090
+ path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/disable`
5091
+ }, unmarshalAlertManager);
5092
+
5093
+ /**
5094
+ * Create a contact point. Contact points are email addresses associated with
5095
+ * the default receiver, that the Alert manager sends alerts to. The source of
5096
+ * the alerts are data sources within the same Project and region as the Alert
5097
+ * manager. If you need to receive alerts for other receivers, you can create
5098
+ * additional contact points and receivers in Grafana. Make sure that you
5099
+ * select the Scaleway Alert manager.
5100
+ *
5101
+ * @param request - The request {@link RegionalApiCreateContactPointRequest}
5102
+ * @returns A Promise of ContactPoint
5103
+ */
5104
+ createContactPoint = (request = {}) => this.client.fetch({
5105
+ body: JSON.stringify(marshalRegionalApiCreateContactPointRequest(request, this.client.settings)),
5106
+ headers: jsonContentHeaders$t,
5107
+ method: 'POST',
5108
+ path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/contact-points`
5109
+ }, unmarshalContactPoint$1);
5110
+ pageOfListContactPoints = (request = {}) => this.client.fetch({
4357
5111
  method: 'GET',
4358
- path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
4359
- }, unmarshalSnapshot$3);
5112
+ path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/contact-points`,
5113
+ urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId ?? this.client.settings.defaultProjectId])
5114
+ }, unmarshalListContactPointsResponse$1);
4360
5115
 
4361
5116
  /**
4362
- * Waits for {@link Snapshot} to be in a final state.
5117
+ * List contact points. Retrieve a list of contact points for the specified
5118
+ * Project. The response lists all contact points and receivers created in
5119
+ * Grafana or via the API.
4363
5120
  *
4364
- * @param request - The request {@link GetSnapshotRequest}
4365
- * @param options - The waiting options
4366
- * @returns A Promise of Snapshot
5121
+ * @param request - The request {@link RegionalApiListContactPointsRequest}
5122
+ * @returns A Promise of ListContactPointsResponse
4367
5123
  */
4368
- waitForSnapshot = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!SNAPSHOT_TRANSIENT_STATUSES$3.includes(res.status))), this.getSnapshot, request, options);
5124
+ listContactPoints = (request = {}) => enrichForPagination('contactPoints', this.pageOfListContactPoints, request);
4369
5125
 
4370
5126
  /**
4371
- * Create a snapshot of a volume. To create a snapshot, the volume must be in
4372
- * the `in_use` or the `available` status. If your volume is in a transient
4373
- * state, you need to wait until the end of the current operation.
5127
+ * Delete a contact point. Delete a contact point associated with the default
5128
+ * receiver.
4374
5129
  *
4375
- * @param request - The request {@link CreateSnapshotRequest}
4376
- * @returns A Promise of Snapshot
5130
+ * @param request - The request {@link RegionalApiDeleteContactPointRequest}
4377
5131
  */
4378
- createSnapshot = request => this.client.fetch({
4379
- body: JSON.stringify(marshalCreateSnapshotRequest$3(request, this.client.settings)),
5132
+ deleteContactPoint = (request = {}) => this.client.fetch({
5133
+ body: JSON.stringify(marshalRegionalApiDeleteContactPointRequest(request, this.client.settings)),
4380
5134
  headers: jsonContentHeaders$t,
4381
5135
  method: 'POST',
4382
- path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots`
4383
- }, unmarshalSnapshot$3);
5136
+ path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/contact-points/delete`
5137
+ });
4384
5138
 
4385
5139
  /**
4386
- * Delete a snapshot. You must specify the `snapshot_id` of the snapshot you
4387
- * want to delete. The snapshot must not be in use.
5140
+ * Enable managed alerts. Enable the sending of managed alerts for the
5141
+ * specified Project. Managed alerts are predefined alerts that apply to
5142
+ * Scaleway recources integrated with Cockpit by default.
4388
5143
  *
4389
- * @param request - The request {@link DeleteSnapshotRequest}
5144
+ * @param request - The request {@link RegionalApiEnableManagedAlertsRequest}
5145
+ * @returns A Promise of AlertManager
4390
5146
  */
4391
- deleteSnapshot = request => this.client.fetch({
4392
- method: 'DELETE',
4393
- path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
4394
- });
5147
+ enableManagedAlerts = (request = {}) => this.client.fetch({
5148
+ body: JSON.stringify(marshalRegionalApiEnableManagedAlertsRequest(request, this.client.settings)),
5149
+ headers: jsonContentHeaders$t,
5150
+ method: 'POST',
5151
+ path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/managed-alerts/enable`
5152
+ }, unmarshalAlertManager);
4395
5153
 
4396
5154
  /**
4397
- * Update a snapshot. Update the name or tags of the snapshot.
5155
+ * Disable managed alerts. Disable the sending of managed alerts for the
5156
+ * specified Project.
4398
5157
  *
4399
- * @param request - The request {@link UpdateSnapshotRequest}
4400
- * @returns A Promise of Snapshot
5158
+ * @param request - The request {@link RegionalApiDisableManagedAlertsRequest}
5159
+ * @returns A Promise of AlertManager
4401
5160
  */
4402
- updateSnapshot = request => this.client.fetch({
4403
- body: JSON.stringify(marshalUpdateSnapshotRequest$3(request, this.client.settings)),
5161
+ disableManagedAlerts = (request = {}) => this.client.fetch({
5162
+ body: JSON.stringify(marshalRegionalApiDisableManagedAlertsRequest(request, this.client.settings)),
4404
5163
  headers: jsonContentHeaders$t,
4405
- method: 'PATCH',
4406
- path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
4407
- }, unmarshalSnapshot$3);
4408
- };
5164
+ method: 'POST',
5165
+ path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/managed-alerts/disable`
5166
+ }, unmarshalAlertManager);
5167
+
5168
+ /**
5169
+ * Trigger a test alert. Send a test alert to the Alert manager to make sure
5170
+ * your contact points get notified.
5171
+ *
5172
+ * @param request - The request {@link RegionalApiTriggerTestAlertRequest}
5173
+ */
5174
+ triggerTestAlert = (request = {}) => this.client.fetch({
5175
+ body: JSON.stringify(marshalRegionalApiTriggerTestAlertRequest(request, this.client.settings)),
5176
+ headers: jsonContentHeaders$t,
5177
+ method: 'POST',
5178
+ path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/trigger-test-alert`
5179
+ });
5180
+ }
4409
5181
 
4410
5182
  // This file was automatically generated. DO NOT EDIT.
4411
5183
  // If you have any remark or suggestion do not hesitate to open an issue.
4412
5184
 
4413
- const CreateSnapshotRequest = {
5185
+ const RegionalApiCreateDataSourceRequest = {
4414
5186
  name: {
4415
- minLength: 1
5187
+ maxLength: 50,
5188
+ minLength: 3,
5189
+ pattern: /^[A-Za-z0-9-_. ]+$/
4416
5190
  }
4417
5191
  };
4418
- const CreateVolumeRequest = {
5192
+ const RegionalApiCreateTokenRequest = {
4419
5193
  name: {
4420
- minLength: 1
5194
+ maxLength: 50,
5195
+ minLength: 3,
5196
+ pattern: /^[A-Za-z0-9-_]+$/
4421
5197
  }
4422
5198
  };
4423
- const ListSnapshotsRequest = {
5199
+ const RegionalApiListContactPointsRequest = {
4424
5200
  page: {
4425
- greaterThan: 0
5201
+ greaterThanOrEqual: 1
4426
5202
  },
4427
5203
  pageSize: {
4428
- greaterThan: 0,
4429
- lessThanOrEqual: 100
5204
+ greaterThanOrEqual: 1,
5205
+ lessThanOrEqual: 1000
4430
5206
  }
4431
5207
  };
4432
- const ListVolumeTypesRequest = {
5208
+ const RegionalApiListDataSourcesRequest = {
4433
5209
  page: {
4434
- greaterThan: 0
5210
+ greaterThanOrEqual: 1
4435
5211
  },
4436
5212
  pageSize: {
4437
- greaterThan: 0,
4438
- lessThanOrEqual: 100
5213
+ greaterThanOrEqual: 1,
5214
+ lessThanOrEqual: 1000
4439
5215
  }
4440
5216
  };
4441
- const ListVolumesRequest = {
5217
+ const RegionalApiListTokensRequest = {
4442
5218
  page: {
4443
- greaterThan: 0
5219
+ greaterThanOrEqual: 1
4444
5220
  },
4445
5221
  pageSize: {
4446
- greaterThan: 0,
4447
- lessThanOrEqual: 100
4448
- }
4449
- };
4450
- const Reference = {
4451
- productResourceType: {
4452
- minLength: 1
5222
+ greaterThanOrEqual: 1,
5223
+ lessThanOrEqual: 1000
4453
5224
  }
4454
5225
  };
4455
5226
 
4456
- var validationRules_gen$e = /*#__PURE__*/Object.freeze({
5227
+ var validationRules_gen$f = /*#__PURE__*/Object.freeze({
4457
5228
  __proto__: null,
4458
- CreateSnapshotRequest: CreateSnapshotRequest,
4459
- CreateVolumeRequest: CreateVolumeRequest,
4460
- ListSnapshotsRequest: ListSnapshotsRequest,
4461
- ListVolumeTypesRequest: ListVolumeTypesRequest,
4462
- ListVolumesRequest: ListVolumesRequest,
4463
- Reference: Reference
5229
+ RegionalApiCreateDataSourceRequest: RegionalApiCreateDataSourceRequest,
5230
+ RegionalApiCreateTokenRequest: RegionalApiCreateTokenRequest,
5231
+ RegionalApiListContactPointsRequest: RegionalApiListContactPointsRequest,
5232
+ RegionalApiListDataSourcesRequest: RegionalApiListDataSourcesRequest,
5233
+ RegionalApiListTokensRequest: RegionalApiListTokensRequest
4464
5234
  });
4465
5235
 
4466
5236
  // This file was automatically generated. DO NOT EDIT.
@@ -4468,16 +5238,9 @@ var validationRules_gen$e = /*#__PURE__*/Object.freeze({
4468
5238
 
4469
5239
  var index_gen$s = /*#__PURE__*/Object.freeze({
4470
5240
  __proto__: null,
4471
- API: API$t,
4472
- REFERENCE_TRANSIENT_STATUSES: REFERENCE_TRANSIENT_STATUSES,
4473
- SNAPSHOT_TRANSIENT_STATUSES: SNAPSHOT_TRANSIENT_STATUSES$3,
4474
- VOLUME_TRANSIENT_STATUSES: VOLUME_TRANSIENT_STATUSES$1,
4475
- ValidationRules: validationRules_gen$e
4476
- });
4477
-
4478
- var index$v = /*#__PURE__*/Object.freeze({
4479
- __proto__: null,
4480
- v1alpha1: index_gen$s
5241
+ GlobalAPI: GlobalAPI,
5242
+ RegionalAPI: RegionalAPI,
5243
+ ValidationRules: validationRules_gen$f
4481
5244
  });
4482
5245
 
4483
5246
  // This file was automatically generated. DO NOT EDIT.
@@ -5108,6 +5871,7 @@ var index_gen$r = /*#__PURE__*/Object.freeze({
5108
5871
 
5109
5872
  var index$u = /*#__PURE__*/Object.freeze({
5110
5873
  __proto__: null,
5874
+ v1: index_gen$s,
5111
5875
  v1beta1: index_gen$r
5112
5876
  });
5113
5877
 
@@ -5959,7 +6723,7 @@ const UpdateTriggerRequest$1 = {
5959
6723
  }
5960
6724
  };
5961
6725
 
5962
- var validationRules_gen$d = /*#__PURE__*/Object.freeze({
6726
+ var validationRules_gen$e = /*#__PURE__*/Object.freeze({
5963
6727
  __proto__: null,
5964
6728
  CreateTriggerRequest: CreateTriggerRequest$1,
5965
6729
  CreateTriggerRequestMnqNatsClientConfig: CreateTriggerRequestMnqNatsClientConfig$1,
@@ -5979,7 +6743,7 @@ var index_gen$q = /*#__PURE__*/Object.freeze({
5979
6743
  NAMESPACE_TRANSIENT_STATUSES: NAMESPACE_TRANSIENT_STATUSES$2,
5980
6744
  TOKEN_TRANSIENT_STATUSES: TOKEN_TRANSIENT_STATUSES$1,
5981
6745
  TRIGGER_TRANSIENT_STATUSES: TRIGGER_TRANSIENT_STATUSES$1,
5982
- ValidationRules: validationRules_gen$d
6746
+ ValidationRules: validationRules_gen$e
5983
6747
  });
5984
6748
 
5985
6749
  var index$t = /*#__PURE__*/Object.freeze({
@@ -8719,7 +9483,7 @@ const UpdateServerTagsRequest = {
8719
9483
  }
8720
9484
  };
8721
9485
 
8722
- var validationRules_gen$c = /*#__PURE__*/Object.freeze({
9486
+ var validationRules_gen$d = /*#__PURE__*/Object.freeze({
8723
9487
  __proto__: null,
8724
9488
  AttachFailoverIPToMacAddressRequest: AttachFailoverIPToMacAddressRequest,
8725
9489
  AttachFailoverIPsRequest: AttachFailoverIPsRequest,
@@ -8829,7 +9593,7 @@ var index_gen$p = /*#__PURE__*/Object.freeze({
8829
9593
  SERVER_INSTALL_TRANSIENT_STATUSES: SERVER_INSTALL_TRANSIENT_STATUSES,
8830
9594
  SERVER_TRANSIENT_STATUSES: SERVER_TRANSIENT_STATUSES$1,
8831
9595
  SERVICE_PROVISIONING_TRANSIENT_STATUSES: SERVICE_PROVISIONING_TRANSIENT_STATUSES,
8832
- ValidationRules: validationRules_gen$c
9596
+ ValidationRules: validationRules_gen$d
8833
9597
  });
8834
9598
 
8835
9599
  var index$s = /*#__PURE__*/Object.freeze({
@@ -10302,7 +11066,7 @@ const UpdateInstanceRequest$1 = {
10302
11066
  }
10303
11067
  };
10304
11068
 
10305
- var validationRules_gen$b = /*#__PURE__*/Object.freeze({
11069
+ var validationRules_gen$c = /*#__PURE__*/Object.freeze({
10306
11070
  __proto__: null,
10307
11071
  UpdateInstanceRequest: UpdateInstanceRequest$1
10308
11072
  });
@@ -10318,7 +11082,7 @@ var index_gen$o = /*#__PURE__*/Object.freeze({
10318
11082
  MAINTENANCE_TRANSIENT_STATUSES: MAINTENANCE_TRANSIENT_STATUSES$1,
10319
11083
  READ_REPLICA_TRANSIENT_STATUSES: READ_REPLICA_TRANSIENT_STATUSES$1,
10320
11084
  SNAPSHOT_TRANSIENT_STATUSES: SNAPSHOT_TRANSIENT_STATUSES$2,
10321
- ValidationRules: validationRules_gen$b
11085
+ ValidationRules: validationRules_gen$c
10322
11086
  });
10323
11087
 
10324
11088
  var index$r = /*#__PURE__*/Object.freeze({
@@ -12605,7 +13369,7 @@ const ListFlexibleIPsRequest = {
12605
13369
  }
12606
13370
  };
12607
13371
 
12608
- var validationRules_gen$a = /*#__PURE__*/Object.freeze({
13372
+ var validationRules_gen$b = /*#__PURE__*/Object.freeze({
12609
13373
  __proto__: null,
12610
13374
  ListFlexibleIPsRequest: ListFlexibleIPsRequest
12611
13375
  });
@@ -12618,7 +13382,7 @@ var index_gen$m = /*#__PURE__*/Object.freeze({
12618
13382
  API: API$n,
12619
13383
  FLEXIBLE_IP_TRANSIENT_STATUSES: FLEXIBLE_IP_TRANSIENT_STATUSES,
12620
13384
  MAC_ADDRESS_TRANSIENT_STATUSES: MAC_ADDRESS_TRANSIENT_STATUSES,
12621
- ValidationRules: validationRules_gen$a
13385
+ ValidationRules: validationRules_gen$b
12622
13386
  });
12623
13387
 
12624
13388
  var index$p = /*#__PURE__*/Object.freeze({
@@ -13551,7 +14315,7 @@ const UpdateTriggerRequest = {
13551
14315
  }
13552
14316
  };
13553
14317
 
13554
- var validationRules_gen$9 = /*#__PURE__*/Object.freeze({
14318
+ var validationRules_gen$a = /*#__PURE__*/Object.freeze({
13555
14319
  __proto__: null,
13556
14320
  CreateTriggerRequest: CreateTriggerRequest,
13557
14321
  CreateTriggerRequestMnqNatsClientConfig: CreateTriggerRequestMnqNatsClientConfig,
@@ -13571,7 +14335,7 @@ var index_gen$l = /*#__PURE__*/Object.freeze({
13571
14335
  NAMESPACE_TRANSIENT_STATUSES: NAMESPACE_TRANSIENT_STATUSES$1,
13572
14336
  TOKEN_TRANSIENT_STATUSES: TOKEN_TRANSIENT_STATUSES,
13573
14337
  TRIGGER_TRANSIENT_STATUSES: TRIGGER_TRANSIENT_STATUSES,
13574
- ValidationRules: validationRules_gen$9
14338
+ ValidationRules: validationRules_gen$a
13575
14339
  });
13576
14340
 
13577
14341
  var index$o = /*#__PURE__*/Object.freeze({
@@ -13689,8 +14453,11 @@ const unmarshalQuotum = data => {
13689
14453
  throw new TypeError(`Unmarshalling the type 'Quotum' failed as data isn't a dictionary.`);
13690
14454
  }
13691
14455
  return {
14456
+ description: data.description,
13692
14457
  limit: data.limit,
13693
14458
  name: data.name,
14459
+ prettyName: data.pretty_name,
14460
+ unit: data.unit,
13694
14461
  unlimited: data.unlimited
13695
14462
  };
13696
14463
  };
@@ -14912,7 +15679,7 @@ const UpdateSSHKeyRequest = {
14912
15679
  }
14913
15680
  };
14914
15681
 
14915
- var validationRules_gen$8 = /*#__PURE__*/Object.freeze({
15682
+ var validationRules_gen$9 = /*#__PURE__*/Object.freeze({
14916
15683
  __proto__: null,
14917
15684
  CreateAPIKeyRequest: CreateAPIKeyRequest,
14918
15685
  CreateApplicationRequest: CreateApplicationRequest,
@@ -14944,7 +15711,7 @@ var validationRules_gen$8 = /*#__PURE__*/Object.freeze({
14944
15711
  var index_gen$k = /*#__PURE__*/Object.freeze({
14945
15712
  __proto__: null,
14946
15713
  API: API$l,
14947
- ValidationRules: validationRules_gen$8
15714
+ ValidationRules: validationRules_gen$9
14948
15715
  });
14949
15716
 
14950
15717
  var index$n = /*#__PURE__*/Object.freeze({
@@ -16486,7 +17253,7 @@ let API$k = class API extends API$z {
16486
17253
  pageOfListServers = (request = {}) => this.client.fetch({
16487
17254
  method: 'GET',
16488
17255
  path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers`,
16489
- urlParams: urlParams(['commercial_type', request.commercialType], ['name', request.name], ['order', request.order], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? this.client.settings.defaultPageSize], ['private_ip', request.privateIp], ['private_network', request.privateNetwork], ['private_networks', request.privateNetworks && request.privateNetworks.length > 0 ? request.privateNetworks.join(',') : undefined], ['private_nic_mac_address', request.privateNicMacAddress], ['project', request.project], ['servers', request.servers && request.servers.length > 0 ? request.servers.join(',') : undefined], ['state', request.state], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined], ['without_ip', request.withoutIp])
17256
+ urlParams: urlParams(['commercial_type', request.commercialType], ['name', request.name], ['order', request.order], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? this.client.settings.defaultPageSize], ['private_ip', request.privateIp], ['private_network', request.privateNetwork], ['private_networks', request.privateNetworks && request.privateNetworks.length > 0 ? request.privateNetworks.join(',') : undefined], ['private_nic_mac_address', request.privateNicMacAddress], ['project', request.project], ['servers', request.servers && request.servers.length > 0 ? request.servers.join(',') : undefined], ['state', request.state], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined], ['with_ip', request.withIp], ['without_ip', request.withoutIp])
16490
17257
  }, unmarshalListServersResponse);
16491
17258
 
16492
17259
  /**
@@ -18723,7 +19490,7 @@ const ListIPsRequest = {
18723
19490
  }
18724
19491
  };
18725
19492
 
18726
- var validationRules_gen$7 = /*#__PURE__*/Object.freeze({
19493
+ var validationRules_gen$8 = /*#__PURE__*/Object.freeze({
18727
19494
  __proto__: null,
18728
19495
  ListIPsRequest: ListIPsRequest
18729
19496
  });
@@ -18734,7 +19501,7 @@ var validationRules_gen$7 = /*#__PURE__*/Object.freeze({
18734
19501
  var index_gen$i = /*#__PURE__*/Object.freeze({
18735
19502
  __proto__: null,
18736
19503
  API: API$i,
18737
- ValidationRules: validationRules_gen$7
19504
+ ValidationRules: validationRules_gen$8
18738
19505
  });
18739
19506
 
18740
19507
  var index$j = /*#__PURE__*/Object.freeze({
@@ -19383,7 +20150,7 @@ let API$g = class API extends API$z {
19383
20150
  pageOfListJobDefinitions = (request = {}) => this.client.fetch({
19384
20151
  method: 'GET',
19385
20152
  path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/job-definitions`,
19386
- urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
20153
+ urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
19387
20154
  }, unmarshalListJobDefinitionsResponse);
19388
20155
 
19389
20156
  /**
@@ -19458,7 +20225,7 @@ let API$g = class API extends API$z {
19458
20225
  pageOfListJobRuns = (request = {}) => this.client.fetch({
19459
20226
  method: 'GET',
19460
20227
  path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/job-runs`,
19461
- urlParams: urlParams(['job_definition_id', request.jobDefinitionId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
20228
+ urlParams: urlParams(['job_definition_id', request.jobDefinitionId], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
19462
20229
  }, unmarshalListJobRunsResponse);
19463
20230
 
19464
20231
  /**
@@ -19567,7 +20334,7 @@ const UpdateJobDefinitionRequestCronScheduleConfig = {
19567
20334
  }
19568
20335
  };
19569
20336
 
19570
- var validationRules_gen$6 = /*#__PURE__*/Object.freeze({
20337
+ var validationRules_gen$7 = /*#__PURE__*/Object.freeze({
19571
20338
  __proto__: null,
19572
20339
  CreateJobDefinitionRequest: CreateJobDefinitionRequest,
19573
20340
  CreateJobDefinitionRequestCronScheduleConfig: CreateJobDefinitionRequestCronScheduleConfig,
@@ -19586,7 +20353,7 @@ var index_gen$g = /*#__PURE__*/Object.freeze({
19586
20353
  __proto__: null,
19587
20354
  API: API$g,
19588
20355
  JOB_RUN_TRANSIENT_STATUSES: JOB_RUN_TRANSIENT_STATUSES,
19589
- ValidationRules: validationRules_gen$6
20356
+ ValidationRules: validationRules_gen$7
19590
20357
  });
19591
20358
 
19592
20359
  var index$h = /*#__PURE__*/Object.freeze({
@@ -19734,6 +20501,7 @@ const unmarshalCluster$1 = data => {
19734
20501
  privateNetworkId: data.private_network_id,
19735
20502
  projectId: data.project_id,
19736
20503
  region: data.region,
20504
+ routedIpEnabled: data.routed_ip_enabled,
19737
20505
  status: data.status,
19738
20506
  tags: data.tags,
19739
20507
  type: data.type,
@@ -20547,7 +21315,7 @@ const UpdateClusterRequestAutoscalerConfig = {
20547
21315
  }
20548
21316
  };
20549
21317
 
20550
- var validationRules_gen$5 = /*#__PURE__*/Object.freeze({
21318
+ var validationRules_gen$6 = /*#__PURE__*/Object.freeze({
20551
21319
  __proto__: null,
20552
21320
  CreateClusterRequest: CreateClusterRequest,
20553
21321
  CreateClusterRequestAutoscalerConfig: CreateClusterRequestAutoscalerConfig,
@@ -20569,7 +21337,7 @@ var index$g = /*#__PURE__*/Object.freeze({
20569
21337
  CLUSTER_TRANSIENT_STATUSES: CLUSTER_TRANSIENT_STATUSES$1,
20570
21338
  NODE_TRANSIENT_STATUSES: NODE_TRANSIENT_STATUSES,
20571
21339
  POOL_TRANSIENT_STATUSES: POOL_TRANSIENT_STATUSES,
20572
- ValidationRules: validationRules_gen$5
21340
+ ValidationRules: validationRules_gen$6
20573
21341
  });
20574
21342
 
20575
21343
  var index$f = /*#__PURE__*/Object.freeze({
@@ -23715,7 +24483,7 @@ const UpdateDeploymentRequest = {
23715
24483
  }
23716
24484
  };
23717
24485
 
23718
- var validationRules_gen$4 = /*#__PURE__*/Object.freeze({
24486
+ var validationRules_gen$5 = /*#__PURE__*/Object.freeze({
23719
24487
  __proto__: null,
23720
24488
  CreateDeploymentRequest: CreateDeploymentRequest,
23721
24489
  ListDeploymentsRequest: ListDeploymentsRequest,
@@ -23730,7 +24498,7 @@ var index_gen$f = /*#__PURE__*/Object.freeze({
23730
24498
  __proto__: null,
23731
24499
  API: API$d,
23732
24500
  DEPLOYMENT_TRANSIENT_STATUSES: DEPLOYMENT_TRANSIENT_STATUSES,
23733
- ValidationRules: validationRules_gen$4
24501
+ ValidationRules: validationRules_gen$5
23734
24502
  });
23735
24503
 
23736
24504
  var index$c = /*#__PURE__*/Object.freeze({
@@ -24635,7 +25403,7 @@ const SqsCredentials = {
24635
25403
  }
24636
25404
  };
24637
25405
 
24638
- var validationRules_gen$3 = /*#__PURE__*/Object.freeze({
25406
+ var validationRules_gen$4 = /*#__PURE__*/Object.freeze({
24639
25407
  __proto__: null,
24640
25408
  NatsAccount: NatsAccount,
24641
25409
  NatsApiCreateNatsAccountRequest: NatsApiCreateNatsAccountRequest,
@@ -24658,7 +25426,7 @@ var index_gen$d = /*#__PURE__*/Object.freeze({
24658
25426
  NatsAPI: NatsAPI,
24659
25427
  SnsAPI: SnsAPI,
24660
25428
  SqsAPI: SqsAPI,
24661
- ValidationRules: validationRules_gen$3
25429
+ ValidationRules: validationRules_gen$4
24662
25430
  });
24663
25431
 
24664
25432
  var index$a = /*#__PURE__*/Object.freeze({
@@ -24707,6 +25475,7 @@ const unmarshalEndpointPrivateNetworkDetails = data => {
24707
25475
  }
24708
25476
  return {
24709
25477
  privateNetworkId: data.private_network_id,
25478
+ provisioningMode: data.provisioning_mode,
24710
25479
  serviceIp: data.service_ip,
24711
25480
  zone: data.zone
24712
25481
  };
@@ -26320,7 +27089,7 @@ const UpdateInstanceRequest = {
26320
27089
  }
26321
27090
  };
26322
27091
 
26323
- var validationRules_gen$2 = /*#__PURE__*/Object.freeze({
27092
+ var validationRules_gen$3 = /*#__PURE__*/Object.freeze({
26324
27093
  __proto__: null,
26325
27094
  UpdateInstanceRequest: UpdateInstanceRequest
26326
27095
  });
@@ -26337,7 +27106,7 @@ var index_gen$c = /*#__PURE__*/Object.freeze({
26337
27106
  MAINTENANCE_TRANSIENT_STATUSES: MAINTENANCE_TRANSIENT_STATUSES,
26338
27107
  READ_REPLICA_TRANSIENT_STATUSES: READ_REPLICA_TRANSIENT_STATUSES,
26339
27108
  SNAPSHOT_TRANSIENT_STATUSES: SNAPSHOT_TRANSIENT_STATUSES,
26340
- ValidationRules: validationRules_gen$2
27109
+ ValidationRules: validationRules_gen$3
26341
27110
  });
26342
27111
 
26343
27112
  var index$9 = /*#__PURE__*/Object.freeze({
@@ -28321,6 +29090,20 @@ let API$7 = class API extends API$z {
28321
29090
  path: `/secret-manager/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/versions/${validatePathParam('revision', request.revision)}/access`
28322
29091
  }, unmarshalAccessSecretVersionResponse);
28323
29092
 
29093
+ /**
29094
+ * Access a secret's version using the secret's name and path. Access
29095
+ * sensitive data in a secret's version specified by the `region`,
29096
+ * `secret_name`, `secret_path` and `revision` parameters.
29097
+ *
29098
+ * @param request - The request {@link AccessSecretVersionByPathRequest}
29099
+ * @returns A Promise of AccessSecretVersionResponse
29100
+ */
29101
+ accessSecretVersionByPath = request => this.client.fetch({
29102
+ method: 'GET',
29103
+ path: `/secret-manager/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets-by-path/versions/${validatePathParam('revision', request.revision)}/access`,
29104
+ urlParams: urlParams(['project_id', request.projectId ?? this.client.settings.defaultProjectId], ['secret_name', request.secretName], ['secret_path', request.secretPath])
29105
+ }, unmarshalAccessSecretVersionResponse);
29106
+
28324
29107
  /**
28325
29108
  * Enable a version. Make a specific version accessible. You must specify the
28326
29109
  * `region`, `secret_id` and `revision` parameters.
@@ -28366,9 +29149,24 @@ let API$7 = class API extends API$z {
28366
29149
  // This file was automatically generated. DO NOT EDIT.
28367
29150
  // If you have any remark or suggestion do not hesitate to open an issue.
28368
29151
 
29152
+ const DatabaseCredentials = {
29153
+ port: {
29154
+ pattern: /^[0-9]+$/
29155
+ }
29156
+ };
29157
+
29158
+ var validationRules_gen$2 = /*#__PURE__*/Object.freeze({
29159
+ __proto__: null,
29160
+ DatabaseCredentials: DatabaseCredentials
29161
+ });
29162
+
29163
+ // This file was automatically generated. DO NOT EDIT.
29164
+ // If you have any remark or suggestion do not hesitate to open an issue.
29165
+
28369
29166
  var index_gen$8 = /*#__PURE__*/Object.freeze({
28370
29167
  __proto__: null,
28371
- API: API$7
29168
+ API: API$7,
29169
+ ValidationRules: validationRules_gen$2
28372
29170
  });
28373
29171
 
28374
29172
  var index$6 = /*#__PURE__*/Object.freeze({
@@ -28586,7 +29384,7 @@ let API$6 = class API extends API$z {
28586
29384
  /**
28587
29385
  * List your Serverless SQL Database backups. List all Serverless SQL Database
28588
29386
  * backups for a given Scaleway Project or Database. By default, the backups
28589
- * returned in the list are ordered by creation date in ascending order,
29387
+ * returned in the list are ordered by creation date in descending order,
28590
29388
  * though this can be modified via the order_by field.
28591
29389
  *
28592
29390
  * @param request - The request {@link ListDatabaseBackupsRequest}
@@ -30837,6 +31635,7 @@ const unmarshalHosting = data => {
30837
31635
  offerEndOfLife: data.offer_end_of_life,
30838
31636
  offerId: data.offer_id,
30839
31637
  offerName: data.offer_name,
31638
+ oneTimePassword: data.one_time_password,
30840
31639
  options: unmarshalArrayOfObject(data.options, unmarshalHostingOption),
30841
31640
  organizationId: data.organization_id,
30842
31641
  platformGroup: data.platform_group,