@scaleway/sdk-dedibox 1.3.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -0
- package/dist/v1/api.gen.d.ts +2 -2
- package/dist/v1/api.gen.js +309 -361
- package/dist/v1/content.gen.js +7 -2
- package/dist/v1/index.gen.d.ts +1 -1
- package/dist/v1/marshalling.gen.d.ts +1 -1
- package/dist/v1/marshalling.gen.js +9 -35
- package/dist/v1/types.gen.d.ts +4 -4
- package/package.json +6 -9
- package/dist/index.gen.cjs +0 -4
- package/dist/v1/api.gen.cjs +0 -1454
- package/dist/v1/content.gen.cjs +0 -49
- package/dist/v1/index.gen.cjs +0 -104
- package/dist/v1/marshalling.gen.cjs +0 -1486
- package/dist/v1/validation-rules.gen.cjs +0 -626
package/dist/v1/api.gen.cjs
DELETED
|
@@ -1,1454 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const sdkClient = require("@scaleway/sdk-client");
|
|
4
|
-
const content_gen = require("./content.gen.cjs");
|
|
5
|
-
const marshalling_gen = require("./marshalling.gen.cjs");
|
|
6
|
-
const jsonContentHeaders = {
|
|
7
|
-
"Content-Type": "application/json; charset=utf-8"
|
|
8
|
-
};
|
|
9
|
-
class API extends sdkClient.API {
|
|
10
|
-
/**
|
|
11
|
-
* Locality of this API.
|
|
12
|
-
* type ∈ {'zone','region','global','unspecified'}
|
|
13
|
-
*/
|
|
14
|
-
static LOCALITY = sdkClient.toApiLocality({
|
|
15
|
-
zones: ["fr-par-1", "fr-par-2", "nl-ams-1"]
|
|
16
|
-
});
|
|
17
|
-
pageOfListServers = (request = {}) => this.client.fetch(
|
|
18
|
-
{
|
|
19
|
-
method: "GET",
|
|
20
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers`,
|
|
21
|
-
urlParams: sdkClient.urlParams(
|
|
22
|
-
["order_by", request.orderBy],
|
|
23
|
-
["page", request.page],
|
|
24
|
-
[
|
|
25
|
-
"page_size",
|
|
26
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
27
|
-
],
|
|
28
|
-
[
|
|
29
|
-
"project_id",
|
|
30
|
-
request.projectId ?? this.client.settings.defaultProjectId
|
|
31
|
-
],
|
|
32
|
-
["search", request.search]
|
|
33
|
-
)
|
|
34
|
-
},
|
|
35
|
-
marshalling_gen.unmarshalListServersResponse
|
|
36
|
-
);
|
|
37
|
-
/**
|
|
38
|
-
* List baremetal servers for project.
|
|
39
|
-
*
|
|
40
|
-
* @param request - The request {@link ListServersRequest}
|
|
41
|
-
* @returns A Promise of ListServersResponse
|
|
42
|
-
*/
|
|
43
|
-
listServers = (request = {}) => sdkClient.enrichForPagination("servers", this.pageOfListServers, request);
|
|
44
|
-
/**
|
|
45
|
-
* Get a specific baremetal server. Get the server associated with the given ID.
|
|
46
|
-
*
|
|
47
|
-
* @param request - The request {@link GetServerRequest}
|
|
48
|
-
* @returns A Promise of Server
|
|
49
|
-
*/
|
|
50
|
-
getServer = (request) => this.client.fetch(
|
|
51
|
-
{
|
|
52
|
-
method: "GET",
|
|
53
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}`
|
|
54
|
-
},
|
|
55
|
-
marshalling_gen.unmarshalServer
|
|
56
|
-
);
|
|
57
|
-
/**
|
|
58
|
-
* Waits for {@link Server} to be in a final state.
|
|
59
|
-
*
|
|
60
|
-
* @param request - The request {@link GetServerRequest}
|
|
61
|
-
* @param options - The waiting options
|
|
62
|
-
* @returns A Promise of Server
|
|
63
|
-
*/
|
|
64
|
-
waitForServer = (request, options) => sdkClient.waitForResource(
|
|
65
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
66
|
-
!content_gen.SERVER_TRANSIENT_STATUSES.includes(res.status)
|
|
67
|
-
)),
|
|
68
|
-
this.getServer,
|
|
69
|
-
request,
|
|
70
|
-
options
|
|
71
|
-
);
|
|
72
|
-
getServerBackup = (request) => this.client.fetch(
|
|
73
|
-
{
|
|
74
|
-
method: "GET",
|
|
75
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/backups`
|
|
76
|
-
},
|
|
77
|
-
marshalling_gen.unmarshalBackup
|
|
78
|
-
);
|
|
79
|
-
updateServerBackup = (request) => this.client.fetch(
|
|
80
|
-
{
|
|
81
|
-
body: JSON.stringify(
|
|
82
|
-
marshalling_gen.marshalUpdateServerBackupRequest(request, this.client.settings)
|
|
83
|
-
),
|
|
84
|
-
headers: jsonContentHeaders,
|
|
85
|
-
method: "PATCH",
|
|
86
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/backups`
|
|
87
|
-
},
|
|
88
|
-
marshalling_gen.unmarshalBackup
|
|
89
|
-
);
|
|
90
|
-
pageOfListSubscribableServerOptions = (request) => this.client.fetch(
|
|
91
|
-
{
|
|
92
|
-
method: "GET",
|
|
93
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/subscribable-server-options`,
|
|
94
|
-
urlParams: sdkClient.urlParams(
|
|
95
|
-
["page", request.page],
|
|
96
|
-
[
|
|
97
|
-
"page_size",
|
|
98
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
99
|
-
]
|
|
100
|
-
)
|
|
101
|
-
},
|
|
102
|
-
marshalling_gen.unmarshalListSubscribableServerOptionsResponse
|
|
103
|
-
);
|
|
104
|
-
/**
|
|
105
|
-
* List subscribable server options. List subscribable options associated to the given server ID.
|
|
106
|
-
*
|
|
107
|
-
* @param request - The request {@link ListSubscribableServerOptionsRequest}
|
|
108
|
-
* @returns A Promise of ListSubscribableServerOptionsResponse
|
|
109
|
-
*/
|
|
110
|
-
listSubscribableServerOptions = (request) => sdkClient.enrichForPagination(
|
|
111
|
-
"serverOptions",
|
|
112
|
-
this.pageOfListSubscribableServerOptions,
|
|
113
|
-
request
|
|
114
|
-
);
|
|
115
|
-
/**
|
|
116
|
-
* Subscribe server option. Subscribe option for the given server ID.
|
|
117
|
-
*
|
|
118
|
-
* @param request - The request {@link SubscribeServerOptionRequest}
|
|
119
|
-
* @returns A Promise of Service
|
|
120
|
-
*/
|
|
121
|
-
subscribeServerOption = (request) => this.client.fetch(
|
|
122
|
-
{
|
|
123
|
-
body: JSON.stringify(
|
|
124
|
-
marshalling_gen.marshalSubscribeServerOptionRequest(request, this.client.settings)
|
|
125
|
-
),
|
|
126
|
-
headers: jsonContentHeaders,
|
|
127
|
-
method: "PATCH",
|
|
128
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/subscribe-server-option`
|
|
129
|
-
},
|
|
130
|
-
marshalling_gen.unmarshalService
|
|
131
|
-
);
|
|
132
|
-
/**
|
|
133
|
-
* Create a baremetal server. Create a new baremetal server. The order return you a service ID to follow the provisionning status you could call GetService.
|
|
134
|
-
*
|
|
135
|
-
* @param request - The request {@link CreateServerRequest}
|
|
136
|
-
* @returns A Promise of Service
|
|
137
|
-
*/
|
|
138
|
-
createServer = (request) => this.client.fetch(
|
|
139
|
-
{
|
|
140
|
-
body: JSON.stringify(
|
|
141
|
-
marshalling_gen.marshalCreateServerRequest(request, this.client.settings)
|
|
142
|
-
),
|
|
143
|
-
headers: jsonContentHeaders,
|
|
144
|
-
method: "POST",
|
|
145
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers`
|
|
146
|
-
},
|
|
147
|
-
marshalling_gen.unmarshalService
|
|
148
|
-
);
|
|
149
|
-
/**
|
|
150
|
-
* Subscribe storage server option. Subscribe storage option for the given server ID.
|
|
151
|
-
*
|
|
152
|
-
* @param request - The request {@link SubscribeStorageOptionsRequest}
|
|
153
|
-
* @returns A Promise of SubscribeStorageOptionsResponse
|
|
154
|
-
*/
|
|
155
|
-
subscribeStorageOptions = (request) => this.client.fetch(
|
|
156
|
-
{
|
|
157
|
-
body: JSON.stringify(
|
|
158
|
-
marshalling_gen.marshalSubscribeStorageOptionsRequest(request, this.client.settings)
|
|
159
|
-
),
|
|
160
|
-
headers: jsonContentHeaders,
|
|
161
|
-
method: "POST",
|
|
162
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/subscribe-storage-options`
|
|
163
|
-
},
|
|
164
|
-
marshalling_gen.unmarshalSubscribeStorageOptionsResponse
|
|
165
|
-
);
|
|
166
|
-
/**
|
|
167
|
-
* Update a baremetal server. Update the server associated with the given ID.
|
|
168
|
-
*
|
|
169
|
-
* @param request - The request {@link UpdateServerRequest}
|
|
170
|
-
* @returns A Promise of Server
|
|
171
|
-
*/
|
|
172
|
-
updateServer = (request) => this.client.fetch(
|
|
173
|
-
{
|
|
174
|
-
body: JSON.stringify(
|
|
175
|
-
marshalling_gen.marshalUpdateServerRequest(request, this.client.settings)
|
|
176
|
-
),
|
|
177
|
-
headers: jsonContentHeaders,
|
|
178
|
-
method: "PATCH",
|
|
179
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}`
|
|
180
|
-
},
|
|
181
|
-
marshalling_gen.unmarshalServer
|
|
182
|
-
);
|
|
183
|
-
updateServerTags = (request) => this.client.fetch(
|
|
184
|
-
{
|
|
185
|
-
body: JSON.stringify(
|
|
186
|
-
marshalling_gen.marshalUpdateServerTagsRequest(request, this.client.settings)
|
|
187
|
-
),
|
|
188
|
-
headers: jsonContentHeaders,
|
|
189
|
-
method: "POST",
|
|
190
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/tags`
|
|
191
|
-
},
|
|
192
|
-
marshalling_gen.unmarshalServer
|
|
193
|
-
);
|
|
194
|
-
/**
|
|
195
|
-
* Reboot a baremetal server. Reboot the server associated with the given ID, use boot param to reboot in rescue.
|
|
196
|
-
*
|
|
197
|
-
* @param request - The request {@link RebootServerRequest}
|
|
198
|
-
*/
|
|
199
|
-
rebootServer = (request) => this.client.fetch({
|
|
200
|
-
body: "{}",
|
|
201
|
-
headers: jsonContentHeaders,
|
|
202
|
-
method: "POST",
|
|
203
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/reboot`
|
|
204
|
-
});
|
|
205
|
-
/**
|
|
206
|
-
* Start a baremetal server. Start the server associated with the given ID.
|
|
207
|
-
*
|
|
208
|
-
* @param request - The request {@link StartServerRequest}
|
|
209
|
-
*/
|
|
210
|
-
startServer = (request) => this.client.fetch({
|
|
211
|
-
body: "{}",
|
|
212
|
-
headers: jsonContentHeaders,
|
|
213
|
-
method: "POST",
|
|
214
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/start`
|
|
215
|
-
});
|
|
216
|
-
/**
|
|
217
|
-
* Stop a baremetal server. Stop the server associated with the given ID.
|
|
218
|
-
*
|
|
219
|
-
* @param request - The request {@link StopServerRequest}
|
|
220
|
-
*/
|
|
221
|
-
stopServer = (request) => this.client.fetch({
|
|
222
|
-
body: "{}",
|
|
223
|
-
headers: jsonContentHeaders,
|
|
224
|
-
method: "POST",
|
|
225
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/stop`
|
|
226
|
-
});
|
|
227
|
-
/**
|
|
228
|
-
* Delete a baremetal server. Delete the server associated with the given ID.
|
|
229
|
-
*
|
|
230
|
-
* @param request - The request {@link DeleteServerRequest}
|
|
231
|
-
*/
|
|
232
|
-
deleteServer = (request) => this.client.fetch({
|
|
233
|
-
method: "DELETE",
|
|
234
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}`
|
|
235
|
-
});
|
|
236
|
-
pageOfListServerEvents = (request) => this.client.fetch(
|
|
237
|
-
{
|
|
238
|
-
method: "GET",
|
|
239
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/events`,
|
|
240
|
-
urlParams: sdkClient.urlParams(
|
|
241
|
-
["order_by", request.orderBy],
|
|
242
|
-
["page", request.page],
|
|
243
|
-
[
|
|
244
|
-
"page_size",
|
|
245
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
246
|
-
]
|
|
247
|
-
)
|
|
248
|
-
},
|
|
249
|
-
marshalling_gen.unmarshalListServerEventsResponse
|
|
250
|
-
);
|
|
251
|
-
/**
|
|
252
|
-
* List server events. List events associated to the given server ID.
|
|
253
|
-
*
|
|
254
|
-
* @param request - The request {@link ListServerEventsRequest}
|
|
255
|
-
* @returns A Promise of ListServerEventsResponse
|
|
256
|
-
*/
|
|
257
|
-
listServerEvents = (request) => sdkClient.enrichForPagination("events", this.pageOfListServerEvents, request);
|
|
258
|
-
pageOfListServerDisks = (request) => this.client.fetch(
|
|
259
|
-
{
|
|
260
|
-
method: "GET",
|
|
261
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/disks`,
|
|
262
|
-
urlParams: sdkClient.urlParams(
|
|
263
|
-
["order_by", request.orderBy],
|
|
264
|
-
["page", request.page],
|
|
265
|
-
[
|
|
266
|
-
"page_size",
|
|
267
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
268
|
-
]
|
|
269
|
-
)
|
|
270
|
-
},
|
|
271
|
-
marshalling_gen.unmarshalListServerDisksResponse
|
|
272
|
-
);
|
|
273
|
-
/**
|
|
274
|
-
* List server disks. List disks associated to the given server ID.
|
|
275
|
-
*
|
|
276
|
-
* @param request - The request {@link ListServerDisksRequest}
|
|
277
|
-
* @returns A Promise of ListServerDisksResponse
|
|
278
|
-
*/
|
|
279
|
-
listServerDisks = (request) => sdkClient.enrichForPagination("disks", this.pageOfListServerDisks, request);
|
|
280
|
-
getOrderedService = (request) => this.client.fetch(
|
|
281
|
-
{
|
|
282
|
-
method: "GET",
|
|
283
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ordered-services/${sdkClient.validatePathParam("orderedServiceId", request.orderedServiceId)}`
|
|
284
|
-
},
|
|
285
|
-
marshalling_gen.unmarshalService
|
|
286
|
-
);
|
|
287
|
-
/**
|
|
288
|
-
* Get a specific service. Get the service associated with the given ID.
|
|
289
|
-
*
|
|
290
|
-
* @param request - The request {@link GetServiceRequest}
|
|
291
|
-
* @returns A Promise of Service
|
|
292
|
-
*/
|
|
293
|
-
getService = (request) => this.client.fetch(
|
|
294
|
-
{
|
|
295
|
-
body: "{}",
|
|
296
|
-
headers: jsonContentHeaders,
|
|
297
|
-
method: "PATCH",
|
|
298
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/services/${sdkClient.validatePathParam("serviceId", request.serviceId)}`
|
|
299
|
-
},
|
|
300
|
-
marshalling_gen.unmarshalService
|
|
301
|
-
);
|
|
302
|
-
/**
|
|
303
|
-
* Delete a specific service. Delete the service associated with the given ID.
|
|
304
|
-
*
|
|
305
|
-
* @param request - The request {@link DeleteServiceRequest}
|
|
306
|
-
* @returns A Promise of Service
|
|
307
|
-
*/
|
|
308
|
-
deleteService = (request) => this.client.fetch(
|
|
309
|
-
{
|
|
310
|
-
method: "DELETE",
|
|
311
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/services/${sdkClient.validatePathParam("serviceId", request.serviceId)}`
|
|
312
|
-
},
|
|
313
|
-
marshalling_gen.unmarshalService
|
|
314
|
-
);
|
|
315
|
-
pageOfListServices = (request = {}) => this.client.fetch(
|
|
316
|
-
{
|
|
317
|
-
method: "GET",
|
|
318
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/services`,
|
|
319
|
-
urlParams: sdkClient.urlParams(
|
|
320
|
-
["order_by", request.orderBy],
|
|
321
|
-
["page", request.page],
|
|
322
|
-
[
|
|
323
|
-
"page_size",
|
|
324
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
325
|
-
],
|
|
326
|
-
["project_id", request.projectId]
|
|
327
|
-
)
|
|
328
|
-
},
|
|
329
|
-
marshalling_gen.unmarshalListServicesResponse
|
|
330
|
-
);
|
|
331
|
-
/**
|
|
332
|
-
* List services.
|
|
333
|
-
*
|
|
334
|
-
* @param request - The request {@link ListServicesRequest}
|
|
335
|
-
* @returns A Promise of ListServicesResponse
|
|
336
|
-
*/
|
|
337
|
-
listServices = (request = {}) => sdkClient.enrichForPagination("services", this.pageOfListServices, request);
|
|
338
|
-
/**
|
|
339
|
-
* Install a baremetal server. Install an OS on the server associated with the given ID.
|
|
340
|
-
*
|
|
341
|
-
* @param request - The request {@link InstallServerRequest}
|
|
342
|
-
* @returns A Promise of ServerInstall
|
|
343
|
-
*/
|
|
344
|
-
installServer = (request) => this.client.fetch(
|
|
345
|
-
{
|
|
346
|
-
body: JSON.stringify(
|
|
347
|
-
marshalling_gen.marshalInstallServerRequest(request, this.client.settings)
|
|
348
|
-
),
|
|
349
|
-
headers: jsonContentHeaders,
|
|
350
|
-
method: "POST",
|
|
351
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/install`
|
|
352
|
-
},
|
|
353
|
-
marshalling_gen.unmarshalServerInstall
|
|
354
|
-
);
|
|
355
|
-
/**
|
|
356
|
-
* Get a specific server installation status. Get the server installation status associated with the given server ID.
|
|
357
|
-
*
|
|
358
|
-
* @param request - The request {@link GetServerInstallRequest}
|
|
359
|
-
* @returns A Promise of ServerInstall
|
|
360
|
-
*/
|
|
361
|
-
getServerInstall = (request) => this.client.fetch(
|
|
362
|
-
{
|
|
363
|
-
method: "GET",
|
|
364
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/install`
|
|
365
|
-
},
|
|
366
|
-
marshalling_gen.unmarshalServerInstall
|
|
367
|
-
);
|
|
368
|
-
/**
|
|
369
|
-
* Waits for {@link ServerInstall} to be in a final state.
|
|
370
|
-
*
|
|
371
|
-
* @param request - The request {@link GetServerInstallRequest}
|
|
372
|
-
* @param options - The waiting options
|
|
373
|
-
* @returns A Promise of ServerInstall
|
|
374
|
-
*/
|
|
375
|
-
waitForServerInstall = (request, options) => sdkClient.waitForResource(
|
|
376
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
377
|
-
!content_gen.SERVER_INSTALL_TRANSIENT_STATUSES.includes(res.status)
|
|
378
|
-
)),
|
|
379
|
-
this.getServerInstall,
|
|
380
|
-
request,
|
|
381
|
-
options
|
|
382
|
-
);
|
|
383
|
-
/**
|
|
384
|
-
* Cancels the current (running) server installation. Cancels the current server installation associated with the given server ID.
|
|
385
|
-
*
|
|
386
|
-
* @param request - The request {@link CancelServerInstallRequest}
|
|
387
|
-
*/
|
|
388
|
-
cancelServerInstall = (request) => this.client.fetch({
|
|
389
|
-
method: "POST",
|
|
390
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/cancel-install`
|
|
391
|
-
});
|
|
392
|
-
/**
|
|
393
|
-
* Get server default partitioning. Get the server default partitioning schema associated with the given server ID and OS ID.
|
|
394
|
-
*
|
|
395
|
-
* @param request - The request {@link GetServerDefaultPartitioningRequest}
|
|
396
|
-
* @returns A Promise of ServerDefaultPartitioning
|
|
397
|
-
*/
|
|
398
|
-
getServerDefaultPartitioning = (request) => this.client.fetch(
|
|
399
|
-
{
|
|
400
|
-
method: "GET",
|
|
401
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/partitioning/${sdkClient.validatePathParam("osId", request.osId)}`
|
|
402
|
-
},
|
|
403
|
-
marshalling_gen.unmarshalServerDefaultPartitioning
|
|
404
|
-
);
|
|
405
|
-
/**
|
|
406
|
-
* Start BMC (Baseboard Management Controller) access for a given baremetal server. Start BMC (Baseboard Management Controller) access associated with the given ID.
|
|
407
|
-
The BMC (Baseboard Management Controller) access is available one hour after the installation of the server.
|
|
408
|
-
*
|
|
409
|
-
* @param request - The request {@link StartBMCAccessRequest}
|
|
410
|
-
*/
|
|
411
|
-
startBMCAccess = (request) => this.client.fetch({
|
|
412
|
-
body: JSON.stringify(
|
|
413
|
-
marshalling_gen.marshalStartBMCAccessRequest(request, this.client.settings)
|
|
414
|
-
),
|
|
415
|
-
headers: jsonContentHeaders,
|
|
416
|
-
method: "POST",
|
|
417
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/bmc-access`
|
|
418
|
-
});
|
|
419
|
-
/**
|
|
420
|
-
* Get BMC (Baseboard Management Controller) access for a given baremetal server. Get the BMC (Baseboard Management Controller) access associated with the given ID.
|
|
421
|
-
*
|
|
422
|
-
* @param request - The request {@link GetBMCAccessRequest}
|
|
423
|
-
* @returns A Promise of BMCAccess
|
|
424
|
-
*/
|
|
425
|
-
getBMCAccess = (request) => this.client.fetch(
|
|
426
|
-
{
|
|
427
|
-
method: "GET",
|
|
428
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/bmc-access`
|
|
429
|
-
},
|
|
430
|
-
marshalling_gen.unmarshalBMCAccess
|
|
431
|
-
);
|
|
432
|
-
/**
|
|
433
|
-
* Waits for {@link BMCAccess} to be in a final state.
|
|
434
|
-
*
|
|
435
|
-
* @param request - The request {@link GetBMCAccessRequest}
|
|
436
|
-
* @param options - The waiting options
|
|
437
|
-
* @returns A Promise of BMCAccess
|
|
438
|
-
*/
|
|
439
|
-
waitForBMCAccess = (request, options) => sdkClient.waitForResource(
|
|
440
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
441
|
-
!content_gen.BMC_ACCESS_TRANSIENT_STATUSES.includes(res.status)
|
|
442
|
-
)),
|
|
443
|
-
this.getBMCAccess,
|
|
444
|
-
request,
|
|
445
|
-
options
|
|
446
|
-
);
|
|
447
|
-
/**
|
|
448
|
-
* Stop BMC (Baseboard Management Controller) access for a given baremetal server. Stop BMC (Baseboard Management Controller) access associated with the given ID.
|
|
449
|
-
*
|
|
450
|
-
* @param request - The request {@link StopBMCAccessRequest}
|
|
451
|
-
*/
|
|
452
|
-
stopBMCAccess = (request) => this.client.fetch({
|
|
453
|
-
method: "DELETE",
|
|
454
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/bmc-access`
|
|
455
|
-
});
|
|
456
|
-
pageOfListOffers = (request = {}) => this.client.fetch(
|
|
457
|
-
{
|
|
458
|
-
method: "GET",
|
|
459
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/offers`,
|
|
460
|
-
urlParams: sdkClient.urlParams(
|
|
461
|
-
["available_only", request.availableOnly],
|
|
462
|
-
["catalog", request.catalog],
|
|
463
|
-
["commercial_range", request.commercialRange],
|
|
464
|
-
["is_failover_block", request.isFailoverBlock],
|
|
465
|
-
["is_failover_ip", request.isFailoverIp],
|
|
466
|
-
["is_rpn_san", request.isRpnSan],
|
|
467
|
-
["order_by", request.orderBy],
|
|
468
|
-
["page", request.page],
|
|
469
|
-
[
|
|
470
|
-
"page_size",
|
|
471
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
472
|
-
],
|
|
473
|
-
["project_id", request.projectId],
|
|
474
|
-
[
|
|
475
|
-
"sold_in",
|
|
476
|
-
request.soldIn && request.soldIn.length > 0 ? request.soldIn.join(",") : void 0
|
|
477
|
-
]
|
|
478
|
-
)
|
|
479
|
-
},
|
|
480
|
-
marshalling_gen.unmarshalListOffersResponse
|
|
481
|
-
);
|
|
482
|
-
/**
|
|
483
|
-
* List offers. List all available server offers.
|
|
484
|
-
*
|
|
485
|
-
* @param request - The request {@link ListOffersRequest}
|
|
486
|
-
* @returns A Promise of ListOffersResponse
|
|
487
|
-
*/
|
|
488
|
-
listOffers = (request = {}) => sdkClient.enrichForPagination("offers", this.pageOfListOffers, request);
|
|
489
|
-
/**
|
|
490
|
-
* Get offer. Return specific offer for the given ID.
|
|
491
|
-
*
|
|
492
|
-
* @param request - The request {@link GetOfferRequest}
|
|
493
|
-
* @returns A Promise of Offer
|
|
494
|
-
*/
|
|
495
|
-
getOffer = (request) => this.client.fetch(
|
|
496
|
-
{
|
|
497
|
-
method: "GET",
|
|
498
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/offers/${sdkClient.validatePathParam("offerId", request.offerId)}`,
|
|
499
|
-
urlParams: sdkClient.urlParams(["project_id", request.projectId])
|
|
500
|
-
},
|
|
501
|
-
marshalling_gen.unmarshalOffer
|
|
502
|
-
);
|
|
503
|
-
pageOfListOS = (request) => this.client.fetch(
|
|
504
|
-
{
|
|
505
|
-
method: "GET",
|
|
506
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/os`,
|
|
507
|
-
urlParams: sdkClient.urlParams(
|
|
508
|
-
["order_by", request.orderBy],
|
|
509
|
-
["page", request.page],
|
|
510
|
-
[
|
|
511
|
-
"page_size",
|
|
512
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
513
|
-
],
|
|
514
|
-
["project_id", request.projectId],
|
|
515
|
-
["server_id", request.serverId],
|
|
516
|
-
["type", request.type]
|
|
517
|
-
)
|
|
518
|
-
},
|
|
519
|
-
marshalling_gen.unmarshalListOSResponse
|
|
520
|
-
);
|
|
521
|
-
/**
|
|
522
|
-
* List all available OS that can be install on a baremetal server.
|
|
523
|
-
*
|
|
524
|
-
* @param request - The request {@link ListOSRequest}
|
|
525
|
-
* @returns A Promise of ListOSResponse
|
|
526
|
-
*/
|
|
527
|
-
listOS = (request) => sdkClient.enrichForPagination("os", this.pageOfListOS, request);
|
|
528
|
-
/**
|
|
529
|
-
* Get an OS with a given ID. Return specific OS for the given ID.
|
|
530
|
-
*
|
|
531
|
-
* @param request - The request {@link GetOSRequest}
|
|
532
|
-
* @returns A Promise of OS
|
|
533
|
-
*/
|
|
534
|
-
getOS = (request) => this.client.fetch(
|
|
535
|
-
{
|
|
536
|
-
method: "GET",
|
|
537
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/os/${sdkClient.validatePathParam("osId", request.osId)}`,
|
|
538
|
-
urlParams: sdkClient.urlParams(
|
|
539
|
-
["project_id", request.projectId],
|
|
540
|
-
["server_id", request.serverId]
|
|
541
|
-
)
|
|
542
|
-
},
|
|
543
|
-
marshalling_gen.unmarshalOS
|
|
544
|
-
);
|
|
545
|
-
/**
|
|
546
|
-
* Update reverse of ip. Update reverse of ip associated with the given ID.
|
|
547
|
-
*
|
|
548
|
-
* @param request - The request {@link UpdateReverseRequest}
|
|
549
|
-
* @returns A Promise of IP
|
|
550
|
-
*/
|
|
551
|
-
updateReverse = (request) => this.client.fetch(
|
|
552
|
-
{
|
|
553
|
-
body: JSON.stringify(
|
|
554
|
-
marshalling_gen.marshalUpdateReverseRequest(request, this.client.settings)
|
|
555
|
-
),
|
|
556
|
-
headers: jsonContentHeaders,
|
|
557
|
-
method: "PATCH",
|
|
558
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/reverses/${sdkClient.validatePathParam("ipId", request.ipId)}`
|
|
559
|
-
},
|
|
560
|
-
marshalling_gen.unmarshalIP
|
|
561
|
-
);
|
|
562
|
-
/**
|
|
563
|
-
* Order failover IPs. Order X failover IPs.
|
|
564
|
-
*
|
|
565
|
-
* @param request - The request {@link CreateFailoverIPsRequest}
|
|
566
|
-
* @returns A Promise of CreateFailoverIPsResponse
|
|
567
|
-
*/
|
|
568
|
-
createFailoverIPs = (request) => this.client.fetch(
|
|
569
|
-
{
|
|
570
|
-
body: JSON.stringify(
|
|
571
|
-
marshalling_gen.marshalCreateFailoverIPsRequest(request, this.client.settings)
|
|
572
|
-
),
|
|
573
|
-
headers: jsonContentHeaders,
|
|
574
|
-
method: "POST",
|
|
575
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips`
|
|
576
|
-
},
|
|
577
|
-
marshalling_gen.unmarshalCreateFailoverIPsResponse
|
|
578
|
-
);
|
|
579
|
-
/**
|
|
580
|
-
* Attach failovers on baremetal server. Attach failovers on the server associated with the given ID.
|
|
581
|
-
*
|
|
582
|
-
* @param request - The request {@link AttachFailoverIPsRequest}
|
|
583
|
-
*/
|
|
584
|
-
attachFailoverIPs = (request) => this.client.fetch({
|
|
585
|
-
body: JSON.stringify(
|
|
586
|
-
marshalling_gen.marshalAttachFailoverIPsRequest(request, this.client.settings)
|
|
587
|
-
),
|
|
588
|
-
headers: jsonContentHeaders,
|
|
589
|
-
method: "POST",
|
|
590
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips/attach`
|
|
591
|
-
});
|
|
592
|
-
/**
|
|
593
|
-
* Detach failovers on baremetal server. Detach failovers on the server associated with the given ID.
|
|
594
|
-
*
|
|
595
|
-
* @param request - The request {@link DetachFailoverIPsRequest}
|
|
596
|
-
*/
|
|
597
|
-
detachFailoverIPs = (request) => this.client.fetch({
|
|
598
|
-
body: JSON.stringify(
|
|
599
|
-
marshalling_gen.marshalDetachFailoverIPsRequest(request, this.client.settings)
|
|
600
|
-
),
|
|
601
|
-
headers: jsonContentHeaders,
|
|
602
|
-
method: "POST",
|
|
603
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips/detach`
|
|
604
|
-
});
|
|
605
|
-
/**
|
|
606
|
-
* Attach a failover IP to a MAC address.
|
|
607
|
-
*
|
|
608
|
-
* @param request - The request {@link AttachFailoverIPToMacAddressRequest}
|
|
609
|
-
* @returns A Promise of IP
|
|
610
|
-
*/
|
|
611
|
-
attachFailoverIPToMacAddress = (request) => this.client.fetch(
|
|
612
|
-
{
|
|
613
|
-
body: JSON.stringify(
|
|
614
|
-
marshalling_gen.marshalAttachFailoverIPToMacAddressRequest(
|
|
615
|
-
request,
|
|
616
|
-
this.client.settings
|
|
617
|
-
)
|
|
618
|
-
),
|
|
619
|
-
headers: jsonContentHeaders,
|
|
620
|
-
method: "POST",
|
|
621
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips/${sdkClient.validatePathParam("ipId", request.ipId)}/attach-to-mac-address`
|
|
622
|
-
},
|
|
623
|
-
marshalling_gen.unmarshalIP
|
|
624
|
-
);
|
|
625
|
-
/**
|
|
626
|
-
* Detach a failover IP from a MAC address.
|
|
627
|
-
*
|
|
628
|
-
* @param request - The request {@link DetachFailoverIPFromMacAddressRequest}
|
|
629
|
-
* @returns A Promise of IP
|
|
630
|
-
*/
|
|
631
|
-
detachFailoverIPFromMacAddress = (request) => this.client.fetch(
|
|
632
|
-
{
|
|
633
|
-
body: "{}",
|
|
634
|
-
headers: jsonContentHeaders,
|
|
635
|
-
method: "POST",
|
|
636
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips/${sdkClient.validatePathParam("ipId", request.ipId)}/detach-from-mac-address`
|
|
637
|
-
},
|
|
638
|
-
marshalling_gen.unmarshalIP
|
|
639
|
-
);
|
|
640
|
-
/**
|
|
641
|
-
* Delete a failover server. Delete the failover associated with the given ID.
|
|
642
|
-
*
|
|
643
|
-
* @param request - The request {@link DeleteFailoverIPRequest}
|
|
644
|
-
*/
|
|
645
|
-
deleteFailoverIP = (request) => this.client.fetch({
|
|
646
|
-
method: "DELETE",
|
|
647
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips/${sdkClient.validatePathParam("ipId", request.ipId)}`
|
|
648
|
-
});
|
|
649
|
-
pageOfListFailoverIPs = (request = {}) => this.client.fetch(
|
|
650
|
-
{
|
|
651
|
-
method: "GET",
|
|
652
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips`,
|
|
653
|
-
urlParams: sdkClient.urlParams(
|
|
654
|
-
["only_available", request.onlyAvailable],
|
|
655
|
-
["order_by", request.orderBy],
|
|
656
|
-
["page", request.page],
|
|
657
|
-
[
|
|
658
|
-
"page_size",
|
|
659
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
660
|
-
],
|
|
661
|
-
[
|
|
662
|
-
"project_id",
|
|
663
|
-
request.projectId ?? this.client.settings.defaultProjectId
|
|
664
|
-
],
|
|
665
|
-
["search", request.search]
|
|
666
|
-
)
|
|
667
|
-
},
|
|
668
|
-
marshalling_gen.unmarshalListFailoverIPsResponse
|
|
669
|
-
);
|
|
670
|
-
/**
|
|
671
|
-
* List failovers for project. List failovers servers for project.
|
|
672
|
-
*
|
|
673
|
-
* @param request - The request {@link ListFailoverIPsRequest}
|
|
674
|
-
* @returns A Promise of ListFailoverIPsResponse
|
|
675
|
-
*/
|
|
676
|
-
listFailoverIPs = (request = {}) => sdkClient.enrichForPagination("failoverIps", this.pageOfListFailoverIPs, request);
|
|
677
|
-
/**
|
|
678
|
-
* Get a specific baremetal server. Get the server associated with the given ID.
|
|
679
|
-
*
|
|
680
|
-
* @param request - The request {@link GetFailoverIPRequest}
|
|
681
|
-
* @returns A Promise of FailoverIP
|
|
682
|
-
*/
|
|
683
|
-
getFailoverIP = (request) => this.client.fetch(
|
|
684
|
-
{
|
|
685
|
-
method: "GET",
|
|
686
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/failover-ips/${sdkClient.validatePathParam("ipId", request.ipId)}`
|
|
687
|
-
},
|
|
688
|
-
marshalling_gen.unmarshalFailoverIP
|
|
689
|
-
);
|
|
690
|
-
/**
|
|
691
|
-
* Get remaining quota.
|
|
692
|
-
*
|
|
693
|
-
* @param request - The request {@link GetRemainingQuotaRequest}
|
|
694
|
-
* @returns A Promise of GetRemainingQuotaResponse
|
|
695
|
-
*/
|
|
696
|
-
getRemainingQuota = (request = {}) => this.client.fetch(
|
|
697
|
-
{
|
|
698
|
-
method: "GET",
|
|
699
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/remaining-quota`,
|
|
700
|
-
urlParams: sdkClient.urlParams(["project_id", request.projectId])
|
|
701
|
-
},
|
|
702
|
-
marshalling_gen.unmarshalGetRemainingQuotaResponse
|
|
703
|
-
);
|
|
704
|
-
/**
|
|
705
|
-
* Get raid. Return raid for the given server ID.
|
|
706
|
-
*
|
|
707
|
-
* @param request - The request {@link GetRaidRequest}
|
|
708
|
-
* @returns A Promise of Raid
|
|
709
|
-
*/
|
|
710
|
-
getRaid = (request) => this.client.fetch(
|
|
711
|
-
{
|
|
712
|
-
method: "GET",
|
|
713
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/raid`
|
|
714
|
-
},
|
|
715
|
-
marshalling_gen.unmarshalRaid
|
|
716
|
-
);
|
|
717
|
-
/**
|
|
718
|
-
* Update RAID. Update RAID associated with the given server ID.
|
|
719
|
-
*
|
|
720
|
-
* @param request - The request {@link UpdateRaidRequest}
|
|
721
|
-
*/
|
|
722
|
-
updateRaid = (request) => this.client.fetch({
|
|
723
|
-
body: JSON.stringify(
|
|
724
|
-
marshalling_gen.marshalUpdateRaidRequest(request, this.client.settings)
|
|
725
|
-
),
|
|
726
|
-
headers: jsonContentHeaders,
|
|
727
|
-
method: "POST",
|
|
728
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/update-raid`
|
|
729
|
-
});
|
|
730
|
-
/**
|
|
731
|
-
* Start in rescue baremetal server. Start in rescue the server associated with the given ID.
|
|
732
|
-
*
|
|
733
|
-
* @param request - The request {@link StartRescueRequest}
|
|
734
|
-
* @returns A Promise of Rescue
|
|
735
|
-
*/
|
|
736
|
-
startRescue = (request) => this.client.fetch(
|
|
737
|
-
{
|
|
738
|
-
body: JSON.stringify(
|
|
739
|
-
marshalling_gen.marshalStartRescueRequest(request, this.client.settings)
|
|
740
|
-
),
|
|
741
|
-
headers: jsonContentHeaders,
|
|
742
|
-
method: "POST",
|
|
743
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/rescue`
|
|
744
|
-
},
|
|
745
|
-
marshalling_gen.unmarshalRescue
|
|
746
|
-
);
|
|
747
|
-
/**
|
|
748
|
-
* Get rescue information. Return rescue information for the given server ID.
|
|
749
|
-
*
|
|
750
|
-
* @param request - The request {@link GetRescueRequest}
|
|
751
|
-
* @returns A Promise of Rescue
|
|
752
|
-
*/
|
|
753
|
-
getRescue = (request) => this.client.fetch(
|
|
754
|
-
{
|
|
755
|
-
method: "GET",
|
|
756
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/rescue`
|
|
757
|
-
},
|
|
758
|
-
marshalling_gen.unmarshalRescue
|
|
759
|
-
);
|
|
760
|
-
/**
|
|
761
|
-
* Stop rescue on baremetal server. Stop rescue on the server associated with the given ID.
|
|
762
|
-
*
|
|
763
|
-
* @param request - The request {@link StopRescueRequest}
|
|
764
|
-
*/
|
|
765
|
-
stopRescue = (request) => this.client.fetch({
|
|
766
|
-
method: "DELETE",
|
|
767
|
-
path: `/dedibox/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/rescue`
|
|
768
|
-
});
|
|
769
|
-
}
|
|
770
|
-
class BillingAPI extends sdkClient.API {
|
|
771
|
-
pageOfListInvoices = (request = {}) => this.client.fetch(
|
|
772
|
-
{
|
|
773
|
-
method: "GET",
|
|
774
|
-
path: `/dedibox/v1/invoices`,
|
|
775
|
-
urlParams: sdkClient.urlParams(
|
|
776
|
-
["order_by", request.orderBy],
|
|
777
|
-
["page", request.page],
|
|
778
|
-
[
|
|
779
|
-
"page_size",
|
|
780
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
781
|
-
],
|
|
782
|
-
["project_id", request.projectId]
|
|
783
|
-
)
|
|
784
|
-
},
|
|
785
|
-
marshalling_gen.unmarshalListInvoicesResponse
|
|
786
|
-
);
|
|
787
|
-
listInvoices = (request = {}) => sdkClient.enrichForPagination("invoices", this.pageOfListInvoices, request);
|
|
788
|
-
getInvoice = (request) => this.client.fetch(
|
|
789
|
-
{
|
|
790
|
-
method: "GET",
|
|
791
|
-
path: `/dedibox/v1/invoices/${sdkClient.validatePathParam("invoiceId", request.invoiceId)}`
|
|
792
|
-
},
|
|
793
|
-
marshalling_gen.unmarshalInvoice
|
|
794
|
-
);
|
|
795
|
-
downloadInvoice = (request) => this.client.fetch({
|
|
796
|
-
method: "GET",
|
|
797
|
-
path: `/dedibox/v1/invoices/${sdkClient.validatePathParam("invoiceId", request.invoiceId)}/download`,
|
|
798
|
-
urlParams: sdkClient.urlParams(["dl", 1]),
|
|
799
|
-
responseType: "blob"
|
|
800
|
-
});
|
|
801
|
-
pageOfListRefunds = (request = {}) => this.client.fetch(
|
|
802
|
-
{
|
|
803
|
-
method: "GET",
|
|
804
|
-
path: `/dedibox/v1/refunds`,
|
|
805
|
-
urlParams: sdkClient.urlParams(
|
|
806
|
-
["order_by", request.orderBy],
|
|
807
|
-
["page", request.page],
|
|
808
|
-
[
|
|
809
|
-
"page_size",
|
|
810
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
811
|
-
],
|
|
812
|
-
["project_id", request.projectId]
|
|
813
|
-
)
|
|
814
|
-
},
|
|
815
|
-
marshalling_gen.unmarshalListRefundsResponse
|
|
816
|
-
);
|
|
817
|
-
listRefunds = (request = {}) => sdkClient.enrichForPagination("refunds", this.pageOfListRefunds, request);
|
|
818
|
-
getRefund = (request) => this.client.fetch(
|
|
819
|
-
{
|
|
820
|
-
method: "GET",
|
|
821
|
-
path: `/dedibox/v1/refunds/${sdkClient.validatePathParam("refundId", request.refundId)}`
|
|
822
|
-
},
|
|
823
|
-
marshalling_gen.unmarshalRefund
|
|
824
|
-
);
|
|
825
|
-
downloadRefund = (request) => this.client.fetch({
|
|
826
|
-
method: "GET",
|
|
827
|
-
path: `/dedibox/v1/refunds/${sdkClient.validatePathParam("refundId", request.refundId)}/download`,
|
|
828
|
-
urlParams: sdkClient.urlParams(["dl", 1]),
|
|
829
|
-
responseType: "blob"
|
|
830
|
-
});
|
|
831
|
-
canOrder = (request = {}) => this.client.fetch(
|
|
832
|
-
{
|
|
833
|
-
method: "GET",
|
|
834
|
-
path: `/dedibox/v1/can-order`,
|
|
835
|
-
urlParams: sdkClient.urlParams([
|
|
836
|
-
"project_id",
|
|
837
|
-
request.projectId ?? this.client.settings.defaultProjectId
|
|
838
|
-
])
|
|
839
|
-
},
|
|
840
|
-
marshalling_gen.unmarshalCanOrderResponse
|
|
841
|
-
);
|
|
842
|
-
}
|
|
843
|
-
class IPv6BlockAPI extends sdkClient.API {
|
|
844
|
-
/**
|
|
845
|
-
* Get IPv6 block quota. Get IPv6 block quota with the given project ID.
|
|
846
|
-
/48 one per organization.
|
|
847
|
-
/56 link to your number of server.
|
|
848
|
-
/64 link to your number of failover IP.
|
|
849
|
-
*
|
|
850
|
-
* @param request - The request {@link IPv6BlockApiGetIPv6BlockQuotasRequest}
|
|
851
|
-
* @returns A Promise of GetIPv6BlockQuotasResponse
|
|
852
|
-
*/
|
|
853
|
-
getIPv6BlockQuotas = (request = {}) => this.client.fetch(
|
|
854
|
-
{
|
|
855
|
-
method: "GET",
|
|
856
|
-
path: `/dedibox/v1/ipv6-block-quotas`,
|
|
857
|
-
urlParams: sdkClient.urlParams(["project_id", request.projectId])
|
|
858
|
-
},
|
|
859
|
-
marshalling_gen.unmarshalGetIPv6BlockQuotasResponse
|
|
860
|
-
);
|
|
861
|
-
/**
|
|
862
|
-
* Create IPv6 block for baremetal server. Create IPv6 block associated with the given project ID.
|
|
863
|
-
*
|
|
864
|
-
* @param request - The request {@link IPv6BlockApiCreateIPv6BlockRequest}
|
|
865
|
-
* @returns A Promise of IPv6Block
|
|
866
|
-
*/
|
|
867
|
-
createIPv6Block = (request = {}) => this.client.fetch(
|
|
868
|
-
{
|
|
869
|
-
body: JSON.stringify(
|
|
870
|
-
marshalling_gen.marshalIPv6BlockApiCreateIPv6BlockRequest(
|
|
871
|
-
request,
|
|
872
|
-
this.client.settings
|
|
873
|
-
)
|
|
874
|
-
),
|
|
875
|
-
headers: jsonContentHeaders,
|
|
876
|
-
method: "POST",
|
|
877
|
-
path: `/dedibox/v1/ipv6-block`
|
|
878
|
-
},
|
|
879
|
-
marshalling_gen.unmarshalIPv6Block
|
|
880
|
-
);
|
|
881
|
-
/**
|
|
882
|
-
* List IPv6 blocks. List IPv6 blocks associated given project ID.
|
|
883
|
-
*
|
|
884
|
-
* @param request - The request {@link IPv6BlockApiListIPv6BlocksRequest}
|
|
885
|
-
* @returns A Promise of ListIPv6BlocksResponse
|
|
886
|
-
*/
|
|
887
|
-
listIPv6Blocks = (request = {}) => this.client.fetch(
|
|
888
|
-
{
|
|
889
|
-
method: "GET",
|
|
890
|
-
path: `/dedibox/v1/ipv6-blocks`,
|
|
891
|
-
urlParams: sdkClient.urlParams(["project_id", request.projectId])
|
|
892
|
-
},
|
|
893
|
-
marshalling_gen.unmarshalListIPv6BlocksResponse
|
|
894
|
-
);
|
|
895
|
-
/**
|
|
896
|
-
* Get first IPv6 block. Get the first IPv6 block associated with the given project ID.
|
|
897
|
-
*
|
|
898
|
-
* @param request - The request {@link IPv6BlockApiGetIPv6BlockRequest}
|
|
899
|
-
* @returns A Promise of IPv6Block
|
|
900
|
-
*/
|
|
901
|
-
getIPv6Block = (request = {}) => this.client.fetch(
|
|
902
|
-
{
|
|
903
|
-
method: "GET",
|
|
904
|
-
path: `/dedibox/v1/ipv6-block`,
|
|
905
|
-
urlParams: sdkClient.urlParams(["project_id", request.projectId])
|
|
906
|
-
},
|
|
907
|
-
marshalling_gen.unmarshalIPv6Block
|
|
908
|
-
);
|
|
909
|
-
/**
|
|
910
|
-
* Update IPv6 block. Update DNS associated to IPv6 block.
|
|
911
|
-
If DNS is used, minimum of 2 is necessary and maximum of 5 (no duplicate).
|
|
912
|
-
*
|
|
913
|
-
* @param request - The request {@link IPv6BlockApiUpdateIPv6BlockRequest}
|
|
914
|
-
* @returns A Promise of IPv6Block
|
|
915
|
-
*/
|
|
916
|
-
updateIPv6Block = (request) => this.client.fetch(
|
|
917
|
-
{
|
|
918
|
-
body: JSON.stringify(
|
|
919
|
-
marshalling_gen.marshalIPv6BlockApiUpdateIPv6BlockRequest(
|
|
920
|
-
request,
|
|
921
|
-
this.client.settings
|
|
922
|
-
)
|
|
923
|
-
),
|
|
924
|
-
headers: jsonContentHeaders,
|
|
925
|
-
method: "PATCH",
|
|
926
|
-
path: `/dedibox/v1/ipv6-blocks/${sdkClient.validatePathParam("blockId", request.blockId)}`
|
|
927
|
-
},
|
|
928
|
-
marshalling_gen.unmarshalIPv6Block
|
|
929
|
-
);
|
|
930
|
-
/**
|
|
931
|
-
* Delete IPv6 block. Delete IPv6 block subnet with the given ID.
|
|
932
|
-
*
|
|
933
|
-
* @param request - The request {@link IPv6BlockApiDeleteIPv6BlockRequest}
|
|
934
|
-
*/
|
|
935
|
-
deleteIPv6Block = (request) => this.client.fetch({
|
|
936
|
-
method: "DELETE",
|
|
937
|
-
path: `/dedibox/v1/ipv6-blocks/${sdkClient.validatePathParam("blockId", request.blockId)}`
|
|
938
|
-
});
|
|
939
|
-
/**
|
|
940
|
-
* Create IPv6 block subnet. Create IPv6 block subnet for the given IP ID.
|
|
941
|
-
/48 could create subnet in /56 (quota link to your number of server).
|
|
942
|
-
/56 could create subnet in /64 (quota link to your number of failover IP).
|
|
943
|
-
*
|
|
944
|
-
* @param request - The request {@link IPv6BlockApiCreateIPv6BlockSubnetRequest}
|
|
945
|
-
* @returns A Promise of IPv6Block
|
|
946
|
-
*/
|
|
947
|
-
createIPv6BlockSubnet = (request) => this.client.fetch(
|
|
948
|
-
{
|
|
949
|
-
body: JSON.stringify(
|
|
950
|
-
marshalling_gen.marshalIPv6BlockApiCreateIPv6BlockSubnetRequest(
|
|
951
|
-
request,
|
|
952
|
-
this.client.settings
|
|
953
|
-
)
|
|
954
|
-
),
|
|
955
|
-
headers: jsonContentHeaders,
|
|
956
|
-
method: "POST",
|
|
957
|
-
path: `/dedibox/v1/ipv6-blocks/${sdkClient.validatePathParam("blockId", request.blockId)}/subnets`
|
|
958
|
-
},
|
|
959
|
-
marshalling_gen.unmarshalIPv6Block
|
|
960
|
-
);
|
|
961
|
-
/**
|
|
962
|
-
* List available IPv6 block subnets. List all available IPv6 block subnets for given IP ID.
|
|
963
|
-
*
|
|
964
|
-
* @param request - The request {@link IPv6BlockApiListIPv6BlockSubnetsAvailableRequest}
|
|
965
|
-
* @returns A Promise of ListIPv6BlockSubnetsAvailableResponse
|
|
966
|
-
*/
|
|
967
|
-
listIPv6BlockSubnetsAvailable = (request) => this.client.fetch(
|
|
968
|
-
{
|
|
969
|
-
method: "GET",
|
|
970
|
-
path: `/dedibox/v1/ipv6-blocks/${sdkClient.validatePathParam("blockId", request.blockId)}/subnets`
|
|
971
|
-
},
|
|
972
|
-
marshalling_gen.unmarshalListIPv6BlockSubnetsAvailableResponse
|
|
973
|
-
);
|
|
974
|
-
}
|
|
975
|
-
class RpnAPI extends sdkClient.API {
|
|
976
|
-
pageOfListRpnServerCapabilities = (request = {}) => this.client.fetch(
|
|
977
|
-
{
|
|
978
|
-
method: "GET",
|
|
979
|
-
path: `/dedibox/v1/rpn/server-capabilities`,
|
|
980
|
-
urlParams: sdkClient.urlParams(
|
|
981
|
-
["order_by", request.orderBy],
|
|
982
|
-
["page", request.page],
|
|
983
|
-
[
|
|
984
|
-
"page_size",
|
|
985
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
986
|
-
],
|
|
987
|
-
["project_id", request.projectId]
|
|
988
|
-
)
|
|
989
|
-
},
|
|
990
|
-
marshalling_gen.unmarshalListRpnServerCapabilitiesResponse
|
|
991
|
-
);
|
|
992
|
-
listRpnServerCapabilities = (request = {}) => sdkClient.enrichForPagination(
|
|
993
|
-
"servers",
|
|
994
|
-
this.pageOfListRpnServerCapabilities,
|
|
995
|
-
request
|
|
996
|
-
);
|
|
997
|
-
getRpnStatus = (request = {}) => this.client.fetch(
|
|
998
|
-
{
|
|
999
|
-
method: "GET",
|
|
1000
|
-
path: `/dedibox/v1/rpn/status`,
|
|
1001
|
-
urlParams: sdkClient.urlParams(
|
|
1002
|
-
["project_id", request.projectId],
|
|
1003
|
-
["rpnv1_group_id", request.rpnv1GroupId],
|
|
1004
|
-
["rpnv2_group_id", request.rpnv2GroupId]
|
|
1005
|
-
)
|
|
1006
|
-
},
|
|
1007
|
-
marshalling_gen.unmarshalGetRpnStatusResponse
|
|
1008
|
-
);
|
|
1009
|
-
}
|
|
1010
|
-
class RpnSanAPI extends sdkClient.API {
|
|
1011
|
-
pageOfListRpnSans = (request = {}) => this.client.fetch(
|
|
1012
|
-
{
|
|
1013
|
-
method: "GET",
|
|
1014
|
-
path: `/dedibox/v1/rpn-sans`,
|
|
1015
|
-
urlParams: sdkClient.urlParams(
|
|
1016
|
-
["order_by", request.orderBy],
|
|
1017
|
-
["page", request.page],
|
|
1018
|
-
[
|
|
1019
|
-
"page_size",
|
|
1020
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
1021
|
-
],
|
|
1022
|
-
["project_id", request.projectId]
|
|
1023
|
-
)
|
|
1024
|
-
},
|
|
1025
|
-
marshalling_gen.unmarshalListRpnSansResponse
|
|
1026
|
-
);
|
|
1027
|
-
listRpnSans = (request = {}) => sdkClient.enrichForPagination("rpnSans", this.pageOfListRpnSans, request);
|
|
1028
|
-
getRpnSan = (request) => this.client.fetch(
|
|
1029
|
-
{
|
|
1030
|
-
method: "GET",
|
|
1031
|
-
path: `/dedibox/v1/rpn-sans/${sdkClient.validatePathParam("rpnSanId", request.rpnSanId)}`
|
|
1032
|
-
},
|
|
1033
|
-
marshalling_gen.unmarshalRpnSan
|
|
1034
|
-
);
|
|
1035
|
-
/**
|
|
1036
|
-
* Waits for {@link RpnSan} to be in a final state.
|
|
1037
|
-
*
|
|
1038
|
-
* @param request - The request {@link RpnSanApiGetRpnSanRequest}
|
|
1039
|
-
* @param options - The waiting options
|
|
1040
|
-
* @returns A Promise of RpnSan
|
|
1041
|
-
*/
|
|
1042
|
-
waitForRpnSan = (request, options) => sdkClient.waitForResource(
|
|
1043
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
1044
|
-
!content_gen.RPN_SAN_TRANSIENT_STATUSES.includes(res.status)
|
|
1045
|
-
)),
|
|
1046
|
-
this.getRpnSan,
|
|
1047
|
-
request,
|
|
1048
|
-
options
|
|
1049
|
-
);
|
|
1050
|
-
deleteRpnSan = (request) => this.client.fetch({
|
|
1051
|
-
method: "DELETE",
|
|
1052
|
-
path: `/dedibox/v1/rpn-sans/${sdkClient.validatePathParam("rpnSanId", request.rpnSanId)}`
|
|
1053
|
-
});
|
|
1054
|
-
createRpnSan = (request) => this.client.fetch(
|
|
1055
|
-
{
|
|
1056
|
-
body: JSON.stringify(
|
|
1057
|
-
marshalling_gen.marshalRpnSanApiCreateRpnSanRequest(request, this.client.settings)
|
|
1058
|
-
),
|
|
1059
|
-
headers: jsonContentHeaders,
|
|
1060
|
-
method: "POST",
|
|
1061
|
-
path: `/dedibox/v1/rpn-sans`
|
|
1062
|
-
},
|
|
1063
|
-
marshalling_gen.unmarshalService
|
|
1064
|
-
);
|
|
1065
|
-
listIps = (request) => this.client.fetch(
|
|
1066
|
-
{
|
|
1067
|
-
method: "GET",
|
|
1068
|
-
path: `/dedibox/v1/rpn-sans/${sdkClient.validatePathParam("rpnSanId", request.rpnSanId)}/ips`,
|
|
1069
|
-
urlParams: sdkClient.urlParams(["type", request.type])
|
|
1070
|
-
},
|
|
1071
|
-
marshalling_gen.unmarshalListIpsResponse
|
|
1072
|
-
);
|
|
1073
|
-
addIp = (request) => this.client.fetch({
|
|
1074
|
-
body: JSON.stringify(
|
|
1075
|
-
marshalling_gen.marshalRpnSanApiAddIpRequest(request, this.client.settings)
|
|
1076
|
-
),
|
|
1077
|
-
headers: jsonContentHeaders,
|
|
1078
|
-
method: "POST",
|
|
1079
|
-
path: `/dedibox/v1/rpn-sans/${sdkClient.validatePathParam("rpnSanId", request.rpnSanId)}/ips`
|
|
1080
|
-
});
|
|
1081
|
-
removeIp = (request) => this.client.fetch({
|
|
1082
|
-
body: JSON.stringify(
|
|
1083
|
-
marshalling_gen.marshalRpnSanApiRemoveIpRequest(request, this.client.settings)
|
|
1084
|
-
),
|
|
1085
|
-
headers: jsonContentHeaders,
|
|
1086
|
-
method: "DELETE",
|
|
1087
|
-
path: `/dedibox/v1/rpn-sans/${sdkClient.validatePathParam("rpnSanId", request.rpnSanId)}/ips`
|
|
1088
|
-
});
|
|
1089
|
-
listAvailableIps = (request) => this.client.fetch(
|
|
1090
|
-
{
|
|
1091
|
-
method: "GET",
|
|
1092
|
-
path: `/dedibox/v1/rpn-sans/${sdkClient.validatePathParam("rpnSanId", request.rpnSanId)}/available-ips`,
|
|
1093
|
-
urlParams: sdkClient.urlParams(["type", request.type])
|
|
1094
|
-
},
|
|
1095
|
-
marshalling_gen.unmarshalListIpsResponse
|
|
1096
|
-
);
|
|
1097
|
-
}
|
|
1098
|
-
class RpnV1API extends sdkClient.API {
|
|
1099
|
-
pageOfListRpnGroups = (request = {}) => this.client.fetch(
|
|
1100
|
-
{
|
|
1101
|
-
method: "GET",
|
|
1102
|
-
path: `/dedibox/v1/rpnv1/groups`,
|
|
1103
|
-
urlParams: sdkClient.urlParams(
|
|
1104
|
-
["order_by", request.orderBy],
|
|
1105
|
-
["page", request.page],
|
|
1106
|
-
[
|
|
1107
|
-
"page_size",
|
|
1108
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
1109
|
-
],
|
|
1110
|
-
["project_id", request.projectId]
|
|
1111
|
-
)
|
|
1112
|
-
},
|
|
1113
|
-
marshalling_gen.unmarshalListRpnGroupsResponse
|
|
1114
|
-
);
|
|
1115
|
-
listRpnGroups = (request = {}) => sdkClient.enrichForPagination("rpnGroups", this.pageOfListRpnGroups, request);
|
|
1116
|
-
getRpnGroup = (request) => this.client.fetch(
|
|
1117
|
-
{
|
|
1118
|
-
method: "GET",
|
|
1119
|
-
path: `/dedibox/v1/rpnv1/groups/${sdkClient.validatePathParam("groupId", request.groupId)}`
|
|
1120
|
-
},
|
|
1121
|
-
marshalling_gen.unmarshalRpnGroup
|
|
1122
|
-
);
|
|
1123
|
-
createRpnGroup = (request) => this.client.fetch(
|
|
1124
|
-
{
|
|
1125
|
-
body: JSON.stringify(
|
|
1126
|
-
marshalling_gen.marshalRpnV1ApiCreateRpnGroupRequest(request, this.client.settings)
|
|
1127
|
-
),
|
|
1128
|
-
headers: jsonContentHeaders,
|
|
1129
|
-
method: "POST",
|
|
1130
|
-
path: `/dedibox/v1/rpnv1/groups`
|
|
1131
|
-
},
|
|
1132
|
-
marshalling_gen.unmarshalRpnGroup
|
|
1133
|
-
);
|
|
1134
|
-
deleteRpnGroup = (request) => this.client.fetch({
|
|
1135
|
-
method: "DELETE",
|
|
1136
|
-
path: `/dedibox/v1/rpnv1/groups/${sdkClient.validatePathParam("groupId", request.groupId)}`
|
|
1137
|
-
});
|
|
1138
|
-
updateRpnGroupName = (request) => this.client.fetch(
|
|
1139
|
-
{
|
|
1140
|
-
body: JSON.stringify(
|
|
1141
|
-
marshalling_gen.marshalRpnV1ApiUpdateRpnGroupNameRequest(
|
|
1142
|
-
request,
|
|
1143
|
-
this.client.settings
|
|
1144
|
-
)
|
|
1145
|
-
),
|
|
1146
|
-
headers: jsonContentHeaders,
|
|
1147
|
-
method: "PATCH",
|
|
1148
|
-
path: `/dedibox/v1/rpnv1/groups/${sdkClient.validatePathParam("groupId", request.groupId)}`
|
|
1149
|
-
},
|
|
1150
|
-
marshalling_gen.unmarshalRpnGroup
|
|
1151
|
-
);
|
|
1152
|
-
pageOfListRpnGroupMembers = (request) => this.client.fetch(
|
|
1153
|
-
{
|
|
1154
|
-
method: "GET",
|
|
1155
|
-
path: `/dedibox/v1/rpnv1/groups/${sdkClient.validatePathParam("groupId", request.groupId)}/members`,
|
|
1156
|
-
urlParams: sdkClient.urlParams(
|
|
1157
|
-
["order_by", request.orderBy],
|
|
1158
|
-
["page", request.page],
|
|
1159
|
-
[
|
|
1160
|
-
"page_size",
|
|
1161
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
1162
|
-
],
|
|
1163
|
-
["project_id", request.projectId]
|
|
1164
|
-
)
|
|
1165
|
-
},
|
|
1166
|
-
marshalling_gen.unmarshalListRpnGroupMembersResponse
|
|
1167
|
-
);
|
|
1168
|
-
listRpnGroupMembers = (request) => sdkClient.enrichForPagination("members", this.pageOfListRpnGroupMembers, request);
|
|
1169
|
-
rpnGroupInvite = (request) => this.client.fetch({
|
|
1170
|
-
body: JSON.stringify(
|
|
1171
|
-
marshalling_gen.marshalRpnV1ApiRpnGroupInviteRequest(request, this.client.settings)
|
|
1172
|
-
),
|
|
1173
|
-
headers: jsonContentHeaders,
|
|
1174
|
-
method: "POST",
|
|
1175
|
-
path: `/dedibox/v1/rpnv1/groups/${sdkClient.validatePathParam("groupId", request.groupId)}/invite`
|
|
1176
|
-
});
|
|
1177
|
-
leaveRpnGroup = (request) => this.client.fetch({
|
|
1178
|
-
body: JSON.stringify(
|
|
1179
|
-
marshalling_gen.marshalRpnV1ApiLeaveRpnGroupRequest(request, this.client.settings)
|
|
1180
|
-
),
|
|
1181
|
-
headers: jsonContentHeaders,
|
|
1182
|
-
method: "POST",
|
|
1183
|
-
path: `/dedibox/v1/rpnv1/groups/${sdkClient.validatePathParam("groupId", request.groupId)}/leave`
|
|
1184
|
-
});
|
|
1185
|
-
addRpnGroupMembers = (request) => this.client.fetch(
|
|
1186
|
-
{
|
|
1187
|
-
body: JSON.stringify(
|
|
1188
|
-
marshalling_gen.marshalRpnV1ApiAddRpnGroupMembersRequest(
|
|
1189
|
-
request,
|
|
1190
|
-
this.client.settings
|
|
1191
|
-
)
|
|
1192
|
-
),
|
|
1193
|
-
headers: jsonContentHeaders,
|
|
1194
|
-
method: "POST",
|
|
1195
|
-
path: `/dedibox/v1/rpnv1/groups/${sdkClient.validatePathParam("groupId", request.groupId)}/members`
|
|
1196
|
-
},
|
|
1197
|
-
marshalling_gen.unmarshalRpnGroup
|
|
1198
|
-
);
|
|
1199
|
-
deleteRpnGroupMembers = (request) => this.client.fetch(
|
|
1200
|
-
{
|
|
1201
|
-
body: JSON.stringify(
|
|
1202
|
-
marshalling_gen.marshalRpnV1ApiDeleteRpnGroupMembersRequest(
|
|
1203
|
-
request,
|
|
1204
|
-
this.client.settings
|
|
1205
|
-
)
|
|
1206
|
-
),
|
|
1207
|
-
headers: jsonContentHeaders,
|
|
1208
|
-
method: "DELETE",
|
|
1209
|
-
path: `/dedibox/v1/rpnv1/groups/${sdkClient.validatePathParam("groupId", request.groupId)}/members`
|
|
1210
|
-
},
|
|
1211
|
-
marshalling_gen.unmarshalRpnGroup
|
|
1212
|
-
);
|
|
1213
|
-
pageOfListRpnCapableServers = (request = {}) => this.client.fetch(
|
|
1214
|
-
{
|
|
1215
|
-
method: "GET",
|
|
1216
|
-
path: `/dedibox/v1/rpnv1/capable-servers`,
|
|
1217
|
-
urlParams: sdkClient.urlParams(
|
|
1218
|
-
["order_by", request.orderBy],
|
|
1219
|
-
["page", request.page],
|
|
1220
|
-
[
|
|
1221
|
-
"page_size",
|
|
1222
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
1223
|
-
],
|
|
1224
|
-
["project_id", request.projectId]
|
|
1225
|
-
)
|
|
1226
|
-
},
|
|
1227
|
-
marshalling_gen.unmarshalListRpnCapableServersResponse
|
|
1228
|
-
);
|
|
1229
|
-
listRpnCapableServers = (request = {}) => sdkClient.enrichForPagination("servers", this.pageOfListRpnCapableServers, request);
|
|
1230
|
-
pageOfListRpnCapableSanServers = (request = {}) => this.client.fetch(
|
|
1231
|
-
{
|
|
1232
|
-
method: "GET",
|
|
1233
|
-
path: `/dedibox/v1/rpnv1/capable-san-servers`,
|
|
1234
|
-
urlParams: sdkClient.urlParams(
|
|
1235
|
-
["order_by", request.orderBy],
|
|
1236
|
-
["page", request.page],
|
|
1237
|
-
[
|
|
1238
|
-
"page_size",
|
|
1239
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
1240
|
-
],
|
|
1241
|
-
["project_id", request.projectId]
|
|
1242
|
-
)
|
|
1243
|
-
},
|
|
1244
|
-
marshalling_gen.unmarshalListRpnCapableSanServersResponse
|
|
1245
|
-
);
|
|
1246
|
-
listRpnCapableSanServers = (request = {}) => sdkClient.enrichForPagination(
|
|
1247
|
-
"sanServers",
|
|
1248
|
-
this.pageOfListRpnCapableSanServers,
|
|
1249
|
-
request
|
|
1250
|
-
);
|
|
1251
|
-
pageOfListRpnInvites = (request = {}) => this.client.fetch(
|
|
1252
|
-
{
|
|
1253
|
-
method: "GET",
|
|
1254
|
-
path: `/dedibox/v1/rpnv1/invites`,
|
|
1255
|
-
urlParams: sdkClient.urlParams(
|
|
1256
|
-
["order_by", request.orderBy],
|
|
1257
|
-
["page", request.page],
|
|
1258
|
-
[
|
|
1259
|
-
"page_size",
|
|
1260
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
1261
|
-
],
|
|
1262
|
-
[
|
|
1263
|
-
"project_id",
|
|
1264
|
-
request.projectId ?? this.client.settings.defaultProjectId
|
|
1265
|
-
]
|
|
1266
|
-
)
|
|
1267
|
-
},
|
|
1268
|
-
marshalling_gen.unmarshalListRpnInvitesResponse
|
|
1269
|
-
);
|
|
1270
|
-
listRpnInvites = (request = {}) => sdkClient.enrichForPagination("members", this.pageOfListRpnInvites, request);
|
|
1271
|
-
acceptRpnInvite = (request) => this.client.fetch({
|
|
1272
|
-
method: "POST",
|
|
1273
|
-
path: `/dedibox/v1/rpnv1/invites/${sdkClient.validatePathParam("memberId", request.memberId)}/accept`
|
|
1274
|
-
});
|
|
1275
|
-
refuseRpnInvite = (request) => this.client.fetch({
|
|
1276
|
-
method: "POST",
|
|
1277
|
-
path: `/dedibox/v1/rpnv1/invites/${sdkClient.validatePathParam("memberId", request.memberId)}/refuse`
|
|
1278
|
-
});
|
|
1279
|
-
}
|
|
1280
|
-
class RpnV2API extends sdkClient.API {
|
|
1281
|
-
pageOfListRpnV2Groups = (request = {}) => this.client.fetch(
|
|
1282
|
-
{
|
|
1283
|
-
method: "GET",
|
|
1284
|
-
path: `/dedibox/v1/rpnv2/groups`,
|
|
1285
|
-
urlParams: sdkClient.urlParams(
|
|
1286
|
-
["order_by", request.orderBy],
|
|
1287
|
-
["page", request.page],
|
|
1288
|
-
[
|
|
1289
|
-
"page_size",
|
|
1290
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
1291
|
-
],
|
|
1292
|
-
["project_id", request.projectId]
|
|
1293
|
-
)
|
|
1294
|
-
},
|
|
1295
|
-
marshalling_gen.unmarshalListRpnV2GroupsResponse
|
|
1296
|
-
);
|
|
1297
|
-
listRpnV2Groups = (request = {}) => sdkClient.enrichForPagination("rpnGroups", this.pageOfListRpnV2Groups, request);
|
|
1298
|
-
pageOfListRpnV2Members = (request) => this.client.fetch(
|
|
1299
|
-
{
|
|
1300
|
-
method: "GET",
|
|
1301
|
-
path: `/dedibox/v1/rpnv2/groups/${sdkClient.validatePathParam("groupId", request.groupId)}/members`,
|
|
1302
|
-
urlParams: sdkClient.urlParams(
|
|
1303
|
-
["order_by", request.orderBy],
|
|
1304
|
-
["page", request.page],
|
|
1305
|
-
[
|
|
1306
|
-
"page_size",
|
|
1307
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
1308
|
-
],
|
|
1309
|
-
["type", request.type]
|
|
1310
|
-
)
|
|
1311
|
-
},
|
|
1312
|
-
marshalling_gen.unmarshalListRpnV2MembersResponse
|
|
1313
|
-
);
|
|
1314
|
-
listRpnV2Members = (request) => sdkClient.enrichForPagination("members", this.pageOfListRpnV2Members, request);
|
|
1315
|
-
getRpnV2Group = (request) => this.client.fetch(
|
|
1316
|
-
{
|
|
1317
|
-
method: "GET",
|
|
1318
|
-
path: `/dedibox/v1/rpnv2/groups/${sdkClient.validatePathParam("groupId", request.groupId)}`
|
|
1319
|
-
},
|
|
1320
|
-
marshalling_gen.unmarshalRpnV2Group
|
|
1321
|
-
);
|
|
1322
|
-
/**
|
|
1323
|
-
* Waits for {@link RpnV2Group} to be in a final state.
|
|
1324
|
-
*
|
|
1325
|
-
* @param request - The request {@link RpnV2ApiGetRpnV2GroupRequest}
|
|
1326
|
-
* @param options - The waiting options
|
|
1327
|
-
* @returns A Promise of RpnV2Group
|
|
1328
|
-
*/
|
|
1329
|
-
waitForRpnV2Group = (request, options) => sdkClient.waitForResource(
|
|
1330
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
1331
|
-
!content_gen.RPN_V2_GROUP_TRANSIENT_STATUSES.includes(res.status)
|
|
1332
|
-
)),
|
|
1333
|
-
this.getRpnV2Group,
|
|
1334
|
-
request,
|
|
1335
|
-
options
|
|
1336
|
-
);
|
|
1337
|
-
createRpnV2Group = (request) => this.client.fetch(
|
|
1338
|
-
{
|
|
1339
|
-
body: JSON.stringify(
|
|
1340
|
-
marshalling_gen.marshalRpnV2ApiCreateRpnV2GroupRequest(request, this.client.settings)
|
|
1341
|
-
),
|
|
1342
|
-
headers: jsonContentHeaders,
|
|
1343
|
-
method: "POST",
|
|
1344
|
-
path: `/dedibox/v1/rpnv2/groups`
|
|
1345
|
-
},
|
|
1346
|
-
marshalling_gen.unmarshalRpnV2Group
|
|
1347
|
-
);
|
|
1348
|
-
deleteRpnV2Group = (request) => this.client.fetch({
|
|
1349
|
-
method: "DELETE",
|
|
1350
|
-
path: `/dedibox/v1/rpnv2/groups/${sdkClient.validatePathParam("groupId", request.groupId)}`
|
|
1351
|
-
});
|
|
1352
|
-
updateRpnV2GroupName = (request) => this.client.fetch(
|
|
1353
|
-
{
|
|
1354
|
-
body: JSON.stringify(
|
|
1355
|
-
marshalling_gen.marshalRpnV2ApiUpdateRpnV2GroupNameRequest(
|
|
1356
|
-
request,
|
|
1357
|
-
this.client.settings
|
|
1358
|
-
)
|
|
1359
|
-
),
|
|
1360
|
-
headers: jsonContentHeaders,
|
|
1361
|
-
method: "PATCH",
|
|
1362
|
-
path: `/dedibox/v1/rpnv2/groups/${sdkClient.validatePathParam("groupId", request.groupId)}`
|
|
1363
|
-
},
|
|
1364
|
-
marshalling_gen.unmarshalRpnV2Group
|
|
1365
|
-
);
|
|
1366
|
-
addRpnV2Members = (request) => this.client.fetch({
|
|
1367
|
-
body: JSON.stringify(
|
|
1368
|
-
marshalling_gen.marshalRpnV2ApiAddRpnV2MembersRequest(request, this.client.settings)
|
|
1369
|
-
),
|
|
1370
|
-
headers: jsonContentHeaders,
|
|
1371
|
-
method: "POST",
|
|
1372
|
-
path: `/dedibox/v1/rpnv2/groups/${sdkClient.validatePathParam("groupId", request.groupId)}/members`
|
|
1373
|
-
});
|
|
1374
|
-
deleteRpnV2Members = (request) => this.client.fetch({
|
|
1375
|
-
body: JSON.stringify(
|
|
1376
|
-
marshalling_gen.marshalRpnV2ApiDeleteRpnV2MembersRequest(request, this.client.settings)
|
|
1377
|
-
),
|
|
1378
|
-
headers: jsonContentHeaders,
|
|
1379
|
-
method: "DELETE",
|
|
1380
|
-
path: `/dedibox/v1/rpnv2/groups/${sdkClient.validatePathParam("groupId", request.groupId)}/members`
|
|
1381
|
-
});
|
|
1382
|
-
pageOfListRpnV2CapableResources = (request = {}) => this.client.fetch(
|
|
1383
|
-
{
|
|
1384
|
-
method: "GET",
|
|
1385
|
-
path: `/dedibox/v1/rpnv2/groups/capable`,
|
|
1386
|
-
urlParams: sdkClient.urlParams(
|
|
1387
|
-
["order_by", request.orderBy],
|
|
1388
|
-
["page", request.page],
|
|
1389
|
-
[
|
|
1390
|
-
"page_size",
|
|
1391
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
1392
|
-
],
|
|
1393
|
-
["project_id", request.projectId]
|
|
1394
|
-
)
|
|
1395
|
-
},
|
|
1396
|
-
marshalling_gen.unmarshalListRpnV2CapableResourcesResponse
|
|
1397
|
-
);
|
|
1398
|
-
listRpnV2CapableResources = (request = {}) => sdkClient.enrichForPagination(
|
|
1399
|
-
"servers",
|
|
1400
|
-
this.pageOfListRpnV2CapableResources,
|
|
1401
|
-
request
|
|
1402
|
-
);
|
|
1403
|
-
pageOfListRpnV2GroupLogs = (request) => this.client.fetch(
|
|
1404
|
-
{
|
|
1405
|
-
method: "GET",
|
|
1406
|
-
path: `/dedibox/v1/rpnv2/groups/${sdkClient.validatePathParam("groupId", request.groupId)}/logs`,
|
|
1407
|
-
urlParams: sdkClient.urlParams(
|
|
1408
|
-
["order_by", request.orderBy],
|
|
1409
|
-
["page", request.page],
|
|
1410
|
-
[
|
|
1411
|
-
"page_size",
|
|
1412
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
1413
|
-
]
|
|
1414
|
-
)
|
|
1415
|
-
},
|
|
1416
|
-
marshalling_gen.unmarshalListRpnV2GroupLogsResponse
|
|
1417
|
-
);
|
|
1418
|
-
listRpnV2GroupLogs = (request) => sdkClient.enrichForPagination("logs", this.pageOfListRpnV2GroupLogs, request);
|
|
1419
|
-
updateRpnV2VlanForMembers = (request) => this.client.fetch({
|
|
1420
|
-
body: JSON.stringify(
|
|
1421
|
-
marshalling_gen.marshalRpnV2ApiUpdateRpnV2VlanForMembersRequest(
|
|
1422
|
-
request,
|
|
1423
|
-
this.client.settings
|
|
1424
|
-
)
|
|
1425
|
-
),
|
|
1426
|
-
headers: jsonContentHeaders,
|
|
1427
|
-
method: "PATCH",
|
|
1428
|
-
path: `/dedibox/v1/rpnv2/groups/${sdkClient.validatePathParam("groupId", request.groupId)}/vlan`
|
|
1429
|
-
});
|
|
1430
|
-
enableRpnV2GroupCompatibility = (request) => this.client.fetch({
|
|
1431
|
-
body: JSON.stringify(
|
|
1432
|
-
marshalling_gen.marshalRpnV2ApiEnableRpnV2GroupCompatibilityRequest(
|
|
1433
|
-
request,
|
|
1434
|
-
this.client.settings
|
|
1435
|
-
)
|
|
1436
|
-
),
|
|
1437
|
-
headers: jsonContentHeaders,
|
|
1438
|
-
method: "POST",
|
|
1439
|
-
path: `/dedibox/v1/rpnv2/groups/${sdkClient.validatePathParam("groupId", request.groupId)}/enable-compatibility`
|
|
1440
|
-
});
|
|
1441
|
-
disableRpnV2GroupCompatibility = (request) => this.client.fetch({
|
|
1442
|
-
body: "{}",
|
|
1443
|
-
headers: jsonContentHeaders,
|
|
1444
|
-
method: "POST",
|
|
1445
|
-
path: `/dedibox/v1/rpnv2/groups/${sdkClient.validatePathParam("groupId", request.groupId)}/disable-compatibility`
|
|
1446
|
-
});
|
|
1447
|
-
}
|
|
1448
|
-
exports.API = API;
|
|
1449
|
-
exports.BillingAPI = BillingAPI;
|
|
1450
|
-
exports.IPv6BlockAPI = IPv6BlockAPI;
|
|
1451
|
-
exports.RpnAPI = RpnAPI;
|
|
1452
|
-
exports.RpnSanAPI = RpnSanAPI;
|
|
1453
|
-
exports.RpnV1API = RpnV1API;
|
|
1454
|
-
exports.RpnV2API = RpnV2API;
|