@scaleway/sdk 2.52.0 → 2.53.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.
Files changed (59) hide show
  1. package/dist/api/applesilicon/v1alpha1/marshalling.gen.cjs +1 -0
  2. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +1 -0
  3. package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +2 -0
  4. package/dist/api/container/v1beta1/index.gen.d.ts +1 -1
  5. package/dist/api/container/v1beta1/marshalling.gen.cjs +66 -6
  6. package/dist/api/container/v1beta1/marshalling.gen.js +67 -7
  7. package/dist/api/container/v1beta1/types.gen.d.ts +59 -2
  8. package/dist/api/container/v1beta1/validation-rules.gen.cjs +14 -0
  9. package/dist/api/container/v1beta1/validation-rules.gen.d.ts +12 -0
  10. package/dist/api/container/v1beta1/validation-rules.gen.js +14 -0
  11. package/dist/api/flexibleip/v1alpha1/api.gen.cjs +4 -1
  12. package/dist/api/flexibleip/v1alpha1/api.gen.js +4 -1
  13. package/dist/api/function/v1beta1/marshalling.gen.cjs +10 -4
  14. package/dist/api/function/v1beta1/marshalling.gen.js +11 -5
  15. package/dist/api/function/v1beta1/types.gen.d.ts +12 -0
  16. package/dist/api/iam/v1alpha1/api.gen.cjs +37 -0
  17. package/dist/api/iam/v1alpha1/api.gen.d.ts +22 -1
  18. package/dist/api/iam/v1alpha1/api.gen.js +37 -0
  19. package/dist/api/iam/v1alpha1/index.gen.d.ts +1 -1
  20. package/dist/api/iam/v1alpha1/types.gen.d.ts +12 -0
  21. package/dist/api/inference/v1beta1/types.gen.d.ts +3 -3
  22. package/dist/api/instance/v1/api.gen.cjs +2 -2
  23. package/dist/api/instance/v1/api.gen.d.ts +2 -2
  24. package/dist/api/instance/v1/api.gen.js +2 -2
  25. package/dist/api/instance/v1/types.gen.d.ts +2 -2
  26. package/dist/api/iot/v1/api.gen.cjs +4 -3
  27. package/dist/api/iot/v1/api.gen.d.ts +4 -3
  28. package/dist/api/iot/v1/api.gen.js +4 -3
  29. package/dist/api/iot/v1/types.gen.d.ts +6 -6
  30. package/dist/api/k8s/v1/api.gen.cjs +64 -0
  31. package/dist/api/k8s/v1/api.gen.d.ts +32 -1
  32. package/dist/api/k8s/v1/api.gen.js +65 -1
  33. package/dist/api/k8s/v1/index.gen.d.ts +1 -1
  34. package/dist/api/k8s/v1/marshalling.gen.cjs +62 -0
  35. package/dist/api/k8s/v1/marshalling.gen.d.ts +6 -1
  36. package/dist/api/k8s/v1/marshalling.gen.js +62 -0
  37. package/dist/api/k8s/v1/types.gen.d.ts +92 -0
  38. package/dist/api/k8s/v1/validation-rules.gen.cjs +6 -0
  39. package/dist/api/k8s/v1/validation-rules.gen.d.ts +5 -0
  40. package/dist/api/k8s/v1/validation-rules.gen.js +6 -0
  41. package/dist/api/lb/v1/types.gen.d.ts +15 -10
  42. package/dist/api/mongodb/v1alpha1/api.gen.cjs +33 -15
  43. package/dist/api/mongodb/v1alpha1/api.gen.d.ts +26 -18
  44. package/dist/api/mongodb/v1alpha1/api.gen.js +34 -16
  45. package/dist/api/mongodb/v1alpha1/index.gen.d.ts +1 -1
  46. package/dist/api/mongodb/v1alpha1/marshalling.gen.cjs +5 -0
  47. package/dist/api/mongodb/v1alpha1/marshalling.gen.d.ts +2 -1
  48. package/dist/api/mongodb/v1alpha1/marshalling.gen.js +5 -0
  49. package/dist/api/mongodb/v1alpha1/types.gen.d.ts +38 -25
  50. package/dist/api/mongodb/v1alpha1/validation-rules.gen.cjs +12 -0
  51. package/dist/api/mongodb/v1alpha1/validation-rules.gen.d.ts +11 -0
  52. package/dist/api/mongodb/v1alpha1/validation-rules.gen.js +12 -0
  53. package/dist/api/rdb/v1/marshalling.gen.cjs +2 -1
  54. package/dist/api/rdb/v1/marshalling.gen.js +2 -1
  55. package/dist/api/rdb/v1/types.gen.d.ts +22 -13
  56. package/dist/scw/constants.cjs +1 -1
  57. package/dist/scw/constants.d.ts +2 -2
  58. package/dist/scw/constants.js +1 -1
  59. package/package.json +2 -2
@@ -179,6 +179,29 @@ const unmarshalNode = (data) => {
179
179
  updatedAt: marshalling.unmarshalDate(data.updated_at)
180
180
  };
181
181
  };
182
+ const unmarshalACLRule = (data) => {
183
+ if (!json.isJSONObject(data)) {
184
+ throw new TypeError(
185
+ `Unmarshalling the type 'ACLRule' failed as data isn't a dictionary.`
186
+ );
187
+ }
188
+ return {
189
+ description: data.description,
190
+ id: data.id,
191
+ ip: data.ip,
192
+ scalewayRanges: data.scaleway_ranges
193
+ };
194
+ };
195
+ const unmarshalAddClusterACLRulesResponse = (data) => {
196
+ if (!json.isJSONObject(data)) {
197
+ throw new TypeError(
198
+ `Unmarshalling the type 'AddClusterACLRulesResponse' failed as data isn't a dictionary.`
199
+ );
200
+ }
201
+ return {
202
+ rules: marshalling.unmarshalArrayOfObject(data.rules, unmarshalACLRule)
203
+ };
204
+ };
182
205
  const unmarshalExternalNodeCoreV1Taint = (data) => {
183
206
  if (!json.isJSONObject(data)) {
184
207
  throw new TypeError(
@@ -227,6 +250,17 @@ const unmarshalExternalNodeAuth = (data) => {
227
250
  nodeToken: data.node_token
228
251
  };
229
252
  };
253
+ const unmarshalListClusterACLRulesResponse = (data) => {
254
+ if (!json.isJSONObject(data)) {
255
+ throw new TypeError(
256
+ `Unmarshalling the type 'ListClusterACLRulesResponse' failed as data isn't a dictionary.`
257
+ );
258
+ }
259
+ return {
260
+ rules: marshalling.unmarshalArrayOfObject(data.rules, unmarshalACLRule),
261
+ totalCount: data.total_count
262
+ };
263
+ };
230
264
  const unmarshalClusterType = (data) => {
231
265
  if (!json.isJSONObject(data)) {
232
266
  throw new TypeError(
@@ -365,6 +399,26 @@ const unmarshalNodeMetadata = (data) => {
365
399
  privateNetworkMode: data.private_network_mode
366
400
  };
367
401
  };
402
+ const unmarshalSetClusterACLRulesResponse = (data) => {
403
+ if (!json.isJSONObject(data)) {
404
+ throw new TypeError(
405
+ `Unmarshalling the type 'SetClusterACLRulesResponse' failed as data isn't a dictionary.`
406
+ );
407
+ }
408
+ return {
409
+ rules: marshalling.unmarshalArrayOfObject(data.rules, unmarshalACLRule)
410
+ };
411
+ };
412
+ const marshalACLRuleRequest = (request, defaults) => ({
413
+ description: request.description,
414
+ ...marshalling.resolveOneOf([
415
+ { param: "ip", value: request.ip },
416
+ { param: "scaleway_ranges", value: request.scalewayRanges }
417
+ ])
418
+ });
419
+ const marshalAddClusterACLRulesRequest = (request, defaults) => ({
420
+ acls: request.acls !== void 0 ? request.acls.map((elt) => marshalACLRuleRequest(elt)) : void 0
421
+ });
368
422
  const marshalMaintenanceWindow = (request, defaults) => ({
369
423
  day: request.day,
370
424
  start_hour: request.startHour
@@ -474,6 +528,9 @@ const marshalCreatePoolRequest = (request, defaults) => ({
474
528
  upgrade_policy: request.upgradePolicy !== void 0 ? marshalCreatePoolRequestUpgradePolicy(request.upgradePolicy) : void 0,
475
529
  zone: request.zone ?? defaults.defaultZone
476
530
  });
531
+ const marshalSetClusterACLRulesRequest = (request, defaults) => ({
532
+ acls: request.acls !== void 0 ? request.acls.map((elt) => marshalACLRuleRequest(elt)) : void 0
533
+ });
477
534
  const marshalSetClusterTypeRequest = (request, defaults) => ({
478
535
  type: request.type
479
536
  });
@@ -538,16 +595,20 @@ const marshalUpgradeClusterRequest = (request, defaults) => ({
538
595
  const marshalUpgradePoolRequest = (request, defaults) => ({
539
596
  version: request.version
540
597
  });
598
+ exports.marshalAddClusterACLRulesRequest = marshalAddClusterACLRulesRequest;
541
599
  exports.marshalCreateClusterRequest = marshalCreateClusterRequest;
542
600
  exports.marshalCreatePoolRequest = marshalCreatePoolRequest;
601
+ exports.marshalSetClusterACLRulesRequest = marshalSetClusterACLRulesRequest;
543
602
  exports.marshalSetClusterTypeRequest = marshalSetClusterTypeRequest;
544
603
  exports.marshalUpdateClusterRequest = marshalUpdateClusterRequest;
545
604
  exports.marshalUpdatePoolRequest = marshalUpdatePoolRequest;
546
605
  exports.marshalUpgradeClusterRequest = marshalUpgradeClusterRequest;
547
606
  exports.marshalUpgradePoolRequest = marshalUpgradePoolRequest;
607
+ exports.unmarshalAddClusterACLRulesResponse = unmarshalAddClusterACLRulesResponse;
548
608
  exports.unmarshalCluster = unmarshalCluster;
549
609
  exports.unmarshalExternalNode = unmarshalExternalNode;
550
610
  exports.unmarshalExternalNodeAuth = unmarshalExternalNodeAuth;
611
+ exports.unmarshalListClusterACLRulesResponse = unmarshalListClusterACLRulesResponse;
551
612
  exports.unmarshalListClusterAvailableTypesResponse = unmarshalListClusterAvailableTypesResponse;
552
613
  exports.unmarshalListClusterAvailableVersionsResponse = unmarshalListClusterAvailableVersionsResponse;
553
614
  exports.unmarshalListClusterTypesResponse = unmarshalListClusterTypesResponse;
@@ -558,4 +619,5 @@ exports.unmarshalListVersionsResponse = unmarshalListVersionsResponse;
558
619
  exports.unmarshalNode = unmarshalNode;
559
620
  exports.unmarshalNodeMetadata = unmarshalNodeMetadata;
560
621
  exports.unmarshalPool = unmarshalPool;
622
+ exports.unmarshalSetClusterACLRulesResponse = unmarshalSetClusterACLRulesResponse;
561
623
  exports.unmarshalVersion = unmarshalVersion;
@@ -1,11 +1,13 @@
1
1
  import type { DefaultValues } from '../../../bridge';
2
- import type { Cluster, CreateClusterRequest, CreatePoolRequest, ExternalNode, ExternalNodeAuth, ListClusterAvailableTypesResponse, ListClusterAvailableVersionsResponse, ListClusterTypesResponse, ListClustersResponse, ListNodesResponse, ListPoolsResponse, ListVersionsResponse, Node, NodeMetadata, Pool, SetClusterTypeRequest, UpdateClusterRequest, UpdatePoolRequest, UpgradeClusterRequest, UpgradePoolRequest, Version } from './types.gen';
2
+ import type { AddClusterACLRulesRequest, AddClusterACLRulesResponse, Cluster, CreateClusterRequest, CreatePoolRequest, ExternalNode, ExternalNodeAuth, ListClusterACLRulesResponse, ListClusterAvailableTypesResponse, ListClusterAvailableVersionsResponse, ListClusterTypesResponse, ListClustersResponse, ListNodesResponse, ListPoolsResponse, ListVersionsResponse, Node, NodeMetadata, Pool, SetClusterACLRulesRequest, SetClusterACLRulesResponse, SetClusterTypeRequest, UpdateClusterRequest, UpdatePoolRequest, UpgradeClusterRequest, UpgradePoolRequest, Version } from './types.gen';
3
3
  export declare const unmarshalPool: (data: unknown) => Pool;
4
4
  export declare const unmarshalVersion: (data: unknown) => Version;
5
5
  export declare const unmarshalCluster: (data: unknown) => Cluster;
6
6
  export declare const unmarshalNode: (data: unknown) => Node;
7
+ export declare const unmarshalAddClusterACLRulesResponse: (data: unknown) => AddClusterACLRulesResponse;
7
8
  export declare const unmarshalExternalNode: (data: unknown) => ExternalNode;
8
9
  export declare const unmarshalExternalNodeAuth: (data: unknown) => ExternalNodeAuth;
10
+ export declare const unmarshalListClusterACLRulesResponse: (data: unknown) => ListClusterACLRulesResponse;
9
11
  export declare const unmarshalListClusterAvailableTypesResponse: (data: unknown) => ListClusterAvailableTypesResponse;
10
12
  export declare const unmarshalListClusterAvailableVersionsResponse: (data: unknown) => ListClusterAvailableVersionsResponse;
11
13
  export declare const unmarshalListClusterTypesResponse: (data: unknown) => ListClusterTypesResponse;
@@ -14,8 +16,11 @@ export declare const unmarshalListNodesResponse: (data: unknown) => ListNodesRes
14
16
  export declare const unmarshalListPoolsResponse: (data: unknown) => ListPoolsResponse;
15
17
  export declare const unmarshalListVersionsResponse: (data: unknown) => ListVersionsResponse;
16
18
  export declare const unmarshalNodeMetadata: (data: unknown) => NodeMetadata;
19
+ export declare const unmarshalSetClusterACLRulesResponse: (data: unknown) => SetClusterACLRulesResponse;
20
+ export declare const marshalAddClusterACLRulesRequest: (request: AddClusterACLRulesRequest, defaults: DefaultValues) => Record<string, unknown>;
17
21
  export declare const marshalCreateClusterRequest: (request: CreateClusterRequest, defaults: DefaultValues) => Record<string, unknown>;
18
22
  export declare const marshalCreatePoolRequest: (request: CreatePoolRequest, defaults: DefaultValues) => Record<string, unknown>;
23
+ export declare const marshalSetClusterACLRulesRequest: (request: SetClusterACLRulesRequest, defaults: DefaultValues) => Record<string, unknown>;
19
24
  export declare const marshalSetClusterTypeRequest: (request: SetClusterTypeRequest, defaults: DefaultValues) => Record<string, unknown>;
20
25
  export declare const marshalUpdateClusterRequest: (request: UpdateClusterRequest, defaults: DefaultValues) => Record<string, unknown>;
21
26
  export declare const marshalUpdatePoolRequest: (request: UpdatePoolRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -177,6 +177,29 @@ const unmarshalNode = (data) => {
177
177
  updatedAt: unmarshalDate(data.updated_at)
178
178
  };
179
179
  };
180
+ const unmarshalACLRule = (data) => {
181
+ if (!isJSONObject(data)) {
182
+ throw new TypeError(
183
+ `Unmarshalling the type 'ACLRule' failed as data isn't a dictionary.`
184
+ );
185
+ }
186
+ return {
187
+ description: data.description,
188
+ id: data.id,
189
+ ip: data.ip,
190
+ scalewayRanges: data.scaleway_ranges
191
+ };
192
+ };
193
+ const unmarshalAddClusterACLRulesResponse = (data) => {
194
+ if (!isJSONObject(data)) {
195
+ throw new TypeError(
196
+ `Unmarshalling the type 'AddClusterACLRulesResponse' failed as data isn't a dictionary.`
197
+ );
198
+ }
199
+ return {
200
+ rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule)
201
+ };
202
+ };
180
203
  const unmarshalExternalNodeCoreV1Taint = (data) => {
181
204
  if (!isJSONObject(data)) {
182
205
  throw new TypeError(
@@ -225,6 +248,17 @@ const unmarshalExternalNodeAuth = (data) => {
225
248
  nodeToken: data.node_token
226
249
  };
227
250
  };
251
+ const unmarshalListClusterACLRulesResponse = (data) => {
252
+ if (!isJSONObject(data)) {
253
+ throw new TypeError(
254
+ `Unmarshalling the type 'ListClusterACLRulesResponse' failed as data isn't a dictionary.`
255
+ );
256
+ }
257
+ return {
258
+ rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule),
259
+ totalCount: data.total_count
260
+ };
261
+ };
228
262
  const unmarshalClusterType = (data) => {
229
263
  if (!isJSONObject(data)) {
230
264
  throw new TypeError(
@@ -363,6 +397,26 @@ const unmarshalNodeMetadata = (data) => {
363
397
  privateNetworkMode: data.private_network_mode
364
398
  };
365
399
  };
400
+ const unmarshalSetClusterACLRulesResponse = (data) => {
401
+ if (!isJSONObject(data)) {
402
+ throw new TypeError(
403
+ `Unmarshalling the type 'SetClusterACLRulesResponse' failed as data isn't a dictionary.`
404
+ );
405
+ }
406
+ return {
407
+ rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule)
408
+ };
409
+ };
410
+ const marshalACLRuleRequest = (request, defaults) => ({
411
+ description: request.description,
412
+ ...resolveOneOf([
413
+ { param: "ip", value: request.ip },
414
+ { param: "scaleway_ranges", value: request.scalewayRanges }
415
+ ])
416
+ });
417
+ const marshalAddClusterACLRulesRequest = (request, defaults) => ({
418
+ acls: request.acls !== void 0 ? request.acls.map((elt) => marshalACLRuleRequest(elt)) : void 0
419
+ });
366
420
  const marshalMaintenanceWindow = (request, defaults) => ({
367
421
  day: request.day,
368
422
  start_hour: request.startHour
@@ -472,6 +526,9 @@ const marshalCreatePoolRequest = (request, defaults) => ({
472
526
  upgrade_policy: request.upgradePolicy !== void 0 ? marshalCreatePoolRequestUpgradePolicy(request.upgradePolicy) : void 0,
473
527
  zone: request.zone ?? defaults.defaultZone
474
528
  });
529
+ const marshalSetClusterACLRulesRequest = (request, defaults) => ({
530
+ acls: request.acls !== void 0 ? request.acls.map((elt) => marshalACLRuleRequest(elt)) : void 0
531
+ });
475
532
  const marshalSetClusterTypeRequest = (request, defaults) => ({
476
533
  type: request.type
477
534
  });
@@ -537,16 +594,20 @@ const marshalUpgradePoolRequest = (request, defaults) => ({
537
594
  version: request.version
538
595
  });
539
596
  export {
597
+ marshalAddClusterACLRulesRequest,
540
598
  marshalCreateClusterRequest,
541
599
  marshalCreatePoolRequest,
600
+ marshalSetClusterACLRulesRequest,
542
601
  marshalSetClusterTypeRequest,
543
602
  marshalUpdateClusterRequest,
544
603
  marshalUpdatePoolRequest,
545
604
  marshalUpgradeClusterRequest,
546
605
  marshalUpgradePoolRequest,
606
+ unmarshalAddClusterACLRulesResponse,
547
607
  unmarshalCluster,
548
608
  unmarshalExternalNode,
549
609
  unmarshalExternalNodeAuth,
610
+ unmarshalListClusterACLRulesResponse,
550
611
  unmarshalListClusterAvailableTypesResponse,
551
612
  unmarshalListClusterAvailableVersionsResponse,
552
613
  unmarshalListClusterTypesResponse,
@@ -557,5 +618,6 @@ export {
557
618
  unmarshalNode,
558
619
  unmarshalNodeMetadata,
559
620
  unmarshalPool,
621
+ unmarshalSetClusterACLRulesResponse,
560
622
  unmarshalVersion
561
623
  };
@@ -188,6 +188,40 @@ export interface Pool {
188
188
  /** Cluster region of the pool. */
189
189
  region: Region;
190
190
  }
191
+ export interface ACLRuleRequest {
192
+ /**
193
+ * IP subnet to allow.
194
+ *
195
+ * One-of ('allowed'): at most one of 'ip', 'scalewayRanges' could be set.
196
+ */
197
+ ip?: string;
198
+ /**
199
+ * Only one rule with this field set to true can be added.
200
+ *
201
+ * One-of ('allowed'): at most one of 'ip', 'scalewayRanges' could be set.
202
+ */
203
+ scalewayRanges?: boolean;
204
+ /** Description of the ACL. */
205
+ description: string;
206
+ }
207
+ export interface ACLRule {
208
+ /** ID of the ACL rule. */
209
+ id: string;
210
+ /**
211
+ * IP subnet to allow.
212
+ *
213
+ * One-of ('allowed'): at most one of 'ip', 'scalewayRanges' could be set.
214
+ */
215
+ ip?: string;
216
+ /**
217
+ * Only one rule with this field set to true can be added.
218
+ *
219
+ * One-of ('allowed'): at most one of 'ip', 'scalewayRanges' could be set.
220
+ */
221
+ scalewayRanges?: boolean;
222
+ /** Description of the ACL. */
223
+ description: string;
224
+ }
191
225
  export interface CreateClusterRequestAutoUpgrade {
192
226
  /** Defines whether auto upgrade is enabled for the cluster. */
193
227
  enable: boolean;
@@ -580,6 +614,21 @@ export interface UpdatePoolRequestUpgradePolicy {
580
614
  maxUnavailable?: number;
581
615
  maxSurge?: number;
582
616
  }
617
+ export type AddClusterACLRulesRequest = {
618
+ /**
619
+ * Region to target. If none is passed will use default region from the
620
+ * config.
621
+ */
622
+ region?: Region;
623
+ /** ID of the cluster whose ACLs will be added. */
624
+ clusterId: string;
625
+ /** ACLs to add. */
626
+ acls?: ACLRuleRequest[];
627
+ };
628
+ export interface AddClusterACLRulesResponse {
629
+ /** ACLs that were added. */
630
+ rules: ACLRule[];
631
+ }
583
632
  export type AuthExternalNodeRequest = {
584
633
  /**
585
634
  * Region to target. If none is passed will use default region from the
@@ -736,6 +785,15 @@ export type CreatePoolRequest = {
736
785
  */
737
786
  publicIpDisabled: boolean;
738
787
  };
788
+ export type DeleteACLRuleRequest = {
789
+ /**
790
+ * Region to target. If none is passed will use default region from the
791
+ * config.
792
+ */
793
+ region?: Region;
794
+ /** ID of the ACL rule to delete. */
795
+ aclId: string;
796
+ };
739
797
  export type DeleteClusterRequest = {
740
798
  /**
741
799
  * Region to target. If none is passed will use default region from the
@@ -849,6 +907,25 @@ export type GetVersionRequest = {
849
907
  /** Requested version name. */
850
908
  versionName: string;
851
909
  };
910
+ export type ListClusterACLRulesRequest = {
911
+ /**
912
+ * Region to target. If none is passed will use default region from the
913
+ * config.
914
+ */
915
+ region?: Region;
916
+ /** ID of the cluster whose ACLs will be listed. */
917
+ clusterId: string;
918
+ /** Page number for the returned ACLs. */
919
+ page?: number;
920
+ /** Maximum number of ACLs per page. */
921
+ pageSize?: number;
922
+ };
923
+ export interface ListClusterACLRulesResponse {
924
+ /** Total number of ACLs that exist for the cluster. */
925
+ totalCount: number;
926
+ /** Paginated returned ACLs. */
927
+ rules: ACLRule[];
928
+ }
852
929
  export type ListClusterAvailableTypesRequest = {
853
930
  /**
854
931
  * Region to target. If none is passed will use default region from the
@@ -1055,6 +1132,21 @@ export type ResetClusterAdminTokenRequest = {
1055
1132
  /** Cluster ID on which the admin token will be renewed. */
1056
1133
  clusterId: string;
1057
1134
  };
1135
+ export type SetClusterACLRulesRequest = {
1136
+ /**
1137
+ * Region to target. If none is passed will use default region from the
1138
+ * config.
1139
+ */
1140
+ region?: Region;
1141
+ /** ID of the cluster whose ACLs will be set. */
1142
+ clusterId: string;
1143
+ /** ACLs to set. */
1144
+ acls?: ACLRuleRequest[];
1145
+ };
1146
+ export interface SetClusterACLRulesResponse {
1147
+ /** ACLs that were set. */
1148
+ rules: ACLRule[];
1149
+ }
1058
1150
  export type SetClusterTypeRequest = {
1059
1151
  /**
1060
1152
  * Region to target. If none is passed will use default region from the
@@ -1,5 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const ACLRuleRequest = {
4
+ description: {
5
+ maxLength: 2e3
6
+ }
7
+ };
3
8
  const CreateClusterRequest = {
4
9
  description: {
5
10
  maxLength: 4096
@@ -148,6 +153,7 @@ const UpgradeClusterRequest = {
148
153
  maxLength: 10
149
154
  }
150
155
  };
156
+ exports.ACLRuleRequest = ACLRuleRequest;
151
157
  exports.CreateClusterRequest = CreateClusterRequest;
152
158
  exports.CreateClusterRequestAutoscalerConfig = CreateClusterRequestAutoscalerConfig;
153
159
  exports.CreateClusterRequestOpenIDConnectConfig = CreateClusterRequestOpenIDConnectConfig;
@@ -1,3 +1,8 @@
1
+ export declare const ACLRuleRequest: {
2
+ description: {
3
+ maxLength: number;
4
+ };
5
+ };
1
6
  export declare const CreateClusterRequest: {
2
7
  description: {
3
8
  maxLength: number;
@@ -1,3 +1,8 @@
1
+ const ACLRuleRequest = {
2
+ description: {
3
+ maxLength: 2e3
4
+ }
5
+ };
1
6
  const CreateClusterRequest = {
2
7
  description: {
3
8
  maxLength: 4096
@@ -147,6 +152,7 @@ const UpgradeClusterRequest = {
147
152
  }
148
153
  };
149
154
  export {
155
+ ACLRuleRequest,
150
156
  CreateClusterRequest,
151
157
  CreateClusterRequestAutoscalerConfig,
152
158
  CreateClusterRequestOpenIDConnectConfig,
@@ -341,8 +341,9 @@ export interface Backend {
341
341
  /** Date at which the backend was updated. */
342
342
  updatedAt?: Date;
343
343
  /**
344
- * Scaleway S3 bucket website to be served as failover if all backend servers
345
- * are down, e.g. failover-website.s3-website.fr-par.scw.cloud.
344
+ * Scaleway Object Storage bucket website to be served as failover if all
345
+ * backend servers are down, e.g.
346
+ * failover-website.s3-website.fr-par.scw.cloud.
346
347
  */
347
348
  failoverHost?: string;
348
349
  /**
@@ -763,8 +764,9 @@ export type CreateBackendRequest = {
763
764
  */
764
765
  proxyProtocol?: ProxyProtocol;
765
766
  /**
766
- * Scaleway S3 bucket website to be served as failover if all backend servers
767
- * are down, e.g. failover-website.s3-website.fr-par.scw.cloud.
767
+ * Scaleway Object Storage bucket website to be served as failover if all
768
+ * backend servers are down, e.g.
769
+ * failover-website.s3-website.fr-par.scw.cloud.
768
770
  */
769
771
  failoverHost?: string;
770
772
  /**
@@ -1570,8 +1572,9 @@ export type UpdateBackendRequest = {
1570
1572
  */
1571
1573
  proxyProtocol?: ProxyProtocol;
1572
1574
  /**
1573
- * Scaleway S3 bucket website to be served as failover if all backend servers
1574
- * are down, e.g. failover-website.s3-website.fr-par.scw.cloud.
1575
+ * Scaleway Object Storage bucket website to be served as failover if all
1576
+ * backend servers are down, e.g.
1577
+ * failover-website.s3-website.fr-par.scw.cloud.
1575
1578
  */
1576
1579
  failoverHost?: string;
1577
1580
  /**
@@ -1923,8 +1926,9 @@ export type ZonedApiCreateBackendRequest = {
1923
1926
  */
1924
1927
  proxyProtocol?: ProxyProtocol;
1925
1928
  /**
1926
- * Scaleway S3 bucket website to be served as failover if all backend servers
1927
- * are down, e.g. failover-website.s3-website.fr-par.scw.cloud.
1929
+ * Scaleway Object Storage bucket website to be served as failover if all
1930
+ * backend servers are down, e.g.
1931
+ * failover-website.s3-website.fr-par.scw.cloud.
1928
1932
  */
1929
1933
  failoverHost?: string;
1930
1934
  /**
@@ -2539,8 +2543,9 @@ export type ZonedApiUpdateBackendRequest = {
2539
2543
  */
2540
2544
  proxyProtocol?: ProxyProtocol;
2541
2545
  /**
2542
- * Scaleway S3 bucket website to be served as failover if all backend servers
2543
- * are down, e.g. failover-website.s3-website.fr-par.scw.cloud.
2546
+ * Scaleway Object Storage bucket website to be served as failover if all
2547
+ * backend servers are down, e.g.
2548
+ * failover-website.s3-website.fr-par.scw.cloud.
2544
2549
  */
2545
2550
  failoverHost?: string;
2546
2551
  /**
@@ -51,7 +51,7 @@ class API extends api.API {
51
51
  marshalling_gen.unmarshalListVersionsResponse
52
52
  );
53
53
  /**
54
- * List available MongoDB versions.
54
+ * List available MongoDB® versions.
55
55
  *
56
56
  * @param request - The request {@link ListVersionsRequest}
57
57
  * @returns A Promise of ListVersionsResponse
@@ -83,22 +83,21 @@ class API extends api.API {
83
83
  marshalling_gen.unmarshalListInstancesResponse
84
84
  );
85
85
  /**
86
- * List MongoDB Database Instances. List all MongoDB Database Instances in
87
- * the specified region, for a given Scaleway Project. By default, the
88
- * MongoDB™ Database Instances returned in the list are ordered by creation
89
- * date in ascending order, though this can be modified via the order_by
90
- * field. You can define additional parameters for your query, such as `tags`
91
- * and `name`. For the `name` parameter, the value you include will be checked
92
- * against the whole name string to see if it includes the string you put in
93
- * the parameter.
86
+ * List MongoDB® Database Instances. List all MongoDB® Database Instances in
87
+ * the specified region. By default, the MongoDB® Database Instances returned
88
+ * in the list are ordered by creation date in ascending order, though this
89
+ * can be modified via the order_by field. You can define additional
90
+ * parameters for your query, such as `tags` and `name`. For the `name`
91
+ * parameter, the value you include will be checked against the whole name
92
+ * string to see if it includes the string you put in the parameter.
94
93
  *
95
94
  * @param request - The request {@link ListInstancesRequest}
96
95
  * @returns A Promise of ListInstancesResponse
97
96
  */
98
97
  listInstances = (request = {}) => resourcePaginator.enrichForPagination("instances", this.pageOfListInstances, request);
99
98
  /**
100
- * Get a MongoDB Database Instance. Retrieve information about a given
101
- * MongoDB Database Instance, specified by the `region` and `instance_id`
99
+ * Get a MongoDB® Database Instance. Retrieve information about a given
100
+ * MongoDB® Database Instance, specified by the `region` and `instance_id`
102
101
  * parameters. Its full details, including name, status, IP address and port,
103
102
  * are returned in the response object.
104
103
  *
@@ -126,7 +125,7 @@ class API extends api.API {
126
125
  options
127
126
  );
128
127
  /**
129
- * Create a MongoDB Database Instance. Create a new MongoDB Database
128
+ * Create a MongoDB® Database Instance. Create a new MongoDB® Database
130
129
  * Instance.
131
130
  *
132
131
  * @param request - The request {@link CreateInstanceRequest}
@@ -144,7 +143,7 @@ class API extends api.API {
144
143
  marshalling_gen.unmarshalInstance
145
144
  );
146
145
  /**
147
- * Update a MongoDB Database Instance. Update the parameters of a MongoDB
146
+ * Update a MongoDB® Database Instance. Update the parameters of a MongoDB®
148
147
  * Database Instance.
149
148
  *
150
149
  * @param request - The request {@link UpdateInstanceRequest}
@@ -162,9 +161,9 @@ class API extends api.API {
162
161
  marshalling_gen.unmarshalInstance
163
162
  );
164
163
  /**
165
- * Delete a MongoDB Database Instance. Delete a given MongoDB Database
164
+ * Delete a MongoDB® Database Instance. Delete a given MongoDB® Database
166
165
  * Instance, specified by the `region` and `instance_id` parameters. Deleting
167
- * a MongoDB Database Instance is permanent, and cannot be undone. Note that
166
+ * a MongoDB® Database Instance is permanent, and cannot be undone. Note that
168
167
  * upon deletion all your data will be lost.
169
168
  *
170
169
  * @param request - The request {@link DeleteInstanceRequest}
@@ -370,6 +369,25 @@ class API extends api.API {
370
369
  * @returns A Promise of ListUsersResponse
371
370
  */
372
371
  listUsers = (request) => resourcePaginator.enrichForPagination("users", this.pageOfListUsers, request);
372
+ /**
373
+ * Create an user on a Database Instance. Create an user on a Database
374
+ * Instance. You must define the `name`, `password` of the user and
375
+ * `instance_id` parameters in the request.
376
+ *
377
+ * @param request - The request {@link CreateUserRequest}
378
+ * @returns A Promise of User
379
+ */
380
+ createUser = (request) => this.client.fetch(
381
+ {
382
+ body: JSON.stringify(
383
+ marshalling_gen.marshalCreateUserRequest(request, this.client.settings)
384
+ ),
385
+ headers: jsonContentHeaders,
386
+ method: "POST",
387
+ path: `/mongodb/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${marshalling.validatePathParam("instanceId", request.instanceId)}/users`
388
+ },
389
+ marshalling_gen.unmarshalUser
390
+ );
373
391
  /**
374
392
  * Update a user on a Database Instance. Update the parameters of a user on a
375
393
  * Database Instance. You can update the `password` parameter, but you cannot