@scaleway/sdk 1.15.0 → 1.17.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.
@@ -154,12 +154,20 @@ class API extends API$1 {
154
154
  * @param request - The request {@link CreateIpRequest}
155
155
  * @returns A Promise of Ip
156
156
  */
157
- createIp = request => this.client.fetch({
158
- body: JSON.stringify(marshalCreateIpRequest(request, this.client.settings)),
159
- headers: jsonContentHeaders,
160
- method: 'POST',
161
- path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/ips`
162
- }, unmarshalIp);
157
+ createIp = (() => {
158
+ var _this5 = this;
159
+ return function (request) {
160
+ if (request === void 0) {
161
+ request = {};
162
+ }
163
+ return _this5.client.fetch({
164
+ body: JSON.stringify(marshalCreateIpRequest(request, _this5.client.settings)),
165
+ headers: jsonContentHeaders,
166
+ method: 'POST',
167
+ path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this5.client.settings.defaultRegion)}/ips`
168
+ }, unmarshalIp);
169
+ };
170
+ })();
163
171
 
164
172
  /**
165
173
  * Get an IP.
@@ -367,15 +375,15 @@ class API extends API$1 {
367
375
  path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam('frontendId', request.frontendId)}`
368
376
  });
369
377
  pageOfListRoutes = (() => {
370
- var _this5 = this;
378
+ var _this6 = this;
371
379
  return function (request) {
372
380
  if (request === void 0) {
373
381
  request = {};
374
382
  }
375
- return _this5.client.fetch({
383
+ return _this6.client.fetch({
376
384
  method: 'GET',
377
- path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this5.client.settings.defaultRegion)}/routes`,
378
- urlParams: urlParams(['frontend_id', request.frontendId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this5.client.settings.defaultPageSize])
385
+ path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this6.client.settings.defaultRegion)}/routes`,
386
+ urlParams: urlParams(['frontend_id', request.frontendId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this6.client.settings.defaultPageSize])
379
387
  }, unmarshalListRoutesResponse);
380
388
  };
381
389
  })();
@@ -387,12 +395,12 @@ class API extends API$1 {
387
395
  * @returns A Promise of ListRoutesResponse
388
396
  */
389
397
  listRoutes = (() => {
390
- var _this6 = this;
398
+ var _this7 = this;
391
399
  return function (request) {
392
400
  if (request === void 0) {
393
401
  request = {};
394
402
  }
395
- return enrichForPagination('routes', _this6.pageOfListRoutes, request);
403
+ return enrichForPagination('routes', _this7.pageOfListRoutes, request);
396
404
  };
397
405
  })();
398
406
 
@@ -460,6 +468,13 @@ class API extends API$1 {
460
468
  path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/backend-stats`,
461
469
  urlParams: urlParams(['backend_id', request.backendId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
462
470
  }, unmarshalListBackendStatsResponse);
471
+
472
+ /**
473
+ * List backend server statistics.
474
+ *
475
+ * @param request - The request {@link ListBackendStatsRequest}
476
+ * @returns A Promise of ListBackendStatsResponse
477
+ */
463
478
  listBackendStats = request => enrichForPagination('backendServersStats', this.pageOfListBackendStats, request);
464
479
  pageOfListAcls = request => this.client.fetch({
465
480
  method: 'GET',
@@ -592,15 +607,15 @@ class API extends API$1 {
592
607
  path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/certificates/${validatePathParam('certificateId', request.certificateId)}`
593
608
  });
594
609
  pageOfListLbTypes = (() => {
595
- var _this7 = this;
610
+ var _this8 = this;
596
611
  return function (request) {
597
612
  if (request === void 0) {
598
613
  request = {};
599
614
  }
600
- return _this7.client.fetch({
615
+ return _this8.client.fetch({
601
616
  method: 'GET',
602
- path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this7.client.settings.defaultRegion)}/lb-types`,
603
- urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this7.client.settings.defaultPageSize])
617
+ path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this8.client.settings.defaultRegion)}/lb-types`,
618
+ urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this8.client.settings.defaultPageSize])
604
619
  }, unmarshalListLbTypesResponse);
605
620
  };
606
621
  })();
@@ -612,12 +627,12 @@ class API extends API$1 {
612
627
  * @returns A Promise of ListLbTypesResponse
613
628
  */
614
629
  listLbTypes = (() => {
615
- var _this8 = this;
630
+ var _this9 = this;
616
631
  return function (request) {
617
632
  if (request === void 0) {
618
633
  request = {};
619
634
  }
620
- return enrichForPagination('lbTypes', _this8.pageOfListLbTypes, request);
635
+ return enrichForPagination('lbTypes', _this9.pageOfListLbTypes, request);
621
636
  };
622
637
  })();
623
638
 
@@ -752,17 +767,17 @@ class API extends API$1 {
752
767
  */
753
768
  class ZonedAPI extends API$1 {
754
769
  /** Lists the available zones of the API. */
755
- static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
770
+ static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
756
771
  pageOfListLbs = (() => {
757
- var _this9 = this;
772
+ var _this10 = this;
758
773
  return function (request) {
759
774
  if (request === void 0) {
760
775
  request = {};
761
776
  }
762
- return _this9.client.fetch({
777
+ return _this10.client.fetch({
763
778
  method: 'GET',
764
- path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this9.client.settings.defaultZone)}/lbs`,
765
- urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this9.client.settings.defaultPageSize], ['project_id', request.projectId])
779
+ path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this10.client.settings.defaultZone)}/lbs`,
780
+ urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this10.client.settings.defaultPageSize], ['project_id', request.projectId])
766
781
  }, unmarshalListLbsResponse);
767
782
  };
768
783
  })();
@@ -777,12 +792,12 @@ class ZonedAPI extends API$1 {
777
792
  * @returns A Promise of ListLbsResponse
778
793
  */
779
794
  listLbs = (() => {
780
- var _this10 = this;
795
+ var _this11 = this;
781
796
  return function (request) {
782
797
  if (request === void 0) {
783
798
  request = {};
784
799
  }
785
- return enrichForPagination('lbs', _this10.pageOfListLbs, request);
800
+ return enrichForPagination('lbs', _this11.pageOfListLbs, request);
786
801
  };
787
802
  })();
788
803
 
@@ -867,15 +882,15 @@ class ZonedAPI extends API$1 {
867
882
  path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}/migrate`
868
883
  }, unmarshalLb);
869
884
  pageOfListIPs = (() => {
870
- var _this11 = this;
885
+ var _this12 = this;
871
886
  return function (request) {
872
887
  if (request === void 0) {
873
888
  request = {};
874
889
  }
875
- return _this11.client.fetch({
890
+ return _this12.client.fetch({
876
891
  method: 'GET',
877
- path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this11.client.settings.defaultZone)}/ips`,
878
- urlParams: urlParams(['ip_address', request.ipAddress], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this11.client.settings.defaultPageSize], ['project_id', request.projectId])
892
+ path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this12.client.settings.defaultZone)}/ips`,
893
+ urlParams: urlParams(['ip_address', request.ipAddress], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this12.client.settings.defaultPageSize], ['project_id', request.projectId])
879
894
  }, unmarshalListIpsResponse);
880
895
  };
881
896
  })();
@@ -889,12 +904,12 @@ class ZonedAPI extends API$1 {
889
904
  * @returns A Promise of ListIpsResponse
890
905
  */
891
906
  listIPs = (() => {
892
- var _this12 = this;
907
+ var _this13 = this;
893
908
  return function (request) {
894
909
  if (request === void 0) {
895
910
  request = {};
896
911
  }
897
- return enrichForPagination('ips', _this12.pageOfListIPs, request);
912
+ return enrichForPagination('ips', _this13.pageOfListIPs, request);
898
913
  };
899
914
  })();
900
915
 
@@ -906,12 +921,20 @@ class ZonedAPI extends API$1 {
906
921
  * @param request - The request {@link ZonedApiCreateIpRequest}
907
922
  * @returns A Promise of Ip
908
923
  */
909
- createIp = request => this.client.fetch({
910
- body: JSON.stringify(marshalZonedApiCreateIpRequest(request, this.client.settings)),
911
- headers: jsonContentHeaders,
912
- method: 'POST',
913
- path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips`
914
- }, unmarshalIp);
924
+ createIp = (() => {
925
+ var _this14 = this;
926
+ return function (request) {
927
+ if (request === void 0) {
928
+ request = {};
929
+ }
930
+ return _this14.client.fetch({
931
+ body: JSON.stringify(marshalZonedApiCreateIpRequest(request, _this14.client.settings)),
932
+ headers: jsonContentHeaders,
933
+ method: 'POST',
934
+ path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this14.client.settings.defaultZone)}/ips`
935
+ }, unmarshalIp);
936
+ };
937
+ })();
915
938
 
916
939
  /**
917
940
  * Get an IP address. Retrieve the full details of a Load Balancer flexible IP
@@ -1161,15 +1184,15 @@ class ZonedAPI extends API$1 {
1161
1184
  path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam('frontendId', request.frontendId)}`
1162
1185
  });
1163
1186
  pageOfListRoutes = (() => {
1164
- var _this13 = this;
1187
+ var _this15 = this;
1165
1188
  return function (request) {
1166
1189
  if (request === void 0) {
1167
1190
  request = {};
1168
1191
  }
1169
- return _this13.client.fetch({
1192
+ return _this15.client.fetch({
1170
1193
  method: 'GET',
1171
- path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this13.client.settings.defaultZone)}/routes`,
1172
- urlParams: urlParams(['frontend_id', request.frontendId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this13.client.settings.defaultPageSize])
1194
+ path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this15.client.settings.defaultZone)}/routes`,
1195
+ urlParams: urlParams(['frontend_id', request.frontendId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this15.client.settings.defaultPageSize])
1173
1196
  }, unmarshalListRoutesResponse);
1174
1197
  };
1175
1198
  })();
@@ -1184,12 +1207,12 @@ class ZonedAPI extends API$1 {
1184
1207
  * @returns A Promise of ListRoutesResponse
1185
1208
  */
1186
1209
  listRoutes = (() => {
1187
- var _this14 = this;
1210
+ var _this16 = this;
1188
1211
  return function (request) {
1189
1212
  if (request === void 0) {
1190
1213
  request = {};
1191
1214
  }
1192
- return enrichForPagination('routes', _this14.pageOfListRoutes, request);
1215
+ return enrichForPagination('routes', _this16.pageOfListRoutes, request);
1193
1216
  };
1194
1217
  })();
1195
1218
 
@@ -1438,15 +1461,15 @@ class ZonedAPI extends API$1 {
1438
1461
  path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/certificates/${validatePathParam('certificateId', request.certificateId)}`
1439
1462
  });
1440
1463
  pageOfListLbTypes = (() => {
1441
- var _this15 = this;
1464
+ var _this17 = this;
1442
1465
  return function (request) {
1443
1466
  if (request === void 0) {
1444
1467
  request = {};
1445
1468
  }
1446
- return _this15.client.fetch({
1469
+ return _this17.client.fetch({
1447
1470
  method: 'GET',
1448
- path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this15.client.settings.defaultZone)}/lb-types`,
1449
- urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this15.client.settings.defaultPageSize])
1471
+ path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this17.client.settings.defaultZone)}/lb-types`,
1472
+ urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this17.client.settings.defaultPageSize])
1450
1473
  }, unmarshalListLbTypesResponse);
1451
1474
  };
1452
1475
  })();
@@ -1460,12 +1483,12 @@ class ZonedAPI extends API$1 {
1460
1483
  * @returns A Promise of ListLbTypesResponse
1461
1484
  */
1462
1485
  listLbTypes = (() => {
1463
- var _this16 = this;
1486
+ var _this18 = this;
1464
1487
  return function (request) {
1465
1488
  if (request === void 0) {
1466
1489
  request = {};
1467
1490
  }
1468
- return enrichForPagination('lbTypes', _this16.pageOfListLbTypes, request);
1491
+ return enrichForPagination('lbTypes', _this18.pageOfListLbTypes, request);
1469
1492
  };
1470
1493
  })();
1471
1494
 
@@ -646,7 +646,6 @@ const marshalCreateFrontendRequest = (request, defaults) => ({
646
646
  timeout_client: request.timeoutClient
647
647
  });
648
648
  const marshalCreateIpRequest = (request, defaults) => ({
649
- is_ipv6: request.isIpv6,
650
649
  reverse: request.reverse,
651
650
  ...resolveOneOf([{
652
651
  default: defaults.defaultProjectId,
@@ -662,7 +661,6 @@ const marshalCreateLbRequest = (request, defaults) => ({
662
661
  assign_flexible_ip: request.assignFlexibleIp,
663
662
  description: request.description,
664
663
  ip_id: request.ipId,
665
- ip_ids: request.ipIds,
666
664
  name: request.name || randomName('lb'),
667
665
  ssl_compatibility_level: request.sslCompatibilityLevel ?? 'ssl_compatibility_level_unknown',
668
666
  tags: request.tags,
@@ -871,7 +869,6 @@ const marshalZonedApiCreateFrontendRequest = (request, defaults) => ({
871
869
  timeout_client: request.timeoutClient
872
870
  });
873
871
  const marshalZonedApiCreateIpRequest = (request, defaults) => ({
874
- is_ipv6: request.isIpv6,
875
872
  reverse: request.reverse,
876
873
  ...resolveOneOf([{
877
874
  default: defaults.defaultProjectId,
@@ -887,7 +884,6 @@ const marshalZonedApiCreateLbRequest = (request, defaults) => ({
887
884
  assign_flexible_ip: request.assignFlexibleIp,
888
885
  description: request.description,
889
886
  ip_id: request.ipId,
890
- ip_ids: request.ipIds,
891
887
  name: request.name || randomName('lb'),
892
888
  ssl_compatibility_level: request.sslCompatibilityLevel ?? 'ssl_compatibility_level_unknown',
893
889
  tags: request.tags,
@@ -69,7 +69,7 @@ class API extends API$1 {
69
69
  return _this.client.fetch({
70
70
  method: 'GET',
71
71
  path: `/marketplace/v2/local-images`,
72
- urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['zone', request.zone ?? _this.client.settings.defaultZone], ...Object.entries(resolveOneOf([{
72
+ urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['type', request.type ?? 'unknown_type'], ['zone', request.zone ?? _this.client.settings.defaultZone], ...Object.entries(resolveOneOf([{
73
73
  param: 'image_id',
74
74
  value: request.imageId
75
75
  }, {
@@ -38,6 +38,7 @@ const unmarshalLocalImage = data => {
38
38
  compatibleCommercialTypes: data.compatible_commercial_types,
39
39
  id: data.id,
40
40
  label: data.label,
41
+ type: data.type,
41
42
  zone: data.zone
42
43
  };
43
44
  };
@@ -1,5 +1,7 @@
1
1
  export { API } from './api.gen.js';
2
2
  export { DATABASE_BACKUP_TRANSIENT_STATUSES, INSTANCE_LOG_TRANSIENT_STATUSES, INSTANCE_TRANSIENT_STATUSES, MAINTENANCE_TRANSIENT_STATUSES, READ_REPLICA_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES } from './content.gen.js';
3
+ import * as validationRules_gen from './validation-rules.gen.js';
4
+ export { validationRules_gen as ValidationRules };
3
5
 
4
6
  // This file was automatically generated. DO NOT EDIT.
5
7
  // If you have any remark or suggestion do not hesitate to open an issue.
@@ -67,6 +67,7 @@ const unmarshalBackupSchedule = data => {
67
67
  return {
68
68
  disabled: data.disabled,
69
69
  frequency: data.frequency,
70
+ nextRunAt: unmarshalDate(data.next_run_at),
70
71
  retention: data.retention
71
72
  };
72
73
  };
@@ -654,6 +655,7 @@ const marshalUpdateInstanceRequest = (request, defaults) => ({
654
655
  backup_same_region: request.backupSameRegion,
655
656
  backup_schedule_frequency: request.backupScheduleFrequency,
656
657
  backup_schedule_retention: request.backupScheduleRetention,
658
+ backup_schedule_start_hour: request.backupScheduleStartHour,
657
659
  is_backup_schedule_disabled: request.isBackupScheduleDisabled,
658
660
  logs_policy: request.logsPolicy ? marshalLogsPolicy(request.logsPolicy) : undefined,
659
661
  name: request.name,
@@ -0,0 +1,10 @@
1
+ // This file was automatically generated. DO NOT EDIT.
2
+ // If you have any remark or suggestion do not hesitate to open an issue.
3
+
4
+ const UpdateInstanceRequest = {
5
+ backupScheduleStartHour: {
6
+ lessThanOrEqual: 23
7
+ }
8
+ };
9
+
10
+ export { UpdateInstanceRequest };
@@ -11,6 +11,7 @@ const unmarshalPrivateNetwork = data => {
11
11
  }
12
12
  return {
13
13
  id: data.id,
14
+ provisioningMode: data.provisioning_mode,
14
15
  serviceIps: data.service_ips,
15
16
  zone: data.zone
16
17
  };
@@ -1,7 +1,7 @@
1
1
  import { API as API$1 } from '../../../scw/api.js';
2
2
  import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
3
3
  import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
4
- import { marshalCreateSecretRequest, unmarshalSecret, marshalUpdateSecretRequest, unmarshalListSecretsResponse, marshalAddSecretOwnerRequest, marshalCreateSecretVersionRequest, unmarshalSecretVersion, marshalGeneratePasswordRequest, marshalUpdateSecretVersionRequest, unmarshalListSecretVersionsResponse, unmarshalAccessSecretVersionResponse } from './marshalling.gen.js';
4
+ import { marshalCreateSecretRequest, unmarshalSecret, marshalUpdateSecretRequest, unmarshalListSecretsResponse, marshalAddSecretOwnerRequest, marshalCreateSecretVersionRequest, unmarshalSecretVersion, marshalGeneratePasswordRequest, marshalUpdateSecretVersionRequest, unmarshalListSecretVersionsResponse, unmarshalAccessSecretVersionResponse, unmarshalListTagsResponse } from './marshalling.gen.js';
5
5
 
6
6
  // This file was automatically generated. DO NOT EDIT.
7
7
  // If you have any remark or suggestion do not hesitate to open an issue.
@@ -33,8 +33,8 @@ class API extends API$1 {
33
33
  }, unmarshalSecret);
34
34
 
35
35
  /**
36
- * Get metadata using the secret's name. Retrieve the metadata of a secret
37
- * specified by the `region` and the `secret_name` parameters.
36
+ * Get metadata using the secret's ID. Retrieve the metadata of a secret
37
+ * specified by the `region` and `secret_id` parameters.
38
38
  *
39
39
  * @param request - The request {@link GetSecretRequest}
40
40
  * @returns A Promise of Secret
@@ -45,8 +45,8 @@ class API extends API$1 {
45
45
  }, unmarshalSecret);
46
46
 
47
47
  /**
48
- * Get metadata using the secret's ID. Retrieve the metadata of a secret
49
- * specified by the `region`, `secret_id` and `project_id` parameters.
48
+ * Get metadata using the secret's name. Retrieve the metadata of a secret
49
+ * specified by the `region` and `secret_name` parameters.
50
50
  *
51
51
  * @param request - The request {@link GetSecretByNameRequest}
52
52
  * @returns A Promise of Secret
@@ -294,6 +294,35 @@ class API extends API$1 {
294
294
  method: 'POST',
295
295
  path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/versions/${validatePathParam('revision', request.revision)}/destroy`
296
296
  }, unmarshalSecretVersion);
297
+ pageOfListTags = (() => {
298
+ var _this3 = this;
299
+ return function (request) {
300
+ if (request === void 0) {
301
+ request = {};
302
+ }
303
+ return _this3.client.fetch({
304
+ method: 'GET',
305
+ path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/tags`,
306
+ urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize], ['project_id', request.projectId])
307
+ }, unmarshalListTagsResponse);
308
+ };
309
+ })();
310
+
311
+ /**
312
+ * List tags. List all tags associated with secrets within a given Project.
313
+ *
314
+ * @param request - The request {@link ListTagsRequest}
315
+ * @returns A Promise of ListTagsResponse
316
+ */
317
+ listTags = (() => {
318
+ var _this4 = this;
319
+ return function (request) {
320
+ if (request === void 0) {
321
+ request = {};
322
+ }
323
+ return enrichForPagination('tags', _this4.pageOfListTags, request);
324
+ };
325
+ })();
297
326
  }
298
327
 
299
328
  export { API };
@@ -17,6 +17,7 @@ const unmarshalSecret = data => {
17
17
  region: data.region,
18
18
  status: data.status,
19
19
  tags: data.tags,
20
+ type: data.type,
20
21
  updatedAt: unmarshalDate(data.updated_at),
21
22
  versionCount: data.version_count
22
23
  };
@@ -64,6 +65,15 @@ const unmarshalListSecretsResponse = data => {
64
65
  totalCount: data.total_count
65
66
  };
66
67
  };
68
+ const unmarshalListTagsResponse = data => {
69
+ if (!isJSONObject(data)) {
70
+ throw new TypeError(`Unmarshalling the type 'ListTagsResponse' failed as data isn't a dictionary.`);
71
+ }
72
+ return {
73
+ tags: data.tags,
74
+ totalCount: data.total_count
75
+ };
76
+ };
67
77
  const marshalPasswordGenerationParams = (request, defaults) => ({
68
78
  additional_chars: request.additionalChars,
69
79
  length: request.length,
@@ -79,7 +89,8 @@ const marshalCreateSecretRequest = (request, defaults) => ({
79
89
  description: request.description,
80
90
  name: request.name,
81
91
  project_id: request.projectId ?? defaults.defaultProjectId,
82
- tags: request.tags
92
+ tags: request.tags,
93
+ type: request.type ?? 'unknown_secret_type'
83
94
  });
84
95
  const marshalCreateSecretVersionRequest = (request, defaults) => ({
85
96
  data: request.data,
@@ -109,4 +120,4 @@ const marshalUpdateSecretVersionRequest = (request, defaults) => ({
109
120
  description: request.description
110
121
  });
111
122
 
112
- export { marshalAddSecretOwnerRequest, marshalCreateSecretRequest, marshalCreateSecretVersionRequest, marshalGeneratePasswordRequest, marshalUpdateSecretRequest, marshalUpdateSecretVersionRequest, unmarshalAccessSecretVersionResponse, unmarshalListSecretVersionsResponse, unmarshalListSecretsResponse, unmarshalSecret, unmarshalSecretVersion };
123
+ export { marshalAddSecretOwnerRequest, marshalCreateSecretRequest, marshalCreateSecretVersionRequest, marshalGeneratePasswordRequest, marshalUpdateSecretRequest, marshalUpdateSecretVersionRequest, unmarshalAccessSecretVersionResponse, unmarshalListSecretVersionsResponse, unmarshalListSecretsResponse, unmarshalListTagsResponse, unmarshalSecret, unmarshalSecretVersion };
@@ -12,7 +12,7 @@ const jsonContentHeaders = {
12
12
  /** VPC API. */
13
13
  class API extends API$1 {
14
14
  /** Lists the available zones of the API. */
15
- static LOCALITIES = ['fr-par-1', 'fr-par-2', 'fr-par-3', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
15
+ static LOCALITIES = ['fr-par-1', 'fr-par-2', 'fr-par-3', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
16
16
  pageOfListPrivateNetworks = (() => {
17
17
  var _this = this;
18
18
  return function (request) {
@@ -98,7 +98,7 @@ class API extends API$1 {
98
98
  return _this3.client.fetch({
99
99
  method: 'GET',
100
100
  path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/private-networks`,
101
- urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize], ['private_network_ids', request.privateNetworkIds], ['project_id', request.projectId], ['tags', request.tags], ['vpc_id', request.vpcId])
101
+ urlParams: urlParams(['dhcp_enabled', request.dhcpEnabled], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize], ['private_network_ids', request.privateNetworkIds], ['project_id', request.projectId], ['tags', request.tags], ['vpc_id', request.vpcId])
102
102
  }, unmarshalListPrivateNetworksResponse);
103
103
  };
104
104
  })();
@@ -206,6 +206,21 @@ class API extends API$1 {
206
206
  };
207
207
  })();
208
208
 
209
+ /**
210
+ * Enable DHCP on a Private Network. Enable DHCP managed on an existing
211
+ * Private Network. Note that you will not be able to deactivate it
212
+ * afterwards.
213
+ *
214
+ * @param request - The request {@link EnableDHCPRequest}
215
+ * @returns A Promise of PrivateNetwork
216
+ */
217
+ enableDHCP = request => this.client.fetch({
218
+ body: '{}',
219
+ headers: jsonContentHeaders,
220
+ method: 'POST',
221
+ path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}/enable-dhcp`
222
+ }, unmarshalPrivateNetwork);
223
+
209
224
  /**
210
225
  * Set the subnets of a Private Network. Set subnets for an existing Private
211
226
  * Network. Note that the method is PUT and not PATCH. Any existing subnets
@@ -21,6 +21,7 @@ const unmarshalPrivateNetwork = data => {
21
21
  }
22
22
  return {
23
23
  createdAt: unmarshalDate(data.created_at),
24
+ dhcpEnabled: data.dhcp_enabled,
24
25
  id: data.id,
25
26
  name: data.name,
26
27
  organizationId: data.organization_id,
@@ -14,7 +14,7 @@ const jsonContentHeaders = {
14
14
  /** Public Gateways API. */
15
15
  class API extends API$1 {
16
16
  /** Lists the available zones of the API. */
17
- static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
17
+ static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
18
18
  pageOfListGateways = (() => {
19
19
  var _this = this;
20
20
  return function (request) {
@@ -2,6 +2,6 @@
2
2
  // If you have any remark or suggestion do not hesitate to open an issue.
3
3
 
4
4
  /** Lists transient statutes of the enum {@link HostingStatus}. */
5
- const HOSTING_TRANSIENT_STATUSES = ['delivering', 'deleting'];
5
+ const HOSTING_TRANSIENT_STATUSES = ['delivering', 'deleting', 'migrating'];
6
6
 
7
7
  export { HOSTING_TRANSIENT_STATUSES };