@scaleway/sdk-lb 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/license.md +3 -0
- package/dist/metadata.gen.d.ts +6 -6
- package/dist/metadata.gen.js +6 -2
- package/dist/v1/api.gen.d.ts +4 -4
- package/dist/v1/api.gen.js +604 -1256
- package/dist/v1/content.gen.js +4 -4
- package/dist/v1/marshalling.gen.js +110 -110
- package/dist/v1/metadata.gen.js +1 -1
- package/dist/v1/validation-rules.gen.js +2 -2
- 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,649 +2,320 @@ import { CERTIFICATE_TRANSIENT_STATUSES, LB_TRANSIENT_STATUSES } from "./content
|
|
|
2
2
|
import { marshalAddBackendServersRequest, marshalAttachPrivateNetworkRequest, marshalCreateAclRequest, marshalCreateBackendRequest, marshalCreateCertificateRequest, marshalCreateFrontendRequest, marshalCreateIpRequest, marshalCreateLbRequest, marshalCreateRouteRequest, marshalCreateSubscriberRequest, marshalMigrateLbRequest, marshalRemoveBackendServersRequest, marshalSetBackendServersRequest, marshalSubscribeToLbRequest, marshalUpdateAclRequest, marshalUpdateBackendRequest, marshalUpdateCertificateRequest, marshalUpdateFrontendRequest, marshalUpdateHealthCheckRequest, marshalUpdateIpRequest, marshalUpdateLbRequest, marshalUpdateRouteRequest, marshalUpdateSubscriberRequest, marshalZonedApiAddBackendServersRequest, marshalZonedApiAttachPrivateNetworkRequest, marshalZonedApiCreateAclRequest, marshalZonedApiCreateBackendRequest, marshalZonedApiCreateCertificateRequest, marshalZonedApiCreateFrontendRequest, marshalZonedApiCreateIpRequest, marshalZonedApiCreateLbRequest, marshalZonedApiCreateRouteRequest, marshalZonedApiCreateSubscriberRequest, marshalZonedApiDetachPrivateNetworkRequest, marshalZonedApiMigrateLbRequest, marshalZonedApiRemoveBackendServersRequest, marshalZonedApiSetAclsRequest, marshalZonedApiSetBackendServersRequest, marshalZonedApiSubscribeToLbRequest, marshalZonedApiUpdateAclRequest, marshalZonedApiUpdateBackendRequest, marshalZonedApiUpdateCertificateRequest, marshalZonedApiUpdateFrontendRequest, marshalZonedApiUpdateHealthCheckRequest, marshalZonedApiUpdateIpRequest, marshalZonedApiUpdateLbRequest, marshalZonedApiUpdateRouteRequest, marshalZonedApiUpdateSubscriberRequest, unmarshalAcl, unmarshalBackend, unmarshalCertificate, unmarshalFrontend, unmarshalHealthCheck, unmarshalIp, unmarshalLb, unmarshalLbStats, unmarshalListAclResponse, unmarshalListBackendStatsResponse, unmarshalListBackendsResponse, unmarshalListCertificatesResponse, unmarshalListFrontendsResponse, unmarshalListIpsResponse, unmarshalListLbPrivateNetworksResponse, unmarshalListLbTypesResponse, unmarshalListLbsResponse, unmarshalListRoutesResponse, unmarshalListSubscriberResponse, unmarshalPrivateNetwork, unmarshalRoute, unmarshalSetAclsResponse, unmarshalSubscriber } 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
|
* Load Balancer API.
|
|
8
8
|
|
|
9
9
|
This API allows you to manage your Scaleway Load Balancer services.
|
|
10
10
|
*/
|
|
11
11
|
var ZonedAPI = class extends API$1 {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}, unmarshalListRoutesResponse);
|
|
320
|
-
/**
|
|
321
|
-
* List all routes. List all routes for a given frontend. The response is an array of routes, each one with a specified backend to direct to if a certain condition is matched (based on the value of the SNI field or HTTP Host header).
|
|
322
|
-
*
|
|
323
|
-
* @param request - The request {@link ZonedApiListRoutesRequest}
|
|
324
|
-
* @returns A Promise of ListRoutesResponse
|
|
325
|
-
*/
|
|
326
|
-
listRoutes = (request = {}) => enrichForPagination("routes", this.pageOfListRoutes, request);
|
|
327
|
-
/**
|
|
328
|
-
* Create a route. Create a new route on a given frontend. To configure a route, specify the backend to direct to if a certain condition is matched (based on the value of the SNI field or HTTP Host header).
|
|
329
|
-
*
|
|
330
|
-
* @param request - The request {@link ZonedApiCreateRouteRequest}
|
|
331
|
-
* @returns A Promise of Route
|
|
332
|
-
*/
|
|
333
|
-
createRoute = (request) => this.client.fetch({
|
|
334
|
-
body: JSON.stringify(marshalZonedApiCreateRouteRequest(request, this.client.settings)),
|
|
335
|
-
headers: jsonContentHeaders,
|
|
336
|
-
method: "POST",
|
|
337
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/routes`
|
|
338
|
-
}, unmarshalRoute);
|
|
339
|
-
/**
|
|
340
|
-
* Get a route. Retrieve information about an existing route, specified by its route ID. Its full details, origin frontend, target backend and match condition, are returned in the response object.
|
|
341
|
-
*
|
|
342
|
-
* @param request - The request {@link ZonedApiGetRouteRequest}
|
|
343
|
-
* @returns A Promise of Route
|
|
344
|
-
*/
|
|
345
|
-
getRoute = (request) => this.client.fetch({
|
|
346
|
-
method: "GET",
|
|
347
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/routes/${validatePathParam("routeId", request.routeId)}`
|
|
348
|
-
}, unmarshalRoute);
|
|
349
|
-
/**
|
|
350
|
-
* Update a route. Update the configuration of an existing route, specified by its route ID.
|
|
351
|
-
*
|
|
352
|
-
* @param request - The request {@link ZonedApiUpdateRouteRequest}
|
|
353
|
-
* @returns A Promise of Route
|
|
354
|
-
*/
|
|
355
|
-
updateRoute = (request) => this.client.fetch({
|
|
356
|
-
body: JSON.stringify(marshalZonedApiUpdateRouteRequest(request, this.client.settings)),
|
|
357
|
-
headers: jsonContentHeaders,
|
|
358
|
-
method: "PUT",
|
|
359
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/routes/${validatePathParam("routeId", request.routeId)}`
|
|
360
|
-
}, unmarshalRoute);
|
|
361
|
-
/**
|
|
362
|
-
* Delete a route. Delete an existing route, specified by its route ID. Deleting a route is permanent, and cannot be undone.
|
|
363
|
-
*
|
|
364
|
-
* @param request - The request {@link ZonedApiDeleteRouteRequest}
|
|
365
|
-
*/
|
|
366
|
-
deleteRoute = (request) => this.client.fetch({
|
|
367
|
-
method: "DELETE",
|
|
368
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/routes/${validatePathParam("routeId", request.routeId)}`
|
|
369
|
-
});
|
|
370
|
-
/**
|
|
371
|
-
* Get usage statistics of a given Load Balancer.
|
|
372
|
-
*
|
|
373
|
-
* @deprecated
|
|
374
|
-
* @param request - The request {@link ZonedApiGetLbStatsRequest}
|
|
375
|
-
* @returns A Promise of LbStats
|
|
376
|
-
*/
|
|
377
|
-
getLbStats = (request) => this.client.fetch({
|
|
378
|
-
method: "GET",
|
|
379
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/stats`,
|
|
380
|
-
urlParams: urlParams(["backend_id", request.backendId])
|
|
381
|
-
}, unmarshalLbStats);
|
|
382
|
-
pageOfListBackendStats = (request) => this.client.fetch({
|
|
383
|
-
method: "GET",
|
|
384
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/backend-stats`,
|
|
385
|
-
urlParams: urlParams(["backend_id", request.backendId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
386
|
-
}, unmarshalListBackendStatsResponse);
|
|
387
|
-
/**
|
|
388
|
-
* List backend server statistics. List information about your backend servers, including their state and the result of their last health check.
|
|
389
|
-
*
|
|
390
|
-
* @param request - The request {@link ZonedApiListBackendStatsRequest}
|
|
391
|
-
* @returns A Promise of ListBackendStatsResponse
|
|
392
|
-
*/
|
|
393
|
-
listBackendStats = (request) => enrichForPagination("backendServersStats", this.pageOfListBackendStats, request);
|
|
394
|
-
pageOfListAcls = (request) => this.client.fetch({
|
|
395
|
-
method: "GET",
|
|
396
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam("frontendId", request.frontendId)}/acls`,
|
|
397
|
-
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
398
|
-
}, unmarshalListAclResponse);
|
|
399
|
-
/**
|
|
400
|
-
* List ACLs for a given frontend. List the ACLs for a given frontend, specified by its frontend ID. The response is an array of ACL objects, each one representing an ACL that denies or allows traffic based on certain conditions.
|
|
401
|
-
*
|
|
402
|
-
* @param request - The request {@link ZonedApiListAclsRequest}
|
|
403
|
-
* @returns A Promise of ListAclResponse
|
|
404
|
-
*/
|
|
405
|
-
listAcls = (request) => enrichForPagination("acls", this.pageOfListAcls, request);
|
|
406
|
-
/**
|
|
407
|
-
* Create an ACL for a given frontend. Create a new ACL for a given frontend. Each ACL must have a name, an action to perform (allow or deny), and a match rule (the action is carried out when the incoming traffic matches the rule).
|
|
408
|
-
*
|
|
409
|
-
* @param request - The request {@link ZonedApiCreateAclRequest}
|
|
410
|
-
* @returns A Promise of Acl
|
|
411
|
-
*/
|
|
412
|
-
createAcl = (request) => this.client.fetch({
|
|
413
|
-
body: JSON.stringify(marshalZonedApiCreateAclRequest(request, this.client.settings)),
|
|
414
|
-
headers: jsonContentHeaders,
|
|
415
|
-
method: "POST",
|
|
416
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam("frontendId", request.frontendId)}/acls`
|
|
417
|
-
}, unmarshalAcl);
|
|
418
|
-
/**
|
|
419
|
-
* Get an ACL. Get information for a particular ACL, specified by its ACL ID. The response returns full details of the ACL, including its name, action, match rule and frontend.
|
|
420
|
-
*
|
|
421
|
-
* @param request - The request {@link ZonedApiGetAclRequest}
|
|
422
|
-
* @returns A Promise of Acl
|
|
423
|
-
*/
|
|
424
|
-
getAcl = (request) => this.client.fetch({
|
|
425
|
-
method: "GET",
|
|
426
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
427
|
-
}, unmarshalAcl);
|
|
428
|
-
/**
|
|
429
|
-
* Update an ACL. Update a particular ACL, specified by its ACL ID. You can update details including its name, action and match rule.
|
|
430
|
-
*
|
|
431
|
-
* @param request - The request {@link ZonedApiUpdateAclRequest}
|
|
432
|
-
* @returns A Promise of Acl
|
|
433
|
-
*/
|
|
434
|
-
updateAcl = (request) => this.client.fetch({
|
|
435
|
-
body: JSON.stringify(marshalZonedApiUpdateAclRequest(request, this.client.settings)),
|
|
436
|
-
headers: jsonContentHeaders,
|
|
437
|
-
method: "PUT",
|
|
438
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
439
|
-
}, unmarshalAcl);
|
|
440
|
-
/**
|
|
441
|
-
* Delete an ACL. Delete an ACL, specified by its ACL ID. Deleting an ACL is irreversible and cannot be undone.
|
|
442
|
-
*
|
|
443
|
-
* @param request - The request {@link ZonedApiDeleteAclRequest}
|
|
444
|
-
*/
|
|
445
|
-
deleteAcl = (request) => this.client.fetch({
|
|
446
|
-
method: "DELETE",
|
|
447
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
448
|
-
});
|
|
449
|
-
/**
|
|
450
|
-
* Define all ACLs for a given frontend. For a given frontend specified by its frontend ID, define and add the complete set of ACLS for that frontend. Any existing ACLs on this frontend will be removed.
|
|
451
|
-
*
|
|
452
|
-
* @param request - The request {@link ZonedApiSetAclsRequest}
|
|
453
|
-
* @returns A Promise of SetAclsResponse
|
|
454
|
-
*/
|
|
455
|
-
setAcls = (request) => this.client.fetch({
|
|
456
|
-
body: JSON.stringify(marshalZonedApiSetAclsRequest(request, this.client.settings)),
|
|
457
|
-
headers: jsonContentHeaders,
|
|
458
|
-
method: "PUT",
|
|
459
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam("frontendId", request.frontendId)}/acls`
|
|
460
|
-
}, unmarshalSetAclsResponse);
|
|
461
|
-
/**
|
|
462
|
-
* Create an SSL/TLS certificate. Generate a new SSL/TLS certificate for a given Load Balancer. You can choose to create a Let's Encrypt certificate, or import a custom certificate.
|
|
463
|
-
*
|
|
464
|
-
* @param request - The request {@link ZonedApiCreateCertificateRequest}
|
|
465
|
-
* @returns A Promise of Certificate
|
|
466
|
-
*/
|
|
467
|
-
createCertificate = (request) => this.client.fetch({
|
|
468
|
-
body: JSON.stringify(marshalZonedApiCreateCertificateRequest(request, this.client.settings)),
|
|
469
|
-
headers: jsonContentHeaders,
|
|
470
|
-
method: "POST",
|
|
471
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/certificates`
|
|
472
|
-
}, unmarshalCertificate);
|
|
473
|
-
pageOfListCertificates = (request) => this.client.fetch({
|
|
474
|
-
method: "GET",
|
|
475
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/certificates`,
|
|
476
|
-
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
477
|
-
}, unmarshalListCertificatesResponse);
|
|
478
|
-
/**
|
|
479
|
-
* List all SSL/TLS certificates on a given Load Balancer. List all the SSL/TLS certificates on a given Load Balancer. The response is an array of certificate objects, which are by default listed in ascending order of creation date.
|
|
480
|
-
*
|
|
481
|
-
* @param request - The request {@link ZonedApiListCertificatesRequest}
|
|
482
|
-
* @returns A Promise of ListCertificatesResponse
|
|
483
|
-
*/
|
|
484
|
-
listCertificates = (request) => enrichForPagination("certificates", this.pageOfListCertificates, request);
|
|
485
|
-
/**
|
|
486
|
-
* Get an SSL/TLS certificate. Get information for a particular SSL/TLS certificate, specified by its certificate ID. The response returns full details of the certificate, including its type, main domain name, and alternative domain names.
|
|
487
|
-
*
|
|
488
|
-
* @param request - The request {@link ZonedApiGetCertificateRequest}
|
|
489
|
-
* @returns A Promise of Certificate
|
|
490
|
-
*/
|
|
491
|
-
getCertificate = (request) => this.client.fetch({
|
|
492
|
-
method: "GET",
|
|
493
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/certificates/${validatePathParam("certificateId", request.certificateId)}`
|
|
494
|
-
}, unmarshalCertificate);
|
|
495
|
-
/**
|
|
496
|
-
* Waits for {@link Certificate} to be in a final state.
|
|
497
|
-
*
|
|
498
|
-
* @param request - The request {@link ZonedApiGetCertificateRequest}
|
|
499
|
-
* @param options - The waiting options
|
|
500
|
-
* @returns A Promise of Certificate
|
|
501
|
-
*/
|
|
502
|
-
waitForCertificate = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getCertificate, request, options);
|
|
503
|
-
/**
|
|
504
|
-
* Update an SSL/TLS certificate. Update the name of a particular SSL/TLS certificate, specified by its certificate ID.
|
|
505
|
-
*
|
|
506
|
-
* @param request - The request {@link ZonedApiUpdateCertificateRequest}
|
|
507
|
-
* @returns A Promise of Certificate
|
|
508
|
-
*/
|
|
509
|
-
updateCertificate = (request) => this.client.fetch({
|
|
510
|
-
body: JSON.stringify(marshalZonedApiUpdateCertificateRequest(request, this.client.settings)),
|
|
511
|
-
headers: jsonContentHeaders,
|
|
512
|
-
method: "PUT",
|
|
513
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/certificates/${validatePathParam("certificateId", request.certificateId)}`
|
|
514
|
-
}, unmarshalCertificate);
|
|
515
|
-
/**
|
|
516
|
-
* Delete an SSL/TLS certificate. Delete an SSL/TLS certificate, specified by its certificate ID. Deleting a certificate is irreversible and cannot be undone.
|
|
517
|
-
*
|
|
518
|
-
* @param request - The request {@link ZonedApiDeleteCertificateRequest}
|
|
519
|
-
*/
|
|
520
|
-
deleteCertificate = (request) => this.client.fetch({
|
|
521
|
-
method: "DELETE",
|
|
522
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/certificates/${validatePathParam("certificateId", request.certificateId)}`
|
|
523
|
-
});
|
|
524
|
-
pageOfListLbTypes = (request = {}) => this.client.fetch({
|
|
525
|
-
method: "GET",
|
|
526
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lb-types`,
|
|
527
|
-
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
528
|
-
}, unmarshalListLbTypesResponse);
|
|
529
|
-
/**
|
|
530
|
-
* List all Load Balancer offer types. List all the different commercial Load Balancer types. The response includes an array of offer types, each with a name, description, and information about its stock availability.
|
|
531
|
-
*
|
|
532
|
-
* @param request - The request {@link ZonedApiListLbTypesRequest}
|
|
533
|
-
* @returns A Promise of ListLbTypesResponse
|
|
534
|
-
*/
|
|
535
|
-
listLbTypes = (request = {}) => enrichForPagination("lbTypes", this.pageOfListLbTypes, request);
|
|
536
|
-
/**
|
|
537
|
-
* Create a subscriber. Create a new subscriber, either with an email configuration or a webhook configuration, for a specified Scaleway Project.
|
|
538
|
-
*
|
|
539
|
-
* @param request - The request {@link ZonedApiCreateSubscriberRequest}
|
|
540
|
-
* @returns A Promise of Subscriber
|
|
541
|
-
*/
|
|
542
|
-
createSubscriber = (request) => this.client.fetch({
|
|
543
|
-
body: JSON.stringify(marshalZonedApiCreateSubscriberRequest(request, this.client.settings)),
|
|
544
|
-
headers: jsonContentHeaders,
|
|
545
|
-
method: "POST",
|
|
546
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/subscribers`
|
|
547
|
-
}, unmarshalSubscriber);
|
|
548
|
-
/**
|
|
549
|
-
* Get a subscriber. Retrieve information about an existing subscriber, specified by its subscriber ID. Its full details, including name and email/webhook configuration, are returned in the response object.
|
|
550
|
-
*
|
|
551
|
-
* @param request - The request {@link ZonedApiGetSubscriberRequest}
|
|
552
|
-
* @returns A Promise of Subscriber
|
|
553
|
-
*/
|
|
554
|
-
getSubscriber = (request) => this.client.fetch({
|
|
555
|
-
method: "GET",
|
|
556
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/subscribers/${validatePathParam("subscriberId", request.subscriberId)}`
|
|
557
|
-
}, unmarshalSubscriber);
|
|
558
|
-
pageOfListSubscriber = (request = {}) => this.client.fetch({
|
|
559
|
-
method: "GET",
|
|
560
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/subscribers`,
|
|
561
|
-
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
562
|
-
}, unmarshalListSubscriberResponse);
|
|
563
|
-
/**
|
|
564
|
-
* List all subscribers. List all subscribers to Load Balancer alerts. By default, returns all subscribers to Load Balancer alerts for the Organization associated with the authentication token used for the request.
|
|
565
|
-
*
|
|
566
|
-
* @param request - The request {@link ZonedApiListSubscriberRequest}
|
|
567
|
-
* @returns A Promise of ListSubscriberResponse
|
|
568
|
-
*/
|
|
569
|
-
listSubscriber = (request = {}) => enrichForPagination("subscribers", this.pageOfListSubscriber, request);
|
|
570
|
-
/**
|
|
571
|
-
* Update a subscriber. Update the parameters of a given subscriber (e.g. name, webhook configuration, email configuration), specified by its subscriber ID.
|
|
572
|
-
*
|
|
573
|
-
* @param request - The request {@link ZonedApiUpdateSubscriberRequest}
|
|
574
|
-
* @returns A Promise of Subscriber
|
|
575
|
-
*/
|
|
576
|
-
updateSubscriber = (request) => this.client.fetch({
|
|
577
|
-
body: JSON.stringify(marshalZonedApiUpdateSubscriberRequest(request, this.client.settings)),
|
|
578
|
-
headers: jsonContentHeaders,
|
|
579
|
-
method: "PUT",
|
|
580
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/subscribers/${validatePathParam("subscriberId", request.subscriberId)}`
|
|
581
|
-
}, unmarshalSubscriber);
|
|
582
|
-
/**
|
|
583
|
-
* Delete a subscriber. Delete an existing subscriber, specified by its subscriber ID. Deleting a subscriber is permanent, and cannot be undone.
|
|
584
|
-
*
|
|
585
|
-
* @param request - The request {@link ZonedApiDeleteSubscriberRequest}
|
|
586
|
-
*/
|
|
587
|
-
deleteSubscriber = (request) => this.client.fetch({
|
|
588
|
-
method: "DELETE",
|
|
589
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lb/subscription/${validatePathParam("subscriberId", request.subscriberId)}`
|
|
590
|
-
});
|
|
591
|
-
/**
|
|
592
|
-
* Subscribe a subscriber to alerts for a given Load Balancer. Subscribe an existing subscriber to alerts for a given Load Balancer.
|
|
593
|
-
*
|
|
594
|
-
* @param request - The request {@link ZonedApiSubscribeToLbRequest}
|
|
595
|
-
* @returns A Promise of Lb
|
|
596
|
-
*/
|
|
597
|
-
subscribeToLb = (request) => this.client.fetch({
|
|
598
|
-
body: JSON.stringify(marshalZonedApiSubscribeToLbRequest(request, this.client.settings)),
|
|
599
|
-
headers: jsonContentHeaders,
|
|
600
|
-
method: "POST",
|
|
601
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lb/${validatePathParam("lbId", request.lbId)}/subscribe`
|
|
602
|
-
}, unmarshalLb);
|
|
603
|
-
/**
|
|
604
|
-
* Unsubscribe a subscriber from alerts for a given Load Balancer. Unsubscribe a subscriber from alerts for a given Load Balancer. The subscriber is not deleted, and can be resubscribed in the future if necessary.
|
|
605
|
-
*
|
|
606
|
-
* @param request - The request {@link ZonedApiUnsubscribeFromLbRequest}
|
|
607
|
-
* @returns A Promise of Lb
|
|
608
|
-
*/
|
|
609
|
-
unsubscribeFromLb = (request) => this.client.fetch({
|
|
610
|
-
method: "DELETE",
|
|
611
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lb/${validatePathParam("lbId", request.lbId)}/unsubscribe`
|
|
612
|
-
}, unmarshalLb);
|
|
613
|
-
pageOfListLbPrivateNetworks = (request) => this.client.fetch({
|
|
614
|
-
method: "GET",
|
|
615
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/private-networks`,
|
|
616
|
-
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
617
|
-
}, unmarshalListLbPrivateNetworksResponse);
|
|
618
|
-
/**
|
|
619
|
-
* List Private Networks attached to a Load Balancer. List the Private Networks attached to a given Load Balancer, specified by its Load Balancer ID. The response is an array of Private Network objects, giving information including the status, configuration, name and creation date of each Private Network.
|
|
620
|
-
*
|
|
621
|
-
* @param request - The request {@link ZonedApiListLbPrivateNetworksRequest}
|
|
622
|
-
* @returns A Promise of ListLbPrivateNetworksResponse
|
|
623
|
-
*/
|
|
624
|
-
listLbPrivateNetworks = (request) => enrichForPagination("privateNetwork", this.pageOfListLbPrivateNetworks, request);
|
|
625
|
-
/**
|
|
626
|
-
* Attach a Load Balancer to a Private Network. Attach a specified Load Balancer to a specified Private Network, defining a static or DHCP configuration for the Load Balancer on the network.
|
|
627
|
-
*
|
|
628
|
-
* @param request - The request {@link ZonedApiAttachPrivateNetworkRequest}
|
|
629
|
-
* @returns A Promise of PrivateNetwork
|
|
630
|
-
*/
|
|
631
|
-
attachPrivateNetwork = (request) => this.client.fetch({
|
|
632
|
-
body: JSON.stringify(marshalZonedApiAttachPrivateNetworkRequest(request, this.client.settings)),
|
|
633
|
-
headers: jsonContentHeaders,
|
|
634
|
-
method: "POST",
|
|
635
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/attach-private-network`
|
|
636
|
-
}, unmarshalPrivateNetwork);
|
|
637
|
-
/**
|
|
638
|
-
* Detach Load Balancer from Private Network. Detach a specified Load Balancer from a specified Private Network.
|
|
639
|
-
*
|
|
640
|
-
* @param request - The request {@link ZonedApiDetachPrivateNetworkRequest}
|
|
641
|
-
*/
|
|
642
|
-
detachPrivateNetwork = (request) => this.client.fetch({
|
|
643
|
-
body: JSON.stringify(marshalZonedApiDetachPrivateNetworkRequest(request, this.client.settings)),
|
|
644
|
-
headers: jsonContentHeaders,
|
|
645
|
-
method: "POST",
|
|
646
|
-
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/detach-private-network`
|
|
647
|
-
});
|
|
12
|
+
constructor(..._args) {
|
|
13
|
+
super(..._args);
|
|
14
|
+
this.pageOfListLbs = (request = {}) => this.client.fetch({
|
|
15
|
+
method: "GET",
|
|
16
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs`,
|
|
17
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["tags", request.tags])
|
|
18
|
+
}, unmarshalListLbsResponse);
|
|
19
|
+
this.listLbs = (request = {}) => enrichForPagination("lbs", this.pageOfListLbs, request);
|
|
20
|
+
this.createLb = (request) => this.client.fetch({
|
|
21
|
+
body: JSON.stringify(marshalZonedApiCreateLbRequest(request, this.client.settings)),
|
|
22
|
+
headers: jsonContentHeaders,
|
|
23
|
+
method: "POST",
|
|
24
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs`
|
|
25
|
+
}, unmarshalLb);
|
|
26
|
+
this.getLb = (request) => this.client.fetch({
|
|
27
|
+
method: "GET",
|
|
28
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}`
|
|
29
|
+
}, unmarshalLb);
|
|
30
|
+
this.waitForLb = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!LB_TRANSIENT_STATUSES.includes(res.status))), this.getLb, request, options);
|
|
31
|
+
this.updateLb = (request) => this.client.fetch({
|
|
32
|
+
body: JSON.stringify(marshalZonedApiUpdateLbRequest(request, this.client.settings)),
|
|
33
|
+
headers: jsonContentHeaders,
|
|
34
|
+
method: "PUT",
|
|
35
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}`
|
|
36
|
+
}, unmarshalLb);
|
|
37
|
+
this.deleteLb = (request) => this.client.fetch({
|
|
38
|
+
method: "DELETE",
|
|
39
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}`,
|
|
40
|
+
urlParams: urlParams(["release_ip", request.releaseIp])
|
|
41
|
+
});
|
|
42
|
+
this.migrateLb = (request) => this.client.fetch({
|
|
43
|
+
body: JSON.stringify(marshalZonedApiMigrateLbRequest(request, this.client.settings)),
|
|
44
|
+
headers: jsonContentHeaders,
|
|
45
|
+
method: "POST",
|
|
46
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/migrate`
|
|
47
|
+
}, unmarshalLb);
|
|
48
|
+
this.pageOfListIPs = (request = {}) => this.client.fetch({
|
|
49
|
+
method: "GET",
|
|
50
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips`,
|
|
51
|
+
urlParams: urlParams(["ip_address", request.ipAddress], ["ip_type", request.ipType], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["tags", request.tags])
|
|
52
|
+
}, unmarshalListIpsResponse);
|
|
53
|
+
this.listIPs = (request = {}) => enrichForPagination("ips", this.pageOfListIPs, request);
|
|
54
|
+
this.createIp = (request) => this.client.fetch({
|
|
55
|
+
body: JSON.stringify(marshalZonedApiCreateIpRequest(request, this.client.settings)),
|
|
56
|
+
headers: jsonContentHeaders,
|
|
57
|
+
method: "POST",
|
|
58
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips`
|
|
59
|
+
}, unmarshalIp);
|
|
60
|
+
this.getIp = (request) => this.client.fetch({
|
|
61
|
+
method: "GET",
|
|
62
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam("ipId", request.ipId)}`
|
|
63
|
+
}, unmarshalIp);
|
|
64
|
+
this.releaseIp = (request) => this.client.fetch({
|
|
65
|
+
method: "DELETE",
|
|
66
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam("ipId", request.ipId)}`
|
|
67
|
+
});
|
|
68
|
+
this.updateIp = (request) => this.client.fetch({
|
|
69
|
+
body: JSON.stringify(marshalZonedApiUpdateIpRequest(request, this.client.settings)),
|
|
70
|
+
headers: jsonContentHeaders,
|
|
71
|
+
method: "PATCH",
|
|
72
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam("ipId", request.ipId)}`
|
|
73
|
+
}, unmarshalIp);
|
|
74
|
+
this.pageOfListBackends = (request) => this.client.fetch({
|
|
75
|
+
method: "GET",
|
|
76
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/backends`,
|
|
77
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
78
|
+
}, unmarshalListBackendsResponse);
|
|
79
|
+
this.listBackends = (request) => enrichForPagination("backends", this.pageOfListBackends, request);
|
|
80
|
+
this.createBackend = (request) => this.client.fetch({
|
|
81
|
+
body: JSON.stringify(marshalZonedApiCreateBackendRequest(request, this.client.settings)),
|
|
82
|
+
headers: jsonContentHeaders,
|
|
83
|
+
method: "POST",
|
|
84
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/backends`
|
|
85
|
+
}, unmarshalBackend);
|
|
86
|
+
this.getBackend = (request) => this.client.fetch({
|
|
87
|
+
method: "GET",
|
|
88
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam("backendId", request.backendId)}`
|
|
89
|
+
}, unmarshalBackend);
|
|
90
|
+
this.updateBackend = (request) => this.client.fetch({
|
|
91
|
+
body: JSON.stringify(marshalZonedApiUpdateBackendRequest(request, this.client.settings)),
|
|
92
|
+
headers: jsonContentHeaders,
|
|
93
|
+
method: "PUT",
|
|
94
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam("backendId", request.backendId)}`
|
|
95
|
+
}, unmarshalBackend);
|
|
96
|
+
this.deleteBackend = (request) => this.client.fetch({
|
|
97
|
+
method: "DELETE",
|
|
98
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam("backendId", request.backendId)}`
|
|
99
|
+
});
|
|
100
|
+
this.addBackendServers = (request) => this.client.fetch({
|
|
101
|
+
body: JSON.stringify(marshalZonedApiAddBackendServersRequest(request, this.client.settings)),
|
|
102
|
+
headers: jsonContentHeaders,
|
|
103
|
+
method: "POST",
|
|
104
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam("backendId", request.backendId)}/servers`
|
|
105
|
+
}, unmarshalBackend);
|
|
106
|
+
this.removeBackendServers = (request) => this.client.fetch({
|
|
107
|
+
body: JSON.stringify(marshalZonedApiRemoveBackendServersRequest(request, this.client.settings)),
|
|
108
|
+
headers: jsonContentHeaders,
|
|
109
|
+
method: "DELETE",
|
|
110
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam("backendId", request.backendId)}/servers`
|
|
111
|
+
}, unmarshalBackend);
|
|
112
|
+
this.setBackendServers = (request) => this.client.fetch({
|
|
113
|
+
body: JSON.stringify(marshalZonedApiSetBackendServersRequest(request, this.client.settings)),
|
|
114
|
+
headers: jsonContentHeaders,
|
|
115
|
+
method: "PUT",
|
|
116
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam("backendId", request.backendId)}/servers`
|
|
117
|
+
}, unmarshalBackend);
|
|
118
|
+
this.updateHealthCheck = (request) => this.client.fetch({
|
|
119
|
+
body: JSON.stringify(marshalZonedApiUpdateHealthCheckRequest(request, this.client.settings)),
|
|
120
|
+
headers: jsonContentHeaders,
|
|
121
|
+
method: "PUT",
|
|
122
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam("backendId", request.backendId)}/healthcheck`
|
|
123
|
+
}, unmarshalHealthCheck);
|
|
124
|
+
this.pageOfListFrontends = (request) => this.client.fetch({
|
|
125
|
+
method: "GET",
|
|
126
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/frontends`,
|
|
127
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
128
|
+
}, unmarshalListFrontendsResponse);
|
|
129
|
+
this.listFrontends = (request) => enrichForPagination("frontends", this.pageOfListFrontends, request);
|
|
130
|
+
this.createFrontend = (request) => this.client.fetch({
|
|
131
|
+
body: JSON.stringify(marshalZonedApiCreateFrontendRequest(request, this.client.settings)),
|
|
132
|
+
headers: jsonContentHeaders,
|
|
133
|
+
method: "POST",
|
|
134
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/frontends`
|
|
135
|
+
}, unmarshalFrontend);
|
|
136
|
+
this.getFrontend = (request) => this.client.fetch({
|
|
137
|
+
method: "GET",
|
|
138
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam("frontendId", request.frontendId)}`
|
|
139
|
+
}, unmarshalFrontend);
|
|
140
|
+
this.updateFrontend = (request) => this.client.fetch({
|
|
141
|
+
body: JSON.stringify(marshalZonedApiUpdateFrontendRequest(request, this.client.settings)),
|
|
142
|
+
headers: jsonContentHeaders,
|
|
143
|
+
method: "PUT",
|
|
144
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam("frontendId", request.frontendId)}`
|
|
145
|
+
}, unmarshalFrontend);
|
|
146
|
+
this.deleteFrontend = (request) => this.client.fetch({
|
|
147
|
+
method: "DELETE",
|
|
148
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam("frontendId", request.frontendId)}`
|
|
149
|
+
});
|
|
150
|
+
this.pageOfListRoutes = (request = {}) => this.client.fetch({
|
|
151
|
+
method: "GET",
|
|
152
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/routes`,
|
|
153
|
+
urlParams: urlParams(["frontend_id", request.frontendId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
154
|
+
}, unmarshalListRoutesResponse);
|
|
155
|
+
this.listRoutes = (request = {}) => enrichForPagination("routes", this.pageOfListRoutes, request);
|
|
156
|
+
this.createRoute = (request) => this.client.fetch({
|
|
157
|
+
body: JSON.stringify(marshalZonedApiCreateRouteRequest(request, this.client.settings)),
|
|
158
|
+
headers: jsonContentHeaders,
|
|
159
|
+
method: "POST",
|
|
160
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/routes`
|
|
161
|
+
}, unmarshalRoute);
|
|
162
|
+
this.getRoute = (request) => this.client.fetch({
|
|
163
|
+
method: "GET",
|
|
164
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/routes/${validatePathParam("routeId", request.routeId)}`
|
|
165
|
+
}, unmarshalRoute);
|
|
166
|
+
this.updateRoute = (request) => this.client.fetch({
|
|
167
|
+
body: JSON.stringify(marshalZonedApiUpdateRouteRequest(request, this.client.settings)),
|
|
168
|
+
headers: jsonContentHeaders,
|
|
169
|
+
method: "PUT",
|
|
170
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/routes/${validatePathParam("routeId", request.routeId)}`
|
|
171
|
+
}, unmarshalRoute);
|
|
172
|
+
this.deleteRoute = (request) => this.client.fetch({
|
|
173
|
+
method: "DELETE",
|
|
174
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/routes/${validatePathParam("routeId", request.routeId)}`
|
|
175
|
+
});
|
|
176
|
+
this.getLbStats = (request) => this.client.fetch({
|
|
177
|
+
method: "GET",
|
|
178
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/stats`,
|
|
179
|
+
urlParams: urlParams(["backend_id", request.backendId])
|
|
180
|
+
}, unmarshalLbStats);
|
|
181
|
+
this.pageOfListBackendStats = (request) => this.client.fetch({
|
|
182
|
+
method: "GET",
|
|
183
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/backend-stats`,
|
|
184
|
+
urlParams: urlParams(["backend_id", request.backendId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
185
|
+
}, unmarshalListBackendStatsResponse);
|
|
186
|
+
this.listBackendStats = (request) => enrichForPagination("backendServersStats", this.pageOfListBackendStats, request);
|
|
187
|
+
this.pageOfListAcls = (request) => this.client.fetch({
|
|
188
|
+
method: "GET",
|
|
189
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam("frontendId", request.frontendId)}/acls`,
|
|
190
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
191
|
+
}, unmarshalListAclResponse);
|
|
192
|
+
this.listAcls = (request) => enrichForPagination("acls", this.pageOfListAcls, request);
|
|
193
|
+
this.createAcl = (request) => this.client.fetch({
|
|
194
|
+
body: JSON.stringify(marshalZonedApiCreateAclRequest(request, this.client.settings)),
|
|
195
|
+
headers: jsonContentHeaders,
|
|
196
|
+
method: "POST",
|
|
197
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam("frontendId", request.frontendId)}/acls`
|
|
198
|
+
}, unmarshalAcl);
|
|
199
|
+
this.getAcl = (request) => this.client.fetch({
|
|
200
|
+
method: "GET",
|
|
201
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
202
|
+
}, unmarshalAcl);
|
|
203
|
+
this.updateAcl = (request) => this.client.fetch({
|
|
204
|
+
body: JSON.stringify(marshalZonedApiUpdateAclRequest(request, this.client.settings)),
|
|
205
|
+
headers: jsonContentHeaders,
|
|
206
|
+
method: "PUT",
|
|
207
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
208
|
+
}, unmarshalAcl);
|
|
209
|
+
this.deleteAcl = (request) => this.client.fetch({
|
|
210
|
+
method: "DELETE",
|
|
211
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
212
|
+
});
|
|
213
|
+
this.setAcls = (request) => this.client.fetch({
|
|
214
|
+
body: JSON.stringify(marshalZonedApiSetAclsRequest(request, this.client.settings)),
|
|
215
|
+
headers: jsonContentHeaders,
|
|
216
|
+
method: "PUT",
|
|
217
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam("frontendId", request.frontendId)}/acls`
|
|
218
|
+
}, unmarshalSetAclsResponse);
|
|
219
|
+
this.createCertificate = (request) => this.client.fetch({
|
|
220
|
+
body: JSON.stringify(marshalZonedApiCreateCertificateRequest(request, this.client.settings)),
|
|
221
|
+
headers: jsonContentHeaders,
|
|
222
|
+
method: "POST",
|
|
223
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/certificates`
|
|
224
|
+
}, unmarshalCertificate);
|
|
225
|
+
this.pageOfListCertificates = (request) => this.client.fetch({
|
|
226
|
+
method: "GET",
|
|
227
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/certificates`,
|
|
228
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
229
|
+
}, unmarshalListCertificatesResponse);
|
|
230
|
+
this.listCertificates = (request) => enrichForPagination("certificates", this.pageOfListCertificates, request);
|
|
231
|
+
this.getCertificate = (request) => this.client.fetch({
|
|
232
|
+
method: "GET",
|
|
233
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/certificates/${validatePathParam("certificateId", request.certificateId)}`
|
|
234
|
+
}, unmarshalCertificate);
|
|
235
|
+
this.waitForCertificate = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getCertificate, request, options);
|
|
236
|
+
this.updateCertificate = (request) => this.client.fetch({
|
|
237
|
+
body: JSON.stringify(marshalZonedApiUpdateCertificateRequest(request, this.client.settings)),
|
|
238
|
+
headers: jsonContentHeaders,
|
|
239
|
+
method: "PUT",
|
|
240
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/certificates/${validatePathParam("certificateId", request.certificateId)}`
|
|
241
|
+
}, unmarshalCertificate);
|
|
242
|
+
this.deleteCertificate = (request) => this.client.fetch({
|
|
243
|
+
method: "DELETE",
|
|
244
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/certificates/${validatePathParam("certificateId", request.certificateId)}`
|
|
245
|
+
});
|
|
246
|
+
this.pageOfListLbTypes = (request = {}) => this.client.fetch({
|
|
247
|
+
method: "GET",
|
|
248
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lb-types`,
|
|
249
|
+
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
250
|
+
}, unmarshalListLbTypesResponse);
|
|
251
|
+
this.listLbTypes = (request = {}) => enrichForPagination("lbTypes", this.pageOfListLbTypes, request);
|
|
252
|
+
this.createSubscriber = (request) => this.client.fetch({
|
|
253
|
+
body: JSON.stringify(marshalZonedApiCreateSubscriberRequest(request, this.client.settings)),
|
|
254
|
+
headers: jsonContentHeaders,
|
|
255
|
+
method: "POST",
|
|
256
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/subscribers`
|
|
257
|
+
}, unmarshalSubscriber);
|
|
258
|
+
this.getSubscriber = (request) => this.client.fetch({
|
|
259
|
+
method: "GET",
|
|
260
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/subscribers/${validatePathParam("subscriberId", request.subscriberId)}`
|
|
261
|
+
}, unmarshalSubscriber);
|
|
262
|
+
this.pageOfListSubscriber = (request = {}) => this.client.fetch({
|
|
263
|
+
method: "GET",
|
|
264
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/subscribers`,
|
|
265
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
266
|
+
}, unmarshalListSubscriberResponse);
|
|
267
|
+
this.listSubscriber = (request = {}) => enrichForPagination("subscribers", this.pageOfListSubscriber, request);
|
|
268
|
+
this.updateSubscriber = (request) => this.client.fetch({
|
|
269
|
+
body: JSON.stringify(marshalZonedApiUpdateSubscriberRequest(request, this.client.settings)),
|
|
270
|
+
headers: jsonContentHeaders,
|
|
271
|
+
method: "PUT",
|
|
272
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/subscribers/${validatePathParam("subscriberId", request.subscriberId)}`
|
|
273
|
+
}, unmarshalSubscriber);
|
|
274
|
+
this.deleteSubscriber = (request) => this.client.fetch({
|
|
275
|
+
method: "DELETE",
|
|
276
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lb/subscription/${validatePathParam("subscriberId", request.subscriberId)}`
|
|
277
|
+
});
|
|
278
|
+
this.subscribeToLb = (request) => this.client.fetch({
|
|
279
|
+
body: JSON.stringify(marshalZonedApiSubscribeToLbRequest(request, this.client.settings)),
|
|
280
|
+
headers: jsonContentHeaders,
|
|
281
|
+
method: "POST",
|
|
282
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lb/${validatePathParam("lbId", request.lbId)}/subscribe`
|
|
283
|
+
}, unmarshalLb);
|
|
284
|
+
this.unsubscribeFromLb = (request) => this.client.fetch({
|
|
285
|
+
method: "DELETE",
|
|
286
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lb/${validatePathParam("lbId", request.lbId)}/unsubscribe`
|
|
287
|
+
}, unmarshalLb);
|
|
288
|
+
this.pageOfListLbPrivateNetworks = (request) => this.client.fetch({
|
|
289
|
+
method: "GET",
|
|
290
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/private-networks`,
|
|
291
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
292
|
+
}, unmarshalListLbPrivateNetworksResponse);
|
|
293
|
+
this.listLbPrivateNetworks = (request) => enrichForPagination("privateNetwork", this.pageOfListLbPrivateNetworks, request);
|
|
294
|
+
this.attachPrivateNetwork = (request) => this.client.fetch({
|
|
295
|
+
body: JSON.stringify(marshalZonedApiAttachPrivateNetworkRequest(request, this.client.settings)),
|
|
296
|
+
headers: jsonContentHeaders,
|
|
297
|
+
method: "POST",
|
|
298
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/attach-private-network`
|
|
299
|
+
}, unmarshalPrivateNetwork);
|
|
300
|
+
this.detachPrivateNetwork = (request) => this.client.fetch({
|
|
301
|
+
body: JSON.stringify(marshalZonedApiDetachPrivateNetworkRequest(request, this.client.settings)),
|
|
302
|
+
headers: jsonContentHeaders,
|
|
303
|
+
method: "POST",
|
|
304
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/detach-private-network`
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
static {
|
|
308
|
+
this.LOCALITY = toApiLocality({ zones: [
|
|
309
|
+
"fr-par-1",
|
|
310
|
+
"fr-par-2",
|
|
311
|
+
"nl-ams-1",
|
|
312
|
+
"nl-ams-2",
|
|
313
|
+
"nl-ams-3",
|
|
314
|
+
"pl-waw-1",
|
|
315
|
+
"pl-waw-2",
|
|
316
|
+
"pl-waw-3"
|
|
317
|
+
] });
|
|
318
|
+
}
|
|
648
319
|
};
|
|
649
320
|
/**
|
|
650
321
|
* Load balancer API.
|
|
@@ -652,625 +323,302 @@ var ZonedAPI = class extends API$1 {
|
|
|
652
323
|
This API allows you to manage your Load Balancers.
|
|
653
324
|
*/
|
|
654
325
|
var API = class extends API$1 {
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
"
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
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
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
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
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
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
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam("frontendId", request.frontendId)}`
|
|
952
|
-
});
|
|
953
|
-
pageOfListRoutes = (request = {}) => this.client.fetch({
|
|
954
|
-
method: "GET",
|
|
955
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes`,
|
|
956
|
-
urlParams: urlParams(["frontend_id", request.frontendId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
957
|
-
}, unmarshalListRoutesResponse);
|
|
958
|
-
/**
|
|
959
|
-
* List all backend redirections.
|
|
960
|
-
*
|
|
961
|
-
* @param request - The request {@link ListRoutesRequest}
|
|
962
|
-
* @returns A Promise of ListRoutesResponse
|
|
963
|
-
*/
|
|
964
|
-
listRoutes = (request = {}) => enrichForPagination("routes", this.pageOfListRoutes, request);
|
|
965
|
-
/**
|
|
966
|
-
* Create a backend redirection.
|
|
967
|
-
*
|
|
968
|
-
* @param request - The request {@link CreateRouteRequest}
|
|
969
|
-
* @returns A Promise of Route
|
|
970
|
-
*/
|
|
971
|
-
createRoute = (request) => this.client.fetch({
|
|
972
|
-
body: JSON.stringify(marshalCreateRouteRequest(request, this.client.settings)),
|
|
973
|
-
headers: jsonContentHeaders,
|
|
974
|
-
method: "POST",
|
|
975
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes`
|
|
976
|
-
}, unmarshalRoute);
|
|
977
|
-
/**
|
|
978
|
-
* Get single backend redirection.
|
|
979
|
-
*
|
|
980
|
-
* @param request - The request {@link GetRouteRequest}
|
|
981
|
-
* @returns A Promise of Route
|
|
982
|
-
*/
|
|
983
|
-
getRoute = (request) => this.client.fetch({
|
|
984
|
-
method: "GET",
|
|
985
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam("routeId", request.routeId)}`
|
|
986
|
-
}, unmarshalRoute);
|
|
987
|
-
/**
|
|
988
|
-
* Edit a backend redirection.
|
|
989
|
-
*
|
|
990
|
-
* @param request - The request {@link UpdateRouteRequest}
|
|
991
|
-
* @returns A Promise of Route
|
|
992
|
-
*/
|
|
993
|
-
updateRoute = (request) => this.client.fetch({
|
|
994
|
-
body: JSON.stringify(marshalUpdateRouteRequest(request, this.client.settings)),
|
|
995
|
-
headers: jsonContentHeaders,
|
|
996
|
-
method: "PUT",
|
|
997
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam("routeId", request.routeId)}`
|
|
998
|
-
}, unmarshalRoute);
|
|
999
|
-
/**
|
|
1000
|
-
* Delete a backend redirection.
|
|
1001
|
-
*
|
|
1002
|
-
* @param request - The request {@link DeleteRouteRequest}
|
|
1003
|
-
*/
|
|
1004
|
-
deleteRoute = (request) => this.client.fetch({
|
|
1005
|
-
method: "DELETE",
|
|
1006
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam("routeId", request.routeId)}`
|
|
1007
|
-
});
|
|
1008
|
-
/**
|
|
1009
|
-
* Get usage statistics of a given load balancer.
|
|
1010
|
-
*
|
|
1011
|
-
* @deprecated
|
|
1012
|
-
* @param request - The request {@link GetLbStatsRequest}
|
|
1013
|
-
* @returns A Promise of LbStats
|
|
1014
|
-
*/
|
|
1015
|
-
getLbStats = (request) => this.client.fetch({
|
|
1016
|
-
method: "GET",
|
|
1017
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/stats`,
|
|
1018
|
-
urlParams: urlParams(["backend_id", request.backendId])
|
|
1019
|
-
}, unmarshalLbStats);
|
|
1020
|
-
pageOfListBackendStats = (request) => this.client.fetch({
|
|
1021
|
-
method: "GET",
|
|
1022
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/backend-stats`,
|
|
1023
|
-
urlParams: urlParams(["backend_id", request.backendId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
1024
|
-
}, unmarshalListBackendStatsResponse);
|
|
1025
|
-
/**
|
|
1026
|
-
* List backend server statistics.
|
|
1027
|
-
*
|
|
1028
|
-
* @param request - The request {@link ListBackendStatsRequest}
|
|
1029
|
-
* @returns A Promise of ListBackendStatsResponse
|
|
1030
|
-
*/
|
|
1031
|
-
listBackendStats = (request) => enrichForPagination("backendServersStats", this.pageOfListBackendStats, request);
|
|
1032
|
-
pageOfListAcls = (request) => this.client.fetch({
|
|
1033
|
-
method: "GET",
|
|
1034
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam("frontendId", request.frontendId)}/acls`,
|
|
1035
|
-
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
1036
|
-
}, unmarshalListAclResponse);
|
|
1037
|
-
/**
|
|
1038
|
-
* List ACL for a given frontend.
|
|
1039
|
-
*
|
|
1040
|
-
* @param request - The request {@link ListAclsRequest}
|
|
1041
|
-
* @returns A Promise of ListAclResponse
|
|
1042
|
-
*/
|
|
1043
|
-
listAcls = (request) => enrichForPagination("acls", this.pageOfListAcls, request);
|
|
1044
|
-
/**
|
|
1045
|
-
* Create an ACL for a given frontend.
|
|
1046
|
-
*
|
|
1047
|
-
* @param request - The request {@link CreateAclRequest}
|
|
1048
|
-
* @returns A Promise of Acl
|
|
1049
|
-
*/
|
|
1050
|
-
createAcl = (request) => this.client.fetch({
|
|
1051
|
-
body: JSON.stringify(marshalCreateAclRequest(request, this.client.settings)),
|
|
1052
|
-
headers: jsonContentHeaders,
|
|
1053
|
-
method: "POST",
|
|
1054
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam("frontendId", request.frontendId)}/acls`
|
|
1055
|
-
}, unmarshalAcl);
|
|
1056
|
-
/**
|
|
1057
|
-
* Get an ACL.
|
|
1058
|
-
*
|
|
1059
|
-
* @param request - The request {@link GetAclRequest}
|
|
1060
|
-
* @returns A Promise of Acl
|
|
1061
|
-
*/
|
|
1062
|
-
getAcl = (request) => this.client.fetch({
|
|
1063
|
-
method: "GET",
|
|
1064
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
1065
|
-
}, unmarshalAcl);
|
|
1066
|
-
/**
|
|
1067
|
-
* Update an ACL.
|
|
1068
|
-
*
|
|
1069
|
-
* @param request - The request {@link UpdateAclRequest}
|
|
1070
|
-
* @returns A Promise of Acl
|
|
1071
|
-
*/
|
|
1072
|
-
updateAcl = (request) => this.client.fetch({
|
|
1073
|
-
body: JSON.stringify(marshalUpdateAclRequest(request, this.client.settings)),
|
|
1074
|
-
headers: jsonContentHeaders,
|
|
1075
|
-
method: "PUT",
|
|
1076
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
1077
|
-
}, unmarshalAcl);
|
|
1078
|
-
/**
|
|
1079
|
-
* Delete an ACL.
|
|
1080
|
-
*
|
|
1081
|
-
* @param request - The request {@link DeleteAclRequest}
|
|
1082
|
-
*/
|
|
1083
|
-
deleteAcl = (request) => this.client.fetch({
|
|
1084
|
-
method: "DELETE",
|
|
1085
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
1086
|
-
});
|
|
1087
|
-
/**
|
|
1088
|
-
* Create a TLS certificate. Generate a new TLS certificate using Let's Encrypt or import your certificate.
|
|
1089
|
-
*
|
|
1090
|
-
* @param request - The request {@link CreateCertificateRequest}
|
|
1091
|
-
* @returns A Promise of Certificate
|
|
1092
|
-
*/
|
|
1093
|
-
createCertificate = (request) => this.client.fetch({
|
|
1094
|
-
body: JSON.stringify(marshalCreateCertificateRequest(request, this.client.settings)),
|
|
1095
|
-
headers: jsonContentHeaders,
|
|
1096
|
-
method: "POST",
|
|
1097
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/certificates`
|
|
1098
|
-
}, unmarshalCertificate);
|
|
1099
|
-
pageOfListCertificates = (request) => this.client.fetch({
|
|
1100
|
-
method: "GET",
|
|
1101
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/certificates`,
|
|
1102
|
-
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
1103
|
-
}, unmarshalListCertificatesResponse);
|
|
1104
|
-
/**
|
|
1105
|
-
* List all TLS certificates on a given load balancer.
|
|
1106
|
-
*
|
|
1107
|
-
* @param request - The request {@link ListCertificatesRequest}
|
|
1108
|
-
* @returns A Promise of ListCertificatesResponse
|
|
1109
|
-
*/
|
|
1110
|
-
listCertificates = (request) => enrichForPagination("certificates", this.pageOfListCertificates, request);
|
|
1111
|
-
/**
|
|
1112
|
-
* Get a TLS certificate.
|
|
1113
|
-
*
|
|
1114
|
-
* @param request - The request {@link GetCertificateRequest}
|
|
1115
|
-
* @returns A Promise of Certificate
|
|
1116
|
-
*/
|
|
1117
|
-
getCertificate = (request) => this.client.fetch({
|
|
1118
|
-
method: "GET",
|
|
1119
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/certificates/${validatePathParam("certificateId", request.certificateId)}`
|
|
1120
|
-
}, unmarshalCertificate);
|
|
1121
|
-
/**
|
|
1122
|
-
* Waits for {@link Certificate} to be in a final state.
|
|
1123
|
-
*
|
|
1124
|
-
* @param request - The request {@link GetCertificateRequest}
|
|
1125
|
-
* @param options - The waiting options
|
|
1126
|
-
* @returns A Promise of Certificate
|
|
1127
|
-
*/
|
|
1128
|
-
waitForCertificate = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getCertificate, request, options);
|
|
1129
|
-
/**
|
|
1130
|
-
* Update a TLS certificate.
|
|
1131
|
-
*
|
|
1132
|
-
* @param request - The request {@link UpdateCertificateRequest}
|
|
1133
|
-
* @returns A Promise of Certificate
|
|
1134
|
-
*/
|
|
1135
|
-
updateCertificate = (request) => this.client.fetch({
|
|
1136
|
-
body: JSON.stringify(marshalUpdateCertificateRequest(request, this.client.settings)),
|
|
1137
|
-
headers: jsonContentHeaders,
|
|
1138
|
-
method: "PUT",
|
|
1139
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/certificates/${validatePathParam("certificateId", request.certificateId)}`
|
|
1140
|
-
}, unmarshalCertificate);
|
|
1141
|
-
/**
|
|
1142
|
-
* Delete a TLS certificate.
|
|
1143
|
-
*
|
|
1144
|
-
* @param request - The request {@link DeleteCertificateRequest}
|
|
1145
|
-
*/
|
|
1146
|
-
deleteCertificate = (request) => this.client.fetch({
|
|
1147
|
-
method: "DELETE",
|
|
1148
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/certificates/${validatePathParam("certificateId", request.certificateId)}`
|
|
1149
|
-
});
|
|
1150
|
-
pageOfListLbTypes = (request = {}) => this.client.fetch({
|
|
1151
|
-
method: "GET",
|
|
1152
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lb-types`,
|
|
1153
|
-
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
1154
|
-
}, unmarshalListLbTypesResponse);
|
|
1155
|
-
/**
|
|
1156
|
-
* List all load balancer offer type.
|
|
1157
|
-
*
|
|
1158
|
-
* @param request - The request {@link ListLbTypesRequest}
|
|
1159
|
-
* @returns A Promise of ListLbTypesResponse
|
|
1160
|
-
*/
|
|
1161
|
-
listLbTypes = (request = {}) => enrichForPagination("lbTypes", this.pageOfListLbTypes, request);
|
|
1162
|
-
/**
|
|
1163
|
-
* Create a subscriber, webhook or email.
|
|
1164
|
-
*
|
|
1165
|
-
* @param request - The request {@link CreateSubscriberRequest}
|
|
1166
|
-
* @returns A Promise of Subscriber
|
|
1167
|
-
*/
|
|
1168
|
-
createSubscriber = (request) => this.client.fetch({
|
|
1169
|
-
body: JSON.stringify(marshalCreateSubscriberRequest(request, this.client.settings)),
|
|
1170
|
-
headers: jsonContentHeaders,
|
|
1171
|
-
method: "POST",
|
|
1172
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/subscribers`
|
|
1173
|
-
}, unmarshalSubscriber);
|
|
1174
|
-
/**
|
|
1175
|
-
* Get a subscriber.
|
|
1176
|
-
*
|
|
1177
|
-
* @param request - The request {@link GetSubscriberRequest}
|
|
1178
|
-
* @returns A Promise of Subscriber
|
|
1179
|
-
*/
|
|
1180
|
-
getSubscriber = (request) => this.client.fetch({
|
|
1181
|
-
method: "GET",
|
|
1182
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/subscribers/${validatePathParam("subscriberId", request.subscriberId)}`
|
|
1183
|
-
}, unmarshalSubscriber);
|
|
1184
|
-
pageOfListSubscriber = (request = {}) => this.client.fetch({
|
|
1185
|
-
method: "GET",
|
|
1186
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/subscribers`,
|
|
1187
|
-
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
1188
|
-
}, unmarshalListSubscriberResponse);
|
|
1189
|
-
/**
|
|
1190
|
-
* List all subscriber.
|
|
1191
|
-
*
|
|
1192
|
-
* @param request - The request {@link ListSubscriberRequest}
|
|
1193
|
-
* @returns A Promise of ListSubscriberResponse
|
|
1194
|
-
*/
|
|
1195
|
-
listSubscriber = (request = {}) => enrichForPagination("subscribers", this.pageOfListSubscriber, request);
|
|
1196
|
-
/**
|
|
1197
|
-
* Update a subscriber.
|
|
1198
|
-
*
|
|
1199
|
-
* @param request - The request {@link UpdateSubscriberRequest}
|
|
1200
|
-
* @returns A Promise of Subscriber
|
|
1201
|
-
*/
|
|
1202
|
-
updateSubscriber = (request) => this.client.fetch({
|
|
1203
|
-
body: JSON.stringify(marshalUpdateSubscriberRequest(request, this.client.settings)),
|
|
1204
|
-
headers: jsonContentHeaders,
|
|
1205
|
-
method: "PUT",
|
|
1206
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/subscribers/${validatePathParam("subscriberId", request.subscriberId)}`
|
|
1207
|
-
}, unmarshalSubscriber);
|
|
1208
|
-
/**
|
|
1209
|
-
* Delete a subscriber.
|
|
1210
|
-
*
|
|
1211
|
-
* @param request - The request {@link DeleteSubscriberRequest}
|
|
1212
|
-
*/
|
|
1213
|
-
deleteSubscriber = (request) => this.client.fetch({
|
|
1214
|
-
method: "DELETE",
|
|
1215
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lb/subscriber/${validatePathParam("subscriberId", request.subscriberId)}`
|
|
1216
|
-
});
|
|
1217
|
-
/**
|
|
1218
|
-
* Subscribe a subscriber to a given load balancer.
|
|
1219
|
-
*
|
|
1220
|
-
* @param request - The request {@link SubscribeToLbRequest}
|
|
1221
|
-
* @returns A Promise of Lb
|
|
1222
|
-
*/
|
|
1223
|
-
subscribeToLb = (request) => this.client.fetch({
|
|
1224
|
-
body: JSON.stringify(marshalSubscribeToLbRequest(request, this.client.settings)),
|
|
1225
|
-
headers: jsonContentHeaders,
|
|
1226
|
-
method: "POST",
|
|
1227
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lb/${validatePathParam("lbId", request.lbId)}/subscribe`
|
|
1228
|
-
}, unmarshalLb);
|
|
1229
|
-
/**
|
|
1230
|
-
* Unsubscribe a subscriber from a given load balancer.
|
|
1231
|
-
*
|
|
1232
|
-
* @param request - The request {@link UnsubscribeFromLbRequest}
|
|
1233
|
-
* @returns A Promise of Lb
|
|
1234
|
-
*/
|
|
1235
|
-
unsubscribeFromLb = (request) => this.client.fetch({
|
|
1236
|
-
method: "DELETE",
|
|
1237
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lb/${validatePathParam("lbId", request.lbId)}/unsubscribe`
|
|
1238
|
-
}, unmarshalLb);
|
|
1239
|
-
pageOfListLbPrivateNetworks = (request) => this.client.fetch({
|
|
1240
|
-
method: "GET",
|
|
1241
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/private-networks`,
|
|
1242
|
-
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
1243
|
-
}, unmarshalListLbPrivateNetworksResponse);
|
|
1244
|
-
/**
|
|
1245
|
-
* List attached private network of load balancer.
|
|
1246
|
-
*
|
|
1247
|
-
* @param request - The request {@link ListLbPrivateNetworksRequest}
|
|
1248
|
-
* @returns A Promise of ListLbPrivateNetworksResponse
|
|
1249
|
-
*/
|
|
1250
|
-
listLbPrivateNetworks = (request) => enrichForPagination("privateNetwork", this.pageOfListLbPrivateNetworks, request);
|
|
1251
|
-
/**
|
|
1252
|
-
* Add load balancer on instance private network.
|
|
1253
|
-
*
|
|
1254
|
-
* @param request - The request {@link AttachPrivateNetworkRequest}
|
|
1255
|
-
* @returns A Promise of PrivateNetwork
|
|
1256
|
-
*/
|
|
1257
|
-
attachPrivateNetwork = (request) => this.client.fetch({
|
|
1258
|
-
body: JSON.stringify(marshalAttachPrivateNetworkRequest(request, this.client.settings)),
|
|
1259
|
-
headers: jsonContentHeaders,
|
|
1260
|
-
method: "POST",
|
|
1261
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}/attach`
|
|
1262
|
-
}, unmarshalPrivateNetwork);
|
|
1263
|
-
/**
|
|
1264
|
-
* Remove load balancer of private network.
|
|
1265
|
-
*
|
|
1266
|
-
* @param request - The request {@link DetachPrivateNetworkRequest}
|
|
1267
|
-
*/
|
|
1268
|
-
detachPrivateNetwork = (request) => this.client.fetch({
|
|
1269
|
-
body: "{}",
|
|
1270
|
-
headers: jsonContentHeaders,
|
|
1271
|
-
method: "POST",
|
|
1272
|
-
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}/detach`
|
|
1273
|
-
});
|
|
326
|
+
constructor(..._args2) {
|
|
327
|
+
super(..._args2);
|
|
328
|
+
this.pageOfListLbs = (request = {}) => this.client.fetch({
|
|
329
|
+
method: "GET",
|
|
330
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs`,
|
|
331
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["tags", request.tags])
|
|
332
|
+
}, unmarshalListLbsResponse);
|
|
333
|
+
this.listLbs = (request = {}) => enrichForPagination("lbs", this.pageOfListLbs, request);
|
|
334
|
+
this.createLb = (request) => this.client.fetch({
|
|
335
|
+
body: JSON.stringify(marshalCreateLbRequest(request, this.client.settings)),
|
|
336
|
+
headers: jsonContentHeaders,
|
|
337
|
+
method: "POST",
|
|
338
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs`
|
|
339
|
+
}, unmarshalLb);
|
|
340
|
+
this.getLb = (request) => this.client.fetch({
|
|
341
|
+
method: "GET",
|
|
342
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}`
|
|
343
|
+
}, unmarshalLb);
|
|
344
|
+
this.waitForLb = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!LB_TRANSIENT_STATUSES.includes(res.status))), this.getLb, request, options);
|
|
345
|
+
this.updateLb = (request) => this.client.fetch({
|
|
346
|
+
body: JSON.stringify(marshalUpdateLbRequest(request, this.client.settings)),
|
|
347
|
+
headers: jsonContentHeaders,
|
|
348
|
+
method: "PUT",
|
|
349
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}`
|
|
350
|
+
}, unmarshalLb);
|
|
351
|
+
this.deleteLb = (request) => this.client.fetch({
|
|
352
|
+
method: "DELETE",
|
|
353
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}`,
|
|
354
|
+
urlParams: urlParams(["release_ip", request.releaseIp])
|
|
355
|
+
});
|
|
356
|
+
this.migrateLb = (request) => this.client.fetch({
|
|
357
|
+
body: JSON.stringify(marshalMigrateLbRequest(request, this.client.settings)),
|
|
358
|
+
headers: jsonContentHeaders,
|
|
359
|
+
method: "POST",
|
|
360
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/migrate`
|
|
361
|
+
}, unmarshalLb);
|
|
362
|
+
this.pageOfListIPs = (request = {}) => this.client.fetch({
|
|
363
|
+
method: "GET",
|
|
364
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ips`,
|
|
365
|
+
urlParams: urlParams(["ip_address", request.ipAddress], ["ip_type", request.ipType], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["tags", request.tags])
|
|
366
|
+
}, unmarshalListIpsResponse);
|
|
367
|
+
this.listIPs = (request = {}) => enrichForPagination("ips", this.pageOfListIPs, request);
|
|
368
|
+
this.createIp = (request) => this.client.fetch({
|
|
369
|
+
body: JSON.stringify(marshalCreateIpRequest(request, this.client.settings)),
|
|
370
|
+
headers: jsonContentHeaders,
|
|
371
|
+
method: "POST",
|
|
372
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ips`
|
|
373
|
+
}, unmarshalIp);
|
|
374
|
+
this.getIp = (request) => this.client.fetch({
|
|
375
|
+
method: "GET",
|
|
376
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ips/${validatePathParam("ipId", request.ipId)}`
|
|
377
|
+
}, unmarshalIp);
|
|
378
|
+
this.releaseIp = (request) => this.client.fetch({
|
|
379
|
+
method: "DELETE",
|
|
380
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ips/${validatePathParam("ipId", request.ipId)}`
|
|
381
|
+
});
|
|
382
|
+
this.updateIp = (request) => this.client.fetch({
|
|
383
|
+
body: JSON.stringify(marshalUpdateIpRequest(request, this.client.settings)),
|
|
384
|
+
headers: jsonContentHeaders,
|
|
385
|
+
method: "PATCH",
|
|
386
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ips/${validatePathParam("ipId", request.ipId)}`
|
|
387
|
+
}, unmarshalIp);
|
|
388
|
+
this.pageOfListBackends = (request) => this.client.fetch({
|
|
389
|
+
method: "GET",
|
|
390
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/backends`,
|
|
391
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
392
|
+
}, unmarshalListBackendsResponse);
|
|
393
|
+
this.listBackends = (request) => enrichForPagination("backends", this.pageOfListBackends, request);
|
|
394
|
+
this.createBackend = (request) => this.client.fetch({
|
|
395
|
+
body: JSON.stringify(marshalCreateBackendRequest(request, this.client.settings)),
|
|
396
|
+
headers: jsonContentHeaders,
|
|
397
|
+
method: "POST",
|
|
398
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/backends`
|
|
399
|
+
}, unmarshalBackend);
|
|
400
|
+
this.getBackend = (request) => this.client.fetch({
|
|
401
|
+
method: "GET",
|
|
402
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam("backendId", request.backendId)}`
|
|
403
|
+
}, unmarshalBackend);
|
|
404
|
+
this.updateBackend = (request) => this.client.fetch({
|
|
405
|
+
body: JSON.stringify(marshalUpdateBackendRequest(request, this.client.settings)),
|
|
406
|
+
headers: jsonContentHeaders,
|
|
407
|
+
method: "PUT",
|
|
408
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam("backendId", request.backendId)}`
|
|
409
|
+
}, unmarshalBackend);
|
|
410
|
+
this.deleteBackend = (request) => this.client.fetch({
|
|
411
|
+
method: "DELETE",
|
|
412
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam("backendId", request.backendId)}`
|
|
413
|
+
});
|
|
414
|
+
this.addBackendServers = (request) => this.client.fetch({
|
|
415
|
+
body: JSON.stringify(marshalAddBackendServersRequest(request, this.client.settings)),
|
|
416
|
+
headers: jsonContentHeaders,
|
|
417
|
+
method: "POST",
|
|
418
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam("backendId", request.backendId)}/servers`
|
|
419
|
+
}, unmarshalBackend);
|
|
420
|
+
this.removeBackendServers = (request) => this.client.fetch({
|
|
421
|
+
body: JSON.stringify(marshalRemoveBackendServersRequest(request, this.client.settings)),
|
|
422
|
+
headers: jsonContentHeaders,
|
|
423
|
+
method: "DELETE",
|
|
424
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam("backendId", request.backendId)}/servers`
|
|
425
|
+
}, unmarshalBackend);
|
|
426
|
+
this.setBackendServers = (request) => this.client.fetch({
|
|
427
|
+
body: JSON.stringify(marshalSetBackendServersRequest(request, this.client.settings)),
|
|
428
|
+
headers: jsonContentHeaders,
|
|
429
|
+
method: "PUT",
|
|
430
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam("backendId", request.backendId)}/servers`
|
|
431
|
+
}, unmarshalBackend);
|
|
432
|
+
this.updateHealthCheck = (request) => this.client.fetch({
|
|
433
|
+
body: JSON.stringify(marshalUpdateHealthCheckRequest(request, this.client.settings)),
|
|
434
|
+
headers: jsonContentHeaders,
|
|
435
|
+
method: "PUT",
|
|
436
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam("backendId", request.backendId)}/healthcheck`
|
|
437
|
+
}, unmarshalHealthCheck);
|
|
438
|
+
this.pageOfListFrontends = (request) => this.client.fetch({
|
|
439
|
+
method: "GET",
|
|
440
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/frontends`,
|
|
441
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
442
|
+
}, unmarshalListFrontendsResponse);
|
|
443
|
+
this.listFrontends = (request) => enrichForPagination("frontends", this.pageOfListFrontends, request);
|
|
444
|
+
this.createFrontend = (request) => this.client.fetch({
|
|
445
|
+
body: JSON.stringify(marshalCreateFrontendRequest(request, this.client.settings)),
|
|
446
|
+
headers: jsonContentHeaders,
|
|
447
|
+
method: "POST",
|
|
448
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/frontends`
|
|
449
|
+
}, unmarshalFrontend);
|
|
450
|
+
this.getFrontend = (request) => this.client.fetch({
|
|
451
|
+
method: "GET",
|
|
452
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam("frontendId", request.frontendId)}`
|
|
453
|
+
}, unmarshalFrontend);
|
|
454
|
+
this.updateFrontend = (request) => this.client.fetch({
|
|
455
|
+
body: JSON.stringify(marshalUpdateFrontendRequest(request, this.client.settings)),
|
|
456
|
+
headers: jsonContentHeaders,
|
|
457
|
+
method: "PUT",
|
|
458
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam("frontendId", request.frontendId)}`
|
|
459
|
+
}, unmarshalFrontend);
|
|
460
|
+
this.deleteFrontend = (request) => this.client.fetch({
|
|
461
|
+
method: "DELETE",
|
|
462
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam("frontendId", request.frontendId)}`
|
|
463
|
+
});
|
|
464
|
+
this.pageOfListRoutes = (request = {}) => this.client.fetch({
|
|
465
|
+
method: "GET",
|
|
466
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes`,
|
|
467
|
+
urlParams: urlParams(["frontend_id", request.frontendId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
468
|
+
}, unmarshalListRoutesResponse);
|
|
469
|
+
this.listRoutes = (request = {}) => enrichForPagination("routes", this.pageOfListRoutes, request);
|
|
470
|
+
this.createRoute = (request) => this.client.fetch({
|
|
471
|
+
body: JSON.stringify(marshalCreateRouteRequest(request, this.client.settings)),
|
|
472
|
+
headers: jsonContentHeaders,
|
|
473
|
+
method: "POST",
|
|
474
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes`
|
|
475
|
+
}, unmarshalRoute);
|
|
476
|
+
this.getRoute = (request) => this.client.fetch({
|
|
477
|
+
method: "GET",
|
|
478
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam("routeId", request.routeId)}`
|
|
479
|
+
}, unmarshalRoute);
|
|
480
|
+
this.updateRoute = (request) => this.client.fetch({
|
|
481
|
+
body: JSON.stringify(marshalUpdateRouteRequest(request, this.client.settings)),
|
|
482
|
+
headers: jsonContentHeaders,
|
|
483
|
+
method: "PUT",
|
|
484
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam("routeId", request.routeId)}`
|
|
485
|
+
}, unmarshalRoute);
|
|
486
|
+
this.deleteRoute = (request) => this.client.fetch({
|
|
487
|
+
method: "DELETE",
|
|
488
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam("routeId", request.routeId)}`
|
|
489
|
+
});
|
|
490
|
+
this.getLbStats = (request) => this.client.fetch({
|
|
491
|
+
method: "GET",
|
|
492
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/stats`,
|
|
493
|
+
urlParams: urlParams(["backend_id", request.backendId])
|
|
494
|
+
}, unmarshalLbStats);
|
|
495
|
+
this.pageOfListBackendStats = (request) => this.client.fetch({
|
|
496
|
+
method: "GET",
|
|
497
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/backend-stats`,
|
|
498
|
+
urlParams: urlParams(["backend_id", request.backendId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
499
|
+
}, unmarshalListBackendStatsResponse);
|
|
500
|
+
this.listBackendStats = (request) => enrichForPagination("backendServersStats", this.pageOfListBackendStats, request);
|
|
501
|
+
this.pageOfListAcls = (request) => this.client.fetch({
|
|
502
|
+
method: "GET",
|
|
503
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam("frontendId", request.frontendId)}/acls`,
|
|
504
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
505
|
+
}, unmarshalListAclResponse);
|
|
506
|
+
this.listAcls = (request) => enrichForPagination("acls", this.pageOfListAcls, request);
|
|
507
|
+
this.createAcl = (request) => this.client.fetch({
|
|
508
|
+
body: JSON.stringify(marshalCreateAclRequest(request, this.client.settings)),
|
|
509
|
+
headers: jsonContentHeaders,
|
|
510
|
+
method: "POST",
|
|
511
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam("frontendId", request.frontendId)}/acls`
|
|
512
|
+
}, unmarshalAcl);
|
|
513
|
+
this.getAcl = (request) => this.client.fetch({
|
|
514
|
+
method: "GET",
|
|
515
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
516
|
+
}, unmarshalAcl);
|
|
517
|
+
this.updateAcl = (request) => this.client.fetch({
|
|
518
|
+
body: JSON.stringify(marshalUpdateAclRequest(request, this.client.settings)),
|
|
519
|
+
headers: jsonContentHeaders,
|
|
520
|
+
method: "PUT",
|
|
521
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
522
|
+
}, unmarshalAcl);
|
|
523
|
+
this.deleteAcl = (request) => this.client.fetch({
|
|
524
|
+
method: "DELETE",
|
|
525
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
526
|
+
});
|
|
527
|
+
this.createCertificate = (request) => this.client.fetch({
|
|
528
|
+
body: JSON.stringify(marshalCreateCertificateRequest(request, this.client.settings)),
|
|
529
|
+
headers: jsonContentHeaders,
|
|
530
|
+
method: "POST",
|
|
531
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/certificates`
|
|
532
|
+
}, unmarshalCertificate);
|
|
533
|
+
this.pageOfListCertificates = (request) => this.client.fetch({
|
|
534
|
+
method: "GET",
|
|
535
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/certificates`,
|
|
536
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
537
|
+
}, unmarshalListCertificatesResponse);
|
|
538
|
+
this.listCertificates = (request) => enrichForPagination("certificates", this.pageOfListCertificates, request);
|
|
539
|
+
this.getCertificate = (request) => this.client.fetch({
|
|
540
|
+
method: "GET",
|
|
541
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/certificates/${validatePathParam("certificateId", request.certificateId)}`
|
|
542
|
+
}, unmarshalCertificate);
|
|
543
|
+
this.waitForCertificate = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getCertificate, request, options);
|
|
544
|
+
this.updateCertificate = (request) => this.client.fetch({
|
|
545
|
+
body: JSON.stringify(marshalUpdateCertificateRequest(request, this.client.settings)),
|
|
546
|
+
headers: jsonContentHeaders,
|
|
547
|
+
method: "PUT",
|
|
548
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/certificates/${validatePathParam("certificateId", request.certificateId)}`
|
|
549
|
+
}, unmarshalCertificate);
|
|
550
|
+
this.deleteCertificate = (request) => this.client.fetch({
|
|
551
|
+
method: "DELETE",
|
|
552
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/certificates/${validatePathParam("certificateId", request.certificateId)}`
|
|
553
|
+
});
|
|
554
|
+
this.pageOfListLbTypes = (request = {}) => this.client.fetch({
|
|
555
|
+
method: "GET",
|
|
556
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lb-types`,
|
|
557
|
+
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
558
|
+
}, unmarshalListLbTypesResponse);
|
|
559
|
+
this.listLbTypes = (request = {}) => enrichForPagination("lbTypes", this.pageOfListLbTypes, request);
|
|
560
|
+
this.createSubscriber = (request) => this.client.fetch({
|
|
561
|
+
body: JSON.stringify(marshalCreateSubscriberRequest(request, this.client.settings)),
|
|
562
|
+
headers: jsonContentHeaders,
|
|
563
|
+
method: "POST",
|
|
564
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/subscribers`
|
|
565
|
+
}, unmarshalSubscriber);
|
|
566
|
+
this.getSubscriber = (request) => this.client.fetch({
|
|
567
|
+
method: "GET",
|
|
568
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/subscribers/${validatePathParam("subscriberId", request.subscriberId)}`
|
|
569
|
+
}, unmarshalSubscriber);
|
|
570
|
+
this.pageOfListSubscriber = (request = {}) => this.client.fetch({
|
|
571
|
+
method: "GET",
|
|
572
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/subscribers`,
|
|
573
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
574
|
+
}, unmarshalListSubscriberResponse);
|
|
575
|
+
this.listSubscriber = (request = {}) => enrichForPagination("subscribers", this.pageOfListSubscriber, request);
|
|
576
|
+
this.updateSubscriber = (request) => this.client.fetch({
|
|
577
|
+
body: JSON.stringify(marshalUpdateSubscriberRequest(request, this.client.settings)),
|
|
578
|
+
headers: jsonContentHeaders,
|
|
579
|
+
method: "PUT",
|
|
580
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/subscribers/${validatePathParam("subscriberId", request.subscriberId)}`
|
|
581
|
+
}, unmarshalSubscriber);
|
|
582
|
+
this.deleteSubscriber = (request) => this.client.fetch({
|
|
583
|
+
method: "DELETE",
|
|
584
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lb/subscriber/${validatePathParam("subscriberId", request.subscriberId)}`
|
|
585
|
+
});
|
|
586
|
+
this.subscribeToLb = (request) => this.client.fetch({
|
|
587
|
+
body: JSON.stringify(marshalSubscribeToLbRequest(request, this.client.settings)),
|
|
588
|
+
headers: jsonContentHeaders,
|
|
589
|
+
method: "POST",
|
|
590
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lb/${validatePathParam("lbId", request.lbId)}/subscribe`
|
|
591
|
+
}, unmarshalLb);
|
|
592
|
+
this.unsubscribeFromLb = (request) => this.client.fetch({
|
|
593
|
+
method: "DELETE",
|
|
594
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lb/${validatePathParam("lbId", request.lbId)}/unsubscribe`
|
|
595
|
+
}, unmarshalLb);
|
|
596
|
+
this.pageOfListLbPrivateNetworks = (request) => this.client.fetch({
|
|
597
|
+
method: "GET",
|
|
598
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/private-networks`,
|
|
599
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
600
|
+
}, unmarshalListLbPrivateNetworksResponse);
|
|
601
|
+
this.listLbPrivateNetworks = (request) => enrichForPagination("privateNetwork", this.pageOfListLbPrivateNetworks, request);
|
|
602
|
+
this.attachPrivateNetwork = (request) => this.client.fetch({
|
|
603
|
+
body: JSON.stringify(marshalAttachPrivateNetworkRequest(request, this.client.settings)),
|
|
604
|
+
headers: jsonContentHeaders,
|
|
605
|
+
method: "POST",
|
|
606
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}/attach`
|
|
607
|
+
}, unmarshalPrivateNetwork);
|
|
608
|
+
this.detachPrivateNetwork = (request) => this.client.fetch({
|
|
609
|
+
body: "{}",
|
|
610
|
+
headers: jsonContentHeaders,
|
|
611
|
+
method: "POST",
|
|
612
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}/detach`
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
static {
|
|
616
|
+
this.LOCALITY = toApiLocality({ regions: [
|
|
617
|
+
"fr-par",
|
|
618
|
+
"nl-ams",
|
|
619
|
+
"pl-waw"
|
|
620
|
+
] });
|
|
621
|
+
}
|
|
1274
622
|
};
|
|
1275
623
|
//#endregion
|
|
1276
624
|
export { API, ZonedAPI };
|