@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.
@@ -0,0 +1,490 @@
1
+ import { API as ParentAPI } from '@scaleway/sdk-client';
2
+ import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client';
3
+ import type { AddInstanceACLRulesRequest, AddInstanceACLRulesResponse, AddInstanceSettingsRequest, AddInstanceSettingsResponse, ApplyInstanceMaintenanceRequest, CloneInstanceRequest, CreateDatabaseBackupRequest, CreateDatabaseRequest, CreateEndpointRequest, CreateInstanceFromSnapshotRequest, CreateInstanceRequest, CreateReadReplicaEndpointRequest, CreateReadReplicaRequest, CreateSnapshotRequest, CreateUserRequest, Database, DatabaseBackup, DeleteDatabaseBackupRequest, DeleteDatabaseRequest, DeleteEndpointRequest, DeleteInstanceACLRulesRequest, DeleteInstanceACLRulesResponse, DeleteInstanceRequest, DeleteInstanceSettingsRequest, DeleteInstanceSettingsResponse, DeleteReadReplicaRequest, DeleteSnapshotRequest, DeleteUserRequest, Endpoint, ExportDatabaseBackupRequest, GetDatabaseBackupRequest, GetEndpointRequest, GetInstanceCertificateRequest, GetInstanceLogRequest, GetInstanceMetricsRequest, GetInstanceRequest, GetReadReplicaRequest, GetSnapshotRequest, Instance, InstanceLog, InstanceMetrics, ListDatabaseBackupsRequest, ListDatabaseBackupsResponse, ListDatabaseEnginesRequest, ListDatabaseEnginesResponse, ListDatabasesRequest, ListDatabasesResponse, ListInstanceACLRulesRequest, ListInstanceACLRulesResponse, ListInstanceLogsDetailsRequest, ListInstanceLogsDetailsResponse, ListInstanceLogsRequest, ListInstanceLogsResponse, ListInstancesRequest, ListInstancesResponse, ListNodeTypesRequest, ListNodeTypesResponse, ListPrivilegesRequest, ListPrivilegesResponse, ListSnapshotsRequest, ListSnapshotsResponse, ListUsersRequest, ListUsersResponse, Maintenance, MigrateEndpointRequest, PrepareInstanceLogsRequest, PrepareInstanceLogsResponse, Privilege, PromoteReadReplicaRequest, PurgeInstanceLogsRequest, ReadReplica, RenewInstanceCertificateRequest, ResetReadReplicaRequest, RestartInstanceRequest, RestoreDatabaseBackupRequest, SetInstanceACLRulesRequest, SetInstanceACLRulesResponse, SetInstanceSettingsRequest, SetInstanceSettingsResponse, SetPrivilegeRequest, Snapshot, UpdateDatabaseBackupRequest, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User } from './types.gen';
4
+ /**
5
+ * Managed Database for PostgreSQL and MySQL API.
6
+
7
+ This API allows you to manage your Managed Databases for PostgreSQL and MySQL.
8
+ */
9
+ export declare class API extends ParentAPI {
10
+ /** Lists the available regions of the API. */
11
+ static readonly LOCALITIES: ScwRegion[];
12
+ protected pageOfListDatabaseEngines: (request?: Readonly<ListDatabaseEnginesRequest>) => Promise<ListDatabaseEnginesResponse>;
13
+ /**
14
+ * List available database engines. List the PostgreSQL and MySQL database engines available at Scaleway.
15
+ *
16
+ * @param request - The request {@link ListDatabaseEnginesRequest}
17
+ * @returns A Promise of ListDatabaseEnginesResponse
18
+ */
19
+ listDatabaseEngines: (request?: Readonly<ListDatabaseEnginesRequest>) => Promise<ListDatabaseEnginesResponse> & {
20
+ all: () => Promise<import("./types.gen").DatabaseEngine[]>;
21
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").DatabaseEngine[], void, void>;
22
+ };
23
+ protected pageOfListNodeTypes: (request: Readonly<ListNodeTypesRequest>) => Promise<ListNodeTypesResponse>;
24
+ /**
25
+ * List available node types. List all available node types. By default, the node types returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
26
+ *
27
+ * @param request - The request {@link ListNodeTypesRequest}
28
+ * @returns A Promise of ListNodeTypesResponse
29
+ */
30
+ listNodeTypes: (request: Readonly<ListNodeTypesRequest>) => Promise<ListNodeTypesResponse> & {
31
+ all: () => Promise<import("./types.gen").NodeType[]>;
32
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").NodeType[], void, void>;
33
+ };
34
+ protected pageOfListDatabaseBackups: (request?: Readonly<ListDatabaseBackupsRequest>) => Promise<ListDatabaseBackupsResponse>;
35
+ /**
36
+ * List database backups. List all backups in a specified region, for a given Scaleway Organization or Scaleway Project. By default, the backups listed are ordered by creation date in ascending order. This can be modified via the `order_by` field.
37
+ *
38
+ * @param request - The request {@link ListDatabaseBackupsRequest}
39
+ * @returns A Promise of ListDatabaseBackupsResponse
40
+ */
41
+ listDatabaseBackups: (request?: Readonly<ListDatabaseBackupsRequest>) => Promise<ListDatabaseBackupsResponse> & {
42
+ all: () => Promise<DatabaseBackup[]>;
43
+ [Symbol.asyncIterator]: () => AsyncGenerator<DatabaseBackup[], void, void>;
44
+ };
45
+ /**
46
+ * Create a database backup. Create a new backup. You must set the `instance_id`, `database_name`, `name` and `expires_at` parameters.
47
+ *
48
+ * @param request - The request {@link CreateDatabaseBackupRequest}
49
+ * @returns A Promise of DatabaseBackup
50
+ */
51
+ createDatabaseBackup: (request: Readonly<CreateDatabaseBackupRequest>) => Promise<DatabaseBackup>;
52
+ /**
53
+ * Get a database backup. Retrieve information about a given backup, specified by its database backup ID and region. Full details about the backup, like size, URL and expiration date, are returned in the response.
54
+ *
55
+ * @param request - The request {@link GetDatabaseBackupRequest}
56
+ * @returns A Promise of DatabaseBackup
57
+ */
58
+ getDatabaseBackup: (request: Readonly<GetDatabaseBackupRequest>) => Promise<DatabaseBackup>;
59
+ /**
60
+ * Waits for {@link DatabaseBackup} to be in a final state.
61
+ *
62
+ * @param request - The request {@link GetDatabaseBackupRequest}
63
+ * @param options - The waiting options
64
+ * @returns A Promise of DatabaseBackup
65
+ */
66
+ waitForDatabaseBackup: (request: Readonly<GetDatabaseBackupRequest>, options?: Readonly<WaitForOptions<DatabaseBackup>>) => Promise<DatabaseBackup>;
67
+ /**
68
+ * Update a database backup. Update the parameters of a backup, including name and expiration date.
69
+ *
70
+ * @param request - The request {@link UpdateDatabaseBackupRequest}
71
+ * @returns A Promise of DatabaseBackup
72
+ */
73
+ updateDatabaseBackup: (request: Readonly<UpdateDatabaseBackupRequest>) => Promise<DatabaseBackup>;
74
+ /**
75
+ * Delete a database backup. Delete a backup, specified by its database backup ID and region. Deleting a backup is permanent, and cannot be undone.
76
+ *
77
+ * @param request - The request {@link DeleteDatabaseBackupRequest}
78
+ * @returns A Promise of DatabaseBackup
79
+ */
80
+ deleteDatabaseBackup: (request: Readonly<DeleteDatabaseBackupRequest>) => Promise<DatabaseBackup>;
81
+ /**
82
+ * Restore a database backup. Launch the process of restoring database backup. You must specify the `instance_id` of the Database Instance of destination, where the backup will be restored. Note that large database backups can take up to several hours to restore.
83
+ *
84
+ * @param request - The request {@link RestoreDatabaseBackupRequest}
85
+ * @returns A Promise of DatabaseBackup
86
+ */
87
+ restoreDatabaseBackup: (request: Readonly<RestoreDatabaseBackupRequest>) => Promise<DatabaseBackup>;
88
+ /**
89
+ * Export a database backup. Export a backup, specified by the `database_backup_id` and the `region` parameters. The download URL is returned in the response.
90
+ *
91
+ * @param request - The request {@link ExportDatabaseBackupRequest}
92
+ * @returns A Promise of DatabaseBackup
93
+ */
94
+ exportDatabaseBackup: (request: Readonly<ExportDatabaseBackupRequest>) => Promise<DatabaseBackup>;
95
+ /**
96
+ * Upgrade a Database Instance. Upgrade your current Database Instance specifications like node type, high availability, volume, or the database engine version. Note that upon upgrade the `enable_ha` parameter can only be set to `true`.
97
+ *
98
+ * @param request - The request {@link UpgradeInstanceRequest}
99
+ * @returns A Promise of Instance
100
+ */
101
+ upgradeInstance: (request: Readonly<UpgradeInstanceRequest>) => Promise<Instance>;
102
+ protected pageOfListInstances: (request?: Readonly<ListInstancesRequest>) => Promise<ListInstancesResponse>;
103
+ /**
104
+ * List Database Instances. List all Database Instances in the specified region, for a given Scaleway Organization or Scaleway Project. By default, the Database Instances returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as `tags` and `name`. For the `name` parameter, the value you include will be checked against the whole name string to see if it includes the string you put in the parameter.
105
+ *
106
+ * @param request - The request {@link ListInstancesRequest}
107
+ * @returns A Promise of ListInstancesResponse
108
+ */
109
+ listInstances: (request?: Readonly<ListInstancesRequest>) => Promise<ListInstancesResponse> & {
110
+ all: () => Promise<Instance[]>;
111
+ [Symbol.asyncIterator]: () => AsyncGenerator<Instance[], void, void>;
112
+ };
113
+ /**
114
+ * Get a Database Instance. Retrieve information about a given Database Instance, specified by the `region` and `instance_id` parameters. Its full details, including name, status, IP address and port, are returned in the response object.
115
+ *
116
+ * @param request - The request {@link GetInstanceRequest}
117
+ * @returns A Promise of Instance
118
+ */
119
+ getInstance: (request: Readonly<GetInstanceRequest>) => Promise<Instance>;
120
+ /**
121
+ * Waits for {@link Instance} to be in a final state.
122
+ *
123
+ * @param request - The request {@link GetInstanceRequest}
124
+ * @param options - The waiting options
125
+ * @returns A Promise of Instance
126
+ */
127
+ waitForInstance: (request: Readonly<GetInstanceRequest>, options?: Readonly<WaitForOptions<Instance>>) => Promise<Instance>;
128
+ /**
129
+ * Create a Database Instance. Create a new Database Instance. You must set the `engine`, `user_name`, `password` and `node_type` parameters. Optionally, you can specify the volume type and size.
130
+ *
131
+ * @param request - The request {@link CreateInstanceRequest}
132
+ * @returns A Promise of Instance
133
+ */
134
+ createInstance: (request: Readonly<CreateInstanceRequest>) => Promise<Instance>;
135
+ /**
136
+ * Update a Database Instance. Update the parameters of a Database Instance, including name, tags and backup schedule details.
137
+ *
138
+ * @param request - The request {@link UpdateInstanceRequest}
139
+ * @returns A Promise of Instance
140
+ */
141
+ updateInstance: (request: Readonly<UpdateInstanceRequest>) => Promise<Instance>;
142
+ /**
143
+ * Delete a Database Instance. Delete a given Database Instance, specified by the `region` and `instance_id` parameters. Deleting a Database Instance is permanent, and cannot be undone. Note that upon deletion all your data will be lost.
144
+ *
145
+ * @param request - The request {@link DeleteInstanceRequest}
146
+ * @returns A Promise of Instance
147
+ */
148
+ deleteInstance: (request: Readonly<DeleteInstanceRequest>) => Promise<Instance>;
149
+ /**
150
+ * Clone a Database Instance. Clone a given Database Instance, specified by the `region` and `instance_id` parameters. The clone feature allows you to create a new Database Instance from an existing one. The clone includes all existing databases, users and permissions. You can create a clone on a Database Instance bigger than your current one.
151
+ *
152
+ * @param request - The request {@link CloneInstanceRequest}
153
+ * @returns A Promise of Instance
154
+ */
155
+ cloneInstance: (request: Readonly<CloneInstanceRequest>) => Promise<Instance>;
156
+ /**
157
+ * Restart Database Instance. Restart a given Database Instance, specified by the `region` and `instance_id` parameters. The status of the Database Instance returned in the response.
158
+ *
159
+ * @param request - The request {@link RestartInstanceRequest}
160
+ * @returns A Promise of Instance
161
+ */
162
+ restartInstance: (request: Readonly<RestartInstanceRequest>) => Promise<Instance>;
163
+ /**
164
+ * Get the TLS certificate of a Database Instance. Retrieve information about the TLS certificate of a given Database Instance. Details like name and content are returned in the response.
165
+ *
166
+ * @param request - The request {@link GetInstanceCertificateRequest}
167
+ * @returns A Promise of Blob
168
+ */
169
+ getInstanceCertificate: (request: Readonly<GetInstanceCertificateRequest>) => Promise<Blob>;
170
+ /**
171
+ * Renew the TLS certificate of a Database Instance. Renew a TLS for a Database Instance. Renewing a certificate means that you will not be able to connect to your Database Instance using the previous certificate. You will also need to download and update the new certificate for all database clients.
172
+ *
173
+ * @param request - The request {@link RenewInstanceCertificateRequest}
174
+ */
175
+ renewInstanceCertificate: (request: Readonly<RenewInstanceCertificateRequest>) => Promise<void>;
176
+ /**
177
+ * Get Database Instance metrics. Retrieve the time series metrics of a given Database Instance. You can define the period from which to retrieve metrics by specifying the `start_date` and `end_date`.
178
+ *
179
+ * @param request - The request {@link GetInstanceMetricsRequest}
180
+ * @returns A Promise of InstanceMetrics
181
+ */
182
+ getInstanceMetrics: (request: Readonly<GetInstanceMetricsRequest>) => Promise<InstanceMetrics>;
183
+ /**
184
+ * Create a Read Replica. Create a new Read Replica of a Database Instance. You must specify the `region` and the `instance_id`. You can only create a maximum of 3 Read Replicas per Database Instance.
185
+ *
186
+ * @param request - The request {@link CreateReadReplicaRequest}
187
+ * @returns A Promise of ReadReplica
188
+ */
189
+ createReadReplica: (request: Readonly<CreateReadReplicaRequest>) => Promise<ReadReplica>;
190
+ /**
191
+ * Get a Read Replica. Retrieve information about a Database Instance Read Replica. Full details about the Read Replica, like `endpoints`, `status` and `region` are returned in the response.
192
+ *
193
+ * @param request - The request {@link GetReadReplicaRequest}
194
+ * @returns A Promise of ReadReplica
195
+ */
196
+ getReadReplica: (request: Readonly<GetReadReplicaRequest>) => Promise<ReadReplica>;
197
+ /**
198
+ * Waits for {@link ReadReplica} to be in a final state.
199
+ *
200
+ * @param request - The request {@link GetReadReplicaRequest}
201
+ * @param options - The waiting options
202
+ * @returns A Promise of ReadReplica
203
+ */
204
+ waitForReadReplica: (request: Readonly<GetReadReplicaRequest>, options?: Readonly<WaitForOptions<ReadReplica>>) => Promise<ReadReplica>;
205
+ /**
206
+ * Delete a Read Replica. Delete a Read Replica of a Database Instance. You must specify the `region` and `read_replica_id` parameters of the Read Replica you want to delete.
207
+ *
208
+ * @param request - The request {@link DeleteReadReplicaRequest}
209
+ * @returns A Promise of ReadReplica
210
+ */
211
+ deleteReadReplica: (request: Readonly<DeleteReadReplicaRequest>) => Promise<ReadReplica>;
212
+ /**
213
+ * Resync a Read Replica. When you resync a Read Replica, first it is reset, then its data is resynchronized from the primary node. Your Read Replica remains unavailable during the resync process. The duration of this process is proportional to the size of your Database Instance.
214
+ The configured endpoints do not change.
215
+ *
216
+ * @param request - The request {@link ResetReadReplicaRequest}
217
+ * @returns A Promise of ReadReplica
218
+ */
219
+ resetReadReplica: (request: Readonly<ResetReadReplicaRequest>) => Promise<ReadReplica>;
220
+ /**
221
+ * Promote a Read Replica. Promote a Read Replica to Database Instance automatically.
222
+ *
223
+ * @param request - The request {@link PromoteReadReplicaRequest}
224
+ * @returns A Promise of Instance
225
+ */
226
+ promoteReadReplica: (request: Readonly<PromoteReadReplicaRequest>) => Promise<Instance>;
227
+ /**
228
+ * Create an endpoint for a Read Replica. Create a new endpoint for a Read Replica. Read Replicas can have at most one direct access and one Private Network endpoint.
229
+ *
230
+ * @param request - The request {@link CreateReadReplicaEndpointRequest}
231
+ * @returns A Promise of ReadReplica
232
+ */
233
+ createReadReplicaEndpoint: (request: Readonly<CreateReadReplicaEndpointRequest>) => Promise<ReadReplica>;
234
+ /**
235
+ * Prepare logs of a Database Instance. Prepare your Database Instance logs. You can define the `start_date` and `end_date` parameters for your query. The download URL is returned in the response. Logs are recorded from 00h00 to 23h59 and then aggregated in a `.log` file once a day. Therefore, even if you specify a timeframe from which you want to get the logs, you will receive logs from the full 24 hours.
236
+ *
237
+ * @param request - The request {@link PrepareInstanceLogsRequest}
238
+ * @returns A Promise of PrepareInstanceLogsResponse
239
+ */
240
+ prepareInstanceLogs: (request: Readonly<PrepareInstanceLogsRequest>) => Promise<PrepareInstanceLogsResponse>;
241
+ /**
242
+ * List available logs of a Database Instance. List the available logs of a Database Instance. By default, the logs returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.
243
+ *
244
+ * @param request - The request {@link ListInstanceLogsRequest}
245
+ * @returns A Promise of ListInstanceLogsResponse
246
+ */
247
+ listInstanceLogs: (request: Readonly<ListInstanceLogsRequest>) => Promise<ListInstanceLogsResponse>;
248
+ /**
249
+ * Get given logs of a Database Instance. Retrieve information about the logs of a Database Instance. Specify the `instance_log_id` and `region` in your request to get information such as `download_url`, `status`, `expires_at` and `created_at` about your logs in the response.
250
+ *
251
+ * @param request - The request {@link GetInstanceLogRequest}
252
+ * @returns A Promise of InstanceLog
253
+ */
254
+ getInstanceLog: (request: Readonly<GetInstanceLogRequest>) => Promise<InstanceLog>;
255
+ /**
256
+ * Waits for {@link InstanceLog} to be in a final state.
257
+ *
258
+ * @param request - The request {@link GetInstanceLogRequest}
259
+ * @param options - The waiting options
260
+ * @returns A Promise of InstanceLog
261
+ */
262
+ waitForInstanceLog: (request: Readonly<GetInstanceLogRequest>, options?: Readonly<WaitForOptions<InstanceLog>>) => Promise<InstanceLog>;
263
+ /**
264
+ * Purge remote Database Instance logs. Purge a given remote log from a Database Instance. You can specify the `log_name` of the log you wish to clean from your Database Instance.
265
+ *
266
+ * @param request - The request {@link PurgeInstanceLogsRequest}
267
+ */
268
+ purgeInstanceLogs: (request: Readonly<PurgeInstanceLogsRequest>) => Promise<void>;
269
+ /**
270
+ * List remote Database Instance logs details. List remote log details. By default, the details returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.
271
+ *
272
+ * @param request - The request {@link ListInstanceLogsDetailsRequest}
273
+ * @returns A Promise of ListInstanceLogsDetailsResponse
274
+ */
275
+ listInstanceLogsDetails: (request: Readonly<ListInstanceLogsDetailsRequest>) => Promise<ListInstanceLogsDetailsResponse>;
276
+ /**
277
+ * Add Database Instance advanced settings. Add an advanced setting to a Database Instance. You must set the `name` and the `value` of each setting.
278
+ *
279
+ * @param request - The request {@link AddInstanceSettingsRequest}
280
+ * @returns A Promise of AddInstanceSettingsResponse
281
+ */
282
+ addInstanceSettings: (request: Readonly<AddInstanceSettingsRequest>) => Promise<AddInstanceSettingsResponse>;
283
+ /**
284
+ * Delete Database Instance advanced settings. Delete an advanced setting in a Database Instance. You must specify the names of the settings you want to delete in the request.
285
+ *
286
+ * @param request - The request {@link DeleteInstanceSettingsRequest}
287
+ * @returns A Promise of DeleteInstanceSettingsResponse
288
+ */
289
+ deleteInstanceSettings: (request: Readonly<DeleteInstanceSettingsRequest>) => Promise<DeleteInstanceSettingsResponse>;
290
+ /**
291
+ * Set Database Instance advanced settings. Update an advanced setting for a Database Instance. Settings added upon database engine initialization can only be defined once, and cannot, therefore, be updated.
292
+ *
293
+ * @param request - The request {@link SetInstanceSettingsRequest}
294
+ * @returns A Promise of SetInstanceSettingsResponse
295
+ */
296
+ setInstanceSettings: (request: Readonly<SetInstanceSettingsRequest>) => Promise<SetInstanceSettingsResponse>;
297
+ protected pageOfListInstanceACLRules: (request: Readonly<ListInstanceACLRulesRequest>) => Promise<ListInstanceACLRulesResponse>;
298
+ /**
299
+ * List ACL rules of a Database Instance. List the ACL rules for a given Database Instance. The response is an array of ACL objects, each one representing an ACL that denies, allows or redirects traffic based on certain conditions.
300
+ *
301
+ * @param request - The request {@link ListInstanceACLRulesRequest}
302
+ * @returns A Promise of ListInstanceACLRulesResponse
303
+ */
304
+ listInstanceACLRules: (request: Readonly<ListInstanceACLRulesRequest>) => Promise<ListInstanceACLRulesResponse> & {
305
+ all: () => Promise<import("./types.gen").ACLRule[]>;
306
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").ACLRule[], void, void>;
307
+ };
308
+ /**
309
+ * Add an ACL rule to a Database Instance. Add an additional ACL rule to a Database Instance.
310
+ *
311
+ * @param request - The request {@link AddInstanceACLRulesRequest}
312
+ * @returns A Promise of AddInstanceACLRulesResponse
313
+ */
314
+ addInstanceACLRules: (request: Readonly<AddInstanceACLRulesRequest>) => Promise<AddInstanceACLRulesResponse>;
315
+ /**
316
+ * Set ACL rules for a Database Instance. Replace all the ACL rules of a Database Instance.
317
+ *
318
+ * @param request - The request {@link SetInstanceACLRulesRequest}
319
+ * @returns A Promise of SetInstanceACLRulesResponse
320
+ */
321
+ setInstanceACLRules: (request: Readonly<SetInstanceACLRulesRequest>) => Promise<SetInstanceACLRulesResponse>;
322
+ /**
323
+ * Delete ACL rules of a Database Instance. Delete one or more ACL rules of a Database Instance.
324
+ *
325
+ * @param request - The request {@link DeleteInstanceACLRulesRequest}
326
+ * @returns A Promise of DeleteInstanceACLRulesResponse
327
+ */
328
+ deleteInstanceACLRules: (request: Readonly<DeleteInstanceACLRulesRequest>) => Promise<DeleteInstanceACLRulesResponse>;
329
+ protected pageOfListUsers: (request: Readonly<ListUsersRequest>) => Promise<ListUsersResponse>;
330
+ /**
331
+ * List users of a Database Instance. List all users of a given Database Instance. By default, the users returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.
332
+ *
333
+ * @param request - The request {@link ListUsersRequest}
334
+ * @returns A Promise of ListUsersResponse
335
+ */
336
+ listUsers: (request: Readonly<ListUsersRequest>) => Promise<ListUsersResponse> & {
337
+ all: () => Promise<User[]>;
338
+ [Symbol.asyncIterator]: () => AsyncGenerator<User[], void, void>;
339
+ };
340
+ /**
341
+ * Create a user for a Database Instance. Create a new user for a Database Instance. You must define the `name`, `password` and `is_admin` parameters.
342
+ *
343
+ * @param request - The request {@link CreateUserRequest}
344
+ * @returns A Promise of User
345
+ */
346
+ createUser: (request: Readonly<CreateUserRequest>) => Promise<User>;
347
+ /**
348
+ * Update a user on a Database Instance. Update the parameters of a user on a Database Instance. You can update the `password` and `is_admin` parameters, but you cannot change the name of the user.
349
+ *
350
+ * @param request - The request {@link UpdateUserRequest}
351
+ * @returns A Promise of User
352
+ */
353
+ updateUser: (request: Readonly<UpdateUserRequest>) => Promise<User>;
354
+ /**
355
+ * Delete a user on a Database Instance. Delete a given user on a Database Instance. You must specify, in the endpoint, the `region`, `instance_id` and `name` parameters of the user you want to delete.
356
+ *
357
+ * @param request - The request {@link DeleteUserRequest}
358
+ */
359
+ deleteUser: (request: Readonly<DeleteUserRequest>) => Promise<void>;
360
+ protected pageOfListDatabases: (request: Readonly<ListDatabasesRequest>) => Promise<ListDatabasesResponse>;
361
+ /**
362
+ * List databases in a Database Instance. List all databases of a given Database Instance. By default, the databases returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as `name`, `managed` and `owner`.
363
+ *
364
+ * @param request - The request {@link ListDatabasesRequest}
365
+ * @returns A Promise of ListDatabasesResponse
366
+ */
367
+ listDatabases: (request: Readonly<ListDatabasesRequest>) => Promise<ListDatabasesResponse> & {
368
+ all: () => Promise<Database[]>;
369
+ [Symbol.asyncIterator]: () => AsyncGenerator<Database[], void, void>;
370
+ };
371
+ /**
372
+ * Create a database in a Database Instance. Create a new database. You must define the `name` parameter in the request.
373
+ *
374
+ * @param request - The request {@link CreateDatabaseRequest}
375
+ * @returns A Promise of Database
376
+ */
377
+ createDatabase: (request: Readonly<CreateDatabaseRequest>) => Promise<Database>;
378
+ /**
379
+ * Delete a database in a Database Instance. Delete a given database on a Database Instance. You must specify, in the endpoint, the `region`, `instance_id` and `name` parameters of the database you want to delete.
380
+ *
381
+ * @param request - The request {@link DeleteDatabaseRequest}
382
+ */
383
+ deleteDatabase: (request: Readonly<DeleteDatabaseRequest>) => Promise<void>;
384
+ protected pageOfListPrivileges: (request: Readonly<ListPrivilegesRequest>) => Promise<ListPrivilegesResponse>;
385
+ /**
386
+ * List user privileges for a database. List privileges of a user on a database. By default, the details returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as `database_name` and `user_name`.
387
+ *
388
+ * @param request - The request {@link ListPrivilegesRequest}
389
+ * @returns A Promise of ListPrivilegesResponse
390
+ */
391
+ listPrivileges: (request: Readonly<ListPrivilegesRequest>) => Promise<ListPrivilegesResponse> & {
392
+ all: () => Promise<Privilege[]>;
393
+ [Symbol.asyncIterator]: () => AsyncGenerator<Privilege[], void, void>;
394
+ };
395
+ /**
396
+ * Set user privileges for a database. Set the privileges of a user on a database. You must define `database_name`, `user_name` and `permission` in the request body.
397
+ *
398
+ * @param request - The request {@link SetPrivilegeRequest}
399
+ * @returns A Promise of Privilege
400
+ */
401
+ setPrivilege: (request: Readonly<SetPrivilegeRequest>) => Promise<Privilege>;
402
+ protected pageOfListSnapshots: (request?: Readonly<ListSnapshotsRequest>) => Promise<ListSnapshotsResponse>;
403
+ /**
404
+ * List snapshots. List snapshots. You can include the `instance_id` or `project_id` in your query to get the list of snapshots for specific Database Instances and/or Projects. By default, the details returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
405
+ *
406
+ * @param request - The request {@link ListSnapshotsRequest}
407
+ * @returns A Promise of ListSnapshotsResponse
408
+ */
409
+ listSnapshots: (request?: Readonly<ListSnapshotsRequest>) => Promise<ListSnapshotsResponse> & {
410
+ all: () => Promise<Snapshot[]>;
411
+ [Symbol.asyncIterator]: () => AsyncGenerator<Snapshot[], void, void>;
412
+ };
413
+ /**
414
+ * Get a Database Instance snapshot. Retrieve information about a given snapshot, specified by its `snapshot_id` and `region`. Full details about the snapshot, like size and expiration date, are returned in the response.
415
+ *
416
+ * @param request - The request {@link GetSnapshotRequest}
417
+ * @returns A Promise of Snapshot
418
+ */
419
+ getSnapshot: (request: Readonly<GetSnapshotRequest>) => Promise<Snapshot>;
420
+ /**
421
+ * Waits for {@link Snapshot} to be in a final state.
422
+ *
423
+ * @param request - The request {@link GetSnapshotRequest}
424
+ * @param options - The waiting options
425
+ * @returns A Promise of Snapshot
426
+ */
427
+ waitForSnapshot: (request: Readonly<GetSnapshotRequest>, options?: Readonly<WaitForOptions<Snapshot>>) => Promise<Snapshot>;
428
+ /**
429
+ * Create a Database Instance snapshot. Create a new snapshot of a Database Instance. You must define the `name` parameter in the request.
430
+ *
431
+ * @param request - The request {@link CreateSnapshotRequest}
432
+ * @returns A Promise of Snapshot
433
+ */
434
+ createSnapshot: (request: Readonly<CreateSnapshotRequest>) => Promise<Snapshot>;
435
+ /**
436
+ * Update a Database Instance snapshot. Update the parameters of a snapshot of a Database Instance. You can update the `name` and `expires_at` parameters.
437
+ *
438
+ * @param request - The request {@link UpdateSnapshotRequest}
439
+ * @returns A Promise of Snapshot
440
+ */
441
+ updateSnapshot: (request: Readonly<UpdateSnapshotRequest>) => Promise<Snapshot>;
442
+ /**
443
+ * Delete a Database Instance snapshot. Delete a given snapshot of a Database Instance. You must specify, in the endpoint, the `region` and `snapshot_id` parameters of the snapshot you want to delete.
444
+ *
445
+ * @param request - The request {@link DeleteSnapshotRequest}
446
+ * @returns A Promise of Snapshot
447
+ */
448
+ deleteSnapshot: (request: Readonly<DeleteSnapshotRequest>) => Promise<Snapshot>;
449
+ /**
450
+ * Create a new Database Instance from a snapshot. Restore a snapshot. When you restore a snapshot, a new Instance is created and billed to your account. Note that is possible to select a larger node type for your new Database Instance. However, the Block volume size will be the same as the size of the restored snapshot. All Instance settings will be restored if you chose a node type with the same or more memory size than the initial Instance. Settings will be reset to the default if your node type has less memory.
451
+ *
452
+ * @param request - The request {@link CreateInstanceFromSnapshotRequest}
453
+ * @returns A Promise of Instance
454
+ */
455
+ createInstanceFromSnapshot: (request: Readonly<CreateInstanceFromSnapshotRequest>) => Promise<Instance>;
456
+ /**
457
+ * Create a new Database Instance endpoint. Create a new endpoint for a Database Instance. You can add `load_balancer` and `private_network` specifications to the body of the request.
458
+ *
459
+ * @param request - The request {@link CreateEndpointRequest}
460
+ * @returns A Promise of Endpoint
461
+ */
462
+ createEndpoint: (request: Readonly<CreateEndpointRequest>) => Promise<Endpoint>;
463
+ /**
464
+ * Delete a Database Instance endpoint. Delete the endpoint of a Database Instance. You must specify the `region` and `endpoint_id` parameters of the endpoint you want to delete. Note that might need to update any environment configurations that point to the deleted endpoint.
465
+ *
466
+ * @param request - The request {@link DeleteEndpointRequest}
467
+ */
468
+ deleteEndpoint: (request: Readonly<DeleteEndpointRequest>) => Promise<void>;
469
+ /**
470
+ * Get a Database Instance endpoint. Retrieve information about a Database Instance endpoint. Full details about the endpoint, like `ip`, `port`, `private_network` and `load_balancer` specifications are returned in the response.
471
+ *
472
+ * @param request - The request {@link GetEndpointRequest}
473
+ * @returns A Promise of Endpoint
474
+ */
475
+ getEndpoint: (request: Readonly<GetEndpointRequest>) => Promise<Endpoint>;
476
+ /**
477
+ * Migrate an existing instance endpoint to another instance.
478
+ *
479
+ * @param request - The request {@link MigrateEndpointRequest}
480
+ * @returns A Promise of Endpoint
481
+ */
482
+ migrateEndpoint: (request: Readonly<MigrateEndpointRequest>) => Promise<Endpoint>;
483
+ /**
484
+ * Apply Database Instance maintenance. Apply maintenance tasks to your Database Instance. This will trigger pending maintenance tasks to start in your Database Instance and can generate service interruption. Maintenance tasks can be applied between `starts_at` and `stops_at` times, and are run directly by Scaleway at `forced_at` timestamp.
485
+ *
486
+ * @param request - The request {@link ApplyInstanceMaintenanceRequest}
487
+ * @returns A Promise of Maintenance
488
+ */
489
+ applyInstanceMaintenance: (request: Readonly<ApplyInstanceMaintenanceRequest>) => Promise<Maintenance>;
490
+ }