@scaleway/sdk 2.52.1 → 2.54.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/api/applesilicon/v1alpha1/api.gen.cjs +21 -0
- package/dist/api/applesilicon/v1alpha1/api.gen.d.ts +3 -1
- package/dist/api/applesilicon/v1alpha1/api.gen.js +22 -1
- package/dist/api/applesilicon/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.cjs +47 -0
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.d.ts +4 -1
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +48 -1
- package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +33 -0
- package/dist/api/block/v1alpha1/api.gen.cjs +2 -1
- package/dist/api/block/v1alpha1/api.gen.js +2 -1
- package/dist/api/block/v1alpha1/types.gen.d.ts +5 -0
- package/dist/api/cockpit/v1/api.gen.cjs +21 -2
- package/dist/api/cockpit/v1/api.gen.d.ts +16 -3
- package/dist/api/cockpit/v1/api.gen.js +22 -3
- package/dist/api/cockpit/v1/index.gen.d.ts +1 -1
- package/dist/api/cockpit/v1/marshalling.gen.cjs +29 -1
- package/dist/api/cockpit/v1/marshalling.gen.d.ts +2 -1
- package/dist/api/cockpit/v1/marshalling.gen.js +29 -1
- package/dist/api/cockpit/v1/types.gen.d.ts +29 -1
- package/dist/api/cockpit/v1/validation-rules.gen.cjs +11 -0
- package/dist/api/cockpit/v1/validation-rules.gen.d.ts +11 -0
- package/dist/api/cockpit/v1/validation-rules.gen.js +11 -0
- package/dist/api/container/v1beta1/index.gen.d.ts +1 -1
- package/dist/api/container/v1beta1/marshalling.gen.cjs +70 -6
- package/dist/api/container/v1beta1/marshalling.gen.js +71 -7
- package/dist/api/container/v1beta1/types.gen.d.ts +74 -2
- package/dist/api/container/v1beta1/validation-rules.gen.cjs +14 -0
- package/dist/api/container/v1beta1/validation-rules.gen.d.ts +12 -0
- package/dist/api/container/v1beta1/validation-rules.gen.js +14 -0
- package/dist/api/edge_services/v1alpha1/types.gen.d.ts +4 -4
- package/dist/api/function/v1beta1/marshalling.gen.cjs +12 -4
- package/dist/api/function/v1beta1/marshalling.gen.js +13 -5
- package/dist/api/function/v1beta1/types.gen.d.ts +16 -0
- package/dist/api/iam/v1alpha1/api.gen.cjs +37 -0
- package/dist/api/iam/v1alpha1/api.gen.d.ts +22 -1
- package/dist/api/iam/v1alpha1/api.gen.js +37 -0
- package/dist/api/iam/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/iam/v1alpha1/types.gen.d.ts +12 -0
- package/dist/api/inference/v1beta1/types.gen.d.ts +3 -3
- package/dist/api/instance/v1/api.gen.cjs +2 -2
- package/dist/api/instance/v1/api.gen.d.ts +2 -2
- package/dist/api/instance/v1/api.gen.js +2 -2
- package/dist/api/instance/v1/types.gen.d.ts +2 -2
- package/dist/api/iot/v1/api.gen.cjs +4 -3
- package/dist/api/iot/v1/api.gen.d.ts +4 -3
- package/dist/api/iot/v1/api.gen.js +4 -3
- package/dist/api/iot/v1/types.gen.d.ts +6 -6
- package/dist/api/ipam/v1/types.gen.d.ts +1 -1
- package/dist/api/jobs/v1alpha1/api.gen.cjs +29 -0
- package/dist/api/jobs/v1alpha1/api.gen.d.ts +29 -0
- package/dist/api/jobs/v1alpha1/api.gen.js +29 -0
- package/dist/api/jobs/v1alpha1/types.gen.d.ts +38 -6
- package/dist/api/k8s/v1/api.gen.cjs +65 -1
- package/dist/api/k8s/v1/api.gen.d.ts +32 -1
- package/dist/api/k8s/v1/api.gen.js +66 -2
- package/dist/api/k8s/v1/index.gen.d.ts +1 -1
- package/dist/api/k8s/v1/marshalling.gen.cjs +62 -0
- package/dist/api/k8s/v1/marshalling.gen.d.ts +6 -1
- package/dist/api/k8s/v1/marshalling.gen.js +62 -0
- package/dist/api/k8s/v1/types.gen.d.ts +93 -1
- package/dist/api/k8s/v1/validation-rules.gen.cjs +6 -0
- package/dist/api/k8s/v1/validation-rules.gen.d.ts +5 -0
- package/dist/api/k8s/v1/validation-rules.gen.js +6 -0
- package/dist/api/lb/v1/types.gen.d.ts +15 -10
- package/dist/api/mongodb/v1alpha1/api.gen.cjs +23 -16
- package/dist/api/mongodb/v1alpha1/api.gen.d.ts +10 -1
- package/dist/api/mongodb/v1alpha1/api.gen.js +24 -17
- package/dist/api/mongodb/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/mongodb/v1alpha1/marshalling.gen.cjs +5 -0
- package/dist/api/mongodb/v1alpha1/marshalling.gen.d.ts +2 -1
- package/dist/api/mongodb/v1alpha1/marshalling.gen.js +5 -0
- package/dist/api/mongodb/v1alpha1/types.gen.d.ts +13 -0
- package/dist/api/mongodb/v1alpha1/validation-rules.gen.cjs +12 -0
- package/dist/api/mongodb/v1alpha1/validation-rules.gen.d.ts +11 -0
- package/dist/api/mongodb/v1alpha1/validation-rules.gen.js +12 -0
- package/dist/api/rdb/v1/marshalling.gen.cjs +2 -1
- package/dist/api/rdb/v1/marshalling.gen.js +2 -1
- package/dist/api/rdb/v1/types.gen.d.ts +22 -13
- package/dist/api/webhosting/v1/api.gen.cjs +2 -8
- package/dist/api/webhosting/v1/api.gen.js +2 -8
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- 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
|
};
|
|
@@ -11,7 +11,7 @@ export type ListPoolsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'up
|
|
|
11
11
|
export type MaintenanceWindowDayOfTheWeek = 'any' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
|
|
12
12
|
export type NodeStatus = 'unknown' | 'creating' | 'not_ready' | 'ready' | 'deleting' | 'deleted' | 'locked' | 'rebooting' | 'creation_error' | 'upgrading' | 'starting' | 'registering';
|
|
13
13
|
export type PoolStatus = 'unknown' | 'ready' | 'deleting' | 'deleted' | 'scaling' | 'warning' | 'locked' | 'upgrading';
|
|
14
|
-
export type PoolVolumeType = 'default_volume_type' | 'l_ssd' | 'b_ssd';
|
|
14
|
+
export type PoolVolumeType = 'default_volume_type' | 'l_ssd' | 'b_ssd' | 'sbs_5k' | 'sbs_15k';
|
|
15
15
|
export type Runtime = 'unknown_runtime' | 'docker' | 'containerd' | 'crio';
|
|
16
16
|
export interface MaintenanceWindow {
|
|
17
17
|
/** Start time of the two-hour maintenance window. */
|
|
@@ -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
|
+
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
|
|
345
|
-
* are down, e.g.
|
|
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
|
|
767
|
-
* are down, e.g.
|
|
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
|
|
1574
|
-
* are down, e.g.
|
|
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
|
|
1927
|
-
* are down, e.g.
|
|
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
|
|
2543
|
-
* are down, e.g.
|
|
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
|
/**
|
|
@@ -64,19 +64,13 @@ class API extends api.API {
|
|
|
64
64
|
urlParams: marshalling.urlParams(
|
|
65
65
|
["name", request.name],
|
|
66
66
|
["order_by", request.orderBy],
|
|
67
|
-
[
|
|
68
|
-
"organization_id",
|
|
69
|
-
request.organizationId ?? this.client.settings.defaultOrganizationId
|
|
70
|
-
],
|
|
67
|
+
["organization_id", request.organizationId],
|
|
71
68
|
["page", request.page],
|
|
72
69
|
[
|
|
73
70
|
"page_size",
|
|
74
71
|
request.pageSize ?? this.client.settings.defaultPageSize
|
|
75
72
|
],
|
|
76
|
-
[
|
|
77
|
-
"project_id",
|
|
78
|
-
request.projectId ?? this.client.settings.defaultProjectId
|
|
79
|
-
],
|
|
73
|
+
["project_id", request.projectId],
|
|
80
74
|
["tags", request.tags]
|
|
81
75
|
)
|
|
82
76
|
},
|
|
@@ -302,19 +296,13 @@ class API extends api.API {
|
|
|
302
296
|
["instance_id", request.instanceId],
|
|
303
297
|
["name", request.name],
|
|
304
298
|
["order_by", request.orderBy],
|
|
305
|
-
[
|
|
306
|
-
"organization_id",
|
|
307
|
-
request.organizationId ?? this.client.settings.defaultOrganizationId
|
|
308
|
-
],
|
|
299
|
+
["organization_id", request.organizationId],
|
|
309
300
|
["page", request.page],
|
|
310
301
|
[
|
|
311
302
|
"page_size",
|
|
312
303
|
request.pageSize ?? this.client.settings.defaultPageSize
|
|
313
304
|
],
|
|
314
|
-
[
|
|
315
|
-
"project_id",
|
|
316
|
-
request.projectId ?? this.client.settings.defaultProjectId
|
|
317
|
-
]
|
|
305
|
+
["project_id", request.projectId]
|
|
318
306
|
)
|
|
319
307
|
},
|
|
320
308
|
marshalling_gen.unmarshalListSnapshotsResponse
|
|
@@ -369,6 +357,25 @@ class API extends api.API {
|
|
|
369
357
|
* @returns A Promise of ListUsersResponse
|
|
370
358
|
*/
|
|
371
359
|
listUsers = (request) => resourcePaginator.enrichForPagination("users", this.pageOfListUsers, request);
|
|
360
|
+
/**
|
|
361
|
+
* Create an user on a Database Instance. Create an user on a Database
|
|
362
|
+
* Instance. You must define the `name`, `password` of the user and
|
|
363
|
+
* `instance_id` parameters in the request.
|
|
364
|
+
*
|
|
365
|
+
* @param request - The request {@link CreateUserRequest}
|
|
366
|
+
* @returns A Promise of User
|
|
367
|
+
*/
|
|
368
|
+
createUser = (request) => this.client.fetch(
|
|
369
|
+
{
|
|
370
|
+
body: JSON.stringify(
|
|
371
|
+
marshalling_gen.marshalCreateUserRequest(request, this.client.settings)
|
|
372
|
+
),
|
|
373
|
+
headers: jsonContentHeaders,
|
|
374
|
+
method: "POST",
|
|
375
|
+
path: `/mongodb/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${marshalling.validatePathParam("instanceId", request.instanceId)}/users`
|
|
376
|
+
},
|
|
377
|
+
marshalling_gen.unmarshalUser
|
|
378
|
+
);
|
|
372
379
|
/**
|
|
373
380
|
* Update a user on a Database Instance. Update the parameters of a user on a
|
|
374
381
|
* Database Instance. You can update the `password` parameter, but you cannot
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { Region, WaitForOptions } from '../../../bridge';
|
|
3
|
-
import type { CreateInstanceRequest, CreateSnapshotRequest, DeleteInstanceRequest, DeleteSnapshotRequest, GetInstanceCertificateRequest, GetInstanceRequest, GetSnapshotRequest, Instance, ListInstancesRequest, ListInstancesResponse, ListNodeTypesRequest, ListNodeTypesResponse, ListSnapshotsRequest, ListSnapshotsResponse, ListUsersRequest, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, RestoreSnapshotRequest, Snapshot, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User } from './types.gen';
|
|
3
|
+
import type { CreateInstanceRequest, CreateSnapshotRequest, CreateUserRequest, DeleteInstanceRequest, DeleteSnapshotRequest, GetInstanceCertificateRequest, GetInstanceRequest, GetSnapshotRequest, Instance, ListInstancesRequest, ListInstancesResponse, ListNodeTypesRequest, ListNodeTypesResponse, ListSnapshotsRequest, ListSnapshotsResponse, ListUsersRequest, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, RestoreSnapshotRequest, Snapshot, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User } from './types.gen';
|
|
4
4
|
/**
|
|
5
5
|
* Managed Database for MongoDB®.
|
|
6
6
|
*
|
|
@@ -190,6 +190,15 @@ export declare class API extends ParentAPI {
|
|
|
190
190
|
all: () => Promise<User[]>;
|
|
191
191
|
[Symbol.asyncIterator]: () => AsyncGenerator<User[], void, void>;
|
|
192
192
|
};
|
|
193
|
+
/**
|
|
194
|
+
* Create an user on a Database Instance. Create an user on a Database
|
|
195
|
+
* Instance. You must define the `name`, `password` of the user and
|
|
196
|
+
* `instance_id` parameters in the request.
|
|
197
|
+
*
|
|
198
|
+
* @param request - The request {@link CreateUserRequest}
|
|
199
|
+
* @returns A Promise of User
|
|
200
|
+
*/
|
|
201
|
+
createUser: (request: Readonly<CreateUserRequest>) => Promise<User>;
|
|
193
202
|
/**
|
|
194
203
|
* Update a user on a Database Instance. Update the parameters of a user on a
|
|
195
204
|
* Database Instance. You can update the `password` parameter, but you cannot
|
|
@@ -4,7 +4,7 @@ import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
|
|
|
4
4
|
import "../../../vendor/base64/index.js";
|
|
5
5
|
import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
|
|
6
6
|
import { INSTANCE_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
7
|
-
import { unmarshalListNodeTypesResponse, unmarshalListVersionsResponse, unmarshalListInstancesResponse, unmarshalInstance, marshalCreateInstanceRequest, marshalUpdateInstanceRequest, marshalUpgradeInstanceRequest, marshalCreateSnapshotRequest, unmarshalSnapshot, marshalUpdateSnapshotRequest, marshalRestoreSnapshotRequest, unmarshalListSnapshotsResponse, unmarshalListUsersResponse,
|
|
7
|
+
import { unmarshalListNodeTypesResponse, unmarshalListVersionsResponse, unmarshalListInstancesResponse, unmarshalInstance, marshalCreateInstanceRequest, marshalUpdateInstanceRequest, marshalUpgradeInstanceRequest, marshalCreateSnapshotRequest, unmarshalSnapshot, marshalUpdateSnapshotRequest, marshalRestoreSnapshotRequest, unmarshalListSnapshotsResponse, unmarshalListUsersResponse, marshalCreateUserRequest, unmarshalUser, marshalUpdateUserRequest } from "./marshalling.gen.js";
|
|
8
8
|
const jsonContentHeaders = {
|
|
9
9
|
"Content-Type": "application/json; charset=utf-8"
|
|
10
10
|
};
|
|
@@ -62,19 +62,13 @@ class API extends API$1 {
|
|
|
62
62
|
urlParams: urlParams(
|
|
63
63
|
["name", request.name],
|
|
64
64
|
["order_by", request.orderBy],
|
|
65
|
-
[
|
|
66
|
-
"organization_id",
|
|
67
|
-
request.organizationId ?? this.client.settings.defaultOrganizationId
|
|
68
|
-
],
|
|
65
|
+
["organization_id", request.organizationId],
|
|
69
66
|
["page", request.page],
|
|
70
67
|
[
|
|
71
68
|
"page_size",
|
|
72
69
|
request.pageSize ?? this.client.settings.defaultPageSize
|
|
73
70
|
],
|
|
74
|
-
[
|
|
75
|
-
"project_id",
|
|
76
|
-
request.projectId ?? this.client.settings.defaultProjectId
|
|
77
|
-
],
|
|
71
|
+
["project_id", request.projectId],
|
|
78
72
|
["tags", request.tags]
|
|
79
73
|
)
|
|
80
74
|
},
|
|
@@ -300,19 +294,13 @@ class API extends API$1 {
|
|
|
300
294
|
["instance_id", request.instanceId],
|
|
301
295
|
["name", request.name],
|
|
302
296
|
["order_by", request.orderBy],
|
|
303
|
-
[
|
|
304
|
-
"organization_id",
|
|
305
|
-
request.organizationId ?? this.client.settings.defaultOrganizationId
|
|
306
|
-
],
|
|
297
|
+
["organization_id", request.organizationId],
|
|
307
298
|
["page", request.page],
|
|
308
299
|
[
|
|
309
300
|
"page_size",
|
|
310
301
|
request.pageSize ?? this.client.settings.defaultPageSize
|
|
311
302
|
],
|
|
312
|
-
[
|
|
313
|
-
"project_id",
|
|
314
|
-
request.projectId ?? this.client.settings.defaultProjectId
|
|
315
|
-
]
|
|
303
|
+
["project_id", request.projectId]
|
|
316
304
|
)
|
|
317
305
|
},
|
|
318
306
|
unmarshalListSnapshotsResponse
|
|
@@ -367,6 +355,25 @@ class API extends API$1 {
|
|
|
367
355
|
* @returns A Promise of ListUsersResponse
|
|
368
356
|
*/
|
|
369
357
|
listUsers = (request) => enrichForPagination("users", this.pageOfListUsers, request);
|
|
358
|
+
/**
|
|
359
|
+
* Create an user on a Database Instance. Create an user on a Database
|
|
360
|
+
* Instance. You must define the `name`, `password` of the user and
|
|
361
|
+
* `instance_id` parameters in the request.
|
|
362
|
+
*
|
|
363
|
+
* @param request - The request {@link CreateUserRequest}
|
|
364
|
+
* @returns A Promise of User
|
|
365
|
+
*/
|
|
366
|
+
createUser = (request) => this.client.fetch(
|
|
367
|
+
{
|
|
368
|
+
body: JSON.stringify(
|
|
369
|
+
marshalCreateUserRequest(request, this.client.settings)
|
|
370
|
+
),
|
|
371
|
+
headers: jsonContentHeaders,
|
|
372
|
+
method: "POST",
|
|
373
|
+
path: `/mongodb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/users`
|
|
374
|
+
},
|
|
375
|
+
unmarshalUser
|
|
376
|
+
);
|
|
370
377
|
/**
|
|
371
378
|
* Update a user on a Database Instance. Update the parameters of a user on a
|
|
372
379
|
* Database Instance. You can update the `password` parameter, but you cannot
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { API } from './api.gen';
|
|
2
2
|
export * from './content.gen';
|
|
3
|
-
export type { CreateInstanceRequest, CreateInstanceRequestVolumeDetails, CreateSnapshotRequest, DeleteInstanceRequest, DeleteSnapshotRequest, Endpoint, EndpointPrivateNetworkDetails, EndpointPublicDetails, EndpointSpec, EndpointSpecPrivateNetworkDetails, EndpointSpecPublicDetails, GetInstanceCertificateRequest, GetInstanceRequest, GetSnapshotRequest, Instance, InstanceSetting, InstanceStatus, ListInstancesRequest, ListInstancesRequestOrderBy, ListInstancesResponse, ListNodeTypesRequest, ListNodeTypesResponse, ListSnapshotsRequest, ListSnapshotsRequestOrderBy, ListSnapshotsResponse, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, NodeType, NodeTypeStock, NodeTypeVolumeType, RestoreSnapshotRequest, RestoreSnapshotRequestVolumeDetails, Setting, SettingPropertyType, Snapshot, SnapshotStatus, SnapshotVolumeType, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User, Version, Volume, VolumeType, } from './types.gen';
|
|
3
|
+
export type { CreateInstanceRequest, CreateInstanceRequestVolumeDetails, CreateSnapshotRequest, CreateUserRequest, DeleteInstanceRequest, DeleteSnapshotRequest, Endpoint, EndpointPrivateNetworkDetails, EndpointPublicDetails, EndpointSpec, EndpointSpecPrivateNetworkDetails, EndpointSpecPublicDetails, GetInstanceCertificateRequest, GetInstanceRequest, GetSnapshotRequest, Instance, InstanceSetting, InstanceStatus, ListInstancesRequest, ListInstancesRequestOrderBy, ListInstancesResponse, ListNodeTypesRequest, ListNodeTypesResponse, ListSnapshotsRequest, ListSnapshotsRequestOrderBy, ListSnapshotsResponse, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, NodeType, NodeTypeStock, NodeTypeVolumeType, RestoreSnapshotRequest, RestoreSnapshotRequestVolumeDetails, Setting, SettingPropertyType, Snapshot, SnapshotStatus, SnapshotVolumeType, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User, Version, Volume, VolumeType, } from './types.gen';
|
|
4
4
|
export * as ValidationRules from './validation-rules.gen';
|