@scaleway/sdk-rdb 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.
- package/LICENSE +191 -0
- package/dist/index.gen.cjs +4 -0
- package/dist/index.gen.d.ts +5 -0
- package/dist/index.gen.js +4 -0
- package/dist/v1/api.gen.cjs +1057 -0
- package/dist/v1/api.gen.d.ts +490 -0
- package/dist/v1/api.gen.js +1057 -0
- package/dist/v1/content.gen.cjs +38 -0
- package/dist/v1/content.gen.d.ts +13 -0
- package/dist/v1/content.gen.js +38 -0
- package/dist/v1/index.gen.cjs +71 -0
- package/dist/v1/index.gen.d.ts +5 -0
- package/dist/v1/index.gen.js +71 -0
- package/dist/v1/marshalling.gen.cjs +922 -0
- package/dist/v1/marshalling.gen.d.ts +59 -0
- package/dist/v1/marshalling.gen.js +922 -0
- package/dist/v1/types.gen.d.ts +1913 -0
- package/dist/v1/validation-rules.gen.cjs +8 -0
- package/dist/v1/validation-rules.gen.d.ts +5 -0
- package/dist/v1/validation-rules.gen.js +8 -0
- package/package.json +51 -0
|
@@ -0,0 +1,1913 @@
|
|
|
1
|
+
import type { Region as ScwRegion, Zone as ScwZone, TimeSeries } from '@scaleway/sdk-client';
|
|
2
|
+
export type ACLRuleAction = 'allow' | 'deny';
|
|
3
|
+
export type ACLRuleDirection = 'inbound' | 'outbound';
|
|
4
|
+
export type ACLRuleProtocol = 'tcp' | 'udp' | 'icmp';
|
|
5
|
+
export type DatabaseBackupStatus = 'unknown' | 'creating' | 'ready' | 'restoring' | 'deleting' | 'error' | 'exporting' | 'locked';
|
|
6
|
+
export type EndpointPrivateNetworkDetailsProvisioningMode = 'static' | 'ipam';
|
|
7
|
+
export type EngineSettingPropertyType = 'BOOLEAN' | 'INT' | 'STRING' | 'FLOAT';
|
|
8
|
+
export type InstanceLogStatus = 'unknown' | 'ready' | 'creating' | 'error';
|
|
9
|
+
export type InstanceStatus = 'unknown' | 'ready' | 'provisioning' | 'configuring' | 'deleting' | 'error' | 'autohealing' | 'locked' | 'initializing' | 'disk_full' | 'backuping' | 'snapshotting' | 'restarting';
|
|
10
|
+
export type ListDatabaseBackupsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc' | 'status_asc' | 'status_desc';
|
|
11
|
+
export type ListDatabasesRequestOrderBy = 'name_asc' | 'name_desc' | 'size_asc' | 'size_desc';
|
|
12
|
+
export type ListInstanceLogsRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
13
|
+
export type ListInstancesRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc' | 'region' | 'status_asc' | 'status_desc';
|
|
14
|
+
export type ListPrivilegesRequestOrderBy = 'user_name_asc' | 'user_name_desc' | 'database_name_asc' | 'database_name_desc';
|
|
15
|
+
export type ListSnapshotsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc' | 'expires_at_asc' | 'expires_at_desc';
|
|
16
|
+
export type ListUsersRequestOrderBy = 'name_asc' | 'name_desc' | 'is_admin_asc' | 'is_admin_desc';
|
|
17
|
+
export type MaintenanceStatus = 'unknown' | 'pending' | 'done' | 'canceled' | 'ongoing';
|
|
18
|
+
export type NodeTypeGeneration = 'unknown_generation' | 'generation_v1' | 'generation_v2';
|
|
19
|
+
export type NodeTypeStock = 'unknown' | 'low_stock' | 'out_of_stock' | 'available';
|
|
20
|
+
export type Permission = 'readonly' | 'readwrite' | 'all' | 'custom' | 'none';
|
|
21
|
+
export type ReadReplicaStatus = 'unknown' | 'provisioning' | 'initializing' | 'ready' | 'deleting' | 'error' | 'locked' | 'configuring' | 'promoting';
|
|
22
|
+
export type SnapshotStatus = 'unknown' | 'creating' | 'ready' | 'restoring' | 'deleting' | 'error' | 'locked';
|
|
23
|
+
export type StorageClass = 'unknown_storage_class' | 'lssd' | 'bssd' | 'sbs';
|
|
24
|
+
export type VolumeType = 'lssd' | 'bssd' | 'sbs_5k' | 'sbs_15k';
|
|
25
|
+
export interface EndpointDirectAccessDetails {
|
|
26
|
+
}
|
|
27
|
+
export interface EndpointLoadBalancerDetails {
|
|
28
|
+
}
|
|
29
|
+
export interface EndpointPrivateNetworkDetails {
|
|
30
|
+
/**
|
|
31
|
+
* UUID of the private network.
|
|
32
|
+
*/
|
|
33
|
+
privateNetworkId: string;
|
|
34
|
+
/**
|
|
35
|
+
* CIDR notation of the endpoint IPv4 address.
|
|
36
|
+
*/
|
|
37
|
+
serviceIp: string;
|
|
38
|
+
/**
|
|
39
|
+
* Private network zone.
|
|
40
|
+
*/
|
|
41
|
+
zone: ScwZone;
|
|
42
|
+
/**
|
|
43
|
+
* How endpoint ips are provisioned.
|
|
44
|
+
*/
|
|
45
|
+
provisioningMode: EndpointPrivateNetworkDetailsProvisioningMode;
|
|
46
|
+
}
|
|
47
|
+
export interface EndpointSpecPrivateNetworkIpamConfig {
|
|
48
|
+
}
|
|
49
|
+
export interface ReadReplicaEndpointSpecPrivateNetworkIpamConfig {
|
|
50
|
+
}
|
|
51
|
+
export interface EngineSetting {
|
|
52
|
+
/**
|
|
53
|
+
* Setting name from the database engine.
|
|
54
|
+
*/
|
|
55
|
+
name: string;
|
|
56
|
+
/**
|
|
57
|
+
* Value set when not specified.
|
|
58
|
+
*/
|
|
59
|
+
defaultValue: string;
|
|
60
|
+
/**
|
|
61
|
+
* Setting can be applied without restarting.
|
|
62
|
+
*/
|
|
63
|
+
hotConfigurable: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Setting description.
|
|
66
|
+
*/
|
|
67
|
+
description: string;
|
|
68
|
+
/**
|
|
69
|
+
* Setting type.
|
|
70
|
+
*/
|
|
71
|
+
propertyType: EngineSettingPropertyType;
|
|
72
|
+
/**
|
|
73
|
+
* Setting base unit.
|
|
74
|
+
*/
|
|
75
|
+
unit?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Validation regex for string type settings.
|
|
78
|
+
*/
|
|
79
|
+
stringConstraint?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Minimum value for int types.
|
|
82
|
+
*/
|
|
83
|
+
intMin?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Maximum value for int types.
|
|
86
|
+
*/
|
|
87
|
+
intMax?: number;
|
|
88
|
+
/**
|
|
89
|
+
* Minimum value for float types.
|
|
90
|
+
*/
|
|
91
|
+
floatMin?: number;
|
|
92
|
+
/**
|
|
93
|
+
* Maximum value for float types.
|
|
94
|
+
*/
|
|
95
|
+
floatMax?: number;
|
|
96
|
+
}
|
|
97
|
+
export interface Endpoint {
|
|
98
|
+
/**
|
|
99
|
+
* UUID of the endpoint.
|
|
100
|
+
*/
|
|
101
|
+
id: string;
|
|
102
|
+
/**
|
|
103
|
+
* IPv4 address of the endpoint.
|
|
104
|
+
*
|
|
105
|
+
* One-of ('address'): at most one of 'ip', 'hostname' could be set.
|
|
106
|
+
*/
|
|
107
|
+
ip?: string;
|
|
108
|
+
/**
|
|
109
|
+
* TCP port of the endpoint.
|
|
110
|
+
*/
|
|
111
|
+
port: number;
|
|
112
|
+
/**
|
|
113
|
+
* Name of the endpoint.
|
|
114
|
+
*/
|
|
115
|
+
name?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Private Network details. One maximum per Database Instance or Read Replica (a Database Instance and its Read Replica can have different Private Networks). Cannot be updated (has to be deleted and recreated).
|
|
118
|
+
*
|
|
119
|
+
* One-of ('details'): at most one of 'privateNetwork', 'loadBalancer', 'directAccess' could be set.
|
|
120
|
+
*/
|
|
121
|
+
privateNetwork?: EndpointPrivateNetworkDetails;
|
|
122
|
+
/**
|
|
123
|
+
* Load balancer details. Public endpoint for Database Instance which is systematically present. One per Database Instance.
|
|
124
|
+
*
|
|
125
|
+
* One-of ('details'): at most one of 'privateNetwork', 'loadBalancer', 'directAccess' could be set.
|
|
126
|
+
*/
|
|
127
|
+
loadBalancer?: EndpointLoadBalancerDetails;
|
|
128
|
+
/**
|
|
129
|
+
* Direct access details. Public endpoint reserved for Read Replicas. One per Read Replica.
|
|
130
|
+
*
|
|
131
|
+
* One-of ('details'): at most one of 'privateNetwork', 'loadBalancer', 'directAccess' could be set.
|
|
132
|
+
*/
|
|
133
|
+
directAccess?: EndpointDirectAccessDetails;
|
|
134
|
+
/**
|
|
135
|
+
* Hostname of the endpoint.
|
|
136
|
+
*
|
|
137
|
+
* One-of ('address'): at most one of 'ip', 'hostname' could be set.
|
|
138
|
+
*/
|
|
139
|
+
hostname?: string;
|
|
140
|
+
}
|
|
141
|
+
export interface EndpointSpecLoadBalancer {
|
|
142
|
+
}
|
|
143
|
+
export interface EndpointSpecPrivateNetwork {
|
|
144
|
+
/**
|
|
145
|
+
* UUID of the Private Network to be connected to the Database Instance.
|
|
146
|
+
*/
|
|
147
|
+
privateNetworkId: string;
|
|
148
|
+
/**
|
|
149
|
+
* Endpoint IPv4 address with a CIDR notation. Refer to the official Scaleway documentation to learn more about IP and subnet limitations.
|
|
150
|
+
*
|
|
151
|
+
* One-of ('config'): at most one of 'serviceIp', 'ipamConfig' could be set.
|
|
152
|
+
*/
|
|
153
|
+
serviceIp?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Automated configuration of your Private Network endpoint with Scaleway IPAM service. One at the most per Database Instance or Read Replica (a Database Instance and its Read Replica can have different Private Networks). Cannot be updated (has to be deleted and recreated).
|
|
156
|
+
*
|
|
157
|
+
* One-of ('config'): at most one of 'serviceIp', 'ipamConfig' could be set.
|
|
158
|
+
*/
|
|
159
|
+
ipamConfig?: EndpointSpecPrivateNetworkIpamConfig;
|
|
160
|
+
}
|
|
161
|
+
export interface ReadReplicaEndpointSpecDirectAccess {
|
|
162
|
+
}
|
|
163
|
+
export interface ReadReplicaEndpointSpecPrivateNetwork {
|
|
164
|
+
/**
|
|
165
|
+
* UUID of the Private Network to be connected to the Read Replica.
|
|
166
|
+
*/
|
|
167
|
+
privateNetworkId: string;
|
|
168
|
+
/**
|
|
169
|
+
* Endpoint IPv4 address with a CIDR notation. Refer to the official Scaleway documentation to learn more about IP and subnet limitations.
|
|
170
|
+
*
|
|
171
|
+
* One-of ('config'): at most one of 'serviceIp', 'ipamConfig' could be set.
|
|
172
|
+
*/
|
|
173
|
+
serviceIp?: string;
|
|
174
|
+
/**
|
|
175
|
+
* Automated configuration of your Private Network endpoint with Scaleway IPAM service. One at the most per Database Instance or Read Replica (a Database Instance and its Read Replica can have different private networks). Cannot be updated (has to be deleted and recreated).
|
|
176
|
+
*
|
|
177
|
+
* One-of ('config'): at most one of 'serviceIp', 'ipamConfig' could be set.
|
|
178
|
+
*/
|
|
179
|
+
ipamConfig?: ReadReplicaEndpointSpecPrivateNetworkIpamConfig;
|
|
180
|
+
}
|
|
181
|
+
export interface EngineVersion {
|
|
182
|
+
/**
|
|
183
|
+
* Database engine version.
|
|
184
|
+
*/
|
|
185
|
+
version: string;
|
|
186
|
+
/**
|
|
187
|
+
* Database engine name.
|
|
188
|
+
*/
|
|
189
|
+
name: string;
|
|
190
|
+
/**
|
|
191
|
+
* End of life date.
|
|
192
|
+
*/
|
|
193
|
+
endOfLife?: Date;
|
|
194
|
+
/**
|
|
195
|
+
* Engine settings available to be set.
|
|
196
|
+
*/
|
|
197
|
+
availableSettings: EngineSetting[];
|
|
198
|
+
/**
|
|
199
|
+
* Disabled versions cannot be created.
|
|
200
|
+
*/
|
|
201
|
+
disabled: boolean;
|
|
202
|
+
/**
|
|
203
|
+
* Beta status of engine version.
|
|
204
|
+
*/
|
|
205
|
+
beta: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Engine settings available to be set at database initialization.
|
|
208
|
+
*/
|
|
209
|
+
availableInitSettings: EngineSetting[];
|
|
210
|
+
}
|
|
211
|
+
export interface BackupSchedule {
|
|
212
|
+
/**
|
|
213
|
+
* Frequency of the backup schedule (in hours).
|
|
214
|
+
*/
|
|
215
|
+
frequency: number;
|
|
216
|
+
/**
|
|
217
|
+
* Default retention period of backups (in days).
|
|
218
|
+
*/
|
|
219
|
+
retention: number;
|
|
220
|
+
/**
|
|
221
|
+
* Defines whether the backup schedule feature is disabled.
|
|
222
|
+
*/
|
|
223
|
+
disabled: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* Next run of the backup schedule (accurate to 10 minutes).
|
|
226
|
+
*/
|
|
227
|
+
nextRunAt?: Date;
|
|
228
|
+
}
|
|
229
|
+
export interface EncryptionAtRest {
|
|
230
|
+
enabled: boolean;
|
|
231
|
+
}
|
|
232
|
+
export interface InstanceSetting {
|
|
233
|
+
name: string;
|
|
234
|
+
value: string;
|
|
235
|
+
}
|
|
236
|
+
export interface LogsPolicy {
|
|
237
|
+
/**
|
|
238
|
+
* Max age (in days) of remote logs to keep on the Database Instance.
|
|
239
|
+
*/
|
|
240
|
+
maxAgeRetention?: number;
|
|
241
|
+
/**
|
|
242
|
+
* Max disk size of remote logs to keep on the Database Instance.
|
|
243
|
+
*/
|
|
244
|
+
totalDiskRetention?: number;
|
|
245
|
+
}
|
|
246
|
+
export interface Maintenance {
|
|
247
|
+
/**
|
|
248
|
+
* Start date of the maintenance window.
|
|
249
|
+
*/
|
|
250
|
+
startsAt?: Date;
|
|
251
|
+
/**
|
|
252
|
+
* End date of the maintenance window.
|
|
253
|
+
*/
|
|
254
|
+
stopsAt?: Date;
|
|
255
|
+
/**
|
|
256
|
+
* Closed maintenance date.
|
|
257
|
+
*/
|
|
258
|
+
closedAt?: Date;
|
|
259
|
+
/**
|
|
260
|
+
* Maintenance information message.
|
|
261
|
+
*/
|
|
262
|
+
reason: string;
|
|
263
|
+
/**
|
|
264
|
+
* Status of the maintenance.
|
|
265
|
+
*/
|
|
266
|
+
status: MaintenanceStatus;
|
|
267
|
+
/**
|
|
268
|
+
* Time when Scaleway-side maintenance will be applied.
|
|
269
|
+
*/
|
|
270
|
+
forcedAt?: Date;
|
|
271
|
+
}
|
|
272
|
+
export interface ReadReplica {
|
|
273
|
+
/**
|
|
274
|
+
* UUID of the Read Replica.
|
|
275
|
+
*/
|
|
276
|
+
id: string;
|
|
277
|
+
/**
|
|
278
|
+
* Display Read Replica connection information.
|
|
279
|
+
*/
|
|
280
|
+
endpoints: Endpoint[];
|
|
281
|
+
/**
|
|
282
|
+
* Read replica status.
|
|
283
|
+
*/
|
|
284
|
+
status: ReadReplicaStatus;
|
|
285
|
+
/**
|
|
286
|
+
* Region the Read Replica is in.
|
|
287
|
+
*/
|
|
288
|
+
region: ScwRegion;
|
|
289
|
+
/**
|
|
290
|
+
* Whether the replica is in the same availability zone as the main instance nodes or not.
|
|
291
|
+
*/
|
|
292
|
+
sameZone: boolean;
|
|
293
|
+
/**
|
|
294
|
+
* UUID of the Database Instance.
|
|
295
|
+
*/
|
|
296
|
+
instanceId: string;
|
|
297
|
+
}
|
|
298
|
+
export interface UpgradableVersion {
|
|
299
|
+
id: string;
|
|
300
|
+
name: string;
|
|
301
|
+
version: string;
|
|
302
|
+
minorVersion: string;
|
|
303
|
+
}
|
|
304
|
+
export interface Volume {
|
|
305
|
+
type: VolumeType;
|
|
306
|
+
size: number;
|
|
307
|
+
class: StorageClass;
|
|
308
|
+
}
|
|
309
|
+
export interface NodeTypeVolumeConstraintSizes {
|
|
310
|
+
/**
|
|
311
|
+
* [deprecated] Minimum size required for the Volume.
|
|
312
|
+
*/
|
|
313
|
+
minSize: number;
|
|
314
|
+
/**
|
|
315
|
+
* [deprecated] Maximum size required for the Volume.
|
|
316
|
+
*/
|
|
317
|
+
maxSize: number;
|
|
318
|
+
}
|
|
319
|
+
export interface NodeTypeVolumeType {
|
|
320
|
+
/**
|
|
321
|
+
* Volume Type.
|
|
322
|
+
*/
|
|
323
|
+
type: VolumeType;
|
|
324
|
+
/**
|
|
325
|
+
* The description of the Volume.
|
|
326
|
+
*/
|
|
327
|
+
description: string;
|
|
328
|
+
/**
|
|
329
|
+
* Minimum size required for the Volume.
|
|
330
|
+
*/
|
|
331
|
+
minSize: number;
|
|
332
|
+
/**
|
|
333
|
+
* Maximum size required for the Volume.
|
|
334
|
+
*/
|
|
335
|
+
maxSize: number;
|
|
336
|
+
/**
|
|
337
|
+
* Minimum increment level for a Block Storage volume size.
|
|
338
|
+
*/
|
|
339
|
+
chunkSize: number;
|
|
340
|
+
/**
|
|
341
|
+
* The storage class of the volume.
|
|
342
|
+
*/
|
|
343
|
+
class: StorageClass;
|
|
344
|
+
}
|
|
345
|
+
export interface SnapshotVolumeType {
|
|
346
|
+
type: VolumeType;
|
|
347
|
+
class: StorageClass;
|
|
348
|
+
}
|
|
349
|
+
export interface ACLRuleRequest {
|
|
350
|
+
ip: string;
|
|
351
|
+
description: string;
|
|
352
|
+
}
|
|
353
|
+
export interface ACLRule {
|
|
354
|
+
ip: string;
|
|
355
|
+
/**
|
|
356
|
+
* @deprecated
|
|
357
|
+
*/
|
|
358
|
+
port?: number;
|
|
359
|
+
protocol: ACLRuleProtocol;
|
|
360
|
+
direction: ACLRuleDirection;
|
|
361
|
+
action: ACLRuleAction;
|
|
362
|
+
description: string;
|
|
363
|
+
}
|
|
364
|
+
export interface EndpointSpec {
|
|
365
|
+
/**
|
|
366
|
+
* Load balancer endpoint specifications. Public endpoint for Database Instance which is systematically present. One per RDB instance.
|
|
367
|
+
*
|
|
368
|
+
* One-of ('spec'): at most one of 'loadBalancer', 'privateNetwork' could be set.
|
|
369
|
+
*/
|
|
370
|
+
loadBalancer?: EndpointSpecLoadBalancer;
|
|
371
|
+
/**
|
|
372
|
+
* Private Network endpoint specifications. One maximum per Database Instance or Read Replica (a Database Instance and its Read Replica can have different Private Networks). Cannot be updated (has to be deleted and recreated).
|
|
373
|
+
*
|
|
374
|
+
* One-of ('spec'): at most one of 'loadBalancer', 'privateNetwork' could be set.
|
|
375
|
+
*/
|
|
376
|
+
privateNetwork?: EndpointSpecPrivateNetwork;
|
|
377
|
+
}
|
|
378
|
+
export interface ReadReplicaEndpointSpec {
|
|
379
|
+
/**
|
|
380
|
+
* Direct access endpoint specifications. Public endpoint reserved for Read Replicas. One per Read Replica.
|
|
381
|
+
*
|
|
382
|
+
* One-of ('spec'): at most one of 'directAccess', 'privateNetwork' could be set.
|
|
383
|
+
*/
|
|
384
|
+
directAccess?: ReadReplicaEndpointSpecDirectAccess;
|
|
385
|
+
/**
|
|
386
|
+
* Private Network endpoint specifications. One at the most per Read Replica. Cannot be updated (has to be deleted and recreated).
|
|
387
|
+
*
|
|
388
|
+
* One-of ('spec'): at most one of 'directAccess', 'privateNetwork' could be set.
|
|
389
|
+
*/
|
|
390
|
+
privateNetwork?: ReadReplicaEndpointSpecPrivateNetwork;
|
|
391
|
+
}
|
|
392
|
+
export interface DatabaseBackup {
|
|
393
|
+
/**
|
|
394
|
+
* UUID of the database backup.
|
|
395
|
+
*/
|
|
396
|
+
id: string;
|
|
397
|
+
/**
|
|
398
|
+
* UUID of the Database Instance.
|
|
399
|
+
*/
|
|
400
|
+
instanceId: string;
|
|
401
|
+
/**
|
|
402
|
+
* Name of backed up database.
|
|
403
|
+
*/
|
|
404
|
+
databaseName: string;
|
|
405
|
+
/**
|
|
406
|
+
* Name of the backup.
|
|
407
|
+
*/
|
|
408
|
+
name: string;
|
|
409
|
+
/**
|
|
410
|
+
* Status of the backup.
|
|
411
|
+
*/
|
|
412
|
+
status: DatabaseBackupStatus;
|
|
413
|
+
/**
|
|
414
|
+
* Size of the database backup.
|
|
415
|
+
*/
|
|
416
|
+
size?: number;
|
|
417
|
+
/**
|
|
418
|
+
* Expiration date (must follow the ISO 8601 format).
|
|
419
|
+
*/
|
|
420
|
+
expiresAt?: Date;
|
|
421
|
+
/**
|
|
422
|
+
* Creation date (must follow the ISO 8601 format).
|
|
423
|
+
*/
|
|
424
|
+
createdAt?: Date;
|
|
425
|
+
/**
|
|
426
|
+
* Updated date (must follow the ISO 8601 format).
|
|
427
|
+
*/
|
|
428
|
+
updatedAt?: Date;
|
|
429
|
+
/**
|
|
430
|
+
* Name of the Database Instance of the backup.
|
|
431
|
+
*/
|
|
432
|
+
instanceName: string;
|
|
433
|
+
/**
|
|
434
|
+
* URL you can download the backup from.
|
|
435
|
+
*/
|
|
436
|
+
downloadUrl?: string;
|
|
437
|
+
/**
|
|
438
|
+
* Expiration date of the download link.
|
|
439
|
+
*/
|
|
440
|
+
downloadUrlExpiresAt?: Date;
|
|
441
|
+
/**
|
|
442
|
+
* Region of the database backup.
|
|
443
|
+
*/
|
|
444
|
+
region: ScwRegion;
|
|
445
|
+
/**
|
|
446
|
+
* Store logical backups in the same region as the source Database Instance.
|
|
447
|
+
*/
|
|
448
|
+
sameRegion: boolean;
|
|
449
|
+
}
|
|
450
|
+
export interface DatabaseEngine {
|
|
451
|
+
/**
|
|
452
|
+
* Engine name.
|
|
453
|
+
*/
|
|
454
|
+
name: string;
|
|
455
|
+
/**
|
|
456
|
+
* Engine logo URL.
|
|
457
|
+
*/
|
|
458
|
+
logoUrl: string;
|
|
459
|
+
/**
|
|
460
|
+
* Available versions.
|
|
461
|
+
*/
|
|
462
|
+
versions: EngineVersion[];
|
|
463
|
+
/**
|
|
464
|
+
* Region of this Database Instance.
|
|
465
|
+
*/
|
|
466
|
+
region: ScwRegion;
|
|
467
|
+
}
|
|
468
|
+
export interface Database {
|
|
469
|
+
/**
|
|
470
|
+
* Name of the database.
|
|
471
|
+
*/
|
|
472
|
+
name: string;
|
|
473
|
+
/**
|
|
474
|
+
* Name of the database owner.
|
|
475
|
+
*/
|
|
476
|
+
owner: string;
|
|
477
|
+
/**
|
|
478
|
+
* Defines whether the database is managed or not.
|
|
479
|
+
*/
|
|
480
|
+
managed: boolean;
|
|
481
|
+
/**
|
|
482
|
+
* Size of the database.
|
|
483
|
+
*/
|
|
484
|
+
size: number;
|
|
485
|
+
}
|
|
486
|
+
export interface ListInstanceLogsDetailsResponseInstanceLogDetail {
|
|
487
|
+
logName: string;
|
|
488
|
+
size: number;
|
|
489
|
+
}
|
|
490
|
+
export interface InstanceLog {
|
|
491
|
+
/**
|
|
492
|
+
* Presigned Object Storage URL to download your log file.
|
|
493
|
+
*/
|
|
494
|
+
downloadUrl?: string;
|
|
495
|
+
/**
|
|
496
|
+
* UUID of the Database Instance log.
|
|
497
|
+
*/
|
|
498
|
+
id: string;
|
|
499
|
+
/**
|
|
500
|
+
* Status of the logs in a Database Instance.
|
|
501
|
+
*/
|
|
502
|
+
status: InstanceLogStatus;
|
|
503
|
+
/**
|
|
504
|
+
* Name of the underlying node.
|
|
505
|
+
*/
|
|
506
|
+
nodeName: string;
|
|
507
|
+
/**
|
|
508
|
+
* Expiration date (must follow the ISO 8601 format).
|
|
509
|
+
*/
|
|
510
|
+
expiresAt?: Date;
|
|
511
|
+
/**
|
|
512
|
+
* Creation date (must follow the ISO 8601 format).
|
|
513
|
+
*/
|
|
514
|
+
createdAt?: Date;
|
|
515
|
+
/**
|
|
516
|
+
* Region the Database Instance is in.
|
|
517
|
+
*/
|
|
518
|
+
region: ScwRegion;
|
|
519
|
+
}
|
|
520
|
+
export interface Instance {
|
|
521
|
+
/**
|
|
522
|
+
* Creation date (must follow the ISO 8601 format).
|
|
523
|
+
*/
|
|
524
|
+
createdAt?: Date;
|
|
525
|
+
/**
|
|
526
|
+
* Volumes of the Database Instance.
|
|
527
|
+
*/
|
|
528
|
+
volume?: Volume;
|
|
529
|
+
/**
|
|
530
|
+
* Region the Database Instance is in.
|
|
531
|
+
*/
|
|
532
|
+
region: ScwRegion;
|
|
533
|
+
/**
|
|
534
|
+
* UUID of the Database Instance.
|
|
535
|
+
*/
|
|
536
|
+
id: string;
|
|
537
|
+
/**
|
|
538
|
+
* Name of the Database Instance.
|
|
539
|
+
*/
|
|
540
|
+
name: string;
|
|
541
|
+
/**
|
|
542
|
+
* Organization ID the Database Instance belongs to.
|
|
543
|
+
*/
|
|
544
|
+
organizationId: string;
|
|
545
|
+
/**
|
|
546
|
+
* Project ID the Database Instance belongs to.
|
|
547
|
+
*/
|
|
548
|
+
projectId: string;
|
|
549
|
+
/**
|
|
550
|
+
* Status of the Database Instance.
|
|
551
|
+
*/
|
|
552
|
+
status: InstanceStatus;
|
|
553
|
+
/**
|
|
554
|
+
* Database engine of the database (PostgreSQL, MySQL, ...).
|
|
555
|
+
*/
|
|
556
|
+
engine: string;
|
|
557
|
+
/**
|
|
558
|
+
* Available database engine versions for upgrade.
|
|
559
|
+
*/
|
|
560
|
+
upgradableVersion: UpgradableVersion[];
|
|
561
|
+
/**
|
|
562
|
+
* @deprecated Endpoint of the Database Instance.
|
|
563
|
+
*/
|
|
564
|
+
endpoint?: Endpoint;
|
|
565
|
+
/**
|
|
566
|
+
* List of tags applied to the Database Instance.
|
|
567
|
+
*/
|
|
568
|
+
tags: string[];
|
|
569
|
+
/**
|
|
570
|
+
* Advanced settings of the Database Instance.
|
|
571
|
+
*/
|
|
572
|
+
settings: InstanceSetting[];
|
|
573
|
+
/**
|
|
574
|
+
* Backup schedule of the Database Instance.
|
|
575
|
+
*/
|
|
576
|
+
backupSchedule?: BackupSchedule;
|
|
577
|
+
/**
|
|
578
|
+
* Defines whether or not High-Availability is enabled.
|
|
579
|
+
*/
|
|
580
|
+
isHaCluster: boolean;
|
|
581
|
+
/**
|
|
582
|
+
* Read Replicas of the Database Instance.
|
|
583
|
+
*/
|
|
584
|
+
readReplicas: ReadReplica[];
|
|
585
|
+
/**
|
|
586
|
+
* Node type of the Database Instance.
|
|
587
|
+
*/
|
|
588
|
+
nodeType: string;
|
|
589
|
+
/**
|
|
590
|
+
* List of engine settings to be set at database initialization.
|
|
591
|
+
*/
|
|
592
|
+
initSettings: InstanceSetting[];
|
|
593
|
+
/**
|
|
594
|
+
* List of Database Instance endpoints.
|
|
595
|
+
*/
|
|
596
|
+
endpoints: Endpoint[];
|
|
597
|
+
/**
|
|
598
|
+
* Logs policy of the Database Instance.
|
|
599
|
+
*/
|
|
600
|
+
logsPolicy?: LogsPolicy;
|
|
601
|
+
/**
|
|
602
|
+
* Store logical backups in the same region as the Database Instance.
|
|
603
|
+
*/
|
|
604
|
+
backupSameRegion: boolean;
|
|
605
|
+
/**
|
|
606
|
+
* List of Database Instance maintenance events.
|
|
607
|
+
*/
|
|
608
|
+
maintenances: Maintenance[];
|
|
609
|
+
/**
|
|
610
|
+
* Encryption at rest settings for your Database Instance.
|
|
611
|
+
*/
|
|
612
|
+
encryption?: EncryptionAtRest;
|
|
613
|
+
}
|
|
614
|
+
export interface NodeType {
|
|
615
|
+
/**
|
|
616
|
+
* Node Type name identifier.
|
|
617
|
+
*/
|
|
618
|
+
name: string;
|
|
619
|
+
/**
|
|
620
|
+
* Current stock status for the Node Type.
|
|
621
|
+
*/
|
|
622
|
+
stockStatus: NodeTypeStock;
|
|
623
|
+
/**
|
|
624
|
+
* Current specs of the offer.
|
|
625
|
+
*/
|
|
626
|
+
description: string;
|
|
627
|
+
/**
|
|
628
|
+
* Number of virtual CPUs.
|
|
629
|
+
*/
|
|
630
|
+
vcpus: number;
|
|
631
|
+
/**
|
|
632
|
+
* Quantity of RAM.
|
|
633
|
+
*/
|
|
634
|
+
memory: number;
|
|
635
|
+
/**
|
|
636
|
+
* @deprecated [deprecated] Node Type volume constraints.
|
|
637
|
+
*/
|
|
638
|
+
volumeConstraint?: NodeTypeVolumeConstraintSizes;
|
|
639
|
+
/**
|
|
640
|
+
* @deprecated The Node Type is compliant with Block Storage.
|
|
641
|
+
*/
|
|
642
|
+
isBssdCompatible?: boolean;
|
|
643
|
+
/**
|
|
644
|
+
* The Node Type is currently disabled.
|
|
645
|
+
*/
|
|
646
|
+
disabled: boolean;
|
|
647
|
+
/**
|
|
648
|
+
* The Node Type is currently in beta.
|
|
649
|
+
*/
|
|
650
|
+
beta: boolean;
|
|
651
|
+
/**
|
|
652
|
+
* Available storage options for the Node Type.
|
|
653
|
+
*/
|
|
654
|
+
availableVolumeTypes: NodeTypeVolumeType[];
|
|
655
|
+
/**
|
|
656
|
+
* The Node Type can be used only with high availability option.
|
|
657
|
+
*/
|
|
658
|
+
isHaRequired: boolean;
|
|
659
|
+
/**
|
|
660
|
+
* Generation associated with the NodeType offer.
|
|
661
|
+
*/
|
|
662
|
+
generation: NodeTypeGeneration;
|
|
663
|
+
/**
|
|
664
|
+
* Instance range associated with the NodeType offer.
|
|
665
|
+
*/
|
|
666
|
+
instanceRange: string;
|
|
667
|
+
/**
|
|
668
|
+
* Region the Node Type is in.
|
|
669
|
+
*/
|
|
670
|
+
region: ScwRegion;
|
|
671
|
+
}
|
|
672
|
+
export interface Privilege {
|
|
673
|
+
/**
|
|
674
|
+
* Permission (Read, Read/Write, All, Custom).
|
|
675
|
+
*/
|
|
676
|
+
permission: Permission;
|
|
677
|
+
/**
|
|
678
|
+
* Name of the database.
|
|
679
|
+
*/
|
|
680
|
+
databaseName: string;
|
|
681
|
+
/**
|
|
682
|
+
* Name of the user.
|
|
683
|
+
*/
|
|
684
|
+
userName: string;
|
|
685
|
+
}
|
|
686
|
+
export interface Snapshot {
|
|
687
|
+
/**
|
|
688
|
+
* UUID of the snapshot.
|
|
689
|
+
*/
|
|
690
|
+
id: string;
|
|
691
|
+
/**
|
|
692
|
+
* UUID of the Database Instance.
|
|
693
|
+
*/
|
|
694
|
+
instanceId: string;
|
|
695
|
+
/**
|
|
696
|
+
* Name of the snapshot.
|
|
697
|
+
*/
|
|
698
|
+
name: string;
|
|
699
|
+
/**
|
|
700
|
+
* Status of the snapshot.
|
|
701
|
+
*/
|
|
702
|
+
status: SnapshotStatus;
|
|
703
|
+
/**
|
|
704
|
+
* Size of the snapshot.
|
|
705
|
+
*/
|
|
706
|
+
size?: number;
|
|
707
|
+
/**
|
|
708
|
+
* Expiration date (must follow the ISO 8601 format).
|
|
709
|
+
*/
|
|
710
|
+
expiresAt?: Date;
|
|
711
|
+
/**
|
|
712
|
+
* Creation date (must follow the ISO 8601 format).
|
|
713
|
+
*/
|
|
714
|
+
createdAt?: Date;
|
|
715
|
+
/**
|
|
716
|
+
* Updated date (must follow the ISO 8601 format).
|
|
717
|
+
*/
|
|
718
|
+
updatedAt?: Date;
|
|
719
|
+
/**
|
|
720
|
+
* Name of the Database Instance of the snapshot.
|
|
721
|
+
*/
|
|
722
|
+
instanceName: string;
|
|
723
|
+
/**
|
|
724
|
+
* Source node type.
|
|
725
|
+
*/
|
|
726
|
+
nodeType: string;
|
|
727
|
+
/**
|
|
728
|
+
* Type of volume where data is stored (lssd, bssd or sbs).
|
|
729
|
+
*/
|
|
730
|
+
volumeType?: SnapshotVolumeType;
|
|
731
|
+
/**
|
|
732
|
+
* Region of this snapshot.
|
|
733
|
+
*/
|
|
734
|
+
region: ScwRegion;
|
|
735
|
+
}
|
|
736
|
+
export interface User {
|
|
737
|
+
/**
|
|
738
|
+
* Name of the user (Length must be between 1 and 63 characters for PostgreSQL and between 1 and 32 characters for MySQL. First character must be an alphabet character (a-zA-Z). Your username cannot start with '_rdb' or in PostgreSQL, 'pg_'. Only a-zA-Z0-9_$- characters are accepted).
|
|
739
|
+
*/
|
|
740
|
+
name: string;
|
|
741
|
+
/**
|
|
742
|
+
* Defines whether or not a user got administrative privileges on the Database Instance.
|
|
743
|
+
*/
|
|
744
|
+
isAdmin: boolean;
|
|
745
|
+
}
|
|
746
|
+
export interface UpgradeInstanceRequestMajorUpgradeWorkflow {
|
|
747
|
+
/**
|
|
748
|
+
* This will create a new Database Instance with same specifications as the current one and perform a Database Engine upgrade.
|
|
749
|
+
*/
|
|
750
|
+
upgradableVersionId: string;
|
|
751
|
+
/**
|
|
752
|
+
* At the end of the migration procedure this option let you migrate all your database endpoint to the upgraded instance.
|
|
753
|
+
*/
|
|
754
|
+
withEndpoints: boolean;
|
|
755
|
+
}
|
|
756
|
+
export type AddInstanceACLRulesRequest = {
|
|
757
|
+
/**
|
|
758
|
+
* Region to target. If none is passed will use default region from the config.
|
|
759
|
+
*/
|
|
760
|
+
region?: ScwRegion;
|
|
761
|
+
/**
|
|
762
|
+
* UUID of the Database Instance you want to add ACL rules to.
|
|
763
|
+
*/
|
|
764
|
+
instanceId: string;
|
|
765
|
+
/**
|
|
766
|
+
* ACL rules to add to the Database Instance.
|
|
767
|
+
*/
|
|
768
|
+
rules: ACLRuleRequest[];
|
|
769
|
+
};
|
|
770
|
+
export interface AddInstanceACLRulesResponse {
|
|
771
|
+
/**
|
|
772
|
+
* ACL Rules enabled for the Database Instance.
|
|
773
|
+
*/
|
|
774
|
+
rules: ACLRule[];
|
|
775
|
+
}
|
|
776
|
+
export type AddInstanceSettingsRequest = {
|
|
777
|
+
/**
|
|
778
|
+
* Region to target. If none is passed will use default region from the config.
|
|
779
|
+
*/
|
|
780
|
+
region?: ScwRegion;
|
|
781
|
+
/**
|
|
782
|
+
* UUID of the Database Instance you want to add settings to.
|
|
783
|
+
*/
|
|
784
|
+
instanceId: string;
|
|
785
|
+
/**
|
|
786
|
+
* Settings to add to the Database Instance.
|
|
787
|
+
*/
|
|
788
|
+
settings: InstanceSetting[];
|
|
789
|
+
};
|
|
790
|
+
export interface AddInstanceSettingsResponse {
|
|
791
|
+
/**
|
|
792
|
+
* Settings available on the Database Instance.
|
|
793
|
+
*/
|
|
794
|
+
settings: InstanceSetting[];
|
|
795
|
+
}
|
|
796
|
+
export type ApplyInstanceMaintenanceRequest = {
|
|
797
|
+
/**
|
|
798
|
+
* Region to target. If none is passed will use default region from the config.
|
|
799
|
+
*/
|
|
800
|
+
region?: ScwRegion;
|
|
801
|
+
/**
|
|
802
|
+
* UUID of the Database Instance you want to apply maintenance.
|
|
803
|
+
*/
|
|
804
|
+
instanceId: string;
|
|
805
|
+
};
|
|
806
|
+
export type CloneInstanceRequest = {
|
|
807
|
+
/**
|
|
808
|
+
* Region to target. If none is passed will use default region from the config.
|
|
809
|
+
*/
|
|
810
|
+
region?: ScwRegion;
|
|
811
|
+
/**
|
|
812
|
+
* UUID of the Database Instance you want to clone.
|
|
813
|
+
*/
|
|
814
|
+
instanceId: string;
|
|
815
|
+
/**
|
|
816
|
+
* Name of the Database Instance clone.
|
|
817
|
+
*/
|
|
818
|
+
name: string;
|
|
819
|
+
/**
|
|
820
|
+
* Node type of the clone.
|
|
821
|
+
*/
|
|
822
|
+
nodeType?: string;
|
|
823
|
+
};
|
|
824
|
+
export type CreateDatabaseBackupRequest = {
|
|
825
|
+
/**
|
|
826
|
+
* Region to target. If none is passed will use default region from the config.
|
|
827
|
+
*/
|
|
828
|
+
region?: ScwRegion;
|
|
829
|
+
/**
|
|
830
|
+
* UUID of the Database Instance.
|
|
831
|
+
*/
|
|
832
|
+
instanceId: string;
|
|
833
|
+
/**
|
|
834
|
+
* Name of the database you want to back up.
|
|
835
|
+
*/
|
|
836
|
+
databaseName: string;
|
|
837
|
+
/**
|
|
838
|
+
* Name of the backup.
|
|
839
|
+
*/
|
|
840
|
+
name?: string;
|
|
841
|
+
/**
|
|
842
|
+
* Expiration date (must follow the ISO 8601 format).
|
|
843
|
+
*/
|
|
844
|
+
expiresAt?: Date;
|
|
845
|
+
};
|
|
846
|
+
export type CreateDatabaseRequest = {
|
|
847
|
+
/**
|
|
848
|
+
* Region to target. If none is passed will use default region from the config.
|
|
849
|
+
*/
|
|
850
|
+
region?: ScwRegion;
|
|
851
|
+
/**
|
|
852
|
+
* UUID of the Database Instance where to create the database.
|
|
853
|
+
*/
|
|
854
|
+
instanceId: string;
|
|
855
|
+
/**
|
|
856
|
+
* Name of the database.
|
|
857
|
+
*/
|
|
858
|
+
name: string;
|
|
859
|
+
};
|
|
860
|
+
export type CreateEndpointRequest = {
|
|
861
|
+
/**
|
|
862
|
+
* Region to target. If none is passed will use default region from the config.
|
|
863
|
+
*/
|
|
864
|
+
region?: ScwRegion;
|
|
865
|
+
/**
|
|
866
|
+
* UUID of the Database Instance you to which you want to add an endpoint.
|
|
867
|
+
*/
|
|
868
|
+
instanceId: string;
|
|
869
|
+
/**
|
|
870
|
+
* Specification of the endpoint you want to create.
|
|
871
|
+
*/
|
|
872
|
+
endpointSpec?: EndpointSpec;
|
|
873
|
+
};
|
|
874
|
+
export type CreateInstanceFromSnapshotRequest = {
|
|
875
|
+
/**
|
|
876
|
+
* Region to target. If none is passed will use default region from the config.
|
|
877
|
+
*/
|
|
878
|
+
region?: ScwRegion;
|
|
879
|
+
/**
|
|
880
|
+
* Block snapshot of the Database Instance.
|
|
881
|
+
*/
|
|
882
|
+
snapshotId: string;
|
|
883
|
+
/**
|
|
884
|
+
* Name of the Database Instance created with the snapshot.
|
|
885
|
+
*/
|
|
886
|
+
instanceName: string;
|
|
887
|
+
/**
|
|
888
|
+
* Defines whether or not High-Availability is enabled on the new Database Instance.
|
|
889
|
+
*/
|
|
890
|
+
isHaCluster?: boolean;
|
|
891
|
+
/**
|
|
892
|
+
* The node type used to restore the snapshot.
|
|
893
|
+
*/
|
|
894
|
+
nodeType?: string;
|
|
895
|
+
};
|
|
896
|
+
export type CreateInstanceRequest = {
|
|
897
|
+
/**
|
|
898
|
+
* Region to target. If none is passed will use default region from the config.
|
|
899
|
+
*/
|
|
900
|
+
region?: ScwRegion;
|
|
901
|
+
/**
|
|
902
|
+
* @deprecated Please use project_id instead.
|
|
903
|
+
*
|
|
904
|
+
* One-of ('projectIdentifier'): at most one of 'projectId', 'organizationId' could be set.
|
|
905
|
+
*/
|
|
906
|
+
organizationId?: string;
|
|
907
|
+
/**
|
|
908
|
+
* The Project ID on which the Database Instance will be created.
|
|
909
|
+
*
|
|
910
|
+
* One-of ('projectIdentifier'): at most one of 'projectId', 'organizationId' could be set.
|
|
911
|
+
*/
|
|
912
|
+
projectId?: string;
|
|
913
|
+
/**
|
|
914
|
+
* Name of the Database Instance.
|
|
915
|
+
*/
|
|
916
|
+
name?: string;
|
|
917
|
+
/**
|
|
918
|
+
* Database engine of the Database Instance (PostgreSQL, MySQL, ...).
|
|
919
|
+
*/
|
|
920
|
+
engine: string;
|
|
921
|
+
/**
|
|
922
|
+
* Username created when the Database Instance is created.
|
|
923
|
+
*/
|
|
924
|
+
userName: string;
|
|
925
|
+
/**
|
|
926
|
+
* Password of the user. Password must be between 8 and 128 characters, contain at least one digit, one uppercase, one lowercase and one special character.
|
|
927
|
+
*/
|
|
928
|
+
password: string;
|
|
929
|
+
/**
|
|
930
|
+
* Type of node to use for the Database Instance.
|
|
931
|
+
*/
|
|
932
|
+
nodeType: string;
|
|
933
|
+
/**
|
|
934
|
+
* Defines whether or not High-Availability is enabled.
|
|
935
|
+
*/
|
|
936
|
+
isHaCluster: boolean;
|
|
937
|
+
/**
|
|
938
|
+
* Defines whether or not backups are disabled.
|
|
939
|
+
*/
|
|
940
|
+
disableBackup: boolean;
|
|
941
|
+
/**
|
|
942
|
+
* Tags to apply to the Database Instance.
|
|
943
|
+
*/
|
|
944
|
+
tags?: string[];
|
|
945
|
+
/**
|
|
946
|
+
* List of engine settings to be set upon Database Instance initialization.
|
|
947
|
+
*/
|
|
948
|
+
initSettings?: InstanceSetting[];
|
|
949
|
+
/**
|
|
950
|
+
* Type of volume where data is stored (lssd, bssd, ...).
|
|
951
|
+
*/
|
|
952
|
+
volumeType?: VolumeType;
|
|
953
|
+
/**
|
|
954
|
+
* Volume size when volume_type is not lssd.
|
|
955
|
+
*/
|
|
956
|
+
volumeSize: number;
|
|
957
|
+
/**
|
|
958
|
+
* One or multiple EndpointSpec used to expose your Database Instance. A load_balancer public endpoint is systematically created.
|
|
959
|
+
*/
|
|
960
|
+
initEndpoints?: EndpointSpec[];
|
|
961
|
+
/**
|
|
962
|
+
* Defines whether to or not to store logical backups in the same region as the Database Instance.
|
|
963
|
+
*/
|
|
964
|
+
backupSameRegion: boolean;
|
|
965
|
+
/**
|
|
966
|
+
* Encryption at rest settings for your Database Instance.
|
|
967
|
+
*/
|
|
968
|
+
encryption?: EncryptionAtRest;
|
|
969
|
+
};
|
|
970
|
+
export type CreateReadReplicaEndpointRequest = {
|
|
971
|
+
/**
|
|
972
|
+
* Region to target. If none is passed will use default region from the config.
|
|
973
|
+
*/
|
|
974
|
+
region?: ScwRegion;
|
|
975
|
+
/**
|
|
976
|
+
* UUID of the Read Replica.
|
|
977
|
+
*/
|
|
978
|
+
readReplicaId: string;
|
|
979
|
+
/**
|
|
980
|
+
* Specification of the endpoint you want to create.
|
|
981
|
+
*/
|
|
982
|
+
endpointSpec: ReadReplicaEndpointSpec[];
|
|
983
|
+
};
|
|
984
|
+
export type CreateReadReplicaRequest = {
|
|
985
|
+
/**
|
|
986
|
+
* Region to target. If none is passed will use default region from the config.
|
|
987
|
+
*/
|
|
988
|
+
region?: ScwRegion;
|
|
989
|
+
/**
|
|
990
|
+
* UUID of the Database Instance you want to create a Read Replica from.
|
|
991
|
+
*/
|
|
992
|
+
instanceId: string;
|
|
993
|
+
/**
|
|
994
|
+
* Specification of the endpoint you want to create.
|
|
995
|
+
*/
|
|
996
|
+
endpointSpec?: ReadReplicaEndpointSpec[];
|
|
997
|
+
/**
|
|
998
|
+
* Defines whether to create the replica in the same availability zone as the main instance nodes or not.
|
|
999
|
+
*/
|
|
1000
|
+
sameZone?: boolean;
|
|
1001
|
+
};
|
|
1002
|
+
export type CreateSnapshotRequest = {
|
|
1003
|
+
/**
|
|
1004
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1005
|
+
*/
|
|
1006
|
+
region?: ScwRegion;
|
|
1007
|
+
/**
|
|
1008
|
+
* UUID of the Database Instance.
|
|
1009
|
+
*/
|
|
1010
|
+
instanceId: string;
|
|
1011
|
+
/**
|
|
1012
|
+
* Name of the snapshot.
|
|
1013
|
+
*/
|
|
1014
|
+
name?: string;
|
|
1015
|
+
/**
|
|
1016
|
+
* Expiration date (must follow the ISO 8601 format).
|
|
1017
|
+
*/
|
|
1018
|
+
expiresAt?: Date;
|
|
1019
|
+
};
|
|
1020
|
+
export type CreateUserRequest = {
|
|
1021
|
+
/**
|
|
1022
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1023
|
+
*/
|
|
1024
|
+
region?: ScwRegion;
|
|
1025
|
+
/**
|
|
1026
|
+
* UUID of the Database Instance in which you want to create a user.
|
|
1027
|
+
*/
|
|
1028
|
+
instanceId: string;
|
|
1029
|
+
/**
|
|
1030
|
+
* Name of the user you want to create.
|
|
1031
|
+
*/
|
|
1032
|
+
name: string;
|
|
1033
|
+
/**
|
|
1034
|
+
* Password of the user you want to create. Password must be between 8 and 128 characters, contain at least one digit, one uppercase, one lowercase and one special character.
|
|
1035
|
+
*/
|
|
1036
|
+
password: string;
|
|
1037
|
+
/**
|
|
1038
|
+
* Defines whether the user will have administrative privileges.
|
|
1039
|
+
*/
|
|
1040
|
+
isAdmin: boolean;
|
|
1041
|
+
};
|
|
1042
|
+
export type DeleteDatabaseBackupRequest = {
|
|
1043
|
+
/**
|
|
1044
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1045
|
+
*/
|
|
1046
|
+
region?: ScwRegion;
|
|
1047
|
+
/**
|
|
1048
|
+
* UUID of the database backup to delete.
|
|
1049
|
+
*/
|
|
1050
|
+
databaseBackupId: string;
|
|
1051
|
+
};
|
|
1052
|
+
export type DeleteDatabaseRequest = {
|
|
1053
|
+
/**
|
|
1054
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1055
|
+
*/
|
|
1056
|
+
region?: ScwRegion;
|
|
1057
|
+
/**
|
|
1058
|
+
* UUID of the Database Instance where to delete the database.
|
|
1059
|
+
*/
|
|
1060
|
+
instanceId: string;
|
|
1061
|
+
/**
|
|
1062
|
+
* Name of the database to delete.
|
|
1063
|
+
*/
|
|
1064
|
+
name: string;
|
|
1065
|
+
};
|
|
1066
|
+
export type DeleteEndpointRequest = {
|
|
1067
|
+
/**
|
|
1068
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1069
|
+
*/
|
|
1070
|
+
region?: ScwRegion;
|
|
1071
|
+
/**
|
|
1072
|
+
* This endpoint can also be used to delete a Read Replica endpoint.
|
|
1073
|
+
*/
|
|
1074
|
+
endpointId: string;
|
|
1075
|
+
};
|
|
1076
|
+
export type DeleteInstanceACLRulesRequest = {
|
|
1077
|
+
/**
|
|
1078
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1079
|
+
*/
|
|
1080
|
+
region?: ScwRegion;
|
|
1081
|
+
/**
|
|
1082
|
+
* UUID of the Database Instance you want to delete an ACL rule from.
|
|
1083
|
+
*/
|
|
1084
|
+
instanceId: string;
|
|
1085
|
+
/**
|
|
1086
|
+
* IP addresses defined in the ACL rules of the Database Instance.
|
|
1087
|
+
*/
|
|
1088
|
+
aclRuleIps: string[];
|
|
1089
|
+
};
|
|
1090
|
+
export interface DeleteInstanceACLRulesResponse {
|
|
1091
|
+
/**
|
|
1092
|
+
* IP addresses defined in the ACL rules of the Database Instance.
|
|
1093
|
+
*/
|
|
1094
|
+
rules: ACLRule[];
|
|
1095
|
+
}
|
|
1096
|
+
export type DeleteInstanceRequest = {
|
|
1097
|
+
/**
|
|
1098
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1099
|
+
*/
|
|
1100
|
+
region?: ScwRegion;
|
|
1101
|
+
/**
|
|
1102
|
+
* UUID of the Database Instance to delete.
|
|
1103
|
+
*/
|
|
1104
|
+
instanceId: string;
|
|
1105
|
+
};
|
|
1106
|
+
export type DeleteInstanceSettingsRequest = {
|
|
1107
|
+
/**
|
|
1108
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1109
|
+
*/
|
|
1110
|
+
region?: ScwRegion;
|
|
1111
|
+
/**
|
|
1112
|
+
* UUID of the Database Instance to delete settings from.
|
|
1113
|
+
*/
|
|
1114
|
+
instanceId: string;
|
|
1115
|
+
/**
|
|
1116
|
+
* Settings names to delete.
|
|
1117
|
+
*/
|
|
1118
|
+
settingNames: string[];
|
|
1119
|
+
};
|
|
1120
|
+
export interface DeleteInstanceSettingsResponse {
|
|
1121
|
+
/**
|
|
1122
|
+
* Settings names to delete from the Database Instance.
|
|
1123
|
+
*/
|
|
1124
|
+
settings: InstanceSetting[];
|
|
1125
|
+
}
|
|
1126
|
+
export type DeleteReadReplicaRequest = {
|
|
1127
|
+
/**
|
|
1128
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1129
|
+
*/
|
|
1130
|
+
region?: ScwRegion;
|
|
1131
|
+
/**
|
|
1132
|
+
* UUID of the Read Replica.
|
|
1133
|
+
*/
|
|
1134
|
+
readReplicaId: string;
|
|
1135
|
+
};
|
|
1136
|
+
export type DeleteSnapshotRequest = {
|
|
1137
|
+
/**
|
|
1138
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1139
|
+
*/
|
|
1140
|
+
region?: ScwRegion;
|
|
1141
|
+
/**
|
|
1142
|
+
* UUID of the snapshot to delete.
|
|
1143
|
+
*/
|
|
1144
|
+
snapshotId: string;
|
|
1145
|
+
};
|
|
1146
|
+
export type DeleteUserRequest = {
|
|
1147
|
+
/**
|
|
1148
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1149
|
+
*/
|
|
1150
|
+
region?: ScwRegion;
|
|
1151
|
+
/**
|
|
1152
|
+
* UUID of the Database Instance to delete the user from.
|
|
1153
|
+
*/
|
|
1154
|
+
instanceId: string;
|
|
1155
|
+
/**
|
|
1156
|
+
* Name of the user.
|
|
1157
|
+
*/
|
|
1158
|
+
name: string;
|
|
1159
|
+
};
|
|
1160
|
+
export type ExportDatabaseBackupRequest = {
|
|
1161
|
+
/**
|
|
1162
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1163
|
+
*/
|
|
1164
|
+
region?: ScwRegion;
|
|
1165
|
+
/**
|
|
1166
|
+
* UUID of the database backup you want to export.
|
|
1167
|
+
*/
|
|
1168
|
+
databaseBackupId: string;
|
|
1169
|
+
};
|
|
1170
|
+
export type GetDatabaseBackupRequest = {
|
|
1171
|
+
/**
|
|
1172
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1173
|
+
*/
|
|
1174
|
+
region?: ScwRegion;
|
|
1175
|
+
/**
|
|
1176
|
+
* UUID of the database backup.
|
|
1177
|
+
*/
|
|
1178
|
+
databaseBackupId: string;
|
|
1179
|
+
};
|
|
1180
|
+
export type GetEndpointRequest = {
|
|
1181
|
+
/**
|
|
1182
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1183
|
+
*/
|
|
1184
|
+
region?: ScwRegion;
|
|
1185
|
+
/**
|
|
1186
|
+
* UUID of the endpoint you want to get.
|
|
1187
|
+
*/
|
|
1188
|
+
endpointId: string;
|
|
1189
|
+
};
|
|
1190
|
+
export type GetInstanceCertificateRequest = {
|
|
1191
|
+
/**
|
|
1192
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1193
|
+
*/
|
|
1194
|
+
region?: ScwRegion;
|
|
1195
|
+
/**
|
|
1196
|
+
* UUID of the Database Instance.
|
|
1197
|
+
*/
|
|
1198
|
+
instanceId: string;
|
|
1199
|
+
};
|
|
1200
|
+
export type GetInstanceLogRequest = {
|
|
1201
|
+
/**
|
|
1202
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1203
|
+
*/
|
|
1204
|
+
region?: ScwRegion;
|
|
1205
|
+
/**
|
|
1206
|
+
* UUID of the instance_log you want.
|
|
1207
|
+
*/
|
|
1208
|
+
instanceLogId: string;
|
|
1209
|
+
};
|
|
1210
|
+
export type GetInstanceMetricsRequest = {
|
|
1211
|
+
/**
|
|
1212
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1213
|
+
*/
|
|
1214
|
+
region?: ScwRegion;
|
|
1215
|
+
/**
|
|
1216
|
+
* UUID of the Database Instance.
|
|
1217
|
+
*/
|
|
1218
|
+
instanceId: string;
|
|
1219
|
+
/**
|
|
1220
|
+
* Start date to gather metrics from.
|
|
1221
|
+
*/
|
|
1222
|
+
startDate?: Date;
|
|
1223
|
+
/**
|
|
1224
|
+
* End date to gather metrics from.
|
|
1225
|
+
*/
|
|
1226
|
+
endDate?: Date;
|
|
1227
|
+
/**
|
|
1228
|
+
* Name of the metric to gather.
|
|
1229
|
+
*/
|
|
1230
|
+
metricName?: string;
|
|
1231
|
+
};
|
|
1232
|
+
export type GetInstanceRequest = {
|
|
1233
|
+
/**
|
|
1234
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1235
|
+
*/
|
|
1236
|
+
region?: ScwRegion;
|
|
1237
|
+
/**
|
|
1238
|
+
* UUID of the Database Instance.
|
|
1239
|
+
*/
|
|
1240
|
+
instanceId: string;
|
|
1241
|
+
};
|
|
1242
|
+
export type GetReadReplicaRequest = {
|
|
1243
|
+
/**
|
|
1244
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1245
|
+
*/
|
|
1246
|
+
region?: ScwRegion;
|
|
1247
|
+
/**
|
|
1248
|
+
* UUID of the Read Replica.
|
|
1249
|
+
*/
|
|
1250
|
+
readReplicaId: string;
|
|
1251
|
+
};
|
|
1252
|
+
export type GetSnapshotRequest = {
|
|
1253
|
+
/**
|
|
1254
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1255
|
+
*/
|
|
1256
|
+
region?: ScwRegion;
|
|
1257
|
+
/**
|
|
1258
|
+
* UUID of the snapshot.
|
|
1259
|
+
*/
|
|
1260
|
+
snapshotId: string;
|
|
1261
|
+
};
|
|
1262
|
+
export interface InstanceMetrics {
|
|
1263
|
+
/**
|
|
1264
|
+
* Time series of metrics of a Database Instance.
|
|
1265
|
+
*/
|
|
1266
|
+
timeseries: TimeSeries[];
|
|
1267
|
+
}
|
|
1268
|
+
export type ListDatabaseBackupsRequest = {
|
|
1269
|
+
/**
|
|
1270
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1271
|
+
*/
|
|
1272
|
+
region?: ScwRegion;
|
|
1273
|
+
/**
|
|
1274
|
+
* Name of the database backups.
|
|
1275
|
+
*/
|
|
1276
|
+
name?: string;
|
|
1277
|
+
/**
|
|
1278
|
+
* Criteria to use when ordering database backups listing.
|
|
1279
|
+
*/
|
|
1280
|
+
orderBy?: ListDatabaseBackupsRequestOrderBy;
|
|
1281
|
+
/**
|
|
1282
|
+
* UUID of the Database Instance.
|
|
1283
|
+
*/
|
|
1284
|
+
instanceId?: string;
|
|
1285
|
+
/**
|
|
1286
|
+
* Organization ID of the Organization the database backups belong to.
|
|
1287
|
+
*/
|
|
1288
|
+
organizationId?: string;
|
|
1289
|
+
/**
|
|
1290
|
+
* Project ID of the Project the database backups belong to.
|
|
1291
|
+
*/
|
|
1292
|
+
projectId?: string;
|
|
1293
|
+
page?: number;
|
|
1294
|
+
pageSize?: number;
|
|
1295
|
+
};
|
|
1296
|
+
export interface ListDatabaseBackupsResponse {
|
|
1297
|
+
/**
|
|
1298
|
+
* List of database backups.
|
|
1299
|
+
*/
|
|
1300
|
+
databaseBackups: DatabaseBackup[];
|
|
1301
|
+
/**
|
|
1302
|
+
* Total count of database backups available.
|
|
1303
|
+
*/
|
|
1304
|
+
totalCount: number;
|
|
1305
|
+
}
|
|
1306
|
+
export type ListDatabaseEnginesRequest = {
|
|
1307
|
+
/**
|
|
1308
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1309
|
+
*/
|
|
1310
|
+
region?: ScwRegion;
|
|
1311
|
+
/**
|
|
1312
|
+
* Name of the database engine.
|
|
1313
|
+
*/
|
|
1314
|
+
name?: string;
|
|
1315
|
+
/**
|
|
1316
|
+
* Version of the database engine.
|
|
1317
|
+
*/
|
|
1318
|
+
version?: string;
|
|
1319
|
+
page?: number;
|
|
1320
|
+
pageSize?: number;
|
|
1321
|
+
};
|
|
1322
|
+
export interface ListDatabaseEnginesResponse {
|
|
1323
|
+
/**
|
|
1324
|
+
* List of the available database engines.
|
|
1325
|
+
*/
|
|
1326
|
+
engines: DatabaseEngine[];
|
|
1327
|
+
/**
|
|
1328
|
+
* Total count of database engines available.
|
|
1329
|
+
*/
|
|
1330
|
+
totalCount: number;
|
|
1331
|
+
}
|
|
1332
|
+
export type ListDatabasesRequest = {
|
|
1333
|
+
/**
|
|
1334
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1335
|
+
*/
|
|
1336
|
+
region?: ScwRegion;
|
|
1337
|
+
/**
|
|
1338
|
+
* UUID of the Database Instance to list the databases of.
|
|
1339
|
+
*/
|
|
1340
|
+
instanceId: string;
|
|
1341
|
+
/**
|
|
1342
|
+
* Name of the database.
|
|
1343
|
+
*/
|
|
1344
|
+
name?: string;
|
|
1345
|
+
/**
|
|
1346
|
+
* Defines whether or not the database is managed.
|
|
1347
|
+
*/
|
|
1348
|
+
managed?: boolean;
|
|
1349
|
+
/**
|
|
1350
|
+
* User that owns this database.
|
|
1351
|
+
*/
|
|
1352
|
+
owner?: string;
|
|
1353
|
+
/**
|
|
1354
|
+
* Criteria to use when ordering database listing.
|
|
1355
|
+
*/
|
|
1356
|
+
orderBy?: ListDatabasesRequestOrderBy;
|
|
1357
|
+
page?: number;
|
|
1358
|
+
pageSize?: number;
|
|
1359
|
+
};
|
|
1360
|
+
export interface ListDatabasesResponse {
|
|
1361
|
+
/**
|
|
1362
|
+
* List of the databases.
|
|
1363
|
+
*/
|
|
1364
|
+
databases: Database[];
|
|
1365
|
+
/**
|
|
1366
|
+
* Total count of databases present on a Database Instance.
|
|
1367
|
+
*/
|
|
1368
|
+
totalCount: number;
|
|
1369
|
+
}
|
|
1370
|
+
export type ListInstanceACLRulesRequest = {
|
|
1371
|
+
/**
|
|
1372
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1373
|
+
*/
|
|
1374
|
+
region?: ScwRegion;
|
|
1375
|
+
/**
|
|
1376
|
+
* UUID of the Database Instance.
|
|
1377
|
+
*/
|
|
1378
|
+
instanceId: string;
|
|
1379
|
+
page?: number;
|
|
1380
|
+
pageSize?: number;
|
|
1381
|
+
};
|
|
1382
|
+
export interface ListInstanceACLRulesResponse {
|
|
1383
|
+
/**
|
|
1384
|
+
* List of ACL rules present on a Database Instance.
|
|
1385
|
+
*/
|
|
1386
|
+
rules: ACLRule[];
|
|
1387
|
+
/**
|
|
1388
|
+
* Total count of ACL rules present on a Database Instance.
|
|
1389
|
+
*/
|
|
1390
|
+
totalCount: number;
|
|
1391
|
+
}
|
|
1392
|
+
export type ListInstanceLogsDetailsRequest = {
|
|
1393
|
+
/**
|
|
1394
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1395
|
+
*/
|
|
1396
|
+
region?: ScwRegion;
|
|
1397
|
+
/**
|
|
1398
|
+
* UUID of the Database Instance you want logs of.
|
|
1399
|
+
*/
|
|
1400
|
+
instanceId: string;
|
|
1401
|
+
};
|
|
1402
|
+
export interface ListInstanceLogsDetailsResponse {
|
|
1403
|
+
/**
|
|
1404
|
+
* Remote Database Instance logs details.
|
|
1405
|
+
*/
|
|
1406
|
+
details: ListInstanceLogsDetailsResponseInstanceLogDetail[];
|
|
1407
|
+
}
|
|
1408
|
+
export type ListInstanceLogsRequest = {
|
|
1409
|
+
/**
|
|
1410
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1411
|
+
*/
|
|
1412
|
+
region?: ScwRegion;
|
|
1413
|
+
/**
|
|
1414
|
+
* UUID of the Database Instance you want logs of.
|
|
1415
|
+
*/
|
|
1416
|
+
instanceId: string;
|
|
1417
|
+
/**
|
|
1418
|
+
* Criteria to use when ordering Database Instance logs listing.
|
|
1419
|
+
*/
|
|
1420
|
+
orderBy?: ListInstanceLogsRequestOrderBy;
|
|
1421
|
+
};
|
|
1422
|
+
export interface ListInstanceLogsResponse {
|
|
1423
|
+
/**
|
|
1424
|
+
* Available logs in a Database Instance.
|
|
1425
|
+
*/
|
|
1426
|
+
instanceLogs: InstanceLog[];
|
|
1427
|
+
}
|
|
1428
|
+
export type ListInstancesRequest = {
|
|
1429
|
+
/**
|
|
1430
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1431
|
+
*/
|
|
1432
|
+
region?: ScwRegion;
|
|
1433
|
+
/**
|
|
1434
|
+
* List Database Instances that have a given tag.
|
|
1435
|
+
*/
|
|
1436
|
+
tags?: string[];
|
|
1437
|
+
/**
|
|
1438
|
+
* Lists Database Instances that match a name pattern.
|
|
1439
|
+
*/
|
|
1440
|
+
name?: string;
|
|
1441
|
+
/**
|
|
1442
|
+
* Criteria to use when ordering Database Instance listings.
|
|
1443
|
+
*/
|
|
1444
|
+
orderBy?: ListInstancesRequestOrderBy;
|
|
1445
|
+
/**
|
|
1446
|
+
* Please use project_id instead.
|
|
1447
|
+
*/
|
|
1448
|
+
organizationId?: string;
|
|
1449
|
+
/**
|
|
1450
|
+
* Project ID to list the Database Instance of.
|
|
1451
|
+
*/
|
|
1452
|
+
projectId?: string;
|
|
1453
|
+
page?: number;
|
|
1454
|
+
pageSize?: number;
|
|
1455
|
+
};
|
|
1456
|
+
export interface ListInstancesResponse {
|
|
1457
|
+
/**
|
|
1458
|
+
* List of all Database Instances available in an Organization or Project.
|
|
1459
|
+
*/
|
|
1460
|
+
instances: Instance[];
|
|
1461
|
+
/**
|
|
1462
|
+
* Total count of Database Instances available in a Organization or Project.
|
|
1463
|
+
*/
|
|
1464
|
+
totalCount: number;
|
|
1465
|
+
}
|
|
1466
|
+
export type ListNodeTypesRequest = {
|
|
1467
|
+
/**
|
|
1468
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1469
|
+
*/
|
|
1470
|
+
region?: ScwRegion;
|
|
1471
|
+
/**
|
|
1472
|
+
* Defines whether or not to include disabled types.
|
|
1473
|
+
*/
|
|
1474
|
+
includeDisabledTypes: boolean;
|
|
1475
|
+
page?: number;
|
|
1476
|
+
pageSize?: number;
|
|
1477
|
+
};
|
|
1478
|
+
export interface ListNodeTypesResponse {
|
|
1479
|
+
/**
|
|
1480
|
+
* Types of the node.
|
|
1481
|
+
*/
|
|
1482
|
+
nodeTypes: NodeType[];
|
|
1483
|
+
/**
|
|
1484
|
+
* Total count of node-types available.
|
|
1485
|
+
*/
|
|
1486
|
+
totalCount: number;
|
|
1487
|
+
}
|
|
1488
|
+
export type ListPrivilegesRequest = {
|
|
1489
|
+
/**
|
|
1490
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1491
|
+
*/
|
|
1492
|
+
region?: ScwRegion;
|
|
1493
|
+
/**
|
|
1494
|
+
* UUID of the Database Instance.
|
|
1495
|
+
*/
|
|
1496
|
+
instanceId: string;
|
|
1497
|
+
/**
|
|
1498
|
+
* Criteria to use when ordering privileges listing.
|
|
1499
|
+
*/
|
|
1500
|
+
orderBy?: ListPrivilegesRequestOrderBy;
|
|
1501
|
+
page?: number;
|
|
1502
|
+
pageSize?: number;
|
|
1503
|
+
/**
|
|
1504
|
+
* Name of the database.
|
|
1505
|
+
*/
|
|
1506
|
+
databaseName?: string;
|
|
1507
|
+
/**
|
|
1508
|
+
* Name of the user.
|
|
1509
|
+
*/
|
|
1510
|
+
userName?: string;
|
|
1511
|
+
};
|
|
1512
|
+
export interface ListPrivilegesResponse {
|
|
1513
|
+
/**
|
|
1514
|
+
* Privileges of a user in a database in a Database Instance.
|
|
1515
|
+
*/
|
|
1516
|
+
privileges: Privilege[];
|
|
1517
|
+
/**
|
|
1518
|
+
* Total count of privileges present on a database.
|
|
1519
|
+
*/
|
|
1520
|
+
totalCount: number;
|
|
1521
|
+
}
|
|
1522
|
+
export type ListSnapshotsRequest = {
|
|
1523
|
+
/**
|
|
1524
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1525
|
+
*/
|
|
1526
|
+
region?: ScwRegion;
|
|
1527
|
+
/**
|
|
1528
|
+
* Name of the snapshot.
|
|
1529
|
+
*/
|
|
1530
|
+
name?: string;
|
|
1531
|
+
/**
|
|
1532
|
+
* Criteria to use when ordering snapshot listing.
|
|
1533
|
+
*/
|
|
1534
|
+
orderBy?: ListSnapshotsRequestOrderBy;
|
|
1535
|
+
/**
|
|
1536
|
+
* UUID of the Database Instance.
|
|
1537
|
+
*/
|
|
1538
|
+
instanceId?: string;
|
|
1539
|
+
/**
|
|
1540
|
+
* Organization ID the snapshots belongs to.
|
|
1541
|
+
*/
|
|
1542
|
+
organizationId?: string;
|
|
1543
|
+
/**
|
|
1544
|
+
* Project ID the snapshots belongs to.
|
|
1545
|
+
*/
|
|
1546
|
+
projectId?: string;
|
|
1547
|
+
page?: number;
|
|
1548
|
+
pageSize?: number;
|
|
1549
|
+
};
|
|
1550
|
+
export interface ListSnapshotsResponse {
|
|
1551
|
+
/**
|
|
1552
|
+
* List of snapshots.
|
|
1553
|
+
*/
|
|
1554
|
+
snapshots: Snapshot[];
|
|
1555
|
+
/**
|
|
1556
|
+
* Total count of snapshots available.
|
|
1557
|
+
*/
|
|
1558
|
+
totalCount: number;
|
|
1559
|
+
}
|
|
1560
|
+
export type ListUsersRequest = {
|
|
1561
|
+
/**
|
|
1562
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1563
|
+
*/
|
|
1564
|
+
region?: ScwRegion;
|
|
1565
|
+
/**
|
|
1566
|
+
* UUID of the Database Instance.
|
|
1567
|
+
*/
|
|
1568
|
+
instanceId: string;
|
|
1569
|
+
/**
|
|
1570
|
+
* Name of the user.
|
|
1571
|
+
*/
|
|
1572
|
+
name?: string;
|
|
1573
|
+
/**
|
|
1574
|
+
* Criteria to use when requesting user listing.
|
|
1575
|
+
*/
|
|
1576
|
+
orderBy?: ListUsersRequestOrderBy;
|
|
1577
|
+
page?: number;
|
|
1578
|
+
pageSize?: number;
|
|
1579
|
+
};
|
|
1580
|
+
export interface ListUsersResponse {
|
|
1581
|
+
/**
|
|
1582
|
+
* List of users in a Database Instance.
|
|
1583
|
+
*/
|
|
1584
|
+
users: User[];
|
|
1585
|
+
/**
|
|
1586
|
+
* Total count of users present on a Database Instance.
|
|
1587
|
+
*/
|
|
1588
|
+
totalCount: number;
|
|
1589
|
+
}
|
|
1590
|
+
export type MigrateEndpointRequest = {
|
|
1591
|
+
/**
|
|
1592
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1593
|
+
*/
|
|
1594
|
+
region?: ScwRegion;
|
|
1595
|
+
/**
|
|
1596
|
+
* UUID of the endpoint you want to migrate.
|
|
1597
|
+
*/
|
|
1598
|
+
endpointId: string;
|
|
1599
|
+
/**
|
|
1600
|
+
* UUID of the instance you want to attach the endpoint to.
|
|
1601
|
+
*/
|
|
1602
|
+
instanceId: string;
|
|
1603
|
+
};
|
|
1604
|
+
export type PrepareInstanceLogsRequest = {
|
|
1605
|
+
/**
|
|
1606
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1607
|
+
*/
|
|
1608
|
+
region?: ScwRegion;
|
|
1609
|
+
/**
|
|
1610
|
+
* UUID of the Database Instance you want logs of.
|
|
1611
|
+
*/
|
|
1612
|
+
instanceId: string;
|
|
1613
|
+
/**
|
|
1614
|
+
* Start datetime of your log. (RFC 3339 format).
|
|
1615
|
+
*/
|
|
1616
|
+
startDate?: Date;
|
|
1617
|
+
/**
|
|
1618
|
+
* End datetime of your log. (RFC 3339 format).
|
|
1619
|
+
*/
|
|
1620
|
+
endDate?: Date;
|
|
1621
|
+
};
|
|
1622
|
+
export interface PrepareInstanceLogsResponse {
|
|
1623
|
+
/**
|
|
1624
|
+
* Instance logs for a Database Instance between a start and an end date.
|
|
1625
|
+
*/
|
|
1626
|
+
instanceLogs: InstanceLog[];
|
|
1627
|
+
}
|
|
1628
|
+
export type PromoteReadReplicaRequest = {
|
|
1629
|
+
/**
|
|
1630
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1631
|
+
*/
|
|
1632
|
+
region?: ScwRegion;
|
|
1633
|
+
/**
|
|
1634
|
+
* UUID of the Read Replica.
|
|
1635
|
+
*/
|
|
1636
|
+
readReplicaId: string;
|
|
1637
|
+
};
|
|
1638
|
+
export type PurgeInstanceLogsRequest = {
|
|
1639
|
+
/**
|
|
1640
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1641
|
+
*/
|
|
1642
|
+
region?: ScwRegion;
|
|
1643
|
+
/**
|
|
1644
|
+
* UUID of the Database Instance you want logs of.
|
|
1645
|
+
*/
|
|
1646
|
+
instanceId: string;
|
|
1647
|
+
/**
|
|
1648
|
+
* Given log name to purge.
|
|
1649
|
+
*/
|
|
1650
|
+
logName?: string;
|
|
1651
|
+
};
|
|
1652
|
+
export type RenewInstanceCertificateRequest = {
|
|
1653
|
+
/**
|
|
1654
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1655
|
+
*/
|
|
1656
|
+
region?: ScwRegion;
|
|
1657
|
+
/**
|
|
1658
|
+
* UUID of the Database Instance you want logs of.
|
|
1659
|
+
*/
|
|
1660
|
+
instanceId: string;
|
|
1661
|
+
};
|
|
1662
|
+
export type ResetReadReplicaRequest = {
|
|
1663
|
+
/**
|
|
1664
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1665
|
+
*/
|
|
1666
|
+
region?: ScwRegion;
|
|
1667
|
+
/**
|
|
1668
|
+
* UUID of the Read Replica.
|
|
1669
|
+
*/
|
|
1670
|
+
readReplicaId: string;
|
|
1671
|
+
};
|
|
1672
|
+
export type RestartInstanceRequest = {
|
|
1673
|
+
/**
|
|
1674
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1675
|
+
*/
|
|
1676
|
+
region?: ScwRegion;
|
|
1677
|
+
/**
|
|
1678
|
+
* UUID of the Database Instance you want to restart.
|
|
1679
|
+
*/
|
|
1680
|
+
instanceId: string;
|
|
1681
|
+
};
|
|
1682
|
+
export type RestoreDatabaseBackupRequest = {
|
|
1683
|
+
/**
|
|
1684
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1685
|
+
*/
|
|
1686
|
+
region?: ScwRegion;
|
|
1687
|
+
/**
|
|
1688
|
+
* Backup of a logical database.
|
|
1689
|
+
*/
|
|
1690
|
+
databaseBackupId: string;
|
|
1691
|
+
/**
|
|
1692
|
+
* Defines the destination database to restore into a specified database (the default destination is set to the origin database of the backup).
|
|
1693
|
+
*/
|
|
1694
|
+
databaseName?: string;
|
|
1695
|
+
/**
|
|
1696
|
+
* Defines the Database Instance where the backup has to be restored.
|
|
1697
|
+
*/
|
|
1698
|
+
instanceId: string;
|
|
1699
|
+
};
|
|
1700
|
+
export type SetInstanceACLRulesRequest = {
|
|
1701
|
+
/**
|
|
1702
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1703
|
+
*/
|
|
1704
|
+
region?: ScwRegion;
|
|
1705
|
+
/**
|
|
1706
|
+
* UUID of the Database Instance where the ACL rules must be set.
|
|
1707
|
+
*/
|
|
1708
|
+
instanceId: string;
|
|
1709
|
+
/**
|
|
1710
|
+
* ACL rules to define for the Database Instance.
|
|
1711
|
+
*/
|
|
1712
|
+
rules: ACLRuleRequest[];
|
|
1713
|
+
};
|
|
1714
|
+
export interface SetInstanceACLRulesResponse {
|
|
1715
|
+
/**
|
|
1716
|
+
* ACLs rules configured for a Database Instance.
|
|
1717
|
+
*/
|
|
1718
|
+
rules: ACLRule[];
|
|
1719
|
+
}
|
|
1720
|
+
export type SetInstanceSettingsRequest = {
|
|
1721
|
+
/**
|
|
1722
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1723
|
+
*/
|
|
1724
|
+
region?: ScwRegion;
|
|
1725
|
+
/**
|
|
1726
|
+
* UUID of the Database Instance where the settings must be set.
|
|
1727
|
+
*/
|
|
1728
|
+
instanceId: string;
|
|
1729
|
+
/**
|
|
1730
|
+
* Settings to define for the Database Instance.
|
|
1731
|
+
*/
|
|
1732
|
+
settings: InstanceSetting[];
|
|
1733
|
+
};
|
|
1734
|
+
export interface SetInstanceSettingsResponse {
|
|
1735
|
+
/**
|
|
1736
|
+
* Settings configured for a Database Instance.
|
|
1737
|
+
*/
|
|
1738
|
+
settings: InstanceSetting[];
|
|
1739
|
+
}
|
|
1740
|
+
export type SetPrivilegeRequest = {
|
|
1741
|
+
/**
|
|
1742
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1743
|
+
*/
|
|
1744
|
+
region?: ScwRegion;
|
|
1745
|
+
/**
|
|
1746
|
+
* UUID of the Database Instance.
|
|
1747
|
+
*/
|
|
1748
|
+
instanceId: string;
|
|
1749
|
+
/**
|
|
1750
|
+
* Name of the database.
|
|
1751
|
+
*/
|
|
1752
|
+
databaseName: string;
|
|
1753
|
+
/**
|
|
1754
|
+
* Name of the user.
|
|
1755
|
+
*/
|
|
1756
|
+
userName: string;
|
|
1757
|
+
/**
|
|
1758
|
+
* Permission to set (Read, Read/Write, All, Custom).
|
|
1759
|
+
*/
|
|
1760
|
+
permission?: Permission;
|
|
1761
|
+
};
|
|
1762
|
+
export type UpdateDatabaseBackupRequest = {
|
|
1763
|
+
/**
|
|
1764
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1765
|
+
*/
|
|
1766
|
+
region?: ScwRegion;
|
|
1767
|
+
/**
|
|
1768
|
+
* UUID of the database backup to update.
|
|
1769
|
+
*/
|
|
1770
|
+
databaseBackupId: string;
|
|
1771
|
+
/**
|
|
1772
|
+
* Name of the Database Backup.
|
|
1773
|
+
*/
|
|
1774
|
+
name?: string;
|
|
1775
|
+
/**
|
|
1776
|
+
* Expiration date (must follow the ISO 8601 format).
|
|
1777
|
+
*/
|
|
1778
|
+
expiresAt?: Date;
|
|
1779
|
+
};
|
|
1780
|
+
export type UpdateInstanceRequest = {
|
|
1781
|
+
/**
|
|
1782
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1783
|
+
*/
|
|
1784
|
+
region?: ScwRegion;
|
|
1785
|
+
/**
|
|
1786
|
+
* UUID of the Database Instance to update.
|
|
1787
|
+
*/
|
|
1788
|
+
instanceId: string;
|
|
1789
|
+
/**
|
|
1790
|
+
* In hours.
|
|
1791
|
+
*/
|
|
1792
|
+
backupScheduleFrequency?: number;
|
|
1793
|
+
/**
|
|
1794
|
+
* In days.
|
|
1795
|
+
*/
|
|
1796
|
+
backupScheduleRetention?: number;
|
|
1797
|
+
/**
|
|
1798
|
+
* Defines whether or not the backup schedule is disabled.
|
|
1799
|
+
*/
|
|
1800
|
+
isBackupScheduleDisabled?: boolean;
|
|
1801
|
+
/**
|
|
1802
|
+
* Name of the Database Instance.
|
|
1803
|
+
*/
|
|
1804
|
+
name?: string;
|
|
1805
|
+
/**
|
|
1806
|
+
* Tags of a Database Instance.
|
|
1807
|
+
*/
|
|
1808
|
+
tags?: string[];
|
|
1809
|
+
/**
|
|
1810
|
+
* Logs policy of the Database Instance.
|
|
1811
|
+
*/
|
|
1812
|
+
logsPolicy?: LogsPolicy;
|
|
1813
|
+
/**
|
|
1814
|
+
* Store logical backups in the same region as the Database Instance.
|
|
1815
|
+
*/
|
|
1816
|
+
backupSameRegion?: boolean;
|
|
1817
|
+
/**
|
|
1818
|
+
* Defines the start time of the autobackup.
|
|
1819
|
+
*/
|
|
1820
|
+
backupScheduleStartHour?: number;
|
|
1821
|
+
};
|
|
1822
|
+
export type UpdateSnapshotRequest = {
|
|
1823
|
+
/**
|
|
1824
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1825
|
+
*/
|
|
1826
|
+
region?: ScwRegion;
|
|
1827
|
+
/**
|
|
1828
|
+
* UUID of the snapshot to update.
|
|
1829
|
+
*/
|
|
1830
|
+
snapshotId: string;
|
|
1831
|
+
/**
|
|
1832
|
+
* Name of the snapshot.
|
|
1833
|
+
*/
|
|
1834
|
+
name?: string;
|
|
1835
|
+
/**
|
|
1836
|
+
* Expiration date (must follow the ISO 8601 format).
|
|
1837
|
+
*/
|
|
1838
|
+
expiresAt?: Date;
|
|
1839
|
+
};
|
|
1840
|
+
export type UpdateUserRequest = {
|
|
1841
|
+
/**
|
|
1842
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1843
|
+
*/
|
|
1844
|
+
region?: ScwRegion;
|
|
1845
|
+
/**
|
|
1846
|
+
* UUID of the Database Instance the user belongs to.
|
|
1847
|
+
*/
|
|
1848
|
+
instanceId: string;
|
|
1849
|
+
/**
|
|
1850
|
+
* Name of the database user.
|
|
1851
|
+
*/
|
|
1852
|
+
name: string;
|
|
1853
|
+
/**
|
|
1854
|
+
* Password of the database user. Password must be between 8 and 128 characters, contain at least one digit, one uppercase, one lowercase and one special character.
|
|
1855
|
+
*/
|
|
1856
|
+
password?: string;
|
|
1857
|
+
/**
|
|
1858
|
+
* Defines whether or not this user got administrative privileges.
|
|
1859
|
+
*/
|
|
1860
|
+
isAdmin?: boolean;
|
|
1861
|
+
};
|
|
1862
|
+
export type UpgradeInstanceRequest = {
|
|
1863
|
+
/**
|
|
1864
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1865
|
+
*/
|
|
1866
|
+
region?: ScwRegion;
|
|
1867
|
+
/**
|
|
1868
|
+
* UUID of the Database Instance you want to upgrade.
|
|
1869
|
+
*/
|
|
1870
|
+
instanceId: string;
|
|
1871
|
+
/**
|
|
1872
|
+
* Node type of the Database Instance you want to upgrade to.
|
|
1873
|
+
*
|
|
1874
|
+
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa', 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow', 'enableEncryption' could be set.
|
|
1875
|
+
*/
|
|
1876
|
+
nodeType?: string;
|
|
1877
|
+
/**
|
|
1878
|
+
* Defines whether or not high availability should be enabled on the Database Instance.
|
|
1879
|
+
*
|
|
1880
|
+
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa', 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow', 'enableEncryption' could be set.
|
|
1881
|
+
*/
|
|
1882
|
+
enableHa?: boolean;
|
|
1883
|
+
/**
|
|
1884
|
+
* Increase your block storage volume size.
|
|
1885
|
+
*
|
|
1886
|
+
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa', 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow', 'enableEncryption' could be set.
|
|
1887
|
+
*/
|
|
1888
|
+
volumeSize?: number;
|
|
1889
|
+
/**
|
|
1890
|
+
* Change your Database Instance storage type.
|
|
1891
|
+
*
|
|
1892
|
+
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa', 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow', 'enableEncryption' could be set.
|
|
1893
|
+
*/
|
|
1894
|
+
volumeType?: VolumeType;
|
|
1895
|
+
/**
|
|
1896
|
+
* This will create a new Database Instance with same specifications as the current one and perform a Database Engine upgrade.
|
|
1897
|
+
*
|
|
1898
|
+
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa', 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow', 'enableEncryption' could be set.
|
|
1899
|
+
*/
|
|
1900
|
+
upgradableVersionId?: string;
|
|
1901
|
+
/**
|
|
1902
|
+
* Upgrade your database engine to a new major version including instance endpoints.
|
|
1903
|
+
*
|
|
1904
|
+
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa', 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow', 'enableEncryption' could be set.
|
|
1905
|
+
*/
|
|
1906
|
+
majorUpgradeWorkflow?: UpgradeInstanceRequestMajorUpgradeWorkflow;
|
|
1907
|
+
/**
|
|
1908
|
+
* Defines whether or not encryption should be enabled on the Database Instance.
|
|
1909
|
+
*
|
|
1910
|
+
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa', 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow', 'enableEncryption' could be set.
|
|
1911
|
+
*/
|
|
1912
|
+
enableEncryption?: boolean;
|
|
1913
|
+
};
|