@scaleway/sdk 2.57.0 → 2.59.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.
Files changed (57) hide show
  1. package/dist/api/audit_trail/v1alpha1/index.gen.d.ts +1 -1
  2. package/dist/api/audit_trail/v1alpha1/marshalling.gen.cjs +12 -0
  3. package/dist/api/audit_trail/v1alpha1/marshalling.gen.js +12 -0
  4. package/dist/api/audit_trail/v1alpha1/types.gen.d.ts +28 -0
  5. package/dist/api/iam/v1alpha1/api.gen.cjs +63 -7
  6. package/dist/api/iam/v1alpha1/api.gen.d.ts +35 -8
  7. package/dist/api/iam/v1alpha1/api.gen.js +64 -8
  8. package/dist/api/iam/v1alpha1/index.gen.d.ts +1 -1
  9. package/dist/api/iam/v1alpha1/marshalling.gen.cjs +23 -0
  10. package/dist/api/iam/v1alpha1/marshalling.gen.d.ts +4 -1
  11. package/dist/api/iam/v1alpha1/marshalling.gen.js +23 -0
  12. package/dist/api/iam/v1alpha1/types.gen.d.ts +31 -3
  13. package/dist/api/iam/v1alpha1/validation-rules.gen.cjs +8 -0
  14. package/dist/api/iam/v1alpha1/validation-rules.gen.d.ts +7 -0
  15. package/dist/api/iam/v1alpha1/validation-rules.gen.js +9 -1
  16. package/dist/api/ipam/v1/api.gen.cjs +1 -0
  17. package/dist/api/ipam/v1/api.gen.js +1 -0
  18. package/dist/api/ipam/v1/types.gen.d.ts +5 -0
  19. package/dist/api/k8s/v1/marshalling.gen.cjs +1 -2
  20. package/dist/api/k8s/v1/marshalling.gen.js +1 -2
  21. package/dist/api/k8s/v1/types.gen.d.ts +2 -7
  22. package/dist/api/marketplace/v2/types.gen.d.ts +5 -2
  23. package/dist/api/mnq/v1beta1/api.gen.cjs +47 -42
  24. package/dist/api/mnq/v1beta1/api.gen.d.ts +51 -49
  25. package/dist/api/mnq/v1beta1/api.gen.js +47 -42
  26. package/dist/api/mnq/v1beta1/types.gen.d.ts +37 -32
  27. package/dist/api/tem/v1alpha1/types.gen.d.ts +1 -1
  28. package/dist/api/vpcgw/index.gen.cjs +2 -0
  29. package/dist/api/vpcgw/index.gen.d.ts +1 -0
  30. package/dist/api/vpcgw/index.gen.js +3 -1
  31. package/dist/api/vpcgw/v2/api.gen.cjs +517 -0
  32. package/dist/api/vpcgw/v2/api.gen.d.ts +267 -0
  33. package/dist/api/vpcgw/v2/api.gen.js +517 -0
  34. package/dist/api/vpcgw/v2/content.gen.cjs +15 -0
  35. package/dist/api/vpcgw/v2/content.gen.d.ts +5 -0
  36. package/dist/api/vpcgw/v2/content.gen.js +15 -0
  37. package/dist/api/vpcgw/v2/index.gen.cjs +7 -0
  38. package/dist/api/vpcgw/v2/index.gen.d.ts +3 -0
  39. package/dist/api/vpcgw/v2/index.gen.js +7 -0
  40. package/dist/api/vpcgw/v2/marshalling.gen.cjs +259 -0
  41. package/dist/api/vpcgw/v2/marshalling.gen.d.ts +22 -0
  42. package/dist/api/vpcgw/v2/marshalling.gen.js +259 -0
  43. package/dist/api/vpcgw/v2/types.gen.d.ts +450 -0
  44. package/dist/api/webhosting/v1/api.gen.cjs +41 -2
  45. package/dist/api/webhosting/v1/api.gen.d.ts +26 -2
  46. package/dist/api/webhosting/v1/api.gen.js +42 -3
  47. package/dist/api/webhosting/v1/index.gen.cjs +1 -0
  48. package/dist/api/webhosting/v1/index.gen.d.ts +2 -2
  49. package/dist/api/webhosting/v1/index.gen.js +2 -1
  50. package/dist/api/webhosting/v1/marshalling.gen.cjs +137 -51
  51. package/dist/api/webhosting/v1/marshalling.gen.d.ts +4 -1
  52. package/dist/api/webhosting/v1/marshalling.gen.js +138 -52
  53. package/dist/api/webhosting/v1/types.gen.d.ts +144 -60
  54. package/dist/scw/constants.cjs +1 -1
  55. package/dist/scw/constants.d.ts +2 -2
  56. package/dist/scw/constants.js +1 -1
  57. package/package.json +2 -2
@@ -11,7 +11,7 @@ export type ListWebhookEventsRequestOrderBy = 'created_at_desc' | 'created_at_as
11
11
  export type ListWebhooksRequestOrderBy = 'created_at_desc' | 'created_at_asc';
12
12
  export type ProjectSettingsPeriodicReportFrequency = 'unknown_frequency' | 'monthly' | 'weekly' | 'daily';
13
13
  export type WebhookEventStatus = 'unknown_status' | 'sending' | 'sent' | 'failed';
14
- export type WebhookEventType = 'unknown_type' | 'email_queued' | 'email_dropped' | 'email_deferred' | 'email_delivered' | 'email_spam' | 'email_mailbox_not_found';
14
+ export type WebhookEventType = 'unknown_type' | 'email_queued' | 'email_dropped' | 'email_deferred' | 'email_delivered' | 'email_spam' | 'email_mailbox_not_found' | 'email_blocklisted' | 'blocklist_created';
15
15
  export interface DomainRecordsDMARC {
16
16
  /** Name of the DMARC TXT record. */
17
17
  name: string;
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const index_gen = require("./v1/index.gen.cjs");
4
+ const index_gen$1 = require("./v2/index.gen.cjs");
4
5
  exports.v1 = index_gen;
6
+ exports.v2 = index_gen$1;
@@ -3,3 +3,4 @@
3
3
  * EDIT HERE
4
4
  */
5
5
  export * as v1 from './v1/index.gen';
6
+ export * as v2 from './v2/index.gen';
@@ -1,4 +1,6 @@
1
1
  import * as index_gen from "./v1/index.gen.js";
2
+ import * as index_gen$1 from "./v2/index.gen.js";
2
3
  export {
3
- index_gen as v1
4
+ index_gen as v1,
5
+ index_gen$1 as v2
4
6
  };
@@ -0,0 +1,517 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const intervalRetrier = require("../../../internal/async/interval-retrier.cjs");
4
+ const api = require("../../../scw/api.cjs");
5
+ const marshalling = require("../../../helpers/marshalling.cjs");
6
+ require("../../../vendor/base64/index.cjs");
7
+ const resourcePaginator = require("../../../scw/fetch/resource-paginator.cjs");
8
+ const content_gen = require("./content.gen.cjs");
9
+ const marshalling_gen = require("./marshalling.gen.cjs");
10
+ const jsonContentHeaders = {
11
+ "Content-Type": "application/json; charset=utf-8"
12
+ };
13
+ class API extends api.API {
14
+ /** Lists the available zones of the API. */
15
+ static LOCALITIES = [
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
+ pageOfListGateways = (request = {}) => this.client.fetch(
26
+ {
27
+ method: "GET",
28
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways`,
29
+ urlParams: marshalling.urlParams(
30
+ ["include_legacy", request.includeLegacy],
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_ids", request.privateNetworkIds],
40
+ ["project_id", request.projectId],
41
+ ["status", request.status],
42
+ ["tags", request.tags],
43
+ ["types", request.types]
44
+ )
45
+ },
46
+ marshalling_gen.unmarshalListGatewaysResponse
47
+ );
48
+ /**
49
+ * List Public Gateways. List Public Gateways in a given Scaleway Organization
50
+ * or Project. By default, results are displayed in ascending order of
51
+ * creation date.
52
+ *
53
+ * @param request - The request {@link ListGatewaysRequest}
54
+ * @returns A Promise of ListGatewaysResponse
55
+ */
56
+ listGateways = (request = {}) => resourcePaginator.enrichForPagination("gateways", this.pageOfListGateways, request);
57
+ /**
58
+ * Get a Public Gateway. Get details of a Public Gateway, specified by its
59
+ * gateway ID. The response object contains full details of the gateway,
60
+ * including its **name**, **type**, **status** and more.
61
+ *
62
+ * @param request - The request {@link GetGatewayRequest}
63
+ * @returns A Promise of Gateway
64
+ */
65
+ getGateway = (request) => this.client.fetch(
66
+ {
67
+ method: "GET",
68
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${marshalling.validatePathParam("gatewayId", request.gatewayId)}`
69
+ },
70
+ marshalling_gen.unmarshalGateway
71
+ );
72
+ /**
73
+ * Waits for {@link Gateway} to be in a final state.
74
+ *
75
+ * @param request - The request {@link GetGatewayRequest}
76
+ * @param options - The waiting options
77
+ * @returns A Promise of Gateway
78
+ */
79
+ waitForGateway = (request, options) => intervalRetrier.waitForResource(
80
+ options?.stop ?? ((res) => Promise.resolve(!content_gen.GATEWAY_TRANSIENT_STATUSES.includes(res.status))),
81
+ this.getGateway,
82
+ request,
83
+ options
84
+ );
85
+ /**
86
+ * Create a Public Gateway. Create a new Public Gateway in the specified
87
+ * Scaleway Project, defining its **name**, **type** and other configuration
88
+ * details such as whether to enable SSH bastion.
89
+ *
90
+ * @param request - The request {@link CreateGatewayRequest}
91
+ * @returns A Promise of Gateway
92
+ */
93
+ createGateway = (request) => this.client.fetch(
94
+ {
95
+ body: JSON.stringify(
96
+ marshalling_gen.marshalCreateGatewayRequest(request, this.client.settings)
97
+ ),
98
+ headers: jsonContentHeaders,
99
+ method: "POST",
100
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways`
101
+ },
102
+ marshalling_gen.unmarshalGateway
103
+ );
104
+ /**
105
+ * Update a Public Gateway. Update the parameters of an existing Public
106
+ * Gateway, for example, its **name**, **tags**, **SSH bastion
107
+ * configuration**, and **DNS servers**.
108
+ *
109
+ * @param request - The request {@link UpdateGatewayRequest}
110
+ * @returns A Promise of Gateway
111
+ */
112
+ updateGateway = (request) => this.client.fetch(
113
+ {
114
+ body: JSON.stringify(
115
+ marshalling_gen.marshalUpdateGatewayRequest(request, this.client.settings)
116
+ ),
117
+ headers: jsonContentHeaders,
118
+ method: "PATCH",
119
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${marshalling.validatePathParam("gatewayId", request.gatewayId)}`
120
+ },
121
+ marshalling_gen.unmarshalGateway
122
+ );
123
+ /**
124
+ * Delete a Public Gateway. Delete an existing Public Gateway, specified by
125
+ * its gateway ID. This action is irreversible.
126
+ *
127
+ * @param request - The request {@link DeleteGatewayRequest}
128
+ * @returns A Promise of Gateway
129
+ */
130
+ deleteGateway = (request) => this.client.fetch(
131
+ {
132
+ method: "DELETE",
133
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${marshalling.validatePathParam("gatewayId", request.gatewayId)}`
134
+ },
135
+ marshalling_gen.unmarshalGateway
136
+ );
137
+ /**
138
+ * Upgrade a Public Gateway to the latest version and/or to a different
139
+ * commercial offer type. Upgrade a given Public Gateway to the newest
140
+ * software version or to a different commercial offer type. This applies the
141
+ * latest bugfixes and features to your Public Gateway. Note that gateway
142
+ * service will be interrupted during the update.
143
+ *
144
+ * @param request - The request {@link UpgradeGatewayRequest}
145
+ * @returns A Promise of Gateway
146
+ */
147
+ upgradeGateway = (request) => this.client.fetch(
148
+ {
149
+ body: JSON.stringify(
150
+ marshalling_gen.marshalUpgradeGatewayRequest(request, this.client.settings)
151
+ ),
152
+ headers: jsonContentHeaders,
153
+ method: "POST",
154
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${marshalling.validatePathParam("gatewayId", request.gatewayId)}/upgrade`
155
+ },
156
+ marshalling_gen.unmarshalGateway
157
+ );
158
+ pageOfListGatewayNetworks = (request = {}) => this.client.fetch(
159
+ {
160
+ method: "GET",
161
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateway-networks`,
162
+ urlParams: marshalling.urlParams(
163
+ ["gateway_ids", request.gatewayIds],
164
+ ["masquerade_enabled", request.masqueradeEnabled],
165
+ ["order_by", request.orderBy],
166
+ ["page", request.page],
167
+ [
168
+ "page_size",
169
+ request.pageSize ?? this.client.settings.defaultPageSize
170
+ ],
171
+ ["private_network_ids", request.privateNetworkIds],
172
+ ["status", request.status]
173
+ )
174
+ },
175
+ marshalling_gen.unmarshalListGatewayNetworksResponse
176
+ );
177
+ /**
178
+ * List Public Gateway connections to Private Networks. List the connections
179
+ * between Public Gateways and Private Networks (a connection = a
180
+ * GatewayNetwork). You can choose to filter by `gateway-id` to list all
181
+ * Private Networks attached to the specified Public Gateway, or by
182
+ * `private_network_id` to list all Public Gateways attached to the specified
183
+ * Private Network. Other query parameters are also available. The result is
184
+ * an array of GatewayNetwork objects, each giving details of the connection
185
+ * between a given Public Gateway and a given Private Network.
186
+ *
187
+ * @param request - The request {@link ListGatewayNetworksRequest}
188
+ * @returns A Promise of ListGatewayNetworksResponse
189
+ */
190
+ listGatewayNetworks = (request = {}) => resourcePaginator.enrichForPagination(
191
+ "gatewayNetworks",
192
+ this.pageOfListGatewayNetworks,
193
+ request
194
+ );
195
+ /**
196
+ * Get a Public Gateway connection to a Private Network. Get details of a
197
+ * given connection between a Public Gateway and a Private Network (this
198
+ * connection = a GatewayNetwork), specified by its `gateway_network_id`. The
199
+ * response object contains details of the connection including the IDs of the
200
+ * Public Gateway and Private Network, the dates the connection was
201
+ * created/updated and its configuration settings.
202
+ *
203
+ * @param request - The request {@link GetGatewayNetworkRequest}
204
+ * @returns A Promise of GatewayNetwork
205
+ */
206
+ getGatewayNetwork = (request) => this.client.fetch(
207
+ {
208
+ method: "GET",
209
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateway-networks/${marshalling.validatePathParam("gatewayNetworkId", request.gatewayNetworkId)}`
210
+ },
211
+ marshalling_gen.unmarshalGatewayNetwork
212
+ );
213
+ /**
214
+ * Waits for {@link GatewayNetwork} to be in a final state.
215
+ *
216
+ * @param request - The request {@link GetGatewayNetworkRequest}
217
+ * @param options - The waiting options
218
+ * @returns A Promise of GatewayNetwork
219
+ */
220
+ waitForGatewayNetwork = (request, options) => intervalRetrier.waitForResource(
221
+ options?.stop ?? ((res) => Promise.resolve(
222
+ !content_gen.GATEWAY_NETWORK_TRANSIENT_STATUSES.includes(res.status)
223
+ )),
224
+ this.getGatewayNetwork,
225
+ request,
226
+ options
227
+ );
228
+ /**
229
+ * Attach a Public Gateway to a Private Network. Attach a specific Public
230
+ * Gateway to a specific Private Network (create a GatewayNetwork). You can
231
+ * configure parameters for the connection including whether to enable
232
+ * masquerade (dynamic NAT), and more.
233
+ *
234
+ * @param request - The request {@link CreateGatewayNetworkRequest}
235
+ * @returns A Promise of GatewayNetwork
236
+ */
237
+ createGatewayNetwork = (request) => this.client.fetch(
238
+ {
239
+ body: JSON.stringify(
240
+ marshalling_gen.marshalCreateGatewayNetworkRequest(request, this.client.settings)
241
+ ),
242
+ headers: jsonContentHeaders,
243
+ method: "POST",
244
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateway-networks`
245
+ },
246
+ marshalling_gen.unmarshalGatewayNetwork
247
+ );
248
+ /**
249
+ * Update a Public Gateway's connection to a Private Network. Update the
250
+ * configuration parameters of a connection between a given Public Gateway and
251
+ * Private Network (the connection = a GatewayNetwork). Updatable parameters
252
+ * include whether to enable traffic masquerade (dynamic NAT).
253
+ *
254
+ * @param request - The request {@link UpdateGatewayNetworkRequest}
255
+ * @returns A Promise of GatewayNetwork
256
+ */
257
+ updateGatewayNetwork = (request) => this.client.fetch(
258
+ {
259
+ body: JSON.stringify(
260
+ marshalling_gen.marshalUpdateGatewayNetworkRequest(request, this.client.settings)
261
+ ),
262
+ headers: jsonContentHeaders,
263
+ method: "PATCH",
264
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateway-networks/${marshalling.validatePathParam("gatewayNetworkId", request.gatewayNetworkId)}`
265
+ },
266
+ marshalling_gen.unmarshalGatewayNetwork
267
+ );
268
+ /**
269
+ * Detach a Public Gateway from a Private Network. Detach a given Public
270
+ * Gateway from a given Private Network, i.e. delete a GatewayNetwork
271
+ * specified by a gateway_network_id.
272
+ *
273
+ * @param request - The request {@link DeleteGatewayNetworkRequest}
274
+ * @returns A Promise of GatewayNetwork
275
+ */
276
+ deleteGatewayNetwork = (request) => this.client.fetch(
277
+ {
278
+ method: "DELETE",
279
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateway-networks/${marshalling.validatePathParam("gatewayNetworkId", request.gatewayNetworkId)}`
280
+ },
281
+ marshalling_gen.unmarshalGatewayNetwork
282
+ );
283
+ pageOfListPatRules = (request = {}) => this.client.fetch(
284
+ {
285
+ method: "GET",
286
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/pat-rules`,
287
+ urlParams: marshalling.urlParams(
288
+ ["gateway_ids", request.gatewayIds],
289
+ ["order_by", request.orderBy],
290
+ ["page", request.page],
291
+ [
292
+ "page_size",
293
+ request.pageSize ?? this.client.settings.defaultPageSize
294
+ ],
295
+ ["private_ips", request.privateIps],
296
+ ["protocol", request.protocol]
297
+ )
298
+ },
299
+ marshalling_gen.unmarshalListPatRulesResponse
300
+ );
301
+ /**
302
+ * List PAT rules. List PAT rules. You can filter by gateway ID to list all
303
+ * PAT rules for a particular gateway, or filter for PAT rules targeting a
304
+ * specific IP address or using a specific protocol.
305
+ *
306
+ * @param request - The request {@link ListPatRulesRequest}
307
+ * @returns A Promise of ListPatRulesResponse
308
+ */
309
+ listPatRules = (request = {}) => resourcePaginator.enrichForPagination("patRules", this.pageOfListPatRules, request);
310
+ /**
311
+ * Get a PAT rule. Get a PAT rule, specified by its PAT rule ID. The response
312
+ * object gives full details of the PAT rule, including the Public Gateway it
313
+ * belongs to and the configuration settings in terms of public / private
314
+ * ports, private IP and protocol.
315
+ *
316
+ * @param request - The request {@link GetPatRuleRequest}
317
+ * @returns A Promise of PatRule
318
+ */
319
+ getPatRule = (request) => this.client.fetch(
320
+ {
321
+ method: "GET",
322
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/pat-rules/${marshalling.validatePathParam("patRuleId", request.patRuleId)}`
323
+ },
324
+ marshalling_gen.unmarshalPatRule
325
+ );
326
+ /**
327
+ * Create a PAT rule. Create a new PAT rule on a specified Public Gateway,
328
+ * defining the protocol to use, public port to listen on, and private port /
329
+ * IP address to map to.
330
+ *
331
+ * @param request - The request {@link CreatePatRuleRequest}
332
+ * @returns A Promise of PatRule
333
+ */
334
+ createPatRule = (request) => this.client.fetch(
335
+ {
336
+ body: JSON.stringify(
337
+ marshalling_gen.marshalCreatePatRuleRequest(request, this.client.settings)
338
+ ),
339
+ headers: jsonContentHeaders,
340
+ method: "POST",
341
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/pat-rules`
342
+ },
343
+ marshalling_gen.unmarshalPatRule
344
+ );
345
+ /**
346
+ * Update a PAT rule. Update a PAT rule, specified by its PAT rule ID.
347
+ * Configuration settings including private/public port, private IP address
348
+ * and protocol can all be updated.
349
+ *
350
+ * @param request - The request {@link UpdatePatRuleRequest}
351
+ * @returns A Promise of PatRule
352
+ */
353
+ updatePatRule = (request) => this.client.fetch(
354
+ {
355
+ body: JSON.stringify(
356
+ marshalling_gen.marshalUpdatePatRuleRequest(request, this.client.settings)
357
+ ),
358
+ headers: jsonContentHeaders,
359
+ method: "PATCH",
360
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/pat-rules/${marshalling.validatePathParam("patRuleId", request.patRuleId)}`
361
+ },
362
+ marshalling_gen.unmarshalPatRule
363
+ );
364
+ /**
365
+ * Set all PAT rules. Set a definitive list of PAT rules attached to a Public
366
+ * Gateway. Each rule is identified by its public port and protocol. This will
367
+ * sync the current PAT rule list on the gateway with the new list, creating,
368
+ * updating or deleting PAT rules accordingly.
369
+ *
370
+ * @param request - The request {@link SetPatRulesRequest}
371
+ * @returns A Promise of SetPatRulesResponse
372
+ */
373
+ setPatRules = (request) => this.client.fetch(
374
+ {
375
+ body: JSON.stringify(
376
+ marshalling_gen.marshalSetPatRulesRequest(request, this.client.settings)
377
+ ),
378
+ headers: jsonContentHeaders,
379
+ method: "PUT",
380
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/pat-rules`
381
+ },
382
+ marshalling_gen.unmarshalSetPatRulesResponse
383
+ );
384
+ /**
385
+ * Delete a PAT rule. Delete a PAT rule, identified by its PAT rule ID. This
386
+ * action is irreversible.
387
+ *
388
+ * @param request - The request {@link DeletePatRuleRequest}
389
+ */
390
+ deletePatRule = (request) => this.client.fetch({
391
+ method: "DELETE",
392
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/pat-rules/${marshalling.validatePathParam("patRuleId", request.patRuleId)}`
393
+ });
394
+ /**
395
+ * List Public Gateway types. List the different Public Gateway commercial
396
+ * offer types available at Scaleway. The response is an array of objects
397
+ * describing the name and technical details of each available gateway type.
398
+ *
399
+ * @param request - The request {@link ListGatewayTypesRequest}
400
+ * @returns A Promise of ListGatewayTypesResponse
401
+ */
402
+ listGatewayTypes = (request = {}) => this.client.fetch(
403
+ {
404
+ method: "GET",
405
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateway-types`
406
+ },
407
+ marshalling_gen.unmarshalListGatewayTypesResponse
408
+ );
409
+ pageOfListIPs = (request = {}) => this.client.fetch(
410
+ {
411
+ method: "GET",
412
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips`,
413
+ urlParams: marshalling.urlParams(
414
+ ["is_free", request.isFree],
415
+ ["order_by", request.orderBy],
416
+ ["organization_id", request.organizationId],
417
+ ["page", request.page],
418
+ [
419
+ "page_size",
420
+ request.pageSize ?? this.client.settings.defaultPageSize
421
+ ],
422
+ ["project_id", request.projectId],
423
+ ["reverse", request.reverse],
424
+ ["tags", request.tags]
425
+ )
426
+ },
427
+ marshalling_gen.unmarshalListIPsResponse
428
+ );
429
+ /**
430
+ * List IPs. List Public Gateway flexible IP addresses. A number of filter
431
+ * options are available for limiting results in the response.
432
+ *
433
+ * @param request - The request {@link ListIPsRequest}
434
+ * @returns A Promise of ListIPsResponse
435
+ */
436
+ listIPs = (request = {}) => resourcePaginator.enrichForPagination("ips", this.pageOfListIPs, request);
437
+ /**
438
+ * Get an IP. Get details of a Public Gateway flexible IP address, identified
439
+ * by its IP ID. The response object contains information including which (if
440
+ * any) Public Gateway using this IP address, the reverse and various other
441
+ * metadata.
442
+ *
443
+ * @param request - The request {@link GetIPRequest}
444
+ * @returns A Promise of IP
445
+ */
446
+ getIP = (request) => this.client.fetch(
447
+ {
448
+ method: "GET",
449
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips/${marshalling.validatePathParam("ipId", request.ipId)}`
450
+ },
451
+ marshalling_gen.unmarshalIP
452
+ );
453
+ /**
454
+ * Reserve an IP. Create (reserve) a new flexible IP address that can be used
455
+ * for a Public Gateway in a specified Scaleway Project.
456
+ *
457
+ * @param request - The request {@link CreateIPRequest}
458
+ * @returns A Promise of IP
459
+ */
460
+ createIP = (request = {}) => this.client.fetch(
461
+ {
462
+ body: JSON.stringify(
463
+ marshalling_gen.marshalCreateIPRequest(request, this.client.settings)
464
+ ),
465
+ headers: jsonContentHeaders,
466
+ method: "POST",
467
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips`
468
+ },
469
+ marshalling_gen.unmarshalIP
470
+ );
471
+ /**
472
+ * Update an IP. Update details of an existing flexible IP address, including
473
+ * its tags, reverse and the Public Gateway it is assigned to.
474
+ *
475
+ * @param request - The request {@link UpdateIPRequest}
476
+ * @returns A Promise of IP
477
+ */
478
+ updateIP = (request) => this.client.fetch(
479
+ {
480
+ body: JSON.stringify(
481
+ marshalling_gen.marshalUpdateIPRequest(request, this.client.settings)
482
+ ),
483
+ headers: jsonContentHeaders,
484
+ method: "PATCH",
485
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips/${marshalling.validatePathParam("ipId", request.ipId)}`
486
+ },
487
+ marshalling_gen.unmarshalIP
488
+ );
489
+ /**
490
+ * Delete an IP. Delete a flexible IP address from your account. This action
491
+ * is irreversible.
492
+ *
493
+ * @param request - The request {@link DeleteIPRequest}
494
+ */
495
+ deleteIP = (request) => this.client.fetch({
496
+ method: "DELETE",
497
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips/${marshalling.validatePathParam("ipId", request.ipId)}`
498
+ });
499
+ /**
500
+ * Refresh a Public Gateway's SSH keys. Refresh the SSH keys of a given Public
501
+ * Gateway, specified by its gateway ID. This adds any new SSH keys in the
502
+ * gateway's Scaleway Project to the gateway itself.
503
+ *
504
+ * @param request - The request {@link RefreshSSHKeysRequest}
505
+ * @returns A Promise of Gateway
506
+ */
507
+ refreshSSHKeys = (request) => this.client.fetch(
508
+ {
509
+ body: "{}",
510
+ headers: jsonContentHeaders,
511
+ method: "POST",
512
+ path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${marshalling.validatePathParam("gatewayId", request.gatewayId)}/refresh-ssh-keys`
513
+ },
514
+ marshalling_gen.unmarshalGateway
515
+ );
516
+ }
517
+ exports.API = API;