@scaleway/sdk-mongodb 1.0.5 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.gen.cjs +4 -2
- package/dist/index.gen.d.ts +1 -0
- package/dist/index.gen.js +4 -2
- package/dist/v1/api.gen.cjs +419 -0
- package/dist/v1/api.gen.d.ts +203 -0
- package/dist/v1/api.gen.js +419 -0
- package/dist/v1/content.gen.cjs +16 -0
- package/dist/v1/content.gen.d.ts +5 -0
- package/dist/v1/content.gen.js +16 -0
- package/dist/v1/index.gen.cjs +29 -0
- package/dist/v1/index.gen.d.ts +5 -0
- package/dist/v1/index.gen.js +29 -0
- package/dist/v1/marshalling.gen.cjs +333 -0
- package/dist/v1/marshalling.gen.d.ts +21 -0
- package/dist/v1/marshalling.gen.js +333 -0
- package/dist/v1/types.gen.d.ts +735 -0
- package/dist/v1/validation-rules.gen.cjs +189 -0
- package/dist/v1/validation-rules.gen.d.ts +172 -0
- package/dist/v1/validation-rules.gen.js +189 -0
- package/dist/v1alpha1/api.gen.cjs +7 -2
- package/dist/v1alpha1/api.gen.d.ts +6 -3
- package/dist/v1alpha1/api.gen.js +8 -3
- package/dist/v1alpha1/index.gen.d.ts +1 -1
- package/dist/v1alpha1/marshalling.gen.cjs +15 -0
- package/dist/v1alpha1/marshalling.gen.js +15 -0
- package/dist/v1alpha1/types.gen.d.ts +11 -0
- package/package.json +4 -4
|
@@ -0,0 +1,735 @@
|
|
|
1
|
+
import type { Region as ScwRegion } from '@scaleway/sdk-client';
|
|
2
|
+
export type InstanceStatus = 'unknown_status' | 'ready' | 'provisioning' | 'configuring' | 'deleting' | 'error' | 'initializing' | 'locked' | 'snapshotting';
|
|
3
|
+
export type ListInstancesRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc' | 'status_asc' | 'status_desc';
|
|
4
|
+
export type ListSnapshotsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc' | 'expires_at_asc' | 'expires_at_desc';
|
|
5
|
+
export type ListUsersRequestOrderBy = 'name_asc' | 'name_desc';
|
|
6
|
+
export type NodeTypeStock = 'unknown_stock' | 'low_stock' | 'out_of_stock' | 'available';
|
|
7
|
+
export type SnapshotStatus = 'unknown_status' | 'creating' | 'ready' | 'restoring' | 'deleting' | 'error' | 'locked';
|
|
8
|
+
export type UserRoleRole = 'unknown_role' | 'read' | 'read_write' | 'db_admin' | 'sync';
|
|
9
|
+
export type VolumeType = 'unknown_type' | 'sbs_5k' | 'sbs_15k';
|
|
10
|
+
/**
|
|
11
|
+
* Private Network details.
|
|
12
|
+
*/
|
|
13
|
+
export interface EndpointPrivateNetworkDetails {
|
|
14
|
+
/**
|
|
15
|
+
* UUID of the Private Network.
|
|
16
|
+
*/
|
|
17
|
+
privateNetworkId: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Public Access details.
|
|
21
|
+
*/
|
|
22
|
+
export interface EndpointPublicNetworkDetails {
|
|
23
|
+
}
|
|
24
|
+
export interface EndpointSpecPrivateNetworkDetails {
|
|
25
|
+
/**
|
|
26
|
+
* UUID of the Private Network.
|
|
27
|
+
*/
|
|
28
|
+
privateNetworkId: string;
|
|
29
|
+
}
|
|
30
|
+
export interface EndpointSpecPublicNetworkDetails {
|
|
31
|
+
}
|
|
32
|
+
export interface Endpoint {
|
|
33
|
+
/**
|
|
34
|
+
* UUID of the endpoint.
|
|
35
|
+
*/
|
|
36
|
+
id: string;
|
|
37
|
+
/**
|
|
38
|
+
* List of DNS records of the endpoint.
|
|
39
|
+
*/
|
|
40
|
+
dnsRecord: string;
|
|
41
|
+
/**
|
|
42
|
+
* TCP port of the endpoint.
|
|
43
|
+
*/
|
|
44
|
+
port: number;
|
|
45
|
+
/**
|
|
46
|
+
* Private Network endpoint details.
|
|
47
|
+
*
|
|
48
|
+
* One-of ('details'): at most one of 'privateNetwork', 'publicNetwork' could be set.
|
|
49
|
+
*/
|
|
50
|
+
privateNetwork?: EndpointPrivateNetworkDetails;
|
|
51
|
+
/**
|
|
52
|
+
* Public Network endpoint details.
|
|
53
|
+
*
|
|
54
|
+
* One-of ('details'): at most one of 'privateNetwork', 'publicNetwork' could be set.
|
|
55
|
+
*/
|
|
56
|
+
publicNetwork?: EndpointPublicNetworkDetails;
|
|
57
|
+
}
|
|
58
|
+
export interface InstanceSnapshotSchedule {
|
|
59
|
+
frequencyHours: number;
|
|
60
|
+
retentionDays: number;
|
|
61
|
+
enabled: boolean;
|
|
62
|
+
nextUpdate?: Date;
|
|
63
|
+
lastRun?: Date;
|
|
64
|
+
}
|
|
65
|
+
export interface Volume {
|
|
66
|
+
/**
|
|
67
|
+
* Type of volume where data is stored.
|
|
68
|
+
*/
|
|
69
|
+
type: VolumeType;
|
|
70
|
+
/**
|
|
71
|
+
* Volume size.
|
|
72
|
+
*/
|
|
73
|
+
sizeBytes: number;
|
|
74
|
+
}
|
|
75
|
+
export interface NodeTypeVolumeType {
|
|
76
|
+
/**
|
|
77
|
+
* Volume Type.
|
|
78
|
+
*/
|
|
79
|
+
type: VolumeType;
|
|
80
|
+
/**
|
|
81
|
+
* The description of the volume.
|
|
82
|
+
*/
|
|
83
|
+
description: string;
|
|
84
|
+
/**
|
|
85
|
+
* Minimum size required for the volume.
|
|
86
|
+
*/
|
|
87
|
+
minSizeBytes: number;
|
|
88
|
+
/**
|
|
89
|
+
* Maximum size required for the volume.
|
|
90
|
+
*/
|
|
91
|
+
maxSizeBytes: number;
|
|
92
|
+
/**
|
|
93
|
+
* Minimum increment level for a Block Storage volume size.
|
|
94
|
+
*/
|
|
95
|
+
chunkSizeBytes: number;
|
|
96
|
+
}
|
|
97
|
+
export interface UserRole {
|
|
98
|
+
/**
|
|
99
|
+
* Name of the preset role.
|
|
100
|
+
*/
|
|
101
|
+
role: UserRoleRole;
|
|
102
|
+
/**
|
|
103
|
+
* Name of the database on which the preset role will be used.
|
|
104
|
+
*
|
|
105
|
+
* One-of ('scope'): at most one of 'databaseName', 'anyDatabase' could be set.
|
|
106
|
+
*/
|
|
107
|
+
databaseName?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Flag to enable the preset role in all databases.
|
|
110
|
+
*
|
|
111
|
+
* One-of ('scope'): at most one of 'databaseName', 'anyDatabase' could be set.
|
|
112
|
+
*/
|
|
113
|
+
anyDatabase?: boolean;
|
|
114
|
+
}
|
|
115
|
+
export interface EndpointSpec {
|
|
116
|
+
/**
|
|
117
|
+
*
|
|
118
|
+
* One-of ('details'): at most one of 'publicNetwork', 'privateNetwork' could be set.
|
|
119
|
+
*/
|
|
120
|
+
publicNetwork?: EndpointSpecPublicNetworkDetails;
|
|
121
|
+
/**
|
|
122
|
+
*
|
|
123
|
+
* One-of ('details'): at most one of 'publicNetwork', 'privateNetwork' could be set.
|
|
124
|
+
*/
|
|
125
|
+
privateNetwork?: EndpointSpecPrivateNetworkDetails;
|
|
126
|
+
}
|
|
127
|
+
export interface Instance {
|
|
128
|
+
/**
|
|
129
|
+
* UUID of the Database Instance.
|
|
130
|
+
*/
|
|
131
|
+
id: string;
|
|
132
|
+
/**
|
|
133
|
+
* Name of the Database Instance.
|
|
134
|
+
*/
|
|
135
|
+
name: string;
|
|
136
|
+
/**
|
|
137
|
+
* Project ID the Database Instance belongs to.
|
|
138
|
+
*/
|
|
139
|
+
projectId: string;
|
|
140
|
+
/**
|
|
141
|
+
* Organization ID the Database Instance belongs to.
|
|
142
|
+
*/
|
|
143
|
+
organizationId: string;
|
|
144
|
+
/**
|
|
145
|
+
* Status of the Database Instance.
|
|
146
|
+
*/
|
|
147
|
+
status: InstanceStatus;
|
|
148
|
+
/**
|
|
149
|
+
* MongoDB® major engine version of the Database Instance.
|
|
150
|
+
*/
|
|
151
|
+
version: string;
|
|
152
|
+
/**
|
|
153
|
+
* List of tags applied to the Database Instance.
|
|
154
|
+
*/
|
|
155
|
+
tags: string[];
|
|
156
|
+
/**
|
|
157
|
+
* Number of node in the Database Instance.
|
|
158
|
+
*/
|
|
159
|
+
nodeAmount: number;
|
|
160
|
+
/**
|
|
161
|
+
* Node type of the Database Instance.
|
|
162
|
+
*/
|
|
163
|
+
nodeType: string;
|
|
164
|
+
/**
|
|
165
|
+
* Volumes of the Database Instance.
|
|
166
|
+
*/
|
|
167
|
+
volume?: Volume;
|
|
168
|
+
/**
|
|
169
|
+
* List of Database Instance endpoints.
|
|
170
|
+
*/
|
|
171
|
+
endpoints: Endpoint[];
|
|
172
|
+
/**
|
|
173
|
+
* Creation date (must follow the ISO 8601 format).
|
|
174
|
+
*/
|
|
175
|
+
createdAt?: Date;
|
|
176
|
+
/**
|
|
177
|
+
* Region the Database Instance is in.
|
|
178
|
+
*/
|
|
179
|
+
region: ScwRegion;
|
|
180
|
+
/**
|
|
181
|
+
* Snapshot schedule configuration of the Database Instance.
|
|
182
|
+
*/
|
|
183
|
+
snapshotSchedule?: InstanceSnapshotSchedule;
|
|
184
|
+
}
|
|
185
|
+
export interface NodeType {
|
|
186
|
+
/**
|
|
187
|
+
* Node type name identifier.
|
|
188
|
+
*/
|
|
189
|
+
name: string;
|
|
190
|
+
/**
|
|
191
|
+
* Current stock status for the node type.
|
|
192
|
+
*/
|
|
193
|
+
stockStatus: NodeTypeStock;
|
|
194
|
+
/**
|
|
195
|
+
* Current specs of the offer.
|
|
196
|
+
*/
|
|
197
|
+
description: string;
|
|
198
|
+
/**
|
|
199
|
+
* Number of virtual CPUs.
|
|
200
|
+
*/
|
|
201
|
+
vcpus: number;
|
|
202
|
+
/**
|
|
203
|
+
* Quantity of RAM.
|
|
204
|
+
*/
|
|
205
|
+
memoryBytes: number;
|
|
206
|
+
/**
|
|
207
|
+
* Available storage options for the node type.
|
|
208
|
+
*/
|
|
209
|
+
availableVolumeTypes: NodeTypeVolumeType[];
|
|
210
|
+
/**
|
|
211
|
+
* The node type is currently disabled.
|
|
212
|
+
*/
|
|
213
|
+
disabled: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* The node type is currently in beta.
|
|
216
|
+
*/
|
|
217
|
+
beta: boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Instance range associated with the node type offer.
|
|
220
|
+
*/
|
|
221
|
+
instanceRange: string;
|
|
222
|
+
}
|
|
223
|
+
export interface Snapshot {
|
|
224
|
+
/**
|
|
225
|
+
* UUID of the snapshot.
|
|
226
|
+
*/
|
|
227
|
+
id: string;
|
|
228
|
+
/**
|
|
229
|
+
* UUID of the Database Instance.
|
|
230
|
+
*/
|
|
231
|
+
instanceId?: string;
|
|
232
|
+
/**
|
|
233
|
+
* Name of the snapshot.
|
|
234
|
+
*/
|
|
235
|
+
name: string;
|
|
236
|
+
/**
|
|
237
|
+
* Status of the snapshot.
|
|
238
|
+
*/
|
|
239
|
+
status: SnapshotStatus;
|
|
240
|
+
/**
|
|
241
|
+
* Size of the snapshot.
|
|
242
|
+
*/
|
|
243
|
+
sizeBytes: number;
|
|
244
|
+
/**
|
|
245
|
+
* Expiration date (must follow the ISO 8601 format).
|
|
246
|
+
*/
|
|
247
|
+
expiresAt?: Date;
|
|
248
|
+
/**
|
|
249
|
+
* Creation date (must follow the ISO 8601 format).
|
|
250
|
+
*/
|
|
251
|
+
createdAt?: Date;
|
|
252
|
+
/**
|
|
253
|
+
* Updated date (must follow the ISO 8601 format).
|
|
254
|
+
*/
|
|
255
|
+
updatedAt?: Date;
|
|
256
|
+
/**
|
|
257
|
+
* Name of the Database Instance of the snapshot.
|
|
258
|
+
*/
|
|
259
|
+
instanceName: string;
|
|
260
|
+
/**
|
|
261
|
+
* Source node type.
|
|
262
|
+
*/
|
|
263
|
+
nodeType: string;
|
|
264
|
+
/**
|
|
265
|
+
* Type of volume where data is stored - sbs_5k or sbs_15k.
|
|
266
|
+
*/
|
|
267
|
+
volumeType: VolumeType;
|
|
268
|
+
/**
|
|
269
|
+
* Region of the snapshot.
|
|
270
|
+
*/
|
|
271
|
+
region: ScwRegion;
|
|
272
|
+
}
|
|
273
|
+
export interface User {
|
|
274
|
+
/**
|
|
275
|
+
* Name of the user (Length must be between 1 and 63 characters. First character must be an alphabet character (a-zA-Z). Only a-zA-Z0-9_$- characters are accepted).
|
|
276
|
+
*/
|
|
277
|
+
name: string;
|
|
278
|
+
/**
|
|
279
|
+
* List of roles assigned to the user, along with the corresponding database where each role is granted.
|
|
280
|
+
*/
|
|
281
|
+
roles: UserRole[];
|
|
282
|
+
}
|
|
283
|
+
export interface Version {
|
|
284
|
+
/**
|
|
285
|
+
* MongoDB® major engine version.
|
|
286
|
+
*/
|
|
287
|
+
version: string;
|
|
288
|
+
/**
|
|
289
|
+
* Date of End of Life.
|
|
290
|
+
*/
|
|
291
|
+
endOfLifeAt?: Date;
|
|
292
|
+
}
|
|
293
|
+
export type CreateEndpointRequest = {
|
|
294
|
+
/**
|
|
295
|
+
* Region to target. If none is passed will use default region from the config.
|
|
296
|
+
*/
|
|
297
|
+
region?: ScwRegion;
|
|
298
|
+
/**
|
|
299
|
+
* UUID of the Database Instance.
|
|
300
|
+
*/
|
|
301
|
+
instanceId: string;
|
|
302
|
+
/**
|
|
303
|
+
* EndpointSpec used to expose your Database Instance.
|
|
304
|
+
*/
|
|
305
|
+
endpoint: EndpointSpec;
|
|
306
|
+
};
|
|
307
|
+
export type CreateInstanceRequest = {
|
|
308
|
+
/**
|
|
309
|
+
* Region to target. If none is passed will use default region from the config.
|
|
310
|
+
*/
|
|
311
|
+
region?: ScwRegion;
|
|
312
|
+
/**
|
|
313
|
+
* The Project ID on which the Database Instance will be created.
|
|
314
|
+
*/
|
|
315
|
+
projectId?: string;
|
|
316
|
+
/**
|
|
317
|
+
* Name of the Database Instance.
|
|
318
|
+
*/
|
|
319
|
+
name?: string;
|
|
320
|
+
/**
|
|
321
|
+
* Major version of the MongoDB® engine.
|
|
322
|
+
*/
|
|
323
|
+
version: string;
|
|
324
|
+
/**
|
|
325
|
+
* Tags to apply to the Database Instance.
|
|
326
|
+
*/
|
|
327
|
+
tags?: string[];
|
|
328
|
+
/**
|
|
329
|
+
* Number of node to use for the Database Instance.
|
|
330
|
+
*/
|
|
331
|
+
nodeAmount: number;
|
|
332
|
+
/**
|
|
333
|
+
* Type of node to use for the Database Instance.
|
|
334
|
+
*/
|
|
335
|
+
nodeType: string;
|
|
336
|
+
/**
|
|
337
|
+
* Username created when the Database Instance is created.
|
|
338
|
+
*/
|
|
339
|
+
userName: string;
|
|
340
|
+
/**
|
|
341
|
+
* Password of the initial user.
|
|
342
|
+
*/
|
|
343
|
+
password: string;
|
|
344
|
+
/**
|
|
345
|
+
* Instance volume information.
|
|
346
|
+
*/
|
|
347
|
+
volume?: Volume;
|
|
348
|
+
/**
|
|
349
|
+
* One or multiple EndpointSpec used to expose your Database Instance.
|
|
350
|
+
*/
|
|
351
|
+
endpoints?: EndpointSpec[];
|
|
352
|
+
};
|
|
353
|
+
export type CreateSnapshotRequest = {
|
|
354
|
+
/**
|
|
355
|
+
* Region to target. If none is passed will use default region from the config.
|
|
356
|
+
*/
|
|
357
|
+
region?: ScwRegion;
|
|
358
|
+
/**
|
|
359
|
+
* UUID of the Database Instance to snapshot.
|
|
360
|
+
*/
|
|
361
|
+
instanceId: string;
|
|
362
|
+
/**
|
|
363
|
+
* Name of the snapshot.
|
|
364
|
+
*/
|
|
365
|
+
name: string;
|
|
366
|
+
/**
|
|
367
|
+
* Expiration date of the snapshot (must follow the ISO 8601 format).
|
|
368
|
+
*/
|
|
369
|
+
expiresAt?: Date;
|
|
370
|
+
};
|
|
371
|
+
export type CreateUserRequest = {
|
|
372
|
+
/**
|
|
373
|
+
* Region to target. If none is passed will use default region from the config.
|
|
374
|
+
*/
|
|
375
|
+
region?: ScwRegion;
|
|
376
|
+
/**
|
|
377
|
+
* UUID of the Database Instance the user belongs to.
|
|
378
|
+
*/
|
|
379
|
+
instanceId: string;
|
|
380
|
+
/**
|
|
381
|
+
* Name of the database user.
|
|
382
|
+
*/
|
|
383
|
+
name: string;
|
|
384
|
+
/**
|
|
385
|
+
* Password of the database user.
|
|
386
|
+
*/
|
|
387
|
+
password: string;
|
|
388
|
+
};
|
|
389
|
+
export type DeleteEndpointRequest = {
|
|
390
|
+
/**
|
|
391
|
+
* Region to target. If none is passed will use default region from the config.
|
|
392
|
+
*/
|
|
393
|
+
region?: ScwRegion;
|
|
394
|
+
/**
|
|
395
|
+
* UUID of the Endpoint to delete.
|
|
396
|
+
*/
|
|
397
|
+
endpointId: string;
|
|
398
|
+
};
|
|
399
|
+
export type DeleteInstanceRequest = {
|
|
400
|
+
/**
|
|
401
|
+
* Region to target. If none is passed will use default region from the config.
|
|
402
|
+
*/
|
|
403
|
+
region?: ScwRegion;
|
|
404
|
+
/**
|
|
405
|
+
* UUID of the Database Instance to delete.
|
|
406
|
+
*/
|
|
407
|
+
instanceId: string;
|
|
408
|
+
};
|
|
409
|
+
export type DeleteSnapshotRequest = {
|
|
410
|
+
/**
|
|
411
|
+
* Region to target. If none is passed will use default region from the config.
|
|
412
|
+
*/
|
|
413
|
+
region?: ScwRegion;
|
|
414
|
+
/**
|
|
415
|
+
* UUID of the snapshot.
|
|
416
|
+
*/
|
|
417
|
+
snapshotId: string;
|
|
418
|
+
};
|
|
419
|
+
export type DeleteUserRequest = {
|
|
420
|
+
/**
|
|
421
|
+
* Region to target. If none is passed will use default region from the config.
|
|
422
|
+
*/
|
|
423
|
+
region?: ScwRegion;
|
|
424
|
+
/**
|
|
425
|
+
* UUID of the Database Instance the user belongs to.
|
|
426
|
+
*/
|
|
427
|
+
instanceId: string;
|
|
428
|
+
/**
|
|
429
|
+
* Name of the database user.
|
|
430
|
+
*/
|
|
431
|
+
name: string;
|
|
432
|
+
};
|
|
433
|
+
export type GetInstanceCertificateRequest = {
|
|
434
|
+
/**
|
|
435
|
+
* Region to target. If none is passed will use default region from the config.
|
|
436
|
+
*/
|
|
437
|
+
region?: ScwRegion;
|
|
438
|
+
/**
|
|
439
|
+
* UUID of the Database Instance.
|
|
440
|
+
*/
|
|
441
|
+
instanceId: string;
|
|
442
|
+
};
|
|
443
|
+
export type GetInstanceRequest = {
|
|
444
|
+
/**
|
|
445
|
+
* Region to target. If none is passed will use default region from the config.
|
|
446
|
+
*/
|
|
447
|
+
region?: ScwRegion;
|
|
448
|
+
/**
|
|
449
|
+
* UUID of the Database Instance.
|
|
450
|
+
*/
|
|
451
|
+
instanceId: string;
|
|
452
|
+
};
|
|
453
|
+
export type GetSnapshotRequest = {
|
|
454
|
+
/**
|
|
455
|
+
* Region to target. If none is passed will use default region from the config.
|
|
456
|
+
*/
|
|
457
|
+
region?: ScwRegion;
|
|
458
|
+
/**
|
|
459
|
+
* UUID of the snapshot.
|
|
460
|
+
*/
|
|
461
|
+
snapshotId: string;
|
|
462
|
+
};
|
|
463
|
+
export type ListInstancesRequest = {
|
|
464
|
+
/**
|
|
465
|
+
* Region to target. If none is passed will use default region from the config.
|
|
466
|
+
*/
|
|
467
|
+
region?: ScwRegion;
|
|
468
|
+
/**
|
|
469
|
+
* List Database Instances that have a given tag.
|
|
470
|
+
*/
|
|
471
|
+
tags?: string[];
|
|
472
|
+
/**
|
|
473
|
+
* Lists Database Instances that match a name pattern.
|
|
474
|
+
*/
|
|
475
|
+
name?: string;
|
|
476
|
+
/**
|
|
477
|
+
* Criteria to use when ordering Database Instance listings.
|
|
478
|
+
*/
|
|
479
|
+
orderBy?: ListInstancesRequestOrderBy;
|
|
480
|
+
/**
|
|
481
|
+
* Organization ID of the Database Instance.
|
|
482
|
+
*/
|
|
483
|
+
organizationId?: string;
|
|
484
|
+
/**
|
|
485
|
+
* Project ID to list the instances of.
|
|
486
|
+
*/
|
|
487
|
+
projectId?: string;
|
|
488
|
+
page?: number;
|
|
489
|
+
pageSize?: number;
|
|
490
|
+
};
|
|
491
|
+
export interface ListInstancesResponse {
|
|
492
|
+
/**
|
|
493
|
+
* List of all Database Instances available in an Organization or Project.
|
|
494
|
+
*/
|
|
495
|
+
instances: Instance[];
|
|
496
|
+
/**
|
|
497
|
+
* Total count of Database Instances available in an Organization or Project.
|
|
498
|
+
*/
|
|
499
|
+
totalCount: number;
|
|
500
|
+
}
|
|
501
|
+
export type ListNodeTypesRequest = {
|
|
502
|
+
/**
|
|
503
|
+
* Region to target. If none is passed will use default region from the config.
|
|
504
|
+
*/
|
|
505
|
+
region?: ScwRegion;
|
|
506
|
+
/**
|
|
507
|
+
* Defines whether or not to include disabled types.
|
|
508
|
+
*/
|
|
509
|
+
includeDisabled?: boolean;
|
|
510
|
+
page?: number;
|
|
511
|
+
pageSize?: number;
|
|
512
|
+
};
|
|
513
|
+
export interface ListNodeTypesResponse {
|
|
514
|
+
/**
|
|
515
|
+
* Types of the node.
|
|
516
|
+
*/
|
|
517
|
+
nodeTypes: NodeType[];
|
|
518
|
+
/**
|
|
519
|
+
* Total count of node-types available.
|
|
520
|
+
*/
|
|
521
|
+
totalCount: number;
|
|
522
|
+
}
|
|
523
|
+
export type ListSnapshotsRequest = {
|
|
524
|
+
/**
|
|
525
|
+
* Region to target. If none is passed will use default region from the config.
|
|
526
|
+
*/
|
|
527
|
+
region?: ScwRegion;
|
|
528
|
+
/**
|
|
529
|
+
* Instance ID the snapshots belongs to.
|
|
530
|
+
*/
|
|
531
|
+
instanceId?: string;
|
|
532
|
+
/**
|
|
533
|
+
* Lists database snapshots that match a name pattern.
|
|
534
|
+
*/
|
|
535
|
+
name?: string;
|
|
536
|
+
/**
|
|
537
|
+
* Criteria to use when ordering snapshot listings.
|
|
538
|
+
*/
|
|
539
|
+
orderBy?: ListSnapshotsRequestOrderBy;
|
|
540
|
+
/**
|
|
541
|
+
* Organization ID the snapshots belongs to.
|
|
542
|
+
*/
|
|
543
|
+
organizationId?: string;
|
|
544
|
+
/**
|
|
545
|
+
* Project ID to list the snapshots of.
|
|
546
|
+
*/
|
|
547
|
+
projectId?: string;
|
|
548
|
+
page?: number;
|
|
549
|
+
pageSize?: number;
|
|
550
|
+
};
|
|
551
|
+
export interface ListSnapshotsResponse {
|
|
552
|
+
/**
|
|
553
|
+
* List of all database snapshots available in an Organization or Project.
|
|
554
|
+
*/
|
|
555
|
+
snapshots: Snapshot[];
|
|
556
|
+
/**
|
|
557
|
+
* Total count of database snapshots available in a Organization or Project.
|
|
558
|
+
*/
|
|
559
|
+
totalCount: number;
|
|
560
|
+
}
|
|
561
|
+
export type ListUsersRequest = {
|
|
562
|
+
/**
|
|
563
|
+
* Region to target. If none is passed will use default region from the config.
|
|
564
|
+
*/
|
|
565
|
+
region?: ScwRegion;
|
|
566
|
+
/**
|
|
567
|
+
* UUID of the Database Instance.
|
|
568
|
+
*/
|
|
569
|
+
instanceId: string;
|
|
570
|
+
/**
|
|
571
|
+
* Name of the user.
|
|
572
|
+
*/
|
|
573
|
+
name?: string;
|
|
574
|
+
/**
|
|
575
|
+
* Criteria to use when requesting user listing.
|
|
576
|
+
*/
|
|
577
|
+
orderBy?: ListUsersRequestOrderBy;
|
|
578
|
+
page?: number;
|
|
579
|
+
pageSize?: number;
|
|
580
|
+
};
|
|
581
|
+
export interface ListUsersResponse {
|
|
582
|
+
/**
|
|
583
|
+
* List of users in a Database Instance.
|
|
584
|
+
*/
|
|
585
|
+
users: User[];
|
|
586
|
+
/**
|
|
587
|
+
* Total count of users present on a Database Instance.
|
|
588
|
+
*/
|
|
589
|
+
totalCount: number;
|
|
590
|
+
}
|
|
591
|
+
export type ListVersionsRequest = {
|
|
592
|
+
/**
|
|
593
|
+
* Region to target. If none is passed will use default region from the config.
|
|
594
|
+
*/
|
|
595
|
+
region?: ScwRegion;
|
|
596
|
+
version?: string;
|
|
597
|
+
page?: number;
|
|
598
|
+
pageSize?: number;
|
|
599
|
+
};
|
|
600
|
+
export interface ListVersionsResponse {
|
|
601
|
+
/**
|
|
602
|
+
* Available MongoDB® major engine version.
|
|
603
|
+
*/
|
|
604
|
+
versions: Version[];
|
|
605
|
+
/**
|
|
606
|
+
* Total count of MongoDB® major engine version available.
|
|
607
|
+
*/
|
|
608
|
+
totalCount: number;
|
|
609
|
+
}
|
|
610
|
+
export type RestoreSnapshotRequest = {
|
|
611
|
+
/**
|
|
612
|
+
* Region to target. If none is passed will use default region from the config.
|
|
613
|
+
*/
|
|
614
|
+
region?: ScwRegion;
|
|
615
|
+
/**
|
|
616
|
+
* UUID of the snapshot.
|
|
617
|
+
*/
|
|
618
|
+
snapshotId: string;
|
|
619
|
+
/**
|
|
620
|
+
* Name of the new Database Instance.
|
|
621
|
+
*/
|
|
622
|
+
instanceName: string;
|
|
623
|
+
/**
|
|
624
|
+
* Node type to use for the new Database Instance.
|
|
625
|
+
*/
|
|
626
|
+
nodeType: string;
|
|
627
|
+
/**
|
|
628
|
+
* Number of nodes to use for the new Database Instance.
|
|
629
|
+
*/
|
|
630
|
+
nodeAmount: number;
|
|
631
|
+
/**
|
|
632
|
+
* Instance volume type.
|
|
633
|
+
*/
|
|
634
|
+
volumeType: VolumeType;
|
|
635
|
+
};
|
|
636
|
+
export type SetUserRoleRequest = {
|
|
637
|
+
/**
|
|
638
|
+
* Region to target. If none is passed will use default region from the config.
|
|
639
|
+
*/
|
|
640
|
+
region?: ScwRegion;
|
|
641
|
+
/**
|
|
642
|
+
* UUID of the Database Instance the user belongs to.
|
|
643
|
+
*/
|
|
644
|
+
instanceId: string;
|
|
645
|
+
/**
|
|
646
|
+
* Name of the database user.
|
|
647
|
+
*/
|
|
648
|
+
userName: string;
|
|
649
|
+
/**
|
|
650
|
+
* List of roles assigned to the user, along with the corresponding database where each role is granted.
|
|
651
|
+
*/
|
|
652
|
+
roles?: UserRole[];
|
|
653
|
+
};
|
|
654
|
+
export type UpdateInstanceRequest = {
|
|
655
|
+
/**
|
|
656
|
+
* Region to target. If none is passed will use default region from the config.
|
|
657
|
+
*/
|
|
658
|
+
region?: ScwRegion;
|
|
659
|
+
/**
|
|
660
|
+
* UUID of the Database Instance to update.
|
|
661
|
+
*/
|
|
662
|
+
instanceId: string;
|
|
663
|
+
/**
|
|
664
|
+
* Name of the Database Instance.
|
|
665
|
+
*/
|
|
666
|
+
name?: string;
|
|
667
|
+
/**
|
|
668
|
+
* Tags of a Database Instance.
|
|
669
|
+
*/
|
|
670
|
+
tags?: string[];
|
|
671
|
+
/**
|
|
672
|
+
* In hours.
|
|
673
|
+
*/
|
|
674
|
+
snapshotScheduleFrequencyHours?: number;
|
|
675
|
+
/**
|
|
676
|
+
* In days.
|
|
677
|
+
*/
|
|
678
|
+
snapshotScheduleRetentionDays?: number;
|
|
679
|
+
/**
|
|
680
|
+
* Defines whether or not the snapshot schedule is enabled.
|
|
681
|
+
*/
|
|
682
|
+
isSnapshotScheduleEnabled?: boolean;
|
|
683
|
+
};
|
|
684
|
+
export type UpdateSnapshotRequest = {
|
|
685
|
+
/**
|
|
686
|
+
* Region to target. If none is passed will use default region from the config.
|
|
687
|
+
*/
|
|
688
|
+
region?: ScwRegion;
|
|
689
|
+
/**
|
|
690
|
+
* UUID of the Snapshot.
|
|
691
|
+
*/
|
|
692
|
+
snapshotId: string;
|
|
693
|
+
/**
|
|
694
|
+
* Name of the snapshot.
|
|
695
|
+
*/
|
|
696
|
+
name?: string;
|
|
697
|
+
/**
|
|
698
|
+
* Expiration date of the snapshot (must follow the ISO 8601 format).
|
|
699
|
+
*/
|
|
700
|
+
expiresAt?: Date;
|
|
701
|
+
};
|
|
702
|
+
export type UpdateUserRequest = {
|
|
703
|
+
/**
|
|
704
|
+
* Region to target. If none is passed will use default region from the config.
|
|
705
|
+
*/
|
|
706
|
+
region?: ScwRegion;
|
|
707
|
+
/**
|
|
708
|
+
* UUID of the Database Instance the user belongs to.
|
|
709
|
+
*/
|
|
710
|
+
instanceId: string;
|
|
711
|
+
/**
|
|
712
|
+
* Name of the database user.
|
|
713
|
+
*/
|
|
714
|
+
name: string;
|
|
715
|
+
/**
|
|
716
|
+
* Password of the database user.
|
|
717
|
+
*/
|
|
718
|
+
password?: string;
|
|
719
|
+
};
|
|
720
|
+
export type UpgradeInstanceRequest = {
|
|
721
|
+
/**
|
|
722
|
+
* Region to target. If none is passed will use default region from the config.
|
|
723
|
+
*/
|
|
724
|
+
region?: ScwRegion;
|
|
725
|
+
/**
|
|
726
|
+
* UUID of the Database Instance you want to upgrade.
|
|
727
|
+
*/
|
|
728
|
+
instanceId: string;
|
|
729
|
+
/**
|
|
730
|
+
* Increase your Block Storage volume size.
|
|
731
|
+
*
|
|
732
|
+
* One-of ('upgradeTarget'): at most one of 'volumeSizeBytes' could be set.
|
|
733
|
+
*/
|
|
734
|
+
volumeSizeBytes?: number;
|
|
735
|
+
};
|