@scaleway/sdk-vpcgw 1.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,698 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const sdkClient = require("@scaleway/sdk-client");
4
- const content_gen = require("./content.gen.cjs");
5
- const marshalling_gen = require("./marshalling.gen.cjs");
6
- const jsonContentHeaders = {
7
- "Content-Type": "application/json; charset=utf-8"
8
- };
9
- class API extends sdkClient.API {
10
- /**
11
- * Locality of this API.
12
- * type ∈ {'zone','region','global','unspecified'}
13
- */
14
- static LOCALITY = sdkClient.toApiLocality({
15
- zones: [
16
- "fr-par-1",
17
- "fr-par-2",
18
- "nl-ams-1",
19
- "nl-ams-2",
20
- "nl-ams-3",
21
- "pl-waw-1",
22
- "pl-waw-2",
23
- "pl-waw-3"
24
- ]
25
- });
26
- pageOfListGateways = (request = {}) => this.client.fetch(
27
- {
28
- method: "GET",
29
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways`,
30
- urlParams: sdkClient.urlParams(
31
- ["name", request.name],
32
- ["order_by", request.orderBy],
33
- ["organization_id", request.organizationId],
34
- ["page", request.page],
35
- [
36
- "page_size",
37
- request.pageSize ?? this.client.settings.defaultPageSize
38
- ],
39
- ["private_network_id", request.privateNetworkId],
40
- ["project_id", request.projectId],
41
- ["status", request.status],
42
- ["tags", request.tags],
43
- ["type", request.type]
44
- )
45
- },
46
- marshalling_gen.unmarshalListGatewaysResponse
47
- );
48
- /**
49
- * List Public Gateways. List Public Gateways in a given Scaleway Organization or Project. By default, results are displayed in ascending order of creation date.
50
- *
51
- * @deprecated
52
- * @param request - The request {@link ListGatewaysRequest}
53
- * @returns A Promise of ListGatewaysResponse
54
- */
55
- listGateways = (request = {}) => sdkClient.enrichForPagination("gateways", this.pageOfListGateways, request);
56
- /**
57
- * Get a Public Gateway. Get details of a Public Gateway, specified by its gateway ID. The response object contains full details of the gateway, including its **name**, **type**, **status** and more.
58
- *
59
- * @deprecated
60
- * @param request - The request {@link GetGatewayRequest}
61
- * @returns A Promise of Gateway
62
- */
63
- getGateway = (request) => this.client.fetch(
64
- {
65
- method: "GET",
66
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${sdkClient.validatePathParam("gatewayId", request.gatewayId)}`
67
- },
68
- marshalling_gen.unmarshalGateway
69
- );
70
- /**
71
- * Waits for {@link Gateway} to be in a final state.
72
- *
73
- * @param request - The request {@link GetGatewayRequest}
74
- * @param options - The waiting options
75
- * @returns A Promise of Gateway
76
- */
77
- waitForGateway = (request, options) => sdkClient.waitForResource(
78
- options?.stop ?? ((res) => Promise.resolve(
79
- !content_gen.GATEWAY_TRANSIENT_STATUSES.includes(res.status)
80
- )),
81
- this.getGateway,
82
- request,
83
- options
84
- );
85
- /**
86
- * Create a Public Gateway. Create a new Public Gateway in the specified Scaleway Project, defining its **name**, **type** and other configuration details such as whether to enable SSH bastion.
87
- *
88
- * @deprecated
89
- * @param request - The request {@link CreateGatewayRequest}
90
- * @returns A Promise of Gateway
91
- */
92
- createGateway = (request) => this.client.fetch(
93
- {
94
- body: JSON.stringify(
95
- marshalling_gen.marshalCreateGatewayRequest(request, this.client.settings)
96
- ),
97
- headers: jsonContentHeaders,
98
- method: "POST",
99
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways`
100
- },
101
- marshalling_gen.unmarshalGateway
102
- );
103
- /**
104
- * Update a Public Gateway. Update the parameters of an existing Public Gateway, for example, its **name**, **tags**, **SSH bastion configuration**, and **DNS servers**.
105
- *
106
- * @deprecated
107
- * @param request - The request {@link UpdateGatewayRequest}
108
- * @returns A Promise of Gateway
109
- */
110
- updateGateway = (request) => this.client.fetch(
111
- {
112
- body: JSON.stringify(
113
- marshalling_gen.marshalUpdateGatewayRequest(request, this.client.settings)
114
- ),
115
- headers: jsonContentHeaders,
116
- method: "PATCH",
117
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${sdkClient.validatePathParam("gatewayId", request.gatewayId)}`
118
- },
119
- marshalling_gen.unmarshalGateway
120
- );
121
- /**
122
- * Delete a Public Gateway. Delete an existing Public Gateway, specified by its gateway ID. This action is irreversible.
123
- *
124
- * @deprecated
125
- * @param request - The request {@link DeleteGatewayRequest}
126
- */
127
- deleteGateway = (request) => this.client.fetch({
128
- method: "DELETE",
129
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${sdkClient.validatePathParam("gatewayId", request.gatewayId)}`,
130
- urlParams: sdkClient.urlParams(["cleanup_dhcp", request.cleanupDhcp])
131
- });
132
- /**
133
- * Upgrade a Public Gateway to the latest version and/or to a different commercial offer type. Upgrade a given Public Gateway to the newest software version or to a different commercial offer type. This applies the latest bugfixes and features to your Public Gateway. Note that gateway service will be interrupted during the update.
134
- *
135
- * @deprecated
136
- * @param request - The request {@link UpgradeGatewayRequest}
137
- * @returns A Promise of Gateway
138
- */
139
- upgradeGateway = (request) => this.client.fetch(
140
- {
141
- body: JSON.stringify(
142
- marshalling_gen.marshalUpgradeGatewayRequest(request, this.client.settings)
143
- ),
144
- headers: jsonContentHeaders,
145
- method: "POST",
146
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${sdkClient.validatePathParam("gatewayId", request.gatewayId)}/upgrade`
147
- },
148
- marshalling_gen.unmarshalGateway
149
- );
150
- /**
151
- * Upgrade a Public Gateway to IP mobility. Upgrade a Public Gateway to IP mobility (move from NAT IP to routed IP). This is idempotent: repeated calls after the first will return no error but have no effect.
152
- *
153
- * @deprecated
154
- * @param request - The request {@link EnableIPMobilityRequest}
155
- */
156
- enableIPMobility = (request) => this.client.fetch({
157
- body: "{}",
158
- headers: jsonContentHeaders,
159
- method: "POST",
160
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${sdkClient.validatePathParam("gatewayId", request.gatewayId)}/enable-ip-mobility`
161
- });
162
- pageOfListGatewayNetworks = (request = {}) => this.client.fetch(
163
- {
164
- method: "GET",
165
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateway-networks`,
166
- urlParams: sdkClient.urlParams(
167
- ["dhcp_id", request.dhcpId],
168
- ["enable_masquerade", request.enableMasquerade],
169
- ["gateway_id", request.gatewayId],
170
- ["order_by", request.orderBy],
171
- ["page", request.page],
172
- [
173
- "page_size",
174
- request.pageSize ?? this.client.settings.defaultPageSize
175
- ],
176
- ["private_network_id", request.privateNetworkId],
177
- ["status", request.status]
178
- )
179
- },
180
- marshalling_gen.unmarshalListGatewayNetworksResponse
181
- );
182
- /**
183
- * List Public Gateway connections to Private Networks. List the connections between Public Gateways and Private Networks (a connection = a GatewayNetwork). You can choose to filter by `gateway-id` to list all Private Networks attached to the specified Public Gateway, or by `private_network_id` to list all Public Gateways attached to the specified Private Network. Other query parameters are also available. The result is an array of GatewayNetwork objects, each giving details of the connection between a given Public Gateway and a given Private Network.
184
- *
185
- * @deprecated
186
- * @param request - The request {@link ListGatewayNetworksRequest}
187
- * @returns A Promise of ListGatewayNetworksResponse
188
- */
189
- listGatewayNetworks = (request = {}) => sdkClient.enrichForPagination(
190
- "gatewayNetworks",
191
- this.pageOfListGatewayNetworks,
192
- request
193
- );
194
- /**
195
- * Get a Public Gateway connection to a Private Network. Get details of a given connection between a Public Gateway and a Private Network (this connection = a GatewayNetwork), specified by its `gateway_network_id`. The response object contains details of the connection including the IDs of the Public Gateway and Private Network, the dates the connection was created/updated and its configuration settings.
196
- *
197
- * @deprecated
198
- * @param request - The request {@link GetGatewayNetworkRequest}
199
- * @returns A Promise of GatewayNetwork
200
- */
201
- getGatewayNetwork = (request) => this.client.fetch(
202
- {
203
- method: "GET",
204
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateway-networks/${sdkClient.validatePathParam("gatewayNetworkId", request.gatewayNetworkId)}`
205
- },
206
- marshalling_gen.unmarshalGatewayNetwork
207
- );
208
- /**
209
- * Waits for {@link GatewayNetwork} to be in a final state.
210
- *
211
- * @param request - The request {@link GetGatewayNetworkRequest}
212
- * @param options - The waiting options
213
- * @returns A Promise of GatewayNetwork
214
- */
215
- waitForGatewayNetwork = (request, options) => sdkClient.waitForResource(
216
- options?.stop ?? ((res) => Promise.resolve(
217
- !content_gen.GATEWAY_NETWORK_TRANSIENT_STATUSES.includes(res.status)
218
- )),
219
- this.getGatewayNetwork,
220
- request,
221
- options
222
- );
223
- /**
224
- * Attach a Public Gateway to a Private Network. Attach a specific Public Gateway to a specific Private Network (create a GatewayNetwork). You can configure parameters for the connection including DHCP settings, whether to enable masquerade (dynamic NAT), and more.
225
- *
226
- * @deprecated
227
- * @param request - The request {@link CreateGatewayNetworkRequest}
228
- * @returns A Promise of GatewayNetwork
229
- */
230
- createGatewayNetwork = (request) => this.client.fetch(
231
- {
232
- body: JSON.stringify(
233
- marshalling_gen.marshalCreateGatewayNetworkRequest(request, this.client.settings)
234
- ),
235
- headers: jsonContentHeaders,
236
- method: "POST",
237
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateway-networks`
238
- },
239
- marshalling_gen.unmarshalGatewayNetwork
240
- );
241
- /**
242
- * Update a Public Gateway's connection to a Private Network. Update the configuration parameters of a connection between a given Public Gateway and Private Network (the connection = a GatewayNetwork). Updatable parameters include DHCP settings and whether to enable traffic masquerade (dynamic NAT).
243
- *
244
- * @deprecated
245
- * @param request - The request {@link UpdateGatewayNetworkRequest}
246
- * @returns A Promise of GatewayNetwork
247
- */
248
- updateGatewayNetwork = (request) => this.client.fetch(
249
- {
250
- body: JSON.stringify(
251
- marshalling_gen.marshalUpdateGatewayNetworkRequest(request, this.client.settings)
252
- ),
253
- headers: jsonContentHeaders,
254
- method: "PATCH",
255
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateway-networks/${sdkClient.validatePathParam("gatewayNetworkId", request.gatewayNetworkId)}`
256
- },
257
- marshalling_gen.unmarshalGatewayNetwork
258
- );
259
- /**
260
- * Detach a Public Gateway from a Private Network. Detach a given Public Gateway from a given Private Network, i.e. delete a GatewayNetwork specified by a gateway_network_id.
261
- *
262
- * @deprecated
263
- * @param request - The request {@link DeleteGatewayNetworkRequest}
264
- */
265
- deleteGatewayNetwork = (request) => this.client.fetch({
266
- method: "DELETE",
267
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateway-networks/${sdkClient.validatePathParam("gatewayNetworkId", request.gatewayNetworkId)}`,
268
- urlParams: sdkClient.urlParams(["cleanup_dhcp", request.cleanupDhcp])
269
- });
270
- pageOfListDHCPs = (request = {}) => this.client.fetch(
271
- {
272
- method: "GET",
273
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/dhcps`,
274
- urlParams: sdkClient.urlParams(
275
- ["address", request.address],
276
- ["has_address", request.hasAddress],
277
- ["order_by", request.orderBy],
278
- ["organization_id", request.organizationId],
279
- ["page", request.page],
280
- [
281
- "page_size",
282
- request.pageSize ?? this.client.settings.defaultPageSize
283
- ],
284
- ["project_id", request.projectId]
285
- )
286
- },
287
- marshalling_gen.unmarshalListDHCPsResponse
288
- );
289
- /**
290
- * List DHCP configurations. List DHCP configurations, optionally filtering by Organization, Project, Public Gateway IP address or more. The response is an array of DHCP configuration objects, each identified by a DHCP ID and containing configuration settings for the assignment of IP addresses to devices on a Private Network attached to a Public Gateway. Note that the response does not contain the IDs of any Private Network / Public Gateway the configuration is attached to. Use the `List Public Gateway connections to Private Networks` method for that purpose, filtering on DHCP ID.
291
- *
292
- * @deprecated
293
- * @param request - The request {@link ListDHCPsRequest}
294
- * @returns A Promise of ListDHCPsResponse
295
- */
296
- listDHCPs = (request = {}) => sdkClient.enrichForPagination("dhcps", this.pageOfListDHCPs, request);
297
- /**
298
- * Get a DHCP configuration. Get a DHCP configuration object, identified by its DHCP ID. The response object contains configuration settings for the assignment of IP addresses to devices on a Private Network attached to a Public Gateway. Note that the response does not contain the IDs of any Private Network / Public Gateway the configuration is attached to. Use the `List Public Gateway connections to Private Networks` method for that purpose, filtering on DHCP ID.
299
- *
300
- * @deprecated
301
- * @param request - The request {@link GetDHCPRequest}
302
- * @returns A Promise of DHCP
303
- */
304
- getDHCP = (request) => this.client.fetch(
305
- {
306
- method: "GET",
307
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/dhcps/${sdkClient.validatePathParam("dhcpId", request.dhcpId)}`
308
- },
309
- marshalling_gen.unmarshalDHCP
310
- );
311
- /**
312
- * Create a DHCP configuration. Create a new DHCP configuration object, containing settings for the assignment of IP addresses to devices on a Private Network attached to a Public Gateway. The response object includes the ID of the DHCP configuration object. You can use this ID as part of a call to `Create a Public Gateway connection to a Private Network` or `Update a Public Gateway connection to a Private Network` to directly apply this DHCP configuration.
313
- *
314
- * @deprecated
315
- * @param request - The request {@link CreateDHCPRequest}
316
- * @returns A Promise of DHCP
317
- */
318
- createDHCP = (request) => this.client.fetch(
319
- {
320
- body: JSON.stringify(
321
- marshalling_gen.marshalCreateDHCPRequest(request, this.client.settings)
322
- ),
323
- headers: jsonContentHeaders,
324
- method: "POST",
325
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/dhcps`
326
- },
327
- marshalling_gen.unmarshalDHCP
328
- );
329
- /**
330
- * Update a DHCP configuration. Update a DHCP configuration object, identified by its DHCP ID.
331
- *
332
- * @deprecated
333
- * @param request - The request {@link UpdateDHCPRequest}
334
- * @returns A Promise of DHCP
335
- */
336
- updateDHCP = (request) => this.client.fetch(
337
- {
338
- body: JSON.stringify(
339
- marshalling_gen.marshalUpdateDHCPRequest(request, this.client.settings)
340
- ),
341
- headers: jsonContentHeaders,
342
- method: "PATCH",
343
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/dhcps/${sdkClient.validatePathParam("dhcpId", request.dhcpId)}`
344
- },
345
- marshalling_gen.unmarshalDHCP
346
- );
347
- /**
348
- * Delete a DHCP configuration. Delete a DHCP configuration object, identified by its DHCP ID. Note that you cannot delete a DHCP configuration object that is currently being used by a Gateway Network.
349
- *
350
- * @deprecated
351
- * @param request - The request {@link DeleteDHCPRequest}
352
- */
353
- deleteDHCP = (request) => this.client.fetch({
354
- method: "DELETE",
355
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/dhcps/${sdkClient.validatePathParam("dhcpId", request.dhcpId)}`
356
- });
357
- pageOfListDHCPEntries = (request = {}) => this.client.fetch(
358
- {
359
- method: "GET",
360
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/dhcp-entries`,
361
- urlParams: sdkClient.urlParams(
362
- ["gateway_network_id", request.gatewayNetworkId],
363
- ["hostname", request.hostname],
364
- ["ip_address", request.ipAddress],
365
- ["mac_address", request.macAddress],
366
- ["order_by", request.orderBy],
367
- ["page", request.page],
368
- [
369
- "page_size",
370
- request.pageSize ?? this.client.settings.defaultPageSize
371
- ],
372
- ["type", request.type]
373
- )
374
- },
375
- marshalling_gen.unmarshalListDHCPEntriesResponse
376
- );
377
- /**
378
- * List DHCP entries. List DHCP entries, whether dynamically assigned and/or statically reserved. DHCP entries can be filtered by the Gateway Network they are on, their MAC address, IP address, type or hostname.
379
- *
380
- * @deprecated
381
- * @param request - The request {@link ListDHCPEntriesRequest}
382
- * @returns A Promise of ListDHCPEntriesResponse
383
- */
384
- listDHCPEntries = (request = {}) => sdkClient.enrichForPagination("dhcpEntries", this.pageOfListDHCPEntries, request);
385
- /**
386
- * Get a DHCP entry. Get a DHCP entry, specified by its DHCP entry ID.
387
- *
388
- * @deprecated
389
- * @param request - The request {@link GetDHCPEntryRequest}
390
- * @returns A Promise of DHCPEntry
391
- */
392
- getDHCPEntry = (request) => this.client.fetch(
393
- {
394
- method: "GET",
395
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/dhcp-entries/${sdkClient.validatePathParam("dhcpEntryId", request.dhcpEntryId)}`
396
- },
397
- marshalling_gen.unmarshalDHCPEntry
398
- );
399
- /**
400
- * Create a DHCP entry. Create a static DHCP reservation, specifying the Gateway Network for the reservation, the MAC address of the target device and the IP address to assign this device. The response is a DHCP entry object, confirming the ID and configuration details of the static DHCP reservation.
401
- *
402
- * @deprecated
403
- * @param request - The request {@link CreateDHCPEntryRequest}
404
- * @returns A Promise of DHCPEntry
405
- */
406
- createDHCPEntry = (request) => this.client.fetch(
407
- {
408
- body: JSON.stringify(
409
- marshalling_gen.marshalCreateDHCPEntryRequest(request, this.client.settings)
410
- ),
411
- headers: jsonContentHeaders,
412
- method: "POST",
413
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/dhcp-entries`
414
- },
415
- marshalling_gen.unmarshalDHCPEntry
416
- );
417
- /**
418
- * Update a DHCP entry. Update the IP address for a DHCP entry, specified by its DHCP entry ID. You can update an existing DHCP entry of any type (`reservation` (static), `lease` (dynamic) or `unknown`), but in manually updating the IP address the entry will necessarily be of type `reservation` after the update.
419
- *
420
- * @deprecated
421
- * @param request - The request {@link UpdateDHCPEntryRequest}
422
- * @returns A Promise of DHCPEntry
423
- */
424
- updateDHCPEntry = (request) => this.client.fetch(
425
- {
426
- body: JSON.stringify(
427
- marshalling_gen.marshalUpdateDHCPEntryRequest(request, this.client.settings)
428
- ),
429
- headers: jsonContentHeaders,
430
- method: "PATCH",
431
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/dhcp-entries/${sdkClient.validatePathParam("dhcpEntryId", request.dhcpEntryId)}`
432
- },
433
- marshalling_gen.unmarshalDHCPEntry
434
- );
435
- /**
436
- * Set all DHCP reservations on a Gateway Network. Set the list of DHCP reservations attached to a Gateway Network. Reservations are identified by their MAC address, and will sync the current DHCP entry list to the given list, creating, updating or deleting DHCP entries accordingly.
437
- *
438
- * @deprecated
439
- * @param request - The request {@link SetDHCPEntriesRequest}
440
- * @returns A Promise of SetDHCPEntriesResponse
441
- */
442
- setDHCPEntries = (request) => this.client.fetch(
443
- {
444
- body: JSON.stringify(
445
- marshalling_gen.marshalSetDHCPEntriesRequest(request, this.client.settings)
446
- ),
447
- headers: jsonContentHeaders,
448
- method: "PUT",
449
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/dhcp-entries`
450
- },
451
- marshalling_gen.unmarshalSetDHCPEntriesResponse
452
- );
453
- /**
454
- * Delete a DHCP entry. Delete a static DHCP reservation, identified by its DHCP entry ID. Note that you cannot delete DHCP entries of type `lease`, these are deleted automatically when their time-to-live expires.
455
- *
456
- * @deprecated
457
- * @param request - The request {@link DeleteDHCPEntryRequest}
458
- */
459
- deleteDHCPEntry = (request) => this.client.fetch({
460
- method: "DELETE",
461
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/dhcp-entries/${sdkClient.validatePathParam("dhcpEntryId", request.dhcpEntryId)}`
462
- });
463
- pageOfListPATRules = (request = {}) => this.client.fetch(
464
- {
465
- method: "GET",
466
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/pat-rules`,
467
- urlParams: sdkClient.urlParams(
468
- ["gateway_id", request.gatewayId],
469
- ["order_by", request.orderBy],
470
- ["page", request.page],
471
- [
472
- "page_size",
473
- request.pageSize ?? this.client.settings.defaultPageSize
474
- ],
475
- ["private_ip", request.privateIp],
476
- ["protocol", request.protocol]
477
- )
478
- },
479
- marshalling_gen.unmarshalListPATRulesResponse
480
- );
481
- /**
482
- * List PAT rules. List PAT rules. You can filter by gateway ID to list all PAT rules for a particular gateway, or filter for PAT rules targeting a specific IP address or using a specific protocol.
483
- *
484
- * @deprecated
485
- * @param request - The request {@link ListPATRulesRequest}
486
- * @returns A Promise of ListPATRulesResponse
487
- */
488
- listPATRules = (request = {}) => sdkClient.enrichForPagination("patRules", this.pageOfListPATRules, request);
489
- /**
490
- * Get a PAT rule. Get a PAT rule, specified by its PAT rule ID. The response object gives full details of the PAT rule, including the Public Gateway it belongs to and the configuration settings in terms of public / private ports, private IP and protocol.
491
- *
492
- * @deprecated
493
- * @param request - The request {@link GetPATRuleRequest}
494
- * @returns A Promise of PATRule
495
- */
496
- getPATRule = (request) => this.client.fetch(
497
- {
498
- method: "GET",
499
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/pat-rules/${sdkClient.validatePathParam("patRuleId", request.patRuleId)}`
500
- },
501
- marshalling_gen.unmarshalPATRule
502
- );
503
- /**
504
- * Create a PAT rule. Create a new PAT rule on a specified Public Gateway, defining the protocol to use, public port to listen on, and private port / IP address to map to.
505
- *
506
- * @deprecated
507
- * @param request - The request {@link CreatePATRuleRequest}
508
- * @returns A Promise of PATRule
509
- */
510
- createPATRule = (request) => this.client.fetch(
511
- {
512
- body: JSON.stringify(
513
- marshalling_gen.marshalCreatePATRuleRequest(request, this.client.settings)
514
- ),
515
- headers: jsonContentHeaders,
516
- method: "POST",
517
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/pat-rules`
518
- },
519
- marshalling_gen.unmarshalPATRule
520
- );
521
- /**
522
- * Update a PAT rule. Update a PAT rule, specified by its PAT rule ID. Configuration settings including private/public port, private IP address and protocol can all be updated.
523
- *
524
- * @deprecated
525
- * @param request - The request {@link UpdatePATRuleRequest}
526
- * @returns A Promise of PATRule
527
- */
528
- updatePATRule = (request) => this.client.fetch(
529
- {
530
- body: JSON.stringify(
531
- marshalling_gen.marshalUpdatePATRuleRequest(request, this.client.settings)
532
- ),
533
- headers: jsonContentHeaders,
534
- method: "PATCH",
535
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/pat-rules/${sdkClient.validatePathParam("patRuleId", request.patRuleId)}`
536
- },
537
- marshalling_gen.unmarshalPATRule
538
- );
539
- /**
540
- * Set all PAT rules. Set a definitive list of PAT rules attached to a Public Gateway. Each rule is identified by its public port and protocol. This will sync the current PAT rule list on the gateway with the new list, creating, updating or deleting PAT rules accordingly.
541
- *
542
- * @deprecated
543
- * @param request - The request {@link SetPATRulesRequest}
544
- * @returns A Promise of SetPATRulesResponse
545
- */
546
- setPATRules = (request) => this.client.fetch(
547
- {
548
- body: JSON.stringify(
549
- marshalling_gen.marshalSetPATRulesRequest(request, this.client.settings)
550
- ),
551
- headers: jsonContentHeaders,
552
- method: "PUT",
553
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/pat-rules`
554
- },
555
- marshalling_gen.unmarshalSetPATRulesResponse
556
- );
557
- /**
558
- * Delete a PAT rule. Delete a PAT rule, identified by its PAT rule ID. This action is irreversible.
559
- *
560
- * @deprecated
561
- * @param request - The request {@link DeletePATRuleRequest}
562
- */
563
- deletePATRule = (request) => this.client.fetch({
564
- method: "DELETE",
565
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/pat-rules/${sdkClient.validatePathParam("patRuleId", request.patRuleId)}`
566
- });
567
- /**
568
- * List Public Gateway types. List the different Public Gateway commercial offer types available at Scaleway. The response is an array of objects describing the name and technical details of each available gateway type.
569
- *
570
- * @deprecated
571
- * @param request - The request {@link ListGatewayTypesRequest}
572
- * @returns A Promise of ListGatewayTypesResponse
573
- */
574
- listGatewayTypes = (request = {}) => this.client.fetch(
575
- {
576
- method: "GET",
577
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateway-types`
578
- },
579
- marshalling_gen.unmarshalListGatewayTypesResponse
580
- );
581
- pageOfListIPs = (request = {}) => this.client.fetch(
582
- {
583
- method: "GET",
584
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips`,
585
- urlParams: sdkClient.urlParams(
586
- ["is_free", request.isFree],
587
- ["order_by", request.orderBy],
588
- ["organization_id", request.organizationId],
589
- ["page", request.page],
590
- [
591
- "page_size",
592
- request.pageSize ?? this.client.settings.defaultPageSize
593
- ],
594
- ["project_id", request.projectId],
595
- ["reverse", request.reverse],
596
- ["tags", request.tags]
597
- )
598
- },
599
- marshalling_gen.unmarshalListIPsResponse
600
- );
601
- /**
602
- * List IPs. List Public Gateway flexible IP addresses. A number of filter options are available for limiting results in the response.
603
- *
604
- * @deprecated
605
- * @param request - The request {@link ListIPsRequest}
606
- * @returns A Promise of ListIPsResponse
607
- */
608
- listIPs = (request = {}) => sdkClient.enrichForPagination("ips", this.pageOfListIPs, request);
609
- /**
610
- * Get an IP. Get details of a Public Gateway flexible IP address, identified by its IP ID. The response object contains information including which (if any) Public Gateway using this IP address, the reverse and various other metadata.
611
- *
612
- * @deprecated
613
- * @param request - The request {@link GetIPRequest}
614
- * @returns A Promise of IP
615
- */
616
- getIP = (request) => this.client.fetch(
617
- {
618
- method: "GET",
619
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips/${sdkClient.validatePathParam("ipId", request.ipId)}`
620
- },
621
- marshalling_gen.unmarshalIP
622
- );
623
- /**
624
- * Reserve an IP. Create (reserve) a new flexible IP address that can be used for a Public Gateway in a specified Scaleway Project.
625
- *
626
- * @deprecated
627
- * @param request - The request {@link CreateIPRequest}
628
- * @returns A Promise of IP
629
- */
630
- createIP = (request = {}) => this.client.fetch(
631
- {
632
- body: JSON.stringify(
633
- marshalling_gen.marshalCreateIPRequest(request, this.client.settings)
634
- ),
635
- headers: jsonContentHeaders,
636
- method: "POST",
637
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips`
638
- },
639
- marshalling_gen.unmarshalIP
640
- );
641
- /**
642
- * Update an IP. Update details of an existing flexible IP address, including its tags, reverse and the Public Gateway it is assigned to.
643
- *
644
- * @deprecated
645
- * @param request - The request {@link UpdateIPRequest}
646
- * @returns A Promise of IP
647
- */
648
- updateIP = (request) => this.client.fetch(
649
- {
650
- body: JSON.stringify(
651
- marshalling_gen.marshalUpdateIPRequest(request, this.client.settings)
652
- ),
653
- headers: jsonContentHeaders,
654
- method: "PATCH",
655
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips/${sdkClient.validatePathParam("ipId", request.ipId)}`
656
- },
657
- marshalling_gen.unmarshalIP
658
- );
659
- /**
660
- * Delete an IP. Delete a flexible IP address from your account. This action is irreversible.
661
- *
662
- * @deprecated
663
- * @param request - The request {@link DeleteIPRequest}
664
- */
665
- deleteIP = (request) => this.client.fetch({
666
- method: "DELETE",
667
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips/${sdkClient.validatePathParam("ipId", request.ipId)}`
668
- });
669
- /**
670
- * Refresh a Public Gateway's SSH keys. Refresh the SSH keys of a given Public Gateway, specified by its gateway ID. This adds any new SSH keys in the gateway's Scaleway Project to the gateway itself.
671
- *
672
- * @deprecated
673
- * @param request - The request {@link RefreshSSHKeysRequest}
674
- * @returns A Promise of Gateway
675
- */
676
- refreshSSHKeys = (request) => this.client.fetch(
677
- {
678
- body: "{}",
679
- headers: jsonContentHeaders,
680
- method: "POST",
681
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${sdkClient.validatePathParam("gatewayId", request.gatewayId)}/refresh-ssh-keys`
682
- },
683
- marshalling_gen.unmarshalGateway
684
- );
685
- /**
686
- * Put a Public Gateway in IPAM mode. Put a Public Gateway in IPAM mode, so that it can be used with the Public Gateways API v2. This call is idempotent.
687
- *
688
- * @deprecated
689
- * @param request - The request {@link MigrateToV2Request}
690
- */
691
- migrateToV2 = (request) => this.client.fetch({
692
- body: "{}",
693
- headers: jsonContentHeaders,
694
- method: "POST",
695
- path: `/vpc-gw/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${sdkClient.validatePathParam("gatewayId", request.gatewayId)}/migrate-to-v2`
696
- });
697
- }
698
- exports.API = API;