@scaleway/sdk-dedibox 2.5.0 → 2.6.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 +564 -874
- package/dist/v1/content.gen.js +9 -9
- package/dist/v1/marshalling.gen.js +123 -123
- package/dist/v1/metadata.gen.js +1 -1
- package/dist/v1/validation-rules.gen.js +85 -85
- 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,914 +2,604 @@ import { BMC_ACCESS_TRANSIENT_STATUSES, RPN_SAN_TRANSIENT_STATUSES, RPN_V2_GROUP
|
|
|
2
2
|
import { marshalAttachFailoverIPToMacAddressRequest, marshalAttachFailoverIPsRequest, marshalCreateFailoverIPsRequest, marshalCreateServerRequest, marshalDetachFailoverIPsRequest, marshalIPv6BlockApiCreateIPv6BlockRequest, marshalIPv6BlockApiCreateIPv6BlockSubnetRequest, marshalIPv6BlockApiUpdateIPv6BlockRequest, marshalInstallServerRequest, marshalRpnSanApiAddIpRequest, marshalRpnSanApiCreateRpnSanRequest, marshalRpnSanApiRemoveIpRequest, marshalRpnV1ApiAddRpnGroupMembersRequest, marshalRpnV1ApiCreateRpnGroupRequest, marshalRpnV1ApiDeleteRpnGroupMembersRequest, marshalRpnV1ApiLeaveRpnGroupRequest, marshalRpnV1ApiRpnGroupInviteRequest, marshalRpnV1ApiUpdateRpnGroupNameRequest, marshalRpnV2ApiAddRpnV2MembersRequest, marshalRpnV2ApiCreateRpnV2GroupRequest, marshalRpnV2ApiDeleteRpnV2MembersRequest, marshalRpnV2ApiEnableRpnV2GroupCompatibilityRequest, marshalRpnV2ApiUpdateRpnV2GroupNameRequest, marshalRpnV2ApiUpdateRpnV2VlanForMembersRequest, marshalStartBMCAccessRequest, marshalStartRescueRequest, marshalSubscribeServerOptionRequest, marshalSubscribeStorageOptionsRequest, marshalUpdateRaidRequest, marshalUpdateReverseRequest, marshalUpdateServerBackupRequest, marshalUpdateServerRequest, marshalUpdateServerTagsRequest, unmarshalBMCAccess, unmarshalBackup, unmarshalCanOrderResponse, unmarshalCreateFailoverIPsResponse, unmarshalFailoverIP, unmarshalGetIPv6BlockQuotasResponse, unmarshalGetRemainingQuotaResponse, unmarshalGetRpnStatusResponse, unmarshalIP, unmarshalIPv6Block, unmarshalInvoice, unmarshalListFailoverIPsResponse, unmarshalListIPv6BlockSubnetsAvailableResponse, unmarshalListIPv6BlocksResponse, unmarshalListInvoicesResponse, unmarshalListIpsResponse, unmarshalListOSResponse, unmarshalListOffersResponse, unmarshalListRefundsResponse, unmarshalListRpnCapableSanServersResponse, unmarshalListRpnCapableServersResponse, unmarshalListRpnGroupMembersResponse, unmarshalListRpnGroupsResponse, unmarshalListRpnInvitesResponse, unmarshalListRpnSansResponse, unmarshalListRpnServerCapabilitiesResponse, unmarshalListRpnV2CapableResourcesResponse, unmarshalListRpnV2GroupLogsResponse, unmarshalListRpnV2GroupsResponse, unmarshalListRpnV2MembersResponse, unmarshalListServerDisksResponse, unmarshalListServerEventsResponse, unmarshalListServersResponse, unmarshalListServicesResponse, unmarshalListSubscribableServerOptionsResponse, unmarshalOS, unmarshalOffer, unmarshalRaid, unmarshalRefund, unmarshalRescue, unmarshalRpnGroup, unmarshalRpnSan, unmarshalRpnV2Group, unmarshalServer, unmarshalServerDefaultPartitioning, unmarshalServerInstall, unmarshalService, unmarshalSubscribeStorageOptionsResponse } 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
|
* Dedibox Phoenix API.
|
|
8
8
|
*/
|
|
9
9
|
var API = class extends API$1 {
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/cancel-install`
|
|
267
|
-
});
|
|
268
|
-
/**
|
|
269
|
-
* Get server default partitioning. Get the server default partitioning schema associated with the given server ID and OS ID.
|
|
270
|
-
*
|
|
271
|
-
* @param request - The request {@link GetServerDefaultPartitioningRequest}
|
|
272
|
-
* @returns A Promise of ServerDefaultPartitioning
|
|
273
|
-
*/
|
|
274
|
-
getServerDefaultPartitioning = (request) => this.client.fetch({
|
|
275
|
-
method: "GET",
|
|
276
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/partitioning/${validatePathParam("osId", request.osId)}`
|
|
277
|
-
}, unmarshalServerDefaultPartitioning);
|
|
278
|
-
/**
|
|
279
|
-
* Start BMC (Baseboard Management Controller) access for a given baremetal server. Start BMC (Baseboard Management Controller) access associated with the given ID.
|
|
280
|
-
The BMC (Baseboard Management Controller) access is available one hour after the installation of the server.
|
|
281
|
-
*
|
|
282
|
-
* @param request - The request {@link StartBMCAccessRequest}
|
|
283
|
-
*/
|
|
284
|
-
startBMCAccess = (request) => this.client.fetch({
|
|
285
|
-
body: JSON.stringify(marshalStartBMCAccessRequest(request, this.client.settings)),
|
|
286
|
-
headers: jsonContentHeaders,
|
|
287
|
-
method: "POST",
|
|
288
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/bmc-access`
|
|
289
|
-
});
|
|
290
|
-
/**
|
|
291
|
-
* Get BMC (Baseboard Management Controller) access for a given baremetal server. Get the BMC (Baseboard Management Controller) access associated with the given ID.
|
|
292
|
-
*
|
|
293
|
-
* @param request - The request {@link GetBMCAccessRequest}
|
|
294
|
-
* @returns A Promise of BMCAccess
|
|
295
|
-
*/
|
|
296
|
-
getBMCAccess = (request) => this.client.fetch({
|
|
297
|
-
method: "GET",
|
|
298
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/bmc-access`
|
|
299
|
-
}, unmarshalBMCAccess);
|
|
300
|
-
/**
|
|
301
|
-
* Waits for {@link BMCAccess} to be in a final state.
|
|
302
|
-
*
|
|
303
|
-
* @param request - The request {@link GetBMCAccessRequest}
|
|
304
|
-
* @param options - The waiting options
|
|
305
|
-
* @returns A Promise of BMCAccess
|
|
306
|
-
*/
|
|
307
|
-
waitForBMCAccess = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!BMC_ACCESS_TRANSIENT_STATUSES.includes(res.status))), this.getBMCAccess, request, options);
|
|
308
|
-
/**
|
|
309
|
-
* Stop BMC (Baseboard Management Controller) access for a given baremetal server. Stop BMC (Baseboard Management Controller) access associated with the given ID.
|
|
310
|
-
*
|
|
311
|
-
* @param request - The request {@link StopBMCAccessRequest}
|
|
312
|
-
*/
|
|
313
|
-
stopBMCAccess = (request) => this.client.fetch({
|
|
314
|
-
method: "DELETE",
|
|
315
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/bmc-access`
|
|
316
|
-
});
|
|
317
|
-
pageOfListOffers = (request = {}) => this.client.fetch({
|
|
318
|
-
method: "GET",
|
|
319
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/offers`,
|
|
320
|
-
urlParams: urlParams(["available_only", request.availableOnly], ["catalog", request.catalog], ["commercial_range", request.commercialRange], ["is_failover_block", request.isFailoverBlock], ["is_failover_ip", request.isFailoverIp], ["is_rpn_san", request.isRpnSan], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["sold_in", request.soldIn && request.soldIn.length > 0 ? request.soldIn.join(",") : void 0])
|
|
321
|
-
}, unmarshalListOffersResponse);
|
|
322
|
-
/**
|
|
323
|
-
* List offers. List all available server offers.
|
|
324
|
-
*
|
|
325
|
-
* @param request - The request {@link ListOffersRequest}
|
|
326
|
-
* @returns A Promise of ListOffersResponse
|
|
327
|
-
*/
|
|
328
|
-
listOffers = (request = {}) => enrichForPagination("offers", this.pageOfListOffers, request);
|
|
329
|
-
/**
|
|
330
|
-
* Get offer. Return specific offer for the given ID.
|
|
331
|
-
*
|
|
332
|
-
* @param request - The request {@link GetOfferRequest}
|
|
333
|
-
* @returns A Promise of Offer
|
|
334
|
-
*/
|
|
335
|
-
getOffer = (request) => this.client.fetch({
|
|
336
|
-
method: "GET",
|
|
337
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/offers/${validatePathParam("offerId", request.offerId)}`,
|
|
338
|
-
urlParams: urlParams(["project_id", request.projectId])
|
|
339
|
-
}, unmarshalOffer);
|
|
340
|
-
pageOfListOS = (request) => this.client.fetch({
|
|
341
|
-
method: "GET",
|
|
342
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/os`,
|
|
343
|
-
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["server_id", request.serverId], ["type", request.type])
|
|
344
|
-
}, unmarshalListOSResponse);
|
|
345
|
-
/**
|
|
346
|
-
* List all available OS that can be install on a baremetal server.
|
|
347
|
-
*
|
|
348
|
-
* @param request - The request {@link ListOSRequest}
|
|
349
|
-
* @returns A Promise of ListOSResponse
|
|
350
|
-
*/
|
|
351
|
-
listOS = (request) => enrichForPagination("os", this.pageOfListOS, request);
|
|
352
|
-
/**
|
|
353
|
-
* Get an OS with a given ID. Return specific OS for the given ID.
|
|
354
|
-
*
|
|
355
|
-
* @param request - The request {@link GetOSRequest}
|
|
356
|
-
* @returns A Promise of OS
|
|
357
|
-
*/
|
|
358
|
-
getOS = (request) => this.client.fetch({
|
|
359
|
-
method: "GET",
|
|
360
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/os/${validatePathParam("osId", request.osId)}`,
|
|
361
|
-
urlParams: urlParams(["project_id", request.projectId], ["server_id", request.serverId])
|
|
362
|
-
}, unmarshalOS);
|
|
363
|
-
/**
|
|
364
|
-
* Update reverse of ip. Update reverse of ip associated with the given ID.
|
|
365
|
-
*
|
|
366
|
-
* @param request - The request {@link UpdateReverseRequest}
|
|
367
|
-
* @returns A Promise of IP
|
|
368
|
-
*/
|
|
369
|
-
updateReverse = (request) => this.client.fetch({
|
|
370
|
-
body: JSON.stringify(marshalUpdateReverseRequest(request, this.client.settings)),
|
|
371
|
-
headers: jsonContentHeaders,
|
|
372
|
-
method: "PATCH",
|
|
373
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/reverses/${validatePathParam("ipId", request.ipId)}`
|
|
374
|
-
}, unmarshalIP);
|
|
375
|
-
/**
|
|
376
|
-
* Order failover IPs. Order X failover IPs.
|
|
377
|
-
*
|
|
378
|
-
* @param request - The request {@link CreateFailoverIPsRequest}
|
|
379
|
-
* @returns A Promise of CreateFailoverIPsResponse
|
|
380
|
-
*/
|
|
381
|
-
createFailoverIPs = (request) => this.client.fetch({
|
|
382
|
-
body: JSON.stringify(marshalCreateFailoverIPsRequest(request, this.client.settings)),
|
|
383
|
-
headers: jsonContentHeaders,
|
|
384
|
-
method: "POST",
|
|
385
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips`
|
|
386
|
-
}, unmarshalCreateFailoverIPsResponse);
|
|
387
|
-
/**
|
|
388
|
-
* Attach failovers on baremetal server. Attach failovers on the server associated with the given ID.
|
|
389
|
-
*
|
|
390
|
-
* @param request - The request {@link AttachFailoverIPsRequest}
|
|
391
|
-
*/
|
|
392
|
-
attachFailoverIPs = (request) => this.client.fetch({
|
|
393
|
-
body: JSON.stringify(marshalAttachFailoverIPsRequest(request, this.client.settings)),
|
|
394
|
-
headers: jsonContentHeaders,
|
|
395
|
-
method: "POST",
|
|
396
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips/attach`
|
|
397
|
-
});
|
|
398
|
-
/**
|
|
399
|
-
* Detach failovers on baremetal server. Detach failovers on the server associated with the given ID.
|
|
400
|
-
*
|
|
401
|
-
* @param request - The request {@link DetachFailoverIPsRequest}
|
|
402
|
-
*/
|
|
403
|
-
detachFailoverIPs = (request) => this.client.fetch({
|
|
404
|
-
body: JSON.stringify(marshalDetachFailoverIPsRequest(request, this.client.settings)),
|
|
405
|
-
headers: jsonContentHeaders,
|
|
406
|
-
method: "POST",
|
|
407
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips/detach`
|
|
408
|
-
});
|
|
409
|
-
/**
|
|
410
|
-
* Attach a failover IP to a MAC address.
|
|
411
|
-
*
|
|
412
|
-
* @param request - The request {@link AttachFailoverIPToMacAddressRequest}
|
|
413
|
-
* @returns A Promise of IP
|
|
414
|
-
*/
|
|
415
|
-
attachFailoverIPToMacAddress = (request) => this.client.fetch({
|
|
416
|
-
body: JSON.stringify(marshalAttachFailoverIPToMacAddressRequest(request, this.client.settings)),
|
|
417
|
-
headers: jsonContentHeaders,
|
|
418
|
-
method: "POST",
|
|
419
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips/${validatePathParam("ipId", request.ipId)}/attach-to-mac-address`
|
|
420
|
-
}, unmarshalIP);
|
|
421
|
-
/**
|
|
422
|
-
* Detach a failover IP from a MAC address.
|
|
423
|
-
*
|
|
424
|
-
* @param request - The request {@link DetachFailoverIPFromMacAddressRequest}
|
|
425
|
-
* @returns A Promise of IP
|
|
426
|
-
*/
|
|
427
|
-
detachFailoverIPFromMacAddress = (request) => this.client.fetch({
|
|
428
|
-
body: "{}",
|
|
429
|
-
headers: jsonContentHeaders,
|
|
430
|
-
method: "POST",
|
|
431
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips/${validatePathParam("ipId", request.ipId)}/detach-from-mac-address`
|
|
432
|
-
}, unmarshalIP);
|
|
433
|
-
/**
|
|
434
|
-
* Delete a failover server. Delete the failover associated with the given ID.
|
|
435
|
-
*
|
|
436
|
-
* @param request - The request {@link DeleteFailoverIPRequest}
|
|
437
|
-
*/
|
|
438
|
-
deleteFailoverIP = (request) => this.client.fetch({
|
|
439
|
-
method: "DELETE",
|
|
440
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips/${validatePathParam("ipId", request.ipId)}`
|
|
441
|
-
});
|
|
442
|
-
pageOfListFailoverIPs = (request = {}) => this.client.fetch({
|
|
443
|
-
method: "GET",
|
|
444
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips`,
|
|
445
|
-
urlParams: urlParams(["only_available", request.onlyAvailable], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId ?? this.client.settings.defaultProjectId], ["search", request.search])
|
|
446
|
-
}, unmarshalListFailoverIPsResponse);
|
|
447
|
-
/**
|
|
448
|
-
* List failovers for project. List failovers servers for project.
|
|
449
|
-
*
|
|
450
|
-
* @param request - The request {@link ListFailoverIPsRequest}
|
|
451
|
-
* @returns A Promise of ListFailoverIPsResponse
|
|
452
|
-
*/
|
|
453
|
-
listFailoverIPs = (request = {}) => enrichForPagination("failoverIps", this.pageOfListFailoverIPs, request);
|
|
454
|
-
/**
|
|
455
|
-
* Get a specific baremetal server. Get the server associated with the given ID.
|
|
456
|
-
*
|
|
457
|
-
* @param request - The request {@link GetFailoverIPRequest}
|
|
458
|
-
* @returns A Promise of FailoverIP
|
|
459
|
-
*/
|
|
460
|
-
getFailoverIP = (request) => this.client.fetch({
|
|
461
|
-
method: "GET",
|
|
462
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips/${validatePathParam("ipId", request.ipId)}`
|
|
463
|
-
}, unmarshalFailoverIP);
|
|
464
|
-
/**
|
|
465
|
-
* Get remaining quota.
|
|
466
|
-
*
|
|
467
|
-
* @param request - The request {@link GetRemainingQuotaRequest}
|
|
468
|
-
* @returns A Promise of GetRemainingQuotaResponse
|
|
469
|
-
*/
|
|
470
|
-
getRemainingQuota = (request = {}) => this.client.fetch({
|
|
471
|
-
method: "GET",
|
|
472
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/remaining-quota`,
|
|
473
|
-
urlParams: urlParams(["project_id", request.projectId])
|
|
474
|
-
}, unmarshalGetRemainingQuotaResponse);
|
|
475
|
-
/**
|
|
476
|
-
* Get raid. Return raid for the given server ID.
|
|
477
|
-
*
|
|
478
|
-
* @param request - The request {@link GetRaidRequest}
|
|
479
|
-
* @returns A Promise of Raid
|
|
480
|
-
*/
|
|
481
|
-
getRaid = (request) => this.client.fetch({
|
|
482
|
-
method: "GET",
|
|
483
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/raid`
|
|
484
|
-
}, unmarshalRaid);
|
|
485
|
-
/**
|
|
486
|
-
* Update RAID. Update RAID associated with the given server ID.
|
|
487
|
-
*
|
|
488
|
-
* @param request - The request {@link UpdateRaidRequest}
|
|
489
|
-
*/
|
|
490
|
-
updateRaid = (request) => this.client.fetch({
|
|
491
|
-
body: JSON.stringify(marshalUpdateRaidRequest(request, this.client.settings)),
|
|
492
|
-
headers: jsonContentHeaders,
|
|
493
|
-
method: "POST",
|
|
494
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/update-raid`
|
|
495
|
-
});
|
|
496
|
-
/**
|
|
497
|
-
* Start in rescue baremetal server. Start in rescue the server associated with the given ID.
|
|
498
|
-
*
|
|
499
|
-
* @param request - The request {@link StartRescueRequest}
|
|
500
|
-
* @returns A Promise of Rescue
|
|
501
|
-
*/
|
|
502
|
-
startRescue = (request) => this.client.fetch({
|
|
503
|
-
body: JSON.stringify(marshalStartRescueRequest(request, this.client.settings)),
|
|
504
|
-
headers: jsonContentHeaders,
|
|
505
|
-
method: "POST",
|
|
506
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/rescue`
|
|
507
|
-
}, unmarshalRescue);
|
|
508
|
-
/**
|
|
509
|
-
* Get rescue information. Return rescue information for the given server ID.
|
|
510
|
-
*
|
|
511
|
-
* @param request - The request {@link GetRescueRequest}
|
|
512
|
-
* @returns A Promise of Rescue
|
|
513
|
-
*/
|
|
514
|
-
getRescue = (request) => this.client.fetch({
|
|
515
|
-
method: "GET",
|
|
516
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/rescue`
|
|
517
|
-
}, unmarshalRescue);
|
|
518
|
-
/**
|
|
519
|
-
* Stop rescue on baremetal server. Stop rescue on the server associated with the given ID.
|
|
520
|
-
*
|
|
521
|
-
* @param request - The request {@link StopRescueRequest}
|
|
522
|
-
*/
|
|
523
|
-
stopRescue = (request) => this.client.fetch({
|
|
524
|
-
method: "DELETE",
|
|
525
|
-
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/rescue`
|
|
526
|
-
});
|
|
10
|
+
constructor(..._args) {
|
|
11
|
+
super(..._args);
|
|
12
|
+
this.pageOfListServers = (request = {}) => this.client.fetch({
|
|
13
|
+
method: "GET",
|
|
14
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers`,
|
|
15
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId ?? this.client.settings.defaultProjectId], ["search", request.search])
|
|
16
|
+
}, unmarshalListServersResponse);
|
|
17
|
+
this.listServers = (request = {}) => enrichForPagination("servers", this.pageOfListServers, request);
|
|
18
|
+
this.getServer = (request) => this.client.fetch({
|
|
19
|
+
method: "GET",
|
|
20
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}`
|
|
21
|
+
}, unmarshalServer);
|
|
22
|
+
this.waitForServer = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!SERVER_TRANSIENT_STATUSES.includes(res.status))), this.getServer, request, options);
|
|
23
|
+
this.getServerBackup = (request) => this.client.fetch({
|
|
24
|
+
method: "GET",
|
|
25
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/backups`
|
|
26
|
+
}, unmarshalBackup);
|
|
27
|
+
this.updateServerBackup = (request) => this.client.fetch({
|
|
28
|
+
body: JSON.stringify(marshalUpdateServerBackupRequest(request, this.client.settings)),
|
|
29
|
+
headers: jsonContentHeaders,
|
|
30
|
+
method: "PATCH",
|
|
31
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/backups`
|
|
32
|
+
}, unmarshalBackup);
|
|
33
|
+
this.pageOfListSubscribableServerOptions = (request) => this.client.fetch({
|
|
34
|
+
method: "GET",
|
|
35
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/subscribable-server-options`,
|
|
36
|
+
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
37
|
+
}, unmarshalListSubscribableServerOptionsResponse);
|
|
38
|
+
this.listSubscribableServerOptions = (request) => enrichForPagination("serverOptions", this.pageOfListSubscribableServerOptions, request);
|
|
39
|
+
this.subscribeServerOption = (request) => this.client.fetch({
|
|
40
|
+
body: JSON.stringify(marshalSubscribeServerOptionRequest(request, this.client.settings)),
|
|
41
|
+
headers: jsonContentHeaders,
|
|
42
|
+
method: "PATCH",
|
|
43
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/subscribe-server-option`
|
|
44
|
+
}, unmarshalService);
|
|
45
|
+
this.createServer = (request) => this.client.fetch({
|
|
46
|
+
body: JSON.stringify(marshalCreateServerRequest(request, this.client.settings)),
|
|
47
|
+
headers: jsonContentHeaders,
|
|
48
|
+
method: "POST",
|
|
49
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers`
|
|
50
|
+
}, unmarshalService);
|
|
51
|
+
this.subscribeStorageOptions = (request) => this.client.fetch({
|
|
52
|
+
body: JSON.stringify(marshalSubscribeStorageOptionsRequest(request, this.client.settings)),
|
|
53
|
+
headers: jsonContentHeaders,
|
|
54
|
+
method: "POST",
|
|
55
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/subscribe-storage-options`
|
|
56
|
+
}, unmarshalSubscribeStorageOptionsResponse);
|
|
57
|
+
this.updateServer = (request) => this.client.fetch({
|
|
58
|
+
body: JSON.stringify(marshalUpdateServerRequest(request, this.client.settings)),
|
|
59
|
+
headers: jsonContentHeaders,
|
|
60
|
+
method: "PATCH",
|
|
61
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}`
|
|
62
|
+
}, unmarshalServer);
|
|
63
|
+
this.updateServerTags = (request) => this.client.fetch({
|
|
64
|
+
body: JSON.stringify(marshalUpdateServerTagsRequest(request, this.client.settings)),
|
|
65
|
+
headers: jsonContentHeaders,
|
|
66
|
+
method: "POST",
|
|
67
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/tags`
|
|
68
|
+
}, unmarshalServer);
|
|
69
|
+
this.rebootServer = (request) => this.client.fetch({
|
|
70
|
+
body: "{}",
|
|
71
|
+
headers: jsonContentHeaders,
|
|
72
|
+
method: "POST",
|
|
73
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/reboot`
|
|
74
|
+
});
|
|
75
|
+
this.startServer = (request) => this.client.fetch({
|
|
76
|
+
body: "{}",
|
|
77
|
+
headers: jsonContentHeaders,
|
|
78
|
+
method: "POST",
|
|
79
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/start`
|
|
80
|
+
});
|
|
81
|
+
this.stopServer = (request) => this.client.fetch({
|
|
82
|
+
body: "{}",
|
|
83
|
+
headers: jsonContentHeaders,
|
|
84
|
+
method: "POST",
|
|
85
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/stop`
|
|
86
|
+
});
|
|
87
|
+
this.deleteServer = (request) => this.client.fetch({
|
|
88
|
+
method: "DELETE",
|
|
89
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}`
|
|
90
|
+
});
|
|
91
|
+
this.pageOfListServerEvents = (request) => this.client.fetch({
|
|
92
|
+
method: "GET",
|
|
93
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/events`,
|
|
94
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
95
|
+
}, unmarshalListServerEventsResponse);
|
|
96
|
+
this.listServerEvents = (request) => enrichForPagination("events", this.pageOfListServerEvents, request);
|
|
97
|
+
this.pageOfListServerDisks = (request) => this.client.fetch({
|
|
98
|
+
method: "GET",
|
|
99
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/disks`,
|
|
100
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
101
|
+
}, unmarshalListServerDisksResponse);
|
|
102
|
+
this.listServerDisks = (request) => enrichForPagination("disks", this.pageOfListServerDisks, request);
|
|
103
|
+
this.getOrderedService = (request) => this.client.fetch({
|
|
104
|
+
method: "GET",
|
|
105
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ordered-services/${validatePathParam("orderedServiceId", request.orderedServiceId)}`
|
|
106
|
+
}, unmarshalService);
|
|
107
|
+
this.getService = (request) => this.client.fetch({
|
|
108
|
+
body: "{}",
|
|
109
|
+
headers: jsonContentHeaders,
|
|
110
|
+
method: "PATCH",
|
|
111
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/services/${validatePathParam("serviceId", request.serviceId)}`
|
|
112
|
+
}, unmarshalService);
|
|
113
|
+
this.deleteService = (request) => this.client.fetch({
|
|
114
|
+
method: "DELETE",
|
|
115
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/services/${validatePathParam("serviceId", request.serviceId)}`
|
|
116
|
+
}, unmarshalService);
|
|
117
|
+
this.pageOfListServices = (request = {}) => this.client.fetch({
|
|
118
|
+
method: "GET",
|
|
119
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/services`,
|
|
120
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
121
|
+
}, unmarshalListServicesResponse);
|
|
122
|
+
this.listServices = (request = {}) => enrichForPagination("services", this.pageOfListServices, request);
|
|
123
|
+
this.installServer = (request) => this.client.fetch({
|
|
124
|
+
body: JSON.stringify(marshalInstallServerRequest(request, this.client.settings)),
|
|
125
|
+
headers: jsonContentHeaders,
|
|
126
|
+
method: "POST",
|
|
127
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/install`
|
|
128
|
+
}, unmarshalServerInstall);
|
|
129
|
+
this.getServerInstall = (request) => this.client.fetch({
|
|
130
|
+
method: "GET",
|
|
131
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/install`
|
|
132
|
+
}, unmarshalServerInstall);
|
|
133
|
+
this.waitForServerInstall = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!SERVER_INSTALL_TRANSIENT_STATUSES.includes(res.status))), this.getServerInstall, request, options);
|
|
134
|
+
this.cancelServerInstall = (request) => this.client.fetch({
|
|
135
|
+
method: "POST",
|
|
136
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/cancel-install`
|
|
137
|
+
});
|
|
138
|
+
this.getServerDefaultPartitioning = (request) => this.client.fetch({
|
|
139
|
+
method: "GET",
|
|
140
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/partitioning/${validatePathParam("osId", request.osId)}`
|
|
141
|
+
}, unmarshalServerDefaultPartitioning);
|
|
142
|
+
this.startBMCAccess = (request) => this.client.fetch({
|
|
143
|
+
body: JSON.stringify(marshalStartBMCAccessRequest(request, this.client.settings)),
|
|
144
|
+
headers: jsonContentHeaders,
|
|
145
|
+
method: "POST",
|
|
146
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/bmc-access`
|
|
147
|
+
});
|
|
148
|
+
this.getBMCAccess = (request) => this.client.fetch({
|
|
149
|
+
method: "GET",
|
|
150
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/bmc-access`
|
|
151
|
+
}, unmarshalBMCAccess);
|
|
152
|
+
this.waitForBMCAccess = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!BMC_ACCESS_TRANSIENT_STATUSES.includes(res.status))), this.getBMCAccess, request, options);
|
|
153
|
+
this.stopBMCAccess = (request) => this.client.fetch({
|
|
154
|
+
method: "DELETE",
|
|
155
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/bmc-access`
|
|
156
|
+
});
|
|
157
|
+
this.pageOfListOffers = (request = {}) => this.client.fetch({
|
|
158
|
+
method: "GET",
|
|
159
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/offers`,
|
|
160
|
+
urlParams: urlParams(["available_only", request.availableOnly], ["catalog", request.catalog], ["commercial_range", request.commercialRange], ["is_failover_block", request.isFailoverBlock], ["is_failover_ip", request.isFailoverIp], ["is_rpn_san", request.isRpnSan], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["sold_in", request.soldIn && request.soldIn.length > 0 ? request.soldIn.join(",") : void 0])
|
|
161
|
+
}, unmarshalListOffersResponse);
|
|
162
|
+
this.listOffers = (request = {}) => enrichForPagination("offers", this.pageOfListOffers, request);
|
|
163
|
+
this.getOffer = (request) => this.client.fetch({
|
|
164
|
+
method: "GET",
|
|
165
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/offers/${validatePathParam("offerId", request.offerId)}`,
|
|
166
|
+
urlParams: urlParams(["project_id", request.projectId])
|
|
167
|
+
}, unmarshalOffer);
|
|
168
|
+
this.pageOfListOS = (request) => this.client.fetch({
|
|
169
|
+
method: "GET",
|
|
170
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/os`,
|
|
171
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["server_id", request.serverId], ["type", request.type])
|
|
172
|
+
}, unmarshalListOSResponse);
|
|
173
|
+
this.listOS = (request) => enrichForPagination("os", this.pageOfListOS, request);
|
|
174
|
+
this.getOS = (request) => this.client.fetch({
|
|
175
|
+
method: "GET",
|
|
176
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/os/${validatePathParam("osId", request.osId)}`,
|
|
177
|
+
urlParams: urlParams(["project_id", request.projectId], ["server_id", request.serverId])
|
|
178
|
+
}, unmarshalOS);
|
|
179
|
+
this.updateReverse = (request) => this.client.fetch({
|
|
180
|
+
body: JSON.stringify(marshalUpdateReverseRequest(request, this.client.settings)),
|
|
181
|
+
headers: jsonContentHeaders,
|
|
182
|
+
method: "PATCH",
|
|
183
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/reverses/${validatePathParam("ipId", request.ipId)}`
|
|
184
|
+
}, unmarshalIP);
|
|
185
|
+
this.createFailoverIPs = (request) => this.client.fetch({
|
|
186
|
+
body: JSON.stringify(marshalCreateFailoverIPsRequest(request, this.client.settings)),
|
|
187
|
+
headers: jsonContentHeaders,
|
|
188
|
+
method: "POST",
|
|
189
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips`
|
|
190
|
+
}, unmarshalCreateFailoverIPsResponse);
|
|
191
|
+
this.attachFailoverIPs = (request) => this.client.fetch({
|
|
192
|
+
body: JSON.stringify(marshalAttachFailoverIPsRequest(request, this.client.settings)),
|
|
193
|
+
headers: jsonContentHeaders,
|
|
194
|
+
method: "POST",
|
|
195
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips/attach`
|
|
196
|
+
});
|
|
197
|
+
this.detachFailoverIPs = (request) => this.client.fetch({
|
|
198
|
+
body: JSON.stringify(marshalDetachFailoverIPsRequest(request, this.client.settings)),
|
|
199
|
+
headers: jsonContentHeaders,
|
|
200
|
+
method: "POST",
|
|
201
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips/detach`
|
|
202
|
+
});
|
|
203
|
+
this.attachFailoverIPToMacAddress = (request) => this.client.fetch({
|
|
204
|
+
body: JSON.stringify(marshalAttachFailoverIPToMacAddressRequest(request, this.client.settings)),
|
|
205
|
+
headers: jsonContentHeaders,
|
|
206
|
+
method: "POST",
|
|
207
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips/${validatePathParam("ipId", request.ipId)}/attach-to-mac-address`
|
|
208
|
+
}, unmarshalIP);
|
|
209
|
+
this.detachFailoverIPFromMacAddress = (request) => this.client.fetch({
|
|
210
|
+
body: "{}",
|
|
211
|
+
headers: jsonContentHeaders,
|
|
212
|
+
method: "POST",
|
|
213
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips/${validatePathParam("ipId", request.ipId)}/detach-from-mac-address`
|
|
214
|
+
}, unmarshalIP);
|
|
215
|
+
this.deleteFailoverIP = (request) => this.client.fetch({
|
|
216
|
+
method: "DELETE",
|
|
217
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips/${validatePathParam("ipId", request.ipId)}`
|
|
218
|
+
});
|
|
219
|
+
this.pageOfListFailoverIPs = (request = {}) => this.client.fetch({
|
|
220
|
+
method: "GET",
|
|
221
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips`,
|
|
222
|
+
urlParams: urlParams(["only_available", request.onlyAvailable], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId ?? this.client.settings.defaultProjectId], ["search", request.search])
|
|
223
|
+
}, unmarshalListFailoverIPsResponse);
|
|
224
|
+
this.listFailoverIPs = (request = {}) => enrichForPagination("failoverIps", this.pageOfListFailoverIPs, request);
|
|
225
|
+
this.getFailoverIP = (request) => this.client.fetch({
|
|
226
|
+
method: "GET",
|
|
227
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips/${validatePathParam("ipId", request.ipId)}`
|
|
228
|
+
}, unmarshalFailoverIP);
|
|
229
|
+
this.getRemainingQuota = (request = {}) => this.client.fetch({
|
|
230
|
+
method: "GET",
|
|
231
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/remaining-quota`,
|
|
232
|
+
urlParams: urlParams(["project_id", request.projectId])
|
|
233
|
+
}, unmarshalGetRemainingQuotaResponse);
|
|
234
|
+
this.getRaid = (request) => this.client.fetch({
|
|
235
|
+
method: "GET",
|
|
236
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/raid`
|
|
237
|
+
}, unmarshalRaid);
|
|
238
|
+
this.updateRaid = (request) => this.client.fetch({
|
|
239
|
+
body: JSON.stringify(marshalUpdateRaidRequest(request, this.client.settings)),
|
|
240
|
+
headers: jsonContentHeaders,
|
|
241
|
+
method: "POST",
|
|
242
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/update-raid`
|
|
243
|
+
});
|
|
244
|
+
this.startRescue = (request) => this.client.fetch({
|
|
245
|
+
body: JSON.stringify(marshalStartRescueRequest(request, this.client.settings)),
|
|
246
|
+
headers: jsonContentHeaders,
|
|
247
|
+
method: "POST",
|
|
248
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/rescue`
|
|
249
|
+
}, unmarshalRescue);
|
|
250
|
+
this.getRescue = (request) => this.client.fetch({
|
|
251
|
+
method: "GET",
|
|
252
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/rescue`
|
|
253
|
+
}, unmarshalRescue);
|
|
254
|
+
this.stopRescue = (request) => this.client.fetch({
|
|
255
|
+
method: "DELETE",
|
|
256
|
+
path: `/dedibox/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/rescue`
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
static {
|
|
260
|
+
this.LOCALITY = toApiLocality({ zones: [
|
|
261
|
+
"fr-par-1",
|
|
262
|
+
"fr-par-2",
|
|
263
|
+
"nl-ams-1"
|
|
264
|
+
] });
|
|
265
|
+
}
|
|
527
266
|
};
|
|
528
267
|
/**
|
|
529
268
|
* Dedibox Phoenix Billing API.
|
|
530
269
|
*/
|
|
531
270
|
var BillingAPI = class extends API$1 {
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
271
|
+
constructor(..._args2) {
|
|
272
|
+
super(..._args2);
|
|
273
|
+
this.pageOfListInvoices = (request = {}) => this.client.fetch({
|
|
274
|
+
method: "GET",
|
|
275
|
+
path: `/dedibox/v1/invoices`,
|
|
276
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
277
|
+
}, unmarshalListInvoicesResponse);
|
|
278
|
+
this.listInvoices = (request = {}) => enrichForPagination("invoices", this.pageOfListInvoices, request);
|
|
279
|
+
this.getInvoice = (request) => this.client.fetch({
|
|
280
|
+
method: "GET",
|
|
281
|
+
path: `/dedibox/v1/invoices/${validatePathParam("invoiceId", request.invoiceId)}`
|
|
282
|
+
}, unmarshalInvoice);
|
|
283
|
+
this.downloadInvoice = (request) => this.client.fetch({
|
|
284
|
+
method: "GET",
|
|
285
|
+
path: `/dedibox/v1/invoices/${validatePathParam("invoiceId", request.invoiceId)}/download`,
|
|
286
|
+
urlParams: urlParams(["dl", 1]),
|
|
287
|
+
responseType: "blob"
|
|
288
|
+
});
|
|
289
|
+
this.pageOfListRefunds = (request = {}) => this.client.fetch({
|
|
290
|
+
method: "GET",
|
|
291
|
+
path: `/dedibox/v1/refunds`,
|
|
292
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
293
|
+
}, unmarshalListRefundsResponse);
|
|
294
|
+
this.listRefunds = (request = {}) => enrichForPagination("refunds", this.pageOfListRefunds, request);
|
|
295
|
+
this.getRefund = (request) => this.client.fetch({
|
|
296
|
+
method: "GET",
|
|
297
|
+
path: `/dedibox/v1/refunds/${validatePathParam("refundId", request.refundId)}`
|
|
298
|
+
}, unmarshalRefund);
|
|
299
|
+
this.downloadRefund = (request) => this.client.fetch({
|
|
300
|
+
method: "GET",
|
|
301
|
+
path: `/dedibox/v1/refunds/${validatePathParam("refundId", request.refundId)}/download`,
|
|
302
|
+
urlParams: urlParams(["dl", 1]),
|
|
303
|
+
responseType: "blob"
|
|
304
|
+
});
|
|
305
|
+
this.canOrder = (request = {}) => this.client.fetch({
|
|
306
|
+
method: "GET",
|
|
307
|
+
path: `/dedibox/v1/can-order`,
|
|
308
|
+
urlParams: urlParams(["project_id", request.projectId ?? this.client.settings.defaultProjectId])
|
|
309
|
+
}, unmarshalCanOrderResponse);
|
|
310
|
+
}
|
|
569
311
|
};
|
|
570
312
|
/**
|
|
571
313
|
* Dedibox Phoenix IPv6 Block API.
|
|
572
314
|
*/
|
|
573
315
|
var IPv6BlockAPI = class extends API$1 {
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
method: "GET",
|
|
619
|
-
path: `/dedibox/v1/ipv6-block`,
|
|
620
|
-
urlParams: urlParams(["project_id", request.projectId])
|
|
621
|
-
}, unmarshalIPv6Block);
|
|
622
|
-
/**
|
|
623
|
-
* Update IPv6 block. Update DNS associated to IPv6 block.
|
|
624
|
-
If DNS is used, minimum of 2 is necessary and maximum of 5 (no duplicate).
|
|
625
|
-
*
|
|
626
|
-
* @param request - The request {@link IPv6BlockApiUpdateIPv6BlockRequest}
|
|
627
|
-
* @returns A Promise of IPv6Block
|
|
628
|
-
*/
|
|
629
|
-
updateIPv6Block = (request) => this.client.fetch({
|
|
630
|
-
body: JSON.stringify(marshalIPv6BlockApiUpdateIPv6BlockRequest(request, this.client.settings)),
|
|
631
|
-
headers: jsonContentHeaders,
|
|
632
|
-
method: "PATCH",
|
|
633
|
-
path: `/dedibox/v1/ipv6-blocks/${validatePathParam("blockId", request.blockId)}`
|
|
634
|
-
}, unmarshalIPv6Block);
|
|
635
|
-
/**
|
|
636
|
-
* Delete IPv6 block. Delete IPv6 block subnet with the given ID.
|
|
637
|
-
*
|
|
638
|
-
* @param request - The request {@link IPv6BlockApiDeleteIPv6BlockRequest}
|
|
639
|
-
*/
|
|
640
|
-
deleteIPv6Block = (request) => this.client.fetch({
|
|
641
|
-
method: "DELETE",
|
|
642
|
-
path: `/dedibox/v1/ipv6-blocks/${validatePathParam("blockId", request.blockId)}`
|
|
643
|
-
});
|
|
644
|
-
/**
|
|
645
|
-
* Create IPv6 block subnet. Create IPv6 block subnet for the given IP ID.
|
|
646
|
-
/48 could create subnet in /56 (quota link to your number of server).
|
|
647
|
-
/56 could create subnet in /64 (quota link to your number of failover IP).
|
|
648
|
-
*
|
|
649
|
-
* @param request - The request {@link IPv6BlockApiCreateIPv6BlockSubnetRequest}
|
|
650
|
-
* @returns A Promise of IPv6Block
|
|
651
|
-
*/
|
|
652
|
-
createIPv6BlockSubnet = (request) => this.client.fetch({
|
|
653
|
-
body: JSON.stringify(marshalIPv6BlockApiCreateIPv6BlockSubnetRequest(request, this.client.settings)),
|
|
654
|
-
headers: jsonContentHeaders,
|
|
655
|
-
method: "POST",
|
|
656
|
-
path: `/dedibox/v1/ipv6-blocks/${validatePathParam("blockId", request.blockId)}/subnets`
|
|
657
|
-
}, unmarshalIPv6Block);
|
|
658
|
-
/**
|
|
659
|
-
* List available IPv6 block subnets. List all available IPv6 block subnets for given IP ID.
|
|
660
|
-
*
|
|
661
|
-
* @param request - The request {@link IPv6BlockApiListIPv6BlockSubnetsAvailableRequest}
|
|
662
|
-
* @returns A Promise of ListIPv6BlockSubnetsAvailableResponse
|
|
663
|
-
*/
|
|
664
|
-
listIPv6BlockSubnetsAvailable = (request) => this.client.fetch({
|
|
665
|
-
method: "GET",
|
|
666
|
-
path: `/dedibox/v1/ipv6-blocks/${validatePathParam("blockId", request.blockId)}/subnets`
|
|
667
|
-
}, unmarshalListIPv6BlockSubnetsAvailableResponse);
|
|
316
|
+
constructor(..._args3) {
|
|
317
|
+
super(..._args3);
|
|
318
|
+
this.getIPv6BlockQuotas = (request = {}) => this.client.fetch({
|
|
319
|
+
method: "GET",
|
|
320
|
+
path: `/dedibox/v1/ipv6-block-quotas`,
|
|
321
|
+
urlParams: urlParams(["project_id", request.projectId])
|
|
322
|
+
}, unmarshalGetIPv6BlockQuotasResponse);
|
|
323
|
+
this.createIPv6Block = (request = {}) => this.client.fetch({
|
|
324
|
+
body: JSON.stringify(marshalIPv6BlockApiCreateIPv6BlockRequest(request, this.client.settings)),
|
|
325
|
+
headers: jsonContentHeaders,
|
|
326
|
+
method: "POST",
|
|
327
|
+
path: `/dedibox/v1/ipv6-block`
|
|
328
|
+
}, unmarshalIPv6Block);
|
|
329
|
+
this.listIPv6Blocks = (request = {}) => this.client.fetch({
|
|
330
|
+
method: "GET",
|
|
331
|
+
path: `/dedibox/v1/ipv6-blocks`,
|
|
332
|
+
urlParams: urlParams(["project_id", request.projectId])
|
|
333
|
+
}, unmarshalListIPv6BlocksResponse);
|
|
334
|
+
this.getIPv6Block = (request = {}) => this.client.fetch({
|
|
335
|
+
method: "GET",
|
|
336
|
+
path: `/dedibox/v1/ipv6-block`,
|
|
337
|
+
urlParams: urlParams(["project_id", request.projectId])
|
|
338
|
+
}, unmarshalIPv6Block);
|
|
339
|
+
this.updateIPv6Block = (request) => this.client.fetch({
|
|
340
|
+
body: JSON.stringify(marshalIPv6BlockApiUpdateIPv6BlockRequest(request, this.client.settings)),
|
|
341
|
+
headers: jsonContentHeaders,
|
|
342
|
+
method: "PATCH",
|
|
343
|
+
path: `/dedibox/v1/ipv6-blocks/${validatePathParam("blockId", request.blockId)}`
|
|
344
|
+
}, unmarshalIPv6Block);
|
|
345
|
+
this.deleteIPv6Block = (request) => this.client.fetch({
|
|
346
|
+
method: "DELETE",
|
|
347
|
+
path: `/dedibox/v1/ipv6-blocks/${validatePathParam("blockId", request.blockId)}`
|
|
348
|
+
});
|
|
349
|
+
this.createIPv6BlockSubnet = (request) => this.client.fetch({
|
|
350
|
+
body: JSON.stringify(marshalIPv6BlockApiCreateIPv6BlockSubnetRequest(request, this.client.settings)),
|
|
351
|
+
headers: jsonContentHeaders,
|
|
352
|
+
method: "POST",
|
|
353
|
+
path: `/dedibox/v1/ipv6-blocks/${validatePathParam("blockId", request.blockId)}/subnets`
|
|
354
|
+
}, unmarshalIPv6Block);
|
|
355
|
+
this.listIPv6BlockSubnetsAvailable = (request) => this.client.fetch({
|
|
356
|
+
method: "GET",
|
|
357
|
+
path: `/dedibox/v1/ipv6-blocks/${validatePathParam("blockId", request.blockId)}/subnets`
|
|
358
|
+
}, unmarshalListIPv6BlockSubnetsAvailableResponse);
|
|
359
|
+
}
|
|
668
360
|
};
|
|
669
361
|
/**
|
|
670
362
|
* Dedibox Phoenix RPN API.
|
|
671
363
|
*/
|
|
672
364
|
var RpnAPI = class extends API$1 {
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
365
|
+
constructor(..._args4) {
|
|
366
|
+
super(..._args4);
|
|
367
|
+
this.pageOfListRpnServerCapabilities = (request = {}) => this.client.fetch({
|
|
368
|
+
method: "GET",
|
|
369
|
+
path: `/dedibox/v1/rpn/server-capabilities`,
|
|
370
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
371
|
+
}, unmarshalListRpnServerCapabilitiesResponse);
|
|
372
|
+
this.listRpnServerCapabilities = (request = {}) => enrichForPagination("servers", this.pageOfListRpnServerCapabilities, request);
|
|
373
|
+
this.getRpnStatus = (request = {}) => this.client.fetch({
|
|
374
|
+
method: "GET",
|
|
375
|
+
path: `/dedibox/v1/rpn/status`,
|
|
376
|
+
urlParams: urlParams(["project_id", request.projectId], ["rpnv1_group_id", request.rpnv1GroupId], ["rpnv2_group_id", request.rpnv2GroupId])
|
|
377
|
+
}, unmarshalGetRpnStatusResponse);
|
|
378
|
+
}
|
|
684
379
|
};
|
|
685
380
|
/**
|
|
686
381
|
* Dedibox Phoenix RPN SAN API.
|
|
687
382
|
*/
|
|
688
383
|
var RpnSanAPI = class extends API$1 {
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
method: "GET",
|
|
736
|
-
path: `/dedibox/v1/rpn-sans/${validatePathParam("rpnSanId", request.rpnSanId)}/available-ips`,
|
|
737
|
-
urlParams: urlParams(["type", request.type])
|
|
738
|
-
}, unmarshalListIpsResponse);
|
|
384
|
+
constructor(..._args5) {
|
|
385
|
+
super(..._args5);
|
|
386
|
+
this.pageOfListRpnSans = (request = {}) => this.client.fetch({
|
|
387
|
+
method: "GET",
|
|
388
|
+
path: `/dedibox/v1/rpn-sans`,
|
|
389
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
390
|
+
}, unmarshalListRpnSansResponse);
|
|
391
|
+
this.listRpnSans = (request = {}) => enrichForPagination("rpnSans", this.pageOfListRpnSans, request);
|
|
392
|
+
this.getRpnSan = (request) => this.client.fetch({
|
|
393
|
+
method: "GET",
|
|
394
|
+
path: `/dedibox/v1/rpn-sans/${validatePathParam("rpnSanId", request.rpnSanId)}`
|
|
395
|
+
}, unmarshalRpnSan);
|
|
396
|
+
this.waitForRpnSan = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!RPN_SAN_TRANSIENT_STATUSES.includes(res.status))), this.getRpnSan, request, options);
|
|
397
|
+
this.deleteRpnSan = (request) => this.client.fetch({
|
|
398
|
+
method: "DELETE",
|
|
399
|
+
path: `/dedibox/v1/rpn-sans/${validatePathParam("rpnSanId", request.rpnSanId)}`
|
|
400
|
+
});
|
|
401
|
+
this.createRpnSan = (request) => this.client.fetch({
|
|
402
|
+
body: JSON.stringify(marshalRpnSanApiCreateRpnSanRequest(request, this.client.settings)),
|
|
403
|
+
headers: jsonContentHeaders,
|
|
404
|
+
method: "POST",
|
|
405
|
+
path: `/dedibox/v1/rpn-sans`
|
|
406
|
+
}, unmarshalService);
|
|
407
|
+
this.listIps = (request) => this.client.fetch({
|
|
408
|
+
method: "GET",
|
|
409
|
+
path: `/dedibox/v1/rpn-sans/${validatePathParam("rpnSanId", request.rpnSanId)}/ips`,
|
|
410
|
+
urlParams: urlParams(["type", request.type])
|
|
411
|
+
}, unmarshalListIpsResponse);
|
|
412
|
+
this.addIp = (request) => this.client.fetch({
|
|
413
|
+
body: JSON.stringify(marshalRpnSanApiAddIpRequest(request, this.client.settings)),
|
|
414
|
+
headers: jsonContentHeaders,
|
|
415
|
+
method: "POST",
|
|
416
|
+
path: `/dedibox/v1/rpn-sans/${validatePathParam("rpnSanId", request.rpnSanId)}/ips`
|
|
417
|
+
});
|
|
418
|
+
this.removeIp = (request) => this.client.fetch({
|
|
419
|
+
body: JSON.stringify(marshalRpnSanApiRemoveIpRequest(request, this.client.settings)),
|
|
420
|
+
headers: jsonContentHeaders,
|
|
421
|
+
method: "DELETE",
|
|
422
|
+
path: `/dedibox/v1/rpn-sans/${validatePathParam("rpnSanId", request.rpnSanId)}/ips`
|
|
423
|
+
});
|
|
424
|
+
this.listAvailableIps = (request) => this.client.fetch({
|
|
425
|
+
method: "GET",
|
|
426
|
+
path: `/dedibox/v1/rpn-sans/${validatePathParam("rpnSanId", request.rpnSanId)}/available-ips`,
|
|
427
|
+
urlParams: urlParams(["type", request.type])
|
|
428
|
+
}, unmarshalListIpsResponse);
|
|
429
|
+
}
|
|
739
430
|
};
|
|
740
431
|
/**
|
|
741
432
|
* Dedibox Phoenix RPN v1 API.
|
|
742
433
|
*/
|
|
743
434
|
var RpnV1API = class extends API$1 {
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
435
|
+
constructor(..._args6) {
|
|
436
|
+
super(..._args6);
|
|
437
|
+
this.pageOfListRpnGroups = (request = {}) => this.client.fetch({
|
|
438
|
+
method: "GET",
|
|
439
|
+
path: `/dedibox/v1/rpnv1/groups`,
|
|
440
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
441
|
+
}, unmarshalListRpnGroupsResponse);
|
|
442
|
+
this.listRpnGroups = (request = {}) => enrichForPagination("rpnGroups", this.pageOfListRpnGroups, request);
|
|
443
|
+
this.getRpnGroup = (request) => this.client.fetch({
|
|
444
|
+
method: "GET",
|
|
445
|
+
path: `/dedibox/v1/rpnv1/groups/${validatePathParam("groupId", request.groupId)}`
|
|
446
|
+
}, unmarshalRpnGroup);
|
|
447
|
+
this.createRpnGroup = (request) => this.client.fetch({
|
|
448
|
+
body: JSON.stringify(marshalRpnV1ApiCreateRpnGroupRequest(request, this.client.settings)),
|
|
449
|
+
headers: jsonContentHeaders,
|
|
450
|
+
method: "POST",
|
|
451
|
+
path: `/dedibox/v1/rpnv1/groups`
|
|
452
|
+
}, unmarshalRpnGroup);
|
|
453
|
+
this.deleteRpnGroup = (request) => this.client.fetch({
|
|
454
|
+
method: "DELETE",
|
|
455
|
+
path: `/dedibox/v1/rpnv1/groups/${validatePathParam("groupId", request.groupId)}`
|
|
456
|
+
});
|
|
457
|
+
this.updateRpnGroupName = (request) => this.client.fetch({
|
|
458
|
+
body: JSON.stringify(marshalRpnV1ApiUpdateRpnGroupNameRequest(request, this.client.settings)),
|
|
459
|
+
headers: jsonContentHeaders,
|
|
460
|
+
method: "PATCH",
|
|
461
|
+
path: `/dedibox/v1/rpnv1/groups/${validatePathParam("groupId", request.groupId)}`
|
|
462
|
+
}, unmarshalRpnGroup);
|
|
463
|
+
this.pageOfListRpnGroupMembers = (request) => this.client.fetch({
|
|
464
|
+
method: "GET",
|
|
465
|
+
path: `/dedibox/v1/rpnv1/groups/${validatePathParam("groupId", request.groupId)}/members`,
|
|
466
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
467
|
+
}, unmarshalListRpnGroupMembersResponse);
|
|
468
|
+
this.listRpnGroupMembers = (request) => enrichForPagination("members", this.pageOfListRpnGroupMembers, request);
|
|
469
|
+
this.rpnGroupInvite = (request) => this.client.fetch({
|
|
470
|
+
body: JSON.stringify(marshalRpnV1ApiRpnGroupInviteRequest(request, this.client.settings)),
|
|
471
|
+
headers: jsonContentHeaders,
|
|
472
|
+
method: "POST",
|
|
473
|
+
path: `/dedibox/v1/rpnv1/groups/${validatePathParam("groupId", request.groupId)}/invite`
|
|
474
|
+
});
|
|
475
|
+
this.leaveRpnGroup = (request) => this.client.fetch({
|
|
476
|
+
body: JSON.stringify(marshalRpnV1ApiLeaveRpnGroupRequest(request, this.client.settings)),
|
|
477
|
+
headers: jsonContentHeaders,
|
|
478
|
+
method: "POST",
|
|
479
|
+
path: `/dedibox/v1/rpnv1/groups/${validatePathParam("groupId", request.groupId)}/leave`
|
|
480
|
+
});
|
|
481
|
+
this.addRpnGroupMembers = (request) => this.client.fetch({
|
|
482
|
+
body: JSON.stringify(marshalRpnV1ApiAddRpnGroupMembersRequest(request, this.client.settings)),
|
|
483
|
+
headers: jsonContentHeaders,
|
|
484
|
+
method: "POST",
|
|
485
|
+
path: `/dedibox/v1/rpnv1/groups/${validatePathParam("groupId", request.groupId)}/members`
|
|
486
|
+
}, unmarshalRpnGroup);
|
|
487
|
+
this.deleteRpnGroupMembers = (request) => this.client.fetch({
|
|
488
|
+
body: JSON.stringify(marshalRpnV1ApiDeleteRpnGroupMembersRequest(request, this.client.settings)),
|
|
489
|
+
headers: jsonContentHeaders,
|
|
490
|
+
method: "DELETE",
|
|
491
|
+
path: `/dedibox/v1/rpnv1/groups/${validatePathParam("groupId", request.groupId)}/members`
|
|
492
|
+
}, unmarshalRpnGroup);
|
|
493
|
+
this.pageOfListRpnCapableServers = (request = {}) => this.client.fetch({
|
|
494
|
+
method: "GET",
|
|
495
|
+
path: `/dedibox/v1/rpnv1/capable-servers`,
|
|
496
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
497
|
+
}, unmarshalListRpnCapableServersResponse);
|
|
498
|
+
this.listRpnCapableServers = (request = {}) => enrichForPagination("servers", this.pageOfListRpnCapableServers, request);
|
|
499
|
+
this.pageOfListRpnCapableSanServers = (request = {}) => this.client.fetch({
|
|
500
|
+
method: "GET",
|
|
501
|
+
path: `/dedibox/v1/rpnv1/capable-san-servers`,
|
|
502
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
503
|
+
}, unmarshalListRpnCapableSanServersResponse);
|
|
504
|
+
this.listRpnCapableSanServers = (request = {}) => enrichForPagination("sanServers", this.pageOfListRpnCapableSanServers, request);
|
|
505
|
+
this.pageOfListRpnInvites = (request = {}) => this.client.fetch({
|
|
506
|
+
method: "GET",
|
|
507
|
+
path: `/dedibox/v1/rpnv1/invites`,
|
|
508
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId ?? this.client.settings.defaultProjectId])
|
|
509
|
+
}, unmarshalListRpnInvitesResponse);
|
|
510
|
+
this.listRpnInvites = (request = {}) => enrichForPagination("members", this.pageOfListRpnInvites, request);
|
|
511
|
+
this.acceptRpnInvite = (request) => this.client.fetch({
|
|
512
|
+
method: "POST",
|
|
513
|
+
path: `/dedibox/v1/rpnv1/invites/${validatePathParam("memberId", request.memberId)}/accept`
|
|
514
|
+
});
|
|
515
|
+
this.refuseRpnInvite = (request) => this.client.fetch({
|
|
516
|
+
method: "POST",
|
|
517
|
+
path: `/dedibox/v1/rpnv1/invites/${validatePathParam("memberId", request.memberId)}/refuse`
|
|
518
|
+
});
|
|
519
|
+
}
|
|
826
520
|
};
|
|
827
521
|
/**
|
|
828
522
|
* Dedibox Phoenix RPN v2 API.
|
|
829
523
|
*/
|
|
830
524
|
var RpnV2API = class extends API$1 {
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
headers: jsonContentHeaders,
|
|
910
|
-
method: "POST",
|
|
911
|
-
path: `/dedibox/v1/rpnv2/groups/${validatePathParam("groupId", request.groupId)}/disable-compatibility`
|
|
912
|
-
});
|
|
525
|
+
constructor(..._args7) {
|
|
526
|
+
super(..._args7);
|
|
527
|
+
this.pageOfListRpnV2Groups = (request = {}) => this.client.fetch({
|
|
528
|
+
method: "GET",
|
|
529
|
+
path: `/dedibox/v1/rpnv2/groups`,
|
|
530
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
531
|
+
}, unmarshalListRpnV2GroupsResponse);
|
|
532
|
+
this.listRpnV2Groups = (request = {}) => enrichForPagination("rpnGroups", this.pageOfListRpnV2Groups, request);
|
|
533
|
+
this.pageOfListRpnV2Members = (request) => this.client.fetch({
|
|
534
|
+
method: "GET",
|
|
535
|
+
path: `/dedibox/v1/rpnv2/groups/${validatePathParam("groupId", request.groupId)}/members`,
|
|
536
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["type", request.type])
|
|
537
|
+
}, unmarshalListRpnV2MembersResponse);
|
|
538
|
+
this.listRpnV2Members = (request) => enrichForPagination("members", this.pageOfListRpnV2Members, request);
|
|
539
|
+
this.getRpnV2Group = (request) => this.client.fetch({
|
|
540
|
+
method: "GET",
|
|
541
|
+
path: `/dedibox/v1/rpnv2/groups/${validatePathParam("groupId", request.groupId)}`
|
|
542
|
+
}, unmarshalRpnV2Group);
|
|
543
|
+
this.waitForRpnV2Group = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!RPN_V2_GROUP_TRANSIENT_STATUSES.includes(res.status))), this.getRpnV2Group, request, options);
|
|
544
|
+
this.createRpnV2Group = (request) => this.client.fetch({
|
|
545
|
+
body: JSON.stringify(marshalRpnV2ApiCreateRpnV2GroupRequest(request, this.client.settings)),
|
|
546
|
+
headers: jsonContentHeaders,
|
|
547
|
+
method: "POST",
|
|
548
|
+
path: `/dedibox/v1/rpnv2/groups`
|
|
549
|
+
}, unmarshalRpnV2Group);
|
|
550
|
+
this.deleteRpnV2Group = (request) => this.client.fetch({
|
|
551
|
+
method: "DELETE",
|
|
552
|
+
path: `/dedibox/v1/rpnv2/groups/${validatePathParam("groupId", request.groupId)}`
|
|
553
|
+
});
|
|
554
|
+
this.updateRpnV2GroupName = (request) => this.client.fetch({
|
|
555
|
+
body: JSON.stringify(marshalRpnV2ApiUpdateRpnV2GroupNameRequest(request, this.client.settings)),
|
|
556
|
+
headers: jsonContentHeaders,
|
|
557
|
+
method: "PATCH",
|
|
558
|
+
path: `/dedibox/v1/rpnv2/groups/${validatePathParam("groupId", request.groupId)}`
|
|
559
|
+
}, unmarshalRpnV2Group);
|
|
560
|
+
this.addRpnV2Members = (request) => this.client.fetch({
|
|
561
|
+
body: JSON.stringify(marshalRpnV2ApiAddRpnV2MembersRequest(request, this.client.settings)),
|
|
562
|
+
headers: jsonContentHeaders,
|
|
563
|
+
method: "POST",
|
|
564
|
+
path: `/dedibox/v1/rpnv2/groups/${validatePathParam("groupId", request.groupId)}/members`
|
|
565
|
+
});
|
|
566
|
+
this.deleteRpnV2Members = (request) => this.client.fetch({
|
|
567
|
+
body: JSON.stringify(marshalRpnV2ApiDeleteRpnV2MembersRequest(request, this.client.settings)),
|
|
568
|
+
headers: jsonContentHeaders,
|
|
569
|
+
method: "DELETE",
|
|
570
|
+
path: `/dedibox/v1/rpnv2/groups/${validatePathParam("groupId", request.groupId)}/members`
|
|
571
|
+
});
|
|
572
|
+
this.pageOfListRpnV2CapableResources = (request = {}) => this.client.fetch({
|
|
573
|
+
method: "GET",
|
|
574
|
+
path: `/dedibox/v1/rpnv2/groups/capable`,
|
|
575
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
576
|
+
}, unmarshalListRpnV2CapableResourcesResponse);
|
|
577
|
+
this.listRpnV2CapableResources = (request = {}) => enrichForPagination("servers", this.pageOfListRpnV2CapableResources, request);
|
|
578
|
+
this.pageOfListRpnV2GroupLogs = (request) => this.client.fetch({
|
|
579
|
+
method: "GET",
|
|
580
|
+
path: `/dedibox/v1/rpnv2/groups/${validatePathParam("groupId", request.groupId)}/logs`,
|
|
581
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
582
|
+
}, unmarshalListRpnV2GroupLogsResponse);
|
|
583
|
+
this.listRpnV2GroupLogs = (request) => enrichForPagination("logs", this.pageOfListRpnV2GroupLogs, request);
|
|
584
|
+
this.updateRpnV2VlanForMembers = (request) => this.client.fetch({
|
|
585
|
+
body: JSON.stringify(marshalRpnV2ApiUpdateRpnV2VlanForMembersRequest(request, this.client.settings)),
|
|
586
|
+
headers: jsonContentHeaders,
|
|
587
|
+
method: "PATCH",
|
|
588
|
+
path: `/dedibox/v1/rpnv2/groups/${validatePathParam("groupId", request.groupId)}/vlan`
|
|
589
|
+
});
|
|
590
|
+
this.enableRpnV2GroupCompatibility = (request) => this.client.fetch({
|
|
591
|
+
body: JSON.stringify(marshalRpnV2ApiEnableRpnV2GroupCompatibilityRequest(request, this.client.settings)),
|
|
592
|
+
headers: jsonContentHeaders,
|
|
593
|
+
method: "POST",
|
|
594
|
+
path: `/dedibox/v1/rpnv2/groups/${validatePathParam("groupId", request.groupId)}/enable-compatibility`
|
|
595
|
+
});
|
|
596
|
+
this.disableRpnV2GroupCompatibility = (request) => this.client.fetch({
|
|
597
|
+
body: "{}",
|
|
598
|
+
headers: jsonContentHeaders,
|
|
599
|
+
method: "POST",
|
|
600
|
+
path: `/dedibox/v1/rpnv2/groups/${validatePathParam("groupId", request.groupId)}/disable-compatibility`
|
|
601
|
+
});
|
|
602
|
+
}
|
|
913
603
|
};
|
|
914
604
|
//#endregion
|
|
915
605
|
export { API, BillingAPI, IPv6BlockAPI, RpnAPI, RpnSanAPI, RpnV1API, RpnV2API };
|