@scaleway/sdk-rdb 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/license.md +3 -0
- package/dist/metadata.gen.d.ts +6 -6
- package/dist/metadata.gen.js +6 -2
- package/dist/v1/api.gen.d.ts +5 -5
- package/dist/v1/api.gen.js +334 -713
- package/dist/v1/content.gen.js +6 -6
- package/dist/v1/marshalling.gen.js +86 -86
- package/dist/v1/metadata.gen.js +1 -1
- package/dist/v1/validation-rules.gen.js +1 -1
- package/package.json +8 -6
- package/LICENSE +0 -191
- package/dist/metadata.gen.json +0 -6
- package/dist/metadata2.gen.js +0 -8
package/dist/v1/api.gen.js
CHANGED
|
@@ -2,725 +2,346 @@ import { DATABASE_BACKUP_TRANSIENT_STATUSES, INSTANCE_LOG_TRANSIENT_STATUSES, IN
|
|
|
2
2
|
import { marshalAddInstanceACLRulesRequest, marshalAddInstanceSettingsRequest, marshalCloneInstanceRequest, marshalCreateDatabaseBackupRequest, marshalCreateDatabaseRequest, marshalCreateEndpointRequest, marshalCreateInstanceFromSnapshotRequest, marshalCreateInstanceRequest, marshalCreateReadReplicaEndpointRequest, marshalCreateReadReplicaRequest, marshalCreateSnapshotRequest, marshalCreateUserRequest, marshalDeleteInstanceACLRulesRequest, marshalDeleteInstanceSettingsRequest, marshalMigrateEndpointRequest, marshalPrepareInstanceLogsRequest, marshalPurgeInstanceLogsRequest, marshalRestoreDatabaseBackupRequest, marshalSetInstanceACLRulesRequest, marshalSetInstanceSettingsRequest, marshalSetPrivilegeRequest, marshalUpdateDatabaseBackupRequest, marshalUpdateInstanceRequest, marshalUpdateSnapshotRequest, marshalUpdateUserRequest, marshalUpgradeInstanceRequest, unmarshalAddInstanceACLRulesResponse, unmarshalAddInstanceSettingsResponse, unmarshalDatabase, unmarshalDatabaseBackup, unmarshalDeleteInstanceACLRulesResponse, unmarshalDeleteInstanceSettingsResponse, unmarshalEndpoint, unmarshalInstance, unmarshalInstanceLog, unmarshalInstanceMetrics, unmarshalListDatabaseBackupsResponse, unmarshalListDatabaseEnginesResponse, unmarshalListDatabasesResponse, unmarshalListInstanceACLRulesResponse, unmarshalListInstanceLogsDetailsResponse, unmarshalListInstanceLogsResponse, unmarshalListInstancesResponse, unmarshalListNodeTypesResponse, unmarshalListPrivilegesResponse, unmarshalListSnapshotsResponse, unmarshalListUsersResponse, unmarshalMaintenance, unmarshalPrepareInstanceLogsResponse, unmarshalPrivilege, unmarshalReadReplica, unmarshalSetInstanceACLRulesResponse, unmarshalSetInstanceSettingsResponse, unmarshalSnapshot, unmarshalUser } from "./marshalling.gen.js";
|
|
3
3
|
import { API as API$1, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
4
|
//#region src/v1/api.gen.ts
|
|
5
|
-
|
|
5
|
+
const jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
6
6
|
/**
|
|
7
7
|
* Managed Database for PostgreSQL and MySQL API.
|
|
8
8
|
|
|
9
9
|
This API allows you to manage your Managed Databases for PostgreSQL and MySQL.
|
|
10
10
|
*/
|
|
11
11
|
var API = class extends API$1 {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
}
|
|
345
|
-
/**
|
|
346
|
-
* 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.
|
|
347
|
-
*
|
|
348
|
-
* @param request - The request {@link PrepareInstanceLogsRequest}
|
|
349
|
-
* @returns A Promise of PrepareInstanceLogsResponse
|
|
350
|
-
*/
|
|
351
|
-
prepareInstanceLogs = (request) => this.client.fetch({
|
|
352
|
-
body: JSON.stringify(marshalPrepareInstanceLogsRequest(request, this.client.settings)),
|
|
353
|
-
headers: jsonContentHeaders,
|
|
354
|
-
method: "POST",
|
|
355
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/prepare-logs`
|
|
356
|
-
}, unmarshalPrepareInstanceLogsResponse);
|
|
357
|
-
/**
|
|
358
|
-
* 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.
|
|
359
|
-
*
|
|
360
|
-
* @param request - The request {@link ListInstanceLogsRequest}
|
|
361
|
-
* @returns A Promise of ListInstanceLogsResponse
|
|
362
|
-
*/
|
|
363
|
-
listInstanceLogs = (request) => this.client.fetch({
|
|
364
|
-
method: "GET",
|
|
365
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/logs`,
|
|
366
|
-
urlParams: urlParams(["order_by", request.orderBy])
|
|
367
|
-
}, unmarshalListInstanceLogsResponse);
|
|
368
|
-
/**
|
|
369
|
-
* 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.
|
|
370
|
-
*
|
|
371
|
-
* @param request - The request {@link GetInstanceLogRequest}
|
|
372
|
-
* @returns A Promise of InstanceLog
|
|
373
|
-
*/
|
|
374
|
-
getInstanceLog = (request) => this.client.fetch({
|
|
375
|
-
method: "GET",
|
|
376
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/logs/${validatePathParam("instanceLogId", request.instanceLogId)}`
|
|
377
|
-
}, unmarshalInstanceLog);
|
|
378
|
-
/**
|
|
379
|
-
* Waits for {@link InstanceLog} to be in a final state.
|
|
380
|
-
*
|
|
381
|
-
* @param request - The request {@link GetInstanceLogRequest}
|
|
382
|
-
* @param options - The waiting options
|
|
383
|
-
* @returns A Promise of InstanceLog
|
|
384
|
-
*/
|
|
385
|
-
waitForInstanceLog = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!INSTANCE_LOG_TRANSIENT_STATUSES.includes(res.status))), this.getInstanceLog, request, options);
|
|
386
|
-
/**
|
|
387
|
-
* 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.
|
|
388
|
-
*
|
|
389
|
-
* @param request - The request {@link PurgeInstanceLogsRequest}
|
|
390
|
-
*/
|
|
391
|
-
purgeInstanceLogs = (request) => this.client.fetch({
|
|
392
|
-
body: JSON.stringify(marshalPurgeInstanceLogsRequest(request, this.client.settings)),
|
|
393
|
-
headers: jsonContentHeaders,
|
|
394
|
-
method: "POST",
|
|
395
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/purge-logs`
|
|
396
|
-
});
|
|
397
|
-
/**
|
|
398
|
-
* 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.
|
|
399
|
-
*
|
|
400
|
-
* @param request - The request {@link ListInstanceLogsDetailsRequest}
|
|
401
|
-
* @returns A Promise of ListInstanceLogsDetailsResponse
|
|
402
|
-
*/
|
|
403
|
-
listInstanceLogsDetails = (request) => this.client.fetch({
|
|
404
|
-
method: "GET",
|
|
405
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/logs-details`
|
|
406
|
-
}, unmarshalListInstanceLogsDetailsResponse);
|
|
407
|
-
/**
|
|
408
|
-
* Add Database Instance advanced settings. Add an advanced setting to a Database Instance. You must set the `name` and the `value` of each setting.
|
|
409
|
-
*
|
|
410
|
-
* @param request - The request {@link AddInstanceSettingsRequest}
|
|
411
|
-
* @returns A Promise of AddInstanceSettingsResponse
|
|
412
|
-
*/
|
|
413
|
-
addInstanceSettings = (request) => this.client.fetch({
|
|
414
|
-
body: JSON.stringify(marshalAddInstanceSettingsRequest(request, this.client.settings)),
|
|
415
|
-
headers: jsonContentHeaders,
|
|
416
|
-
method: "POST",
|
|
417
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/settings`
|
|
418
|
-
}, unmarshalAddInstanceSettingsResponse);
|
|
419
|
-
/**
|
|
420
|
-
* 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.
|
|
421
|
-
*
|
|
422
|
-
* @param request - The request {@link DeleteInstanceSettingsRequest}
|
|
423
|
-
* @returns A Promise of DeleteInstanceSettingsResponse
|
|
424
|
-
*/
|
|
425
|
-
deleteInstanceSettings = (request) => this.client.fetch({
|
|
426
|
-
body: JSON.stringify(marshalDeleteInstanceSettingsRequest(request, this.client.settings)),
|
|
427
|
-
headers: jsonContentHeaders,
|
|
428
|
-
method: "DELETE",
|
|
429
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/settings`
|
|
430
|
-
}, unmarshalDeleteInstanceSettingsResponse);
|
|
431
|
-
/**
|
|
432
|
-
* 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.
|
|
433
|
-
*
|
|
434
|
-
* @param request - The request {@link SetInstanceSettingsRequest}
|
|
435
|
-
* @returns A Promise of SetInstanceSettingsResponse
|
|
436
|
-
*/
|
|
437
|
-
setInstanceSettings = (request) => this.client.fetch({
|
|
438
|
-
body: JSON.stringify(marshalSetInstanceSettingsRequest(request, this.client.settings)),
|
|
439
|
-
headers: jsonContentHeaders,
|
|
440
|
-
method: "PUT",
|
|
441
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/settings`
|
|
442
|
-
}, unmarshalSetInstanceSettingsResponse);
|
|
443
|
-
pageOfListInstanceACLRules = (request) => this.client.fetch({
|
|
444
|
-
method: "GET",
|
|
445
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/acls`,
|
|
446
|
-
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
447
|
-
}, unmarshalListInstanceACLRulesResponse);
|
|
448
|
-
/**
|
|
449
|
-
* 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.
|
|
450
|
-
*
|
|
451
|
-
* @param request - The request {@link ListInstanceACLRulesRequest}
|
|
452
|
-
* @returns A Promise of ListInstanceACLRulesResponse
|
|
453
|
-
*/
|
|
454
|
-
listInstanceACLRules = (request) => enrichForPagination("rules", this.pageOfListInstanceACLRules, request);
|
|
455
|
-
/**
|
|
456
|
-
* Add an ACL rule to a Database Instance. Add an additional ACL rule to a Database Instance.
|
|
457
|
-
*
|
|
458
|
-
* @param request - The request {@link AddInstanceACLRulesRequest}
|
|
459
|
-
* @returns A Promise of AddInstanceACLRulesResponse
|
|
460
|
-
*/
|
|
461
|
-
addInstanceACLRules = (request) => this.client.fetch({
|
|
462
|
-
body: JSON.stringify(marshalAddInstanceACLRulesRequest(request, this.client.settings)),
|
|
463
|
-
headers: jsonContentHeaders,
|
|
464
|
-
method: "POST",
|
|
465
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/acls`
|
|
466
|
-
}, unmarshalAddInstanceACLRulesResponse);
|
|
467
|
-
/**
|
|
468
|
-
* Set ACL rules for a Database Instance. Replace all the ACL rules of a Database Instance.
|
|
469
|
-
*
|
|
470
|
-
* @param request - The request {@link SetInstanceACLRulesRequest}
|
|
471
|
-
* @returns A Promise of SetInstanceACLRulesResponse
|
|
472
|
-
*/
|
|
473
|
-
setInstanceACLRules = (request) => this.client.fetch({
|
|
474
|
-
body: JSON.stringify(marshalSetInstanceACLRulesRequest(request, this.client.settings)),
|
|
475
|
-
headers: jsonContentHeaders,
|
|
476
|
-
method: "PUT",
|
|
477
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/acls`
|
|
478
|
-
}, unmarshalSetInstanceACLRulesResponse);
|
|
479
|
-
/**
|
|
480
|
-
* Delete ACL rules of a Database Instance. Delete one or more ACL rules of a Database Instance.
|
|
481
|
-
*
|
|
482
|
-
* @param request - The request {@link DeleteInstanceACLRulesRequest}
|
|
483
|
-
* @returns A Promise of DeleteInstanceACLRulesResponse
|
|
484
|
-
*/
|
|
485
|
-
deleteInstanceACLRules = (request) => this.client.fetch({
|
|
486
|
-
body: JSON.stringify(marshalDeleteInstanceACLRulesRequest(request, this.client.settings)),
|
|
487
|
-
headers: jsonContentHeaders,
|
|
488
|
-
method: "DELETE",
|
|
489
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/acls`
|
|
490
|
-
}, unmarshalDeleteInstanceACLRulesResponse);
|
|
491
|
-
pageOfListUsers = (request) => this.client.fetch({
|
|
492
|
-
method: "GET",
|
|
493
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/users`,
|
|
494
|
-
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
495
|
-
}, unmarshalListUsersResponse);
|
|
496
|
-
/**
|
|
497
|
-
* 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.
|
|
498
|
-
*
|
|
499
|
-
* @param request - The request {@link ListUsersRequest}
|
|
500
|
-
* @returns A Promise of ListUsersResponse
|
|
501
|
-
*/
|
|
502
|
-
listUsers = (request) => enrichForPagination("users", this.pageOfListUsers, request);
|
|
503
|
-
/**
|
|
504
|
-
* 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.
|
|
505
|
-
*
|
|
506
|
-
* @param request - The request {@link CreateUserRequest}
|
|
507
|
-
* @returns A Promise of User
|
|
508
|
-
*/
|
|
509
|
-
createUser = (request) => this.client.fetch({
|
|
510
|
-
body: JSON.stringify(marshalCreateUserRequest(request, this.client.settings)),
|
|
511
|
-
headers: jsonContentHeaders,
|
|
512
|
-
method: "POST",
|
|
513
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/users`
|
|
514
|
-
}, unmarshalUser);
|
|
515
|
-
/**
|
|
516
|
-
* 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.
|
|
517
|
-
*
|
|
518
|
-
* @param request - The request {@link UpdateUserRequest}
|
|
519
|
-
* @returns A Promise of User
|
|
520
|
-
*/
|
|
521
|
-
updateUser = (request) => this.client.fetch({
|
|
522
|
-
body: JSON.stringify(marshalUpdateUserRequest(request, this.client.settings)),
|
|
523
|
-
headers: jsonContentHeaders,
|
|
524
|
-
method: "PATCH",
|
|
525
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/users/${validatePathParam("name", request.name)}`
|
|
526
|
-
}, unmarshalUser);
|
|
527
|
-
/**
|
|
528
|
-
* 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.
|
|
529
|
-
*
|
|
530
|
-
* @param request - The request {@link DeleteUserRequest}
|
|
531
|
-
*/
|
|
532
|
-
deleteUser = (request) => this.client.fetch({
|
|
533
|
-
method: "DELETE",
|
|
534
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/users/${validatePathParam("name", request.name)}`
|
|
535
|
-
});
|
|
536
|
-
pageOfListDatabases = (request) => this.client.fetch({
|
|
537
|
-
method: "GET",
|
|
538
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/databases`,
|
|
539
|
-
urlParams: urlParams(["managed", request.managed], ["name", request.name], ["order_by", request.orderBy], ["owner", request.owner], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["skip_size_retrieval", request.skipSizeRetrieval])
|
|
540
|
-
}, unmarshalListDatabasesResponse);
|
|
541
|
-
/**
|
|
542
|
-
* 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`.
|
|
543
|
-
*
|
|
544
|
-
* @param request - The request {@link ListDatabasesRequest}
|
|
545
|
-
* @returns A Promise of ListDatabasesResponse
|
|
546
|
-
*/
|
|
547
|
-
listDatabases = (request) => enrichForPagination("databases", this.pageOfListDatabases, request);
|
|
548
|
-
/**
|
|
549
|
-
* Create a database in a Database Instance. Create a new database. You must define the `name` parameter in the request.
|
|
550
|
-
*
|
|
551
|
-
* @param request - The request {@link CreateDatabaseRequest}
|
|
552
|
-
* @returns A Promise of Database
|
|
553
|
-
*/
|
|
554
|
-
createDatabase = (request) => this.client.fetch({
|
|
555
|
-
body: JSON.stringify(marshalCreateDatabaseRequest(request, this.client.settings)),
|
|
556
|
-
headers: jsonContentHeaders,
|
|
557
|
-
method: "POST",
|
|
558
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/databases`
|
|
559
|
-
}, unmarshalDatabase);
|
|
560
|
-
/**
|
|
561
|
-
* 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.
|
|
562
|
-
*
|
|
563
|
-
* @param request - The request {@link DeleteDatabaseRequest}
|
|
564
|
-
*/
|
|
565
|
-
deleteDatabase = (request) => this.client.fetch({
|
|
566
|
-
method: "DELETE",
|
|
567
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/databases/${validatePathParam("name", request.name)}`
|
|
568
|
-
});
|
|
569
|
-
pageOfListPrivileges = (request) => this.client.fetch({
|
|
570
|
-
method: "GET",
|
|
571
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/privileges`,
|
|
572
|
-
urlParams: urlParams(["database_name", request.databaseName], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["user_name", request.userName])
|
|
573
|
-
}, unmarshalListPrivilegesResponse);
|
|
574
|
-
/**
|
|
575
|
-
* 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`.
|
|
576
|
-
*
|
|
577
|
-
* @param request - The request {@link ListPrivilegesRequest}
|
|
578
|
-
* @returns A Promise of ListPrivilegesResponse
|
|
579
|
-
*/
|
|
580
|
-
listPrivileges = (request) => enrichForPagination("privileges", this.pageOfListPrivileges, request);
|
|
581
|
-
/**
|
|
582
|
-
* 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.
|
|
583
|
-
*
|
|
584
|
-
* @param request - The request {@link SetPrivilegeRequest}
|
|
585
|
-
* @returns A Promise of Privilege
|
|
586
|
-
*/
|
|
587
|
-
setPrivilege = (request) => this.client.fetch({
|
|
588
|
-
body: JSON.stringify(marshalSetPrivilegeRequest(request, this.client.settings)),
|
|
589
|
-
headers: jsonContentHeaders,
|
|
590
|
-
method: "PUT",
|
|
591
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/privileges`
|
|
592
|
-
}, unmarshalPrivilege);
|
|
593
|
-
pageOfListSnapshots = (request = {}) => this.client.fetch({
|
|
594
|
-
method: "GET",
|
|
595
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/snapshots`,
|
|
596
|
-
urlParams: urlParams(["instance_id", request.instanceId], ["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
597
|
-
}, unmarshalListSnapshotsResponse);
|
|
598
|
-
/**
|
|
599
|
-
* 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.
|
|
600
|
-
*
|
|
601
|
-
* @param request - The request {@link ListSnapshotsRequest}
|
|
602
|
-
* @returns A Promise of ListSnapshotsResponse
|
|
603
|
-
*/
|
|
604
|
-
listSnapshots = (request = {}) => enrichForPagination("snapshots", this.pageOfListSnapshots, request);
|
|
605
|
-
/**
|
|
606
|
-
* 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.
|
|
607
|
-
*
|
|
608
|
-
* @param request - The request {@link GetSnapshotRequest}
|
|
609
|
-
* @returns A Promise of Snapshot
|
|
610
|
-
*/
|
|
611
|
-
getSnapshot = (request) => this.client.fetch({
|
|
612
|
-
method: "GET",
|
|
613
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/snapshots/${validatePathParam("snapshotId", request.snapshotId)}`
|
|
614
|
-
}, unmarshalSnapshot);
|
|
615
|
-
/**
|
|
616
|
-
* Waits for {@link Snapshot} to be in a final state.
|
|
617
|
-
*
|
|
618
|
-
* @param request - The request {@link GetSnapshotRequest}
|
|
619
|
-
* @param options - The waiting options
|
|
620
|
-
* @returns A Promise of Snapshot
|
|
621
|
-
*/
|
|
622
|
-
waitForSnapshot = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status))), this.getSnapshot, request, options);
|
|
623
|
-
/**
|
|
624
|
-
* Create a Database Instance snapshot. Create a new snapshot of a Database Instance. You must define the `name` parameter in the request.
|
|
625
|
-
*
|
|
626
|
-
* @param request - The request {@link CreateSnapshotRequest}
|
|
627
|
-
* @returns A Promise of Snapshot
|
|
628
|
-
*/
|
|
629
|
-
createSnapshot = (request) => this.client.fetch({
|
|
630
|
-
body: JSON.stringify(marshalCreateSnapshotRequest(request, this.client.settings)),
|
|
631
|
-
headers: jsonContentHeaders,
|
|
632
|
-
method: "POST",
|
|
633
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/snapshots`
|
|
634
|
-
}, unmarshalSnapshot);
|
|
635
|
-
/**
|
|
636
|
-
* Update a Database Instance snapshot. Update the parameters of a snapshot of a Database Instance. You can update the `name` and `expires_at` parameters.
|
|
637
|
-
*
|
|
638
|
-
* @param request - The request {@link UpdateSnapshotRequest}
|
|
639
|
-
* @returns A Promise of Snapshot
|
|
640
|
-
*/
|
|
641
|
-
updateSnapshot = (request) => this.client.fetch({
|
|
642
|
-
body: JSON.stringify(marshalUpdateSnapshotRequest(request, this.client.settings)),
|
|
643
|
-
headers: jsonContentHeaders,
|
|
644
|
-
method: "PATCH",
|
|
645
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/snapshots/${validatePathParam("snapshotId", request.snapshotId)}`
|
|
646
|
-
}, unmarshalSnapshot);
|
|
647
|
-
/**
|
|
648
|
-
* 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.
|
|
649
|
-
*
|
|
650
|
-
* @param request - The request {@link DeleteSnapshotRequest}
|
|
651
|
-
* @returns A Promise of Snapshot
|
|
652
|
-
*/
|
|
653
|
-
deleteSnapshot = (request) => this.client.fetch({
|
|
654
|
-
method: "DELETE",
|
|
655
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/snapshots/${validatePathParam("snapshotId", request.snapshotId)}`
|
|
656
|
-
}, unmarshalSnapshot);
|
|
657
|
-
/**
|
|
658
|
-
* 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.
|
|
659
|
-
*
|
|
660
|
-
* @param request - The request {@link CreateInstanceFromSnapshotRequest}
|
|
661
|
-
* @returns A Promise of Instance
|
|
662
|
-
*/
|
|
663
|
-
createInstanceFromSnapshot = (request) => this.client.fetch({
|
|
664
|
-
body: JSON.stringify(marshalCreateInstanceFromSnapshotRequest(request, this.client.settings)),
|
|
665
|
-
headers: jsonContentHeaders,
|
|
666
|
-
method: "POST",
|
|
667
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/snapshots/${validatePathParam("snapshotId", request.snapshotId)}/create-instance`
|
|
668
|
-
}, unmarshalInstance);
|
|
669
|
-
/**
|
|
670
|
-
* 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.
|
|
671
|
-
*
|
|
672
|
-
* @param request - The request {@link CreateEndpointRequest}
|
|
673
|
-
* @returns A Promise of Endpoint
|
|
674
|
-
*/
|
|
675
|
-
createEndpoint = (request) => this.client.fetch({
|
|
676
|
-
body: JSON.stringify(marshalCreateEndpointRequest(request, this.client.settings)),
|
|
677
|
-
headers: jsonContentHeaders,
|
|
678
|
-
method: "POST",
|
|
679
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/endpoints`
|
|
680
|
-
}, unmarshalEndpoint);
|
|
681
|
-
/**
|
|
682
|
-
* 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.
|
|
683
|
-
*
|
|
684
|
-
* @param request - The request {@link DeleteEndpointRequest}
|
|
685
|
-
*/
|
|
686
|
-
deleteEndpoint = (request) => this.client.fetch({
|
|
687
|
-
method: "DELETE",
|
|
688
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam("endpointId", request.endpointId)}`
|
|
689
|
-
});
|
|
690
|
-
/**
|
|
691
|
-
* 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.
|
|
692
|
-
*
|
|
693
|
-
* @param request - The request {@link GetEndpointRequest}
|
|
694
|
-
* @returns A Promise of Endpoint
|
|
695
|
-
*/
|
|
696
|
-
getEndpoint = (request) => this.client.fetch({
|
|
697
|
-
method: "GET",
|
|
698
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam("endpointId", request.endpointId)}`
|
|
699
|
-
}, unmarshalEndpoint);
|
|
700
|
-
/**
|
|
701
|
-
* Migrate an existing instance endpoint to another instance.
|
|
702
|
-
*
|
|
703
|
-
* @param request - The request {@link MigrateEndpointRequest}
|
|
704
|
-
* @returns A Promise of Endpoint
|
|
705
|
-
*/
|
|
706
|
-
migrateEndpoint = (request) => this.client.fetch({
|
|
707
|
-
body: JSON.stringify(marshalMigrateEndpointRequest(request, this.client.settings)),
|
|
708
|
-
headers: jsonContentHeaders,
|
|
709
|
-
method: "POST",
|
|
710
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam("endpointId", request.endpointId)}/migrate`
|
|
711
|
-
}, unmarshalEndpoint);
|
|
712
|
-
/**
|
|
713
|
-
* 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.
|
|
714
|
-
*
|
|
715
|
-
* @param request - The request {@link ApplyInstanceMaintenanceRequest}
|
|
716
|
-
* @returns A Promise of Maintenance
|
|
717
|
-
*/
|
|
718
|
-
applyInstanceMaintenance = (request) => this.client.fetch({
|
|
719
|
-
body: "{}",
|
|
720
|
-
headers: jsonContentHeaders,
|
|
721
|
-
method: "POST",
|
|
722
|
-
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/apply-maintenance`
|
|
723
|
-
}, unmarshalMaintenance);
|
|
12
|
+
constructor(..._args) {
|
|
13
|
+
super(..._args);
|
|
14
|
+
this.pageOfListDatabaseEngines = (request = {}) => this.client.fetch({
|
|
15
|
+
method: "GET",
|
|
16
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/database-engines`,
|
|
17
|
+
urlParams: urlParams(["name", request.name], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["version", request.version])
|
|
18
|
+
}, unmarshalListDatabaseEnginesResponse);
|
|
19
|
+
this.listDatabaseEngines = (request = {}) => enrichForPagination("engines", this.pageOfListDatabaseEngines, request);
|
|
20
|
+
this.pageOfListNodeTypes = (request) => this.client.fetch({
|
|
21
|
+
method: "GET",
|
|
22
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/node-types`,
|
|
23
|
+
urlParams: urlParams(["include_disabled_types", request.includeDisabledTypes], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
24
|
+
}, unmarshalListNodeTypesResponse);
|
|
25
|
+
this.listNodeTypes = (request) => enrichForPagination("nodeTypes", this.pageOfListNodeTypes, request);
|
|
26
|
+
this.pageOfListDatabaseBackups = (request = {}) => this.client.fetch({
|
|
27
|
+
method: "GET",
|
|
28
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backups`,
|
|
29
|
+
urlParams: urlParams(["instance_id", request.instanceId], ["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
30
|
+
}, unmarshalListDatabaseBackupsResponse);
|
|
31
|
+
this.listDatabaseBackups = (request = {}) => enrichForPagination("databaseBackups", this.pageOfListDatabaseBackups, request);
|
|
32
|
+
this.createDatabaseBackup = (request) => this.client.fetch({
|
|
33
|
+
body: JSON.stringify(marshalCreateDatabaseBackupRequest(request, this.client.settings)),
|
|
34
|
+
headers: jsonContentHeaders,
|
|
35
|
+
method: "POST",
|
|
36
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backups`
|
|
37
|
+
}, unmarshalDatabaseBackup);
|
|
38
|
+
this.getDatabaseBackup = (request) => this.client.fetch({
|
|
39
|
+
method: "GET",
|
|
40
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backups/${validatePathParam("databaseBackupId", request.databaseBackupId)}`
|
|
41
|
+
}, unmarshalDatabaseBackup);
|
|
42
|
+
this.waitForDatabaseBackup = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!DATABASE_BACKUP_TRANSIENT_STATUSES.includes(res.status))), this.getDatabaseBackup, request, options);
|
|
43
|
+
this.updateDatabaseBackup = (request) => this.client.fetch({
|
|
44
|
+
body: JSON.stringify(marshalUpdateDatabaseBackupRequest(request, this.client.settings)),
|
|
45
|
+
headers: jsonContentHeaders,
|
|
46
|
+
method: "PATCH",
|
|
47
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backups/${validatePathParam("databaseBackupId", request.databaseBackupId)}`
|
|
48
|
+
}, unmarshalDatabaseBackup);
|
|
49
|
+
this.deleteDatabaseBackup = (request) => this.client.fetch({
|
|
50
|
+
method: "DELETE",
|
|
51
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backups/${validatePathParam("databaseBackupId", request.databaseBackupId)}`
|
|
52
|
+
}, unmarshalDatabaseBackup);
|
|
53
|
+
this.restoreDatabaseBackup = (request) => this.client.fetch({
|
|
54
|
+
body: JSON.stringify(marshalRestoreDatabaseBackupRequest(request, this.client.settings)),
|
|
55
|
+
headers: jsonContentHeaders,
|
|
56
|
+
method: "POST",
|
|
57
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backups/${validatePathParam("databaseBackupId", request.databaseBackupId)}/restore`
|
|
58
|
+
}, unmarshalDatabaseBackup);
|
|
59
|
+
this.exportDatabaseBackup = (request) => this.client.fetch({
|
|
60
|
+
body: "{}",
|
|
61
|
+
headers: jsonContentHeaders,
|
|
62
|
+
method: "POST",
|
|
63
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backups/${validatePathParam("databaseBackupId", request.databaseBackupId)}/export`
|
|
64
|
+
}, unmarshalDatabaseBackup);
|
|
65
|
+
this.upgradeInstance = (request) => this.client.fetch({
|
|
66
|
+
body: JSON.stringify(marshalUpgradeInstanceRequest(request, this.client.settings)),
|
|
67
|
+
headers: jsonContentHeaders,
|
|
68
|
+
method: "POST",
|
|
69
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/upgrade`
|
|
70
|
+
}, unmarshalInstance);
|
|
71
|
+
this.pageOfListInstances = (request = {}) => this.client.fetch({
|
|
72
|
+
method: "GET",
|
|
73
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances`,
|
|
74
|
+
urlParams: urlParams(["has_maintenances", request.hasMaintenances], ["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["tags", request.tags])
|
|
75
|
+
}, unmarshalListInstancesResponse);
|
|
76
|
+
this.listInstances = (request = {}) => enrichForPagination("instances", this.pageOfListInstances, request);
|
|
77
|
+
this.getInstance = (request) => this.client.fetch({
|
|
78
|
+
method: "GET",
|
|
79
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}`
|
|
80
|
+
}, unmarshalInstance);
|
|
81
|
+
this.waitForInstance = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!INSTANCE_TRANSIENT_STATUSES.includes(res.status))), this.getInstance, request, options);
|
|
82
|
+
this.createInstance = (request) => this.client.fetch({
|
|
83
|
+
body: JSON.stringify(marshalCreateInstanceRequest(request, this.client.settings)),
|
|
84
|
+
headers: jsonContentHeaders,
|
|
85
|
+
method: "POST",
|
|
86
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances`
|
|
87
|
+
}, unmarshalInstance);
|
|
88
|
+
this.updateInstance = (request) => this.client.fetch({
|
|
89
|
+
body: JSON.stringify(marshalUpdateInstanceRequest(request, this.client.settings)),
|
|
90
|
+
headers: jsonContentHeaders,
|
|
91
|
+
method: "PATCH",
|
|
92
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}`
|
|
93
|
+
}, unmarshalInstance);
|
|
94
|
+
this.deleteInstance = (request) => this.client.fetch({
|
|
95
|
+
method: "DELETE",
|
|
96
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}`
|
|
97
|
+
}, unmarshalInstance);
|
|
98
|
+
this.cloneInstance = (request) => this.client.fetch({
|
|
99
|
+
body: JSON.stringify(marshalCloneInstanceRequest(request, this.client.settings)),
|
|
100
|
+
headers: jsonContentHeaders,
|
|
101
|
+
method: "POST",
|
|
102
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/clone`
|
|
103
|
+
}, unmarshalInstance);
|
|
104
|
+
this.restartInstance = (request) => this.client.fetch({
|
|
105
|
+
body: "{}",
|
|
106
|
+
headers: jsonContentHeaders,
|
|
107
|
+
method: "POST",
|
|
108
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/restart`
|
|
109
|
+
}, unmarshalInstance);
|
|
110
|
+
this.getInstanceCertificate = (request) => this.client.fetch({
|
|
111
|
+
method: "GET",
|
|
112
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/certificate`,
|
|
113
|
+
urlParams: urlParams(["dl", 1]),
|
|
114
|
+
responseType: "blob"
|
|
115
|
+
});
|
|
116
|
+
this.renewInstanceCertificate = (request) => this.client.fetch({
|
|
117
|
+
body: "{}",
|
|
118
|
+
headers: jsonContentHeaders,
|
|
119
|
+
method: "POST",
|
|
120
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/renew-certificate`
|
|
121
|
+
});
|
|
122
|
+
this.getInstanceMetrics = (request) => this.client.fetch({
|
|
123
|
+
method: "GET",
|
|
124
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/metrics`,
|
|
125
|
+
urlParams: urlParams(["end_date", request.endDate], ["metric_name", request.metricName], ["start_date", request.startDate])
|
|
126
|
+
}, unmarshalInstanceMetrics);
|
|
127
|
+
this.createReadReplica = (request) => this.client.fetch({
|
|
128
|
+
body: JSON.stringify(marshalCreateReadReplicaRequest(request, this.client.settings)),
|
|
129
|
+
headers: jsonContentHeaders,
|
|
130
|
+
method: "POST",
|
|
131
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/read-replicas`
|
|
132
|
+
}, unmarshalReadReplica);
|
|
133
|
+
this.getReadReplica = (request) => this.client.fetch({
|
|
134
|
+
method: "GET",
|
|
135
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/read-replicas/${validatePathParam("readReplicaId", request.readReplicaId)}`
|
|
136
|
+
}, unmarshalReadReplica);
|
|
137
|
+
this.waitForReadReplica = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!READ_REPLICA_TRANSIENT_STATUSES.includes(res.status))), this.getReadReplica, request, options);
|
|
138
|
+
this.deleteReadReplica = (request) => this.client.fetch({
|
|
139
|
+
method: "DELETE",
|
|
140
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/read-replicas/${validatePathParam("readReplicaId", request.readReplicaId)}`
|
|
141
|
+
}, unmarshalReadReplica);
|
|
142
|
+
this.resetReadReplica = (request) => this.client.fetch({
|
|
143
|
+
body: "{}",
|
|
144
|
+
headers: jsonContentHeaders,
|
|
145
|
+
method: "POST",
|
|
146
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/read-replicas/${validatePathParam("readReplicaId", request.readReplicaId)}/reset`
|
|
147
|
+
}, unmarshalReadReplica);
|
|
148
|
+
this.promoteReadReplica = (request) => this.client.fetch({
|
|
149
|
+
body: "{}",
|
|
150
|
+
headers: jsonContentHeaders,
|
|
151
|
+
method: "POST",
|
|
152
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/read-replicas/${validatePathParam("readReplicaId", request.readReplicaId)}/promote`
|
|
153
|
+
}, unmarshalInstance);
|
|
154
|
+
this.createReadReplicaEndpoint = (request) => this.client.fetch({
|
|
155
|
+
body: JSON.stringify(marshalCreateReadReplicaEndpointRequest(request, this.client.settings)),
|
|
156
|
+
headers: jsonContentHeaders,
|
|
157
|
+
method: "POST",
|
|
158
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/read-replicas/${validatePathParam("readReplicaId", request.readReplicaId)}/endpoints`
|
|
159
|
+
}, unmarshalReadReplica);
|
|
160
|
+
this.prepareInstanceLogs = (request) => this.client.fetch({
|
|
161
|
+
body: JSON.stringify(marshalPrepareInstanceLogsRequest(request, this.client.settings)),
|
|
162
|
+
headers: jsonContentHeaders,
|
|
163
|
+
method: "POST",
|
|
164
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/prepare-logs`
|
|
165
|
+
}, unmarshalPrepareInstanceLogsResponse);
|
|
166
|
+
this.listInstanceLogs = (request) => this.client.fetch({
|
|
167
|
+
method: "GET",
|
|
168
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/logs`,
|
|
169
|
+
urlParams: urlParams(["order_by", request.orderBy])
|
|
170
|
+
}, unmarshalListInstanceLogsResponse);
|
|
171
|
+
this.getInstanceLog = (request) => this.client.fetch({
|
|
172
|
+
method: "GET",
|
|
173
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/logs/${validatePathParam("instanceLogId", request.instanceLogId)}`
|
|
174
|
+
}, unmarshalInstanceLog);
|
|
175
|
+
this.waitForInstanceLog = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!INSTANCE_LOG_TRANSIENT_STATUSES.includes(res.status))), this.getInstanceLog, request, options);
|
|
176
|
+
this.purgeInstanceLogs = (request) => this.client.fetch({
|
|
177
|
+
body: JSON.stringify(marshalPurgeInstanceLogsRequest(request, this.client.settings)),
|
|
178
|
+
headers: jsonContentHeaders,
|
|
179
|
+
method: "POST",
|
|
180
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/purge-logs`
|
|
181
|
+
});
|
|
182
|
+
this.listInstanceLogsDetails = (request) => this.client.fetch({
|
|
183
|
+
method: "GET",
|
|
184
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/logs-details`
|
|
185
|
+
}, unmarshalListInstanceLogsDetailsResponse);
|
|
186
|
+
this.addInstanceSettings = (request) => this.client.fetch({
|
|
187
|
+
body: JSON.stringify(marshalAddInstanceSettingsRequest(request, this.client.settings)),
|
|
188
|
+
headers: jsonContentHeaders,
|
|
189
|
+
method: "POST",
|
|
190
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/settings`
|
|
191
|
+
}, unmarshalAddInstanceSettingsResponse);
|
|
192
|
+
this.deleteInstanceSettings = (request) => this.client.fetch({
|
|
193
|
+
body: JSON.stringify(marshalDeleteInstanceSettingsRequest(request, this.client.settings)),
|
|
194
|
+
headers: jsonContentHeaders,
|
|
195
|
+
method: "DELETE",
|
|
196
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/settings`
|
|
197
|
+
}, unmarshalDeleteInstanceSettingsResponse);
|
|
198
|
+
this.setInstanceSettings = (request) => this.client.fetch({
|
|
199
|
+
body: JSON.stringify(marshalSetInstanceSettingsRequest(request, this.client.settings)),
|
|
200
|
+
headers: jsonContentHeaders,
|
|
201
|
+
method: "PUT",
|
|
202
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/settings`
|
|
203
|
+
}, unmarshalSetInstanceSettingsResponse);
|
|
204
|
+
this.pageOfListInstanceACLRules = (request) => this.client.fetch({
|
|
205
|
+
method: "GET",
|
|
206
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/acls`,
|
|
207
|
+
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
208
|
+
}, unmarshalListInstanceACLRulesResponse);
|
|
209
|
+
this.listInstanceACLRules = (request) => enrichForPagination("rules", this.pageOfListInstanceACLRules, request);
|
|
210
|
+
this.addInstanceACLRules = (request) => this.client.fetch({
|
|
211
|
+
body: JSON.stringify(marshalAddInstanceACLRulesRequest(request, this.client.settings)),
|
|
212
|
+
headers: jsonContentHeaders,
|
|
213
|
+
method: "POST",
|
|
214
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/acls`
|
|
215
|
+
}, unmarshalAddInstanceACLRulesResponse);
|
|
216
|
+
this.setInstanceACLRules = (request) => this.client.fetch({
|
|
217
|
+
body: JSON.stringify(marshalSetInstanceACLRulesRequest(request, this.client.settings)),
|
|
218
|
+
headers: jsonContentHeaders,
|
|
219
|
+
method: "PUT",
|
|
220
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/acls`
|
|
221
|
+
}, unmarshalSetInstanceACLRulesResponse);
|
|
222
|
+
this.deleteInstanceACLRules = (request) => this.client.fetch({
|
|
223
|
+
body: JSON.stringify(marshalDeleteInstanceACLRulesRequest(request, this.client.settings)),
|
|
224
|
+
headers: jsonContentHeaders,
|
|
225
|
+
method: "DELETE",
|
|
226
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/acls`
|
|
227
|
+
}, unmarshalDeleteInstanceACLRulesResponse);
|
|
228
|
+
this.pageOfListUsers = (request) => this.client.fetch({
|
|
229
|
+
method: "GET",
|
|
230
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/users`,
|
|
231
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
232
|
+
}, unmarshalListUsersResponse);
|
|
233
|
+
this.listUsers = (request) => enrichForPagination("users", this.pageOfListUsers, request);
|
|
234
|
+
this.createUser = (request) => this.client.fetch({
|
|
235
|
+
body: JSON.stringify(marshalCreateUserRequest(request, this.client.settings)),
|
|
236
|
+
headers: jsonContentHeaders,
|
|
237
|
+
method: "POST",
|
|
238
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/users`
|
|
239
|
+
}, unmarshalUser);
|
|
240
|
+
this.updateUser = (request) => this.client.fetch({
|
|
241
|
+
body: JSON.stringify(marshalUpdateUserRequest(request, this.client.settings)),
|
|
242
|
+
headers: jsonContentHeaders,
|
|
243
|
+
method: "PATCH",
|
|
244
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/users/${validatePathParam("name", request.name)}`
|
|
245
|
+
}, unmarshalUser);
|
|
246
|
+
this.deleteUser = (request) => this.client.fetch({
|
|
247
|
+
method: "DELETE",
|
|
248
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/users/${validatePathParam("name", request.name)}`
|
|
249
|
+
});
|
|
250
|
+
this.pageOfListDatabases = (request) => this.client.fetch({
|
|
251
|
+
method: "GET",
|
|
252
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/databases`,
|
|
253
|
+
urlParams: urlParams(["managed", request.managed], ["name", request.name], ["order_by", request.orderBy], ["owner", request.owner], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["skip_size_retrieval", request.skipSizeRetrieval])
|
|
254
|
+
}, unmarshalListDatabasesResponse);
|
|
255
|
+
this.listDatabases = (request) => enrichForPagination("databases", this.pageOfListDatabases, request);
|
|
256
|
+
this.createDatabase = (request) => this.client.fetch({
|
|
257
|
+
body: JSON.stringify(marshalCreateDatabaseRequest(request, this.client.settings)),
|
|
258
|
+
headers: jsonContentHeaders,
|
|
259
|
+
method: "POST",
|
|
260
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/databases`
|
|
261
|
+
}, unmarshalDatabase);
|
|
262
|
+
this.deleteDatabase = (request) => this.client.fetch({
|
|
263
|
+
method: "DELETE",
|
|
264
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/databases/${validatePathParam("name", request.name)}`
|
|
265
|
+
});
|
|
266
|
+
this.pageOfListPrivileges = (request) => this.client.fetch({
|
|
267
|
+
method: "GET",
|
|
268
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/privileges`,
|
|
269
|
+
urlParams: urlParams(["database_name", request.databaseName], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["user_name", request.userName])
|
|
270
|
+
}, unmarshalListPrivilegesResponse);
|
|
271
|
+
this.listPrivileges = (request) => enrichForPagination("privileges", this.pageOfListPrivileges, request);
|
|
272
|
+
this.setPrivilege = (request) => this.client.fetch({
|
|
273
|
+
body: JSON.stringify(marshalSetPrivilegeRequest(request, this.client.settings)),
|
|
274
|
+
headers: jsonContentHeaders,
|
|
275
|
+
method: "PUT",
|
|
276
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/privileges`
|
|
277
|
+
}, unmarshalPrivilege);
|
|
278
|
+
this.pageOfListSnapshots = (request = {}) => this.client.fetch({
|
|
279
|
+
method: "GET",
|
|
280
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/snapshots`,
|
|
281
|
+
urlParams: urlParams(["instance_id", request.instanceId], ["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
282
|
+
}, unmarshalListSnapshotsResponse);
|
|
283
|
+
this.listSnapshots = (request = {}) => enrichForPagination("snapshots", this.pageOfListSnapshots, request);
|
|
284
|
+
this.getSnapshot = (request) => this.client.fetch({
|
|
285
|
+
method: "GET",
|
|
286
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/snapshots/${validatePathParam("snapshotId", request.snapshotId)}`
|
|
287
|
+
}, unmarshalSnapshot);
|
|
288
|
+
this.waitForSnapshot = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status))), this.getSnapshot, request, options);
|
|
289
|
+
this.createSnapshot = (request) => this.client.fetch({
|
|
290
|
+
body: JSON.stringify(marshalCreateSnapshotRequest(request, this.client.settings)),
|
|
291
|
+
headers: jsonContentHeaders,
|
|
292
|
+
method: "POST",
|
|
293
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/snapshots`
|
|
294
|
+
}, unmarshalSnapshot);
|
|
295
|
+
this.updateSnapshot = (request) => this.client.fetch({
|
|
296
|
+
body: JSON.stringify(marshalUpdateSnapshotRequest(request, this.client.settings)),
|
|
297
|
+
headers: jsonContentHeaders,
|
|
298
|
+
method: "PATCH",
|
|
299
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/snapshots/${validatePathParam("snapshotId", request.snapshotId)}`
|
|
300
|
+
}, unmarshalSnapshot);
|
|
301
|
+
this.deleteSnapshot = (request) => this.client.fetch({
|
|
302
|
+
method: "DELETE",
|
|
303
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/snapshots/${validatePathParam("snapshotId", request.snapshotId)}`
|
|
304
|
+
}, unmarshalSnapshot);
|
|
305
|
+
this.createInstanceFromSnapshot = (request) => this.client.fetch({
|
|
306
|
+
body: JSON.stringify(marshalCreateInstanceFromSnapshotRequest(request, this.client.settings)),
|
|
307
|
+
headers: jsonContentHeaders,
|
|
308
|
+
method: "POST",
|
|
309
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/snapshots/${validatePathParam("snapshotId", request.snapshotId)}/create-instance`
|
|
310
|
+
}, unmarshalInstance);
|
|
311
|
+
this.createEndpoint = (request) => this.client.fetch({
|
|
312
|
+
body: JSON.stringify(marshalCreateEndpointRequest(request, this.client.settings)),
|
|
313
|
+
headers: jsonContentHeaders,
|
|
314
|
+
method: "POST",
|
|
315
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/endpoints`
|
|
316
|
+
}, unmarshalEndpoint);
|
|
317
|
+
this.deleteEndpoint = (request) => this.client.fetch({
|
|
318
|
+
method: "DELETE",
|
|
319
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam("endpointId", request.endpointId)}`
|
|
320
|
+
});
|
|
321
|
+
this.getEndpoint = (request) => this.client.fetch({
|
|
322
|
+
method: "GET",
|
|
323
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam("endpointId", request.endpointId)}`
|
|
324
|
+
}, unmarshalEndpoint);
|
|
325
|
+
this.migrateEndpoint = (request) => this.client.fetch({
|
|
326
|
+
body: JSON.stringify(marshalMigrateEndpointRequest(request, this.client.settings)),
|
|
327
|
+
headers: jsonContentHeaders,
|
|
328
|
+
method: "POST",
|
|
329
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam("endpointId", request.endpointId)}/migrate`
|
|
330
|
+
}, unmarshalEndpoint);
|
|
331
|
+
this.applyInstanceMaintenance = (request) => this.client.fetch({
|
|
332
|
+
body: "{}",
|
|
333
|
+
headers: jsonContentHeaders,
|
|
334
|
+
method: "POST",
|
|
335
|
+
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/apply-maintenance`
|
|
336
|
+
}, unmarshalMaintenance);
|
|
337
|
+
}
|
|
338
|
+
static {
|
|
339
|
+
this.LOCALITY = toApiLocality({ regions: [
|
|
340
|
+
"fr-par",
|
|
341
|
+
"nl-ams",
|
|
342
|
+
"pl-waw"
|
|
343
|
+
] });
|
|
344
|
+
}
|
|
724
345
|
};
|
|
725
346
|
//#endregion
|
|
726
347
|
export { API };
|