@scaleway/sdk-redis 1.0.1

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.
@@ -0,0 +1,750 @@
1
+ import type { Zone as ScwZone, TimeSeries } from '@scaleway/sdk-client';
2
+ export type AvailableClusterSettingPropertyType = 'UNKNOWN' | 'BOOLEAN' | 'INT' | 'STRING';
3
+ export type ClusterStatus = 'unknown' | 'ready' | 'provisioning' | 'configuring' | 'deleting' | 'error' | 'autohealing' | 'locked' | 'suspended' | 'initializing';
4
+ export type ListClustersRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
5
+ export type NodeTypeStock = 'unknown' | 'low_stock' | 'out_of_stock' | 'available';
6
+ export type PrivateNetworkProvisioningMode = 'static' | 'ipam';
7
+ export interface EndpointSpecPrivateNetworkSpecIpamConfig {
8
+ }
9
+ export interface PrivateNetwork {
10
+ /**
11
+ * UUID of the Private Network.
12
+ */
13
+ id: string;
14
+ /**
15
+ * List of IPv4 CIDR notation addresses of the endpoint.
16
+ */
17
+ serviceIps: string[];
18
+ /**
19
+ * Zone of the Private Network.
20
+ */
21
+ zone: ScwZone;
22
+ /**
23
+ * How your endpoint ips are provisioned.
24
+ */
25
+ provisioningMode: PrivateNetworkProvisioningMode;
26
+ }
27
+ export interface PublicNetwork {
28
+ }
29
+ export interface EndpointSpecPrivateNetworkSpec {
30
+ /**
31
+ * UUID of the Private Network to connect to the Database Instance.
32
+ */
33
+ id: string;
34
+ /**
35
+ * Endpoint IPv4 address with a CIDR notation. You must provide at least one IPv4 per node.
36
+ */
37
+ serviceIps: string[];
38
+ /**
39
+ * Automated configuration of your Private Network endpoint with Scaleway IPAM service.
40
+ */
41
+ ipamConfig?: EndpointSpecPrivateNetworkSpecIpamConfig;
42
+ }
43
+ export interface EndpointSpecPublicNetworkSpec {
44
+ }
45
+ export interface AvailableClusterSetting {
46
+ /**
47
+ * Name of the setting.
48
+ */
49
+ name: string;
50
+ /**
51
+ * Default value of the setting.
52
+ */
53
+ defaultValue?: string;
54
+ /**
55
+ * Type of setting.
56
+ */
57
+ type: AvailableClusterSettingPropertyType;
58
+ /**
59
+ * Description of the setting.
60
+ */
61
+ description: string;
62
+ /**
63
+ * Optional maximum value of the setting.
64
+ */
65
+ maxValue?: number;
66
+ /**
67
+ * Optional minimum value of the setting.
68
+ */
69
+ minValue?: number;
70
+ /**
71
+ * Optional validation rule of the setting.
72
+ */
73
+ regex?: string;
74
+ /**
75
+ * Defines whether or not the setting is deprecated.
76
+ */
77
+ deprecated: boolean;
78
+ }
79
+ export interface ACLRule {
80
+ /**
81
+ * ID of the rule.
82
+ */
83
+ id: string;
84
+ /**
85
+ * IPv4 network address of the rule.
86
+ */
87
+ ipCidr?: string;
88
+ /**
89
+ * Description of the rule.
90
+ */
91
+ description?: string;
92
+ }
93
+ export interface ClusterSetting {
94
+ /**
95
+ * Value of the setting.
96
+ */
97
+ value: string;
98
+ /**
99
+ * Name of the setting.
100
+ */
101
+ name: string;
102
+ }
103
+ export interface Endpoint {
104
+ /**
105
+ * TCP port of the endpoint.
106
+ */
107
+ port: number;
108
+ /**
109
+ * Private Network details.
110
+ *
111
+ * One-of ('details'): at most one of 'privateNetwork', 'publicNetwork' could be set.
112
+ */
113
+ privateNetwork?: PrivateNetwork;
114
+ /**
115
+ * Public network details.
116
+ *
117
+ * One-of ('details'): at most one of 'privateNetwork', 'publicNetwork' could be set.
118
+ */
119
+ publicNetwork?: PublicNetwork;
120
+ /**
121
+ * List of IPv4 addresses of the endpoint.
122
+ */
123
+ ips: string[];
124
+ /**
125
+ * UUID of the endpoint.
126
+ */
127
+ id: string;
128
+ }
129
+ export interface ACLRuleSpec {
130
+ /**
131
+ * IPv4 network address of the rule.
132
+ */
133
+ ipCidr: string;
134
+ /**
135
+ * Description of the rule.
136
+ */
137
+ description: string;
138
+ }
139
+ export interface EndpointSpec {
140
+ /**
141
+ * Private Network specification details.
142
+ *
143
+ * One-of ('endpointType'): at most one of 'privateNetwork', 'publicNetwork' could be set.
144
+ */
145
+ privateNetwork?: EndpointSpecPrivateNetworkSpec;
146
+ /**
147
+ * Public network specification details.
148
+ *
149
+ * One-of ('endpointType'): at most one of 'privateNetwork', 'publicNetwork' could be set.
150
+ */
151
+ publicNetwork?: EndpointSpecPublicNetworkSpec;
152
+ }
153
+ export interface ClusterVersion {
154
+ /**
155
+ * Redis™ engine version.
156
+ */
157
+ version: string;
158
+ /**
159
+ * Date of End of Life.
160
+ */
161
+ endOfLifeAt?: Date;
162
+ /**
163
+ * Cluster settings available to be updated.
164
+ */
165
+ availableSettings: AvailableClusterSetting[];
166
+ /**
167
+ * Redis™ logo url.
168
+ */
169
+ logoUrl: string;
170
+ /**
171
+ * Zone of the Redis™ Database Instance.
172
+ */
173
+ zone: ScwZone;
174
+ }
175
+ export interface Cluster {
176
+ /**
177
+ * UUID of the Database Instance.
178
+ */
179
+ id: string;
180
+ /**
181
+ * Name of the Database Instance.
182
+ */
183
+ name: string;
184
+ /**
185
+ * Project ID the Database Instance belongs to.
186
+ */
187
+ projectId: string;
188
+ /**
189
+ * Status of the Database Instance.
190
+ */
191
+ status: ClusterStatus;
192
+ /**
193
+ * Redis™ engine version of the Database Instance.
194
+ */
195
+ version: string;
196
+ /**
197
+ * List of Database Instance endpoints.
198
+ */
199
+ endpoints: Endpoint[];
200
+ /**
201
+ * List of tags applied to the Database Instance.
202
+ */
203
+ tags: string[];
204
+ /**
205
+ * Node type of the Database Instance.
206
+ */
207
+ nodeType: string;
208
+ /**
209
+ * Creation date (Format ISO 8601).
210
+ */
211
+ createdAt?: Date;
212
+ /**
213
+ * Update date (Format ISO 8601).
214
+ */
215
+ updatedAt?: Date;
216
+ /**
217
+ * Defines whether or not TLS is enabled.
218
+ */
219
+ tlsEnabled: boolean;
220
+ /**
221
+ * List of Database Instance settings.
222
+ */
223
+ clusterSettings: ClusterSetting[];
224
+ /**
225
+ * List of ACL rules.
226
+ */
227
+ aclRules: ACLRule[];
228
+ /**
229
+ * Number of nodes of the Database Instance cluster.
230
+ */
231
+ clusterSize: number;
232
+ /**
233
+ * Zone of the Database Instance.
234
+ */
235
+ zone: ScwZone;
236
+ /**
237
+ * Name of the user associated to the cluster.
238
+ */
239
+ userName: string;
240
+ /**
241
+ * List of engine versions the Database Instance can upgrade to.
242
+ */
243
+ upgradableVersions: string[];
244
+ }
245
+ export interface NodeType {
246
+ /**
247
+ * Node type name.
248
+ */
249
+ name: string;
250
+ /**
251
+ * Current stock status of the node type.
252
+ */
253
+ stockStatus: NodeTypeStock;
254
+ /**
255
+ * Current specifications of the offer.
256
+ */
257
+ description: string;
258
+ /**
259
+ * Number of virtual CPUs.
260
+ */
261
+ vcpus: number;
262
+ /**
263
+ * Quantity of RAM.
264
+ */
265
+ memory: number;
266
+ /**
267
+ * Defines whether node type is currently disabled or not.
268
+ */
269
+ disabled: boolean;
270
+ /**
271
+ * Defines whether node type is currently in beta.
272
+ */
273
+ beta: boolean;
274
+ /**
275
+ * Zone of the node type.
276
+ */
277
+ zone: ScwZone;
278
+ }
279
+ export type AddAclRulesRequest = {
280
+ /**
281
+ * Zone to target. If none is passed will use default zone from the config.
282
+ */
283
+ zone?: ScwZone;
284
+ /**
285
+ * UUID of the Database Instance you want to add ACL rules to.
286
+ */
287
+ clusterId: string;
288
+ /**
289
+ * ACLs rules to add to the cluster.
290
+ */
291
+ aclRules: ACLRuleSpec[];
292
+ };
293
+ export interface AddAclRulesResponse {
294
+ /**
295
+ * ACL Rules enabled for the Database Instance.
296
+ */
297
+ aclRules: ACLRule[];
298
+ /**
299
+ * Total count of ACL rules of the Database Instance.
300
+ */
301
+ totalCount: number;
302
+ }
303
+ export type AddClusterSettingsRequest = {
304
+ /**
305
+ * Zone to target. If none is passed will use default zone from the config.
306
+ */
307
+ zone?: ScwZone;
308
+ /**
309
+ * UUID of the Database Instance you want to add settings to.
310
+ */
311
+ clusterId: string;
312
+ /**
313
+ * Settings to add to the cluster.
314
+ */
315
+ settings: ClusterSetting[];
316
+ };
317
+ export type AddEndpointsRequest = {
318
+ /**
319
+ * Zone to target. If none is passed will use default zone from the config.
320
+ */
321
+ zone?: ScwZone;
322
+ /**
323
+ * UUID of the Database Instance you want to add endpoints to.
324
+ */
325
+ clusterId: string;
326
+ /**
327
+ * Endpoints to add to the Database Instance.
328
+ */
329
+ endpoints: EndpointSpec[];
330
+ };
331
+ export interface AddEndpointsResponse {
332
+ /**
333
+ * Endpoints defined on the Database Instance.
334
+ */
335
+ endpoints: Endpoint[];
336
+ /**
337
+ * Total count of endpoints of the Database Instance.
338
+ */
339
+ totalCount: number;
340
+ }
341
+ export interface ClusterMetricsResponse {
342
+ /**
343
+ * Time series of metrics of a given cluster.
344
+ */
345
+ timeseries: TimeSeries[];
346
+ }
347
+ export interface ClusterSettingsResponse {
348
+ /**
349
+ * Settings configured for a given Database Instance.
350
+ */
351
+ settings: ClusterSetting[];
352
+ }
353
+ export type CreateClusterRequest = {
354
+ /**
355
+ * Zone to target. If none is passed will use default zone from the config.
356
+ */
357
+ zone?: ScwZone;
358
+ /**
359
+ * Project ID in which to create the Database Instance.
360
+ */
361
+ projectId?: string;
362
+ /**
363
+ * Name of the Database Instance.
364
+ */
365
+ name?: string;
366
+ /**
367
+ * Redis™ engine version of the Database Instance.
368
+ */
369
+ version: string;
370
+ /**
371
+ * Tags to apply to the Database Instance.
372
+ */
373
+ tags?: string[];
374
+ /**
375
+ * Type of node to use for the Database Instance.
376
+ */
377
+ nodeType: string;
378
+ /**
379
+ * Name of the user created upon Database Instance creation.
380
+ */
381
+ userName: string;
382
+ /**
383
+ * Password of the user.
384
+ */
385
+ password: string;
386
+ /**
387
+ * Number of nodes in the Redis™ cluster.
388
+ */
389
+ clusterSize?: number;
390
+ /**
391
+ * List of ACLRuleSpec used to secure your publicly exposed cluster.
392
+ */
393
+ aclRules?: ACLRuleSpec[];
394
+ /**
395
+ * Zero or multiple EndpointSpec used to expose your cluster publicly and inside private networks. If no EndpoindSpec is given the cluster will be publicly exposed by default.
396
+ */
397
+ endpoints?: EndpointSpec[];
398
+ /**
399
+ * Defines whether or not TLS is enabled.
400
+ */
401
+ tlsEnabled: boolean;
402
+ /**
403
+ * List of advanced settings to be set upon Database Instance initialization.
404
+ */
405
+ clusterSettings?: ClusterSetting[];
406
+ };
407
+ export type DeleteAclRuleRequest = {
408
+ /**
409
+ * Zone to target. If none is passed will use default zone from the config.
410
+ */
411
+ zone?: ScwZone;
412
+ /**
413
+ * UUID of the ACL rule you want to delete.
414
+ */
415
+ aclId: string;
416
+ };
417
+ export type DeleteClusterRequest = {
418
+ /**
419
+ * Zone to target. If none is passed will use default zone from the config.
420
+ */
421
+ zone?: ScwZone;
422
+ /**
423
+ * UUID of the Database Instance to delete.
424
+ */
425
+ clusterId: string;
426
+ };
427
+ export type DeleteClusterSettingRequest = {
428
+ /**
429
+ * Zone to target. If none is passed will use default zone from the config.
430
+ */
431
+ zone?: ScwZone;
432
+ /**
433
+ * UUID of the Database Instance where the settings must be set.
434
+ */
435
+ clusterId: string;
436
+ /**
437
+ * Setting name to delete.
438
+ */
439
+ settingName: string;
440
+ };
441
+ export type DeleteEndpointRequest = {
442
+ /**
443
+ * Zone to target. If none is passed will use default zone from the config.
444
+ */
445
+ zone?: ScwZone;
446
+ /**
447
+ * UUID of the endpoint you want to delete.
448
+ */
449
+ endpointId: string;
450
+ };
451
+ export type GetAclRuleRequest = {
452
+ /**
453
+ * Zone to target. If none is passed will use default zone from the config.
454
+ */
455
+ zone?: ScwZone;
456
+ /**
457
+ * UUID of the ACL rule you want to get.
458
+ */
459
+ aclId: string;
460
+ };
461
+ export type GetClusterCertificateRequest = {
462
+ /**
463
+ * Zone to target. If none is passed will use default zone from the config.
464
+ */
465
+ zone?: ScwZone;
466
+ /**
467
+ * UUID of the cluster.
468
+ */
469
+ clusterId: string;
470
+ };
471
+ export type GetClusterMetricsRequest = {
472
+ /**
473
+ * Zone to target. If none is passed will use default zone from the config.
474
+ */
475
+ zone?: ScwZone;
476
+ /**
477
+ * UUID of the cluster.
478
+ */
479
+ clusterId: string;
480
+ /**
481
+ * Start date.
482
+ */
483
+ startAt?: Date;
484
+ /**
485
+ * End date.
486
+ */
487
+ endAt?: Date;
488
+ /**
489
+ * Name of the metric to gather.
490
+ */
491
+ metricName?: string;
492
+ };
493
+ export type GetClusterRequest = {
494
+ /**
495
+ * Zone to target. If none is passed will use default zone from the config.
496
+ */
497
+ zone?: ScwZone;
498
+ /**
499
+ * UUID of the cluster.
500
+ */
501
+ clusterId: string;
502
+ };
503
+ export type GetEndpointRequest = {
504
+ /**
505
+ * Zone to target. If none is passed will use default zone from the config.
506
+ */
507
+ zone?: ScwZone;
508
+ /**
509
+ * UUID of the endpoint you want to get.
510
+ */
511
+ endpointId: string;
512
+ };
513
+ export type ListClusterVersionsRequest = {
514
+ /**
515
+ * Zone to target. If none is passed will use default zone from the config.
516
+ */
517
+ zone?: ScwZone;
518
+ /**
519
+ * Defines whether or not to include disabled Redis™ engine versions.
520
+ */
521
+ includeDisabled: boolean;
522
+ /**
523
+ * Defines whether or not to include beta Redis™ engine versions.
524
+ */
525
+ includeBeta: boolean;
526
+ /**
527
+ * Defines whether or not to include deprecated Redis™ engine versions.
528
+ */
529
+ includeDeprecated: boolean;
530
+ /**
531
+ * List Redis™ engine versions that match a given name pattern.
532
+ */
533
+ version?: string;
534
+ page?: number;
535
+ pageSize?: number;
536
+ };
537
+ export interface ListClusterVersionsResponse {
538
+ /**
539
+ * List of available Redis™ engine versions.
540
+ */
541
+ versions: ClusterVersion[];
542
+ /**
543
+ * Total count of available Redis™ engine versions.
544
+ */
545
+ totalCount: number;
546
+ }
547
+ export type ListClustersRequest = {
548
+ /**
549
+ * Zone to target. If none is passed will use default zone from the config.
550
+ */
551
+ zone?: ScwZone;
552
+ /**
553
+ * Filter by Database Instance tags.
554
+ */
555
+ tags?: string[];
556
+ /**
557
+ * Filter by Database Instance names.
558
+ */
559
+ name?: string;
560
+ /**
561
+ * Criteria to use when ordering the list.
562
+ */
563
+ orderBy?: ListClustersRequestOrderBy;
564
+ /**
565
+ * Filter by Project ID.
566
+ */
567
+ projectId?: string;
568
+ /**
569
+ * Filter by Organization ID.
570
+ */
571
+ organizationId?: string;
572
+ /**
573
+ * Filter by Redis™ engine version.
574
+ */
575
+ version?: string;
576
+ page?: number;
577
+ pageSize?: number;
578
+ };
579
+ export interface ListClustersResponse {
580
+ /**
581
+ * List all Database Instances.
582
+ */
583
+ clusters: Cluster[];
584
+ /**
585
+ * Total count of Database Instances.
586
+ */
587
+ totalCount: number;
588
+ }
589
+ export type ListNodeTypesRequest = {
590
+ /**
591
+ * Zone to target. If none is passed will use default zone from the config.
592
+ */
593
+ zone?: ScwZone;
594
+ /**
595
+ * Defines whether or not to include disabled types.
596
+ */
597
+ includeDisabledTypes: boolean;
598
+ page?: number;
599
+ pageSize?: number;
600
+ };
601
+ export interface ListNodeTypesResponse {
602
+ /**
603
+ * Types of node.
604
+ */
605
+ nodeTypes: NodeType[];
606
+ /**
607
+ * Total count of node types available.
608
+ */
609
+ totalCount: number;
610
+ }
611
+ export type MigrateClusterRequest = {
612
+ /**
613
+ * Zone to target. If none is passed will use default zone from the config.
614
+ */
615
+ zone?: ScwZone;
616
+ /**
617
+ * UUID of the Database Instance to update.
618
+ */
619
+ clusterId: string;
620
+ /**
621
+ * Redis™ engine version of the Database Instance.
622
+ *
623
+ * One-of ('action'): at most one of 'version', 'nodeType', 'clusterSize' could be set.
624
+ */
625
+ version?: string;
626
+ /**
627
+ * Type of node to use for the Database Instance.
628
+ *
629
+ * One-of ('action'): at most one of 'version', 'nodeType', 'clusterSize' could be set.
630
+ */
631
+ nodeType?: string;
632
+ /**
633
+ * Number of nodes for the Database Instance.
634
+ *
635
+ * One-of ('action'): at most one of 'version', 'nodeType', 'clusterSize' could be set.
636
+ */
637
+ clusterSize?: number;
638
+ };
639
+ export type RenewClusterCertificateRequest = {
640
+ /**
641
+ * Zone to target. If none is passed will use default zone from the config.
642
+ */
643
+ zone?: ScwZone;
644
+ /**
645
+ * UUID of the cluster.
646
+ */
647
+ clusterId: string;
648
+ };
649
+ export type SetAclRulesRequest = {
650
+ /**
651
+ * Zone to target. If none is passed will use default zone from the config.
652
+ */
653
+ zone?: ScwZone;
654
+ /**
655
+ * UUID of the Database Instance where the ACL rules have to be set.
656
+ */
657
+ clusterId: string;
658
+ /**
659
+ * ACLs rules to define for the cluster.
660
+ */
661
+ aclRules: ACLRuleSpec[];
662
+ };
663
+ export interface SetAclRulesResponse {
664
+ /**
665
+ * ACL Rules enabled for the Database Instance.
666
+ */
667
+ aclRules: ACLRule[];
668
+ }
669
+ export type SetClusterSettingsRequest = {
670
+ /**
671
+ * Zone to target. If none is passed will use default zone from the config.
672
+ */
673
+ zone?: ScwZone;
674
+ /**
675
+ * UUID of the Database Instance where the settings must be set.
676
+ */
677
+ clusterId: string;
678
+ /**
679
+ * Settings to define for the Database Instance.
680
+ */
681
+ settings: ClusterSetting[];
682
+ };
683
+ export type SetEndpointsRequest = {
684
+ /**
685
+ * Zone to target. If none is passed will use default zone from the config.
686
+ */
687
+ zone?: ScwZone;
688
+ /**
689
+ * UUID of the Database Instance where the endpoints have to be set.
690
+ */
691
+ clusterId: string;
692
+ /**
693
+ * Endpoints to define for the Database Instance.
694
+ */
695
+ endpoints: EndpointSpec[];
696
+ };
697
+ export interface SetEndpointsResponse {
698
+ /**
699
+ * Endpoints defined on the Database Instance.
700
+ */
701
+ endpoints: Endpoint[];
702
+ }
703
+ export type UpdateClusterRequest = {
704
+ /**
705
+ * Zone to target. If none is passed will use default zone from the config.
706
+ */
707
+ zone?: ScwZone;
708
+ /**
709
+ * UUID of the Database Instance to update.
710
+ */
711
+ clusterId: string;
712
+ /**
713
+ * Name of the Database Instance.
714
+ */
715
+ name?: string;
716
+ /**
717
+ * Database Instance tags.
718
+ */
719
+ tags?: string[];
720
+ /**
721
+ * Name of the Database Instance user.
722
+ */
723
+ userName?: string;
724
+ /**
725
+ * Password of the Database Instance user.
726
+ */
727
+ password?: string;
728
+ };
729
+ export type UpdateEndpointRequest = {
730
+ /**
731
+ * Zone to target. If none is passed will use default zone from the config.
732
+ */
733
+ zone?: ScwZone;
734
+ /**
735
+ * UUID of the endpoint you want to get.
736
+ */
737
+ endpointId: string;
738
+ /**
739
+ * Private Network details.
740
+ *
741
+ * One-of ('endpointType'): at most one of 'privateNetwork', 'publicNetwork' could be set.
742
+ */
743
+ privateNetwork?: EndpointSpecPrivateNetworkSpec;
744
+ /**
745
+ * Public network details.
746
+ *
747
+ * One-of ('endpointType'): at most one of 'privateNetwork', 'publicNetwork' could be set.
748
+ */
749
+ publicNetwork?: EndpointSpecPublicNetworkSpec;
750
+ };