@scaleway/sdk-vpcgw 1.0.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.
@@ -0,0 +1,340 @@
1
+ import { API as ParentAPI } from '@scaleway/sdk-client';
2
+ import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client';
3
+ import type { CreateDHCPEntryRequest, CreateDHCPRequest, CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePATRuleRequest, DHCP, DHCPEntry, DeleteDHCPEntryRequest, DeleteDHCPRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePATRuleRequest, EnableIPMobilityRequest, Gateway, GatewayNetwork, GetDHCPEntryRequest, GetDHCPRequest, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPATRuleRequest, IP, ListDHCPEntriesRequest, ListDHCPEntriesResponse, ListDHCPsRequest, ListDHCPsResponse, ListGatewayNetworksRequest, ListGatewayNetworksResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListGatewaysRequest, ListGatewaysResponse, ListIPsRequest, ListIPsResponse, ListPATRulesRequest, ListPATRulesResponse, MigrateToV2Request, PATRule, RefreshSSHKeysRequest, SetDHCPEntriesRequest, SetDHCPEntriesResponse, SetPATRulesRequest, SetPATRulesResponse, UpdateDHCPEntryRequest, UpdateDHCPRequest, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePATRuleRequest, UpgradeGatewayRequest } from './types.gen';
4
+ /**
5
+ * Public Gateways API.
6
+
7
+ This API allows you to manage your Public Gateways.
8
+ */
9
+ export declare class API extends ParentAPI {
10
+ /** Lists the available zones of the API. */
11
+ static readonly LOCALITIES: ScwZone[];
12
+ protected pageOfListGateways: (request?: Readonly<ListGatewaysRequest>) => Promise<ListGatewaysResponse>;
13
+ /**
14
+ * List Public Gateways. List Public Gateways in a given Scaleway Organization or Project. By default, results are displayed in ascending order of creation date.
15
+ *
16
+ * @deprecated
17
+ * @param request - The request {@link ListGatewaysRequest}
18
+ * @returns A Promise of ListGatewaysResponse
19
+ */
20
+ listGateways: (request?: Readonly<ListGatewaysRequest>) => Promise<ListGatewaysResponse> & {
21
+ all: () => Promise<Gateway[]>;
22
+ [Symbol.asyncIterator]: () => AsyncGenerator<Gateway[], void, void>;
23
+ };
24
+ /**
25
+ * 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.
26
+ *
27
+ * @deprecated
28
+ * @param request - The request {@link GetGatewayRequest}
29
+ * @returns A Promise of Gateway
30
+ */
31
+ getGateway: (request: Readonly<GetGatewayRequest>) => Promise<Gateway>;
32
+ /**
33
+ * Waits for {@link Gateway} to be in a final state.
34
+ *
35
+ * @param request - The request {@link GetGatewayRequest}
36
+ * @param options - The waiting options
37
+ * @returns A Promise of Gateway
38
+ */
39
+ waitForGateway: (request: Readonly<GetGatewayRequest>, options?: Readonly<WaitForOptions<Gateway>>) => Promise<Gateway>;
40
+ /**
41
+ * 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.
42
+ *
43
+ * @deprecated
44
+ * @param request - The request {@link CreateGatewayRequest}
45
+ * @returns A Promise of Gateway
46
+ */
47
+ createGateway: (request: Readonly<CreateGatewayRequest>) => Promise<Gateway>;
48
+ /**
49
+ * Update a Public Gateway. Update the parameters of an existing Public Gateway, for example, its **name**, **tags**, **SSH bastion configuration**, and **DNS servers**.
50
+ *
51
+ * @deprecated
52
+ * @param request - The request {@link UpdateGatewayRequest}
53
+ * @returns A Promise of Gateway
54
+ */
55
+ updateGateway: (request: Readonly<UpdateGatewayRequest>) => Promise<Gateway>;
56
+ /**
57
+ * Delete a Public Gateway. Delete an existing Public Gateway, specified by its gateway ID. This action is irreversible.
58
+ *
59
+ * @deprecated
60
+ * @param request - The request {@link DeleteGatewayRequest}
61
+ */
62
+ deleteGateway: (request: Readonly<DeleteGatewayRequest>) => Promise<void>;
63
+ /**
64
+ * 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.
65
+ *
66
+ * @deprecated
67
+ * @param request - The request {@link UpgradeGatewayRequest}
68
+ * @returns A Promise of Gateway
69
+ */
70
+ upgradeGateway: (request: Readonly<UpgradeGatewayRequest>) => Promise<Gateway>;
71
+ /**
72
+ * 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.
73
+ *
74
+ * @deprecated
75
+ * @param request - The request {@link EnableIPMobilityRequest}
76
+ */
77
+ enableIPMobility: (request: Readonly<EnableIPMobilityRequest>) => Promise<void>;
78
+ protected pageOfListGatewayNetworks: (request?: Readonly<ListGatewayNetworksRequest>) => Promise<ListGatewayNetworksResponse>;
79
+ /**
80
+ * 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.
81
+ *
82
+ * @deprecated
83
+ * @param request - The request {@link ListGatewayNetworksRequest}
84
+ * @returns A Promise of ListGatewayNetworksResponse
85
+ */
86
+ listGatewayNetworks: (request?: Readonly<ListGatewayNetworksRequest>) => Promise<ListGatewayNetworksResponse> & {
87
+ all: () => Promise<GatewayNetwork[]>;
88
+ [Symbol.asyncIterator]: () => AsyncGenerator<GatewayNetwork[], void, void>;
89
+ };
90
+ /**
91
+ * 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.
92
+ *
93
+ * @deprecated
94
+ * @param request - The request {@link GetGatewayNetworkRequest}
95
+ * @returns A Promise of GatewayNetwork
96
+ */
97
+ getGatewayNetwork: (request: Readonly<GetGatewayNetworkRequest>) => Promise<GatewayNetwork>;
98
+ /**
99
+ * Waits for {@link GatewayNetwork} to be in a final state.
100
+ *
101
+ * @param request - The request {@link GetGatewayNetworkRequest}
102
+ * @param options - The waiting options
103
+ * @returns A Promise of GatewayNetwork
104
+ */
105
+ waitForGatewayNetwork: (request: Readonly<GetGatewayNetworkRequest>, options?: Readonly<WaitForOptions<GatewayNetwork>>) => Promise<GatewayNetwork>;
106
+ /**
107
+ * 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.
108
+ *
109
+ * @deprecated
110
+ * @param request - The request {@link CreateGatewayNetworkRequest}
111
+ * @returns A Promise of GatewayNetwork
112
+ */
113
+ createGatewayNetwork: (request: Readonly<CreateGatewayNetworkRequest>) => Promise<GatewayNetwork>;
114
+ /**
115
+ * 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).
116
+ *
117
+ * @deprecated
118
+ * @param request - The request {@link UpdateGatewayNetworkRequest}
119
+ * @returns A Promise of GatewayNetwork
120
+ */
121
+ updateGatewayNetwork: (request: Readonly<UpdateGatewayNetworkRequest>) => Promise<GatewayNetwork>;
122
+ /**
123
+ * 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.
124
+ *
125
+ * @deprecated
126
+ * @param request - The request {@link DeleteGatewayNetworkRequest}
127
+ */
128
+ deleteGatewayNetwork: (request: Readonly<DeleteGatewayNetworkRequest>) => Promise<void>;
129
+ protected pageOfListDHCPs: (request?: Readonly<ListDHCPsRequest>) => Promise<ListDHCPsResponse>;
130
+ /**
131
+ * 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.
132
+ *
133
+ * @deprecated
134
+ * @param request - The request {@link ListDHCPsRequest}
135
+ * @returns A Promise of ListDHCPsResponse
136
+ */
137
+ listDHCPs: (request?: Readonly<ListDHCPsRequest>) => Promise<ListDHCPsResponse> & {
138
+ all: () => Promise<DHCP[]>;
139
+ [Symbol.asyncIterator]: () => AsyncGenerator<DHCP[], void, void>;
140
+ };
141
+ /**
142
+ * 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.
143
+ *
144
+ * @deprecated
145
+ * @param request - The request {@link GetDHCPRequest}
146
+ * @returns A Promise of DHCP
147
+ */
148
+ getDHCP: (request: Readonly<GetDHCPRequest>) => Promise<DHCP>;
149
+ /**
150
+ * 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.
151
+ *
152
+ * @deprecated
153
+ * @param request - The request {@link CreateDHCPRequest}
154
+ * @returns A Promise of DHCP
155
+ */
156
+ createDHCP: (request: Readonly<CreateDHCPRequest>) => Promise<DHCP>;
157
+ /**
158
+ * Update a DHCP configuration. Update a DHCP configuration object, identified by its DHCP ID.
159
+ *
160
+ * @deprecated
161
+ * @param request - The request {@link UpdateDHCPRequest}
162
+ * @returns A Promise of DHCP
163
+ */
164
+ updateDHCP: (request: Readonly<UpdateDHCPRequest>) => Promise<DHCP>;
165
+ /**
166
+ * 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.
167
+ *
168
+ * @deprecated
169
+ * @param request - The request {@link DeleteDHCPRequest}
170
+ */
171
+ deleteDHCP: (request: Readonly<DeleteDHCPRequest>) => Promise<void>;
172
+ protected pageOfListDHCPEntries: (request?: Readonly<ListDHCPEntriesRequest>) => Promise<ListDHCPEntriesResponse>;
173
+ /**
174
+ * 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.
175
+ *
176
+ * @deprecated
177
+ * @param request - The request {@link ListDHCPEntriesRequest}
178
+ * @returns A Promise of ListDHCPEntriesResponse
179
+ */
180
+ listDHCPEntries: (request?: Readonly<ListDHCPEntriesRequest>) => Promise<ListDHCPEntriesResponse> & {
181
+ all: () => Promise<DHCPEntry[]>;
182
+ [Symbol.asyncIterator]: () => AsyncGenerator<DHCPEntry[], void, void>;
183
+ };
184
+ /**
185
+ * Get a DHCP entry. Get a DHCP entry, specified by its DHCP entry ID.
186
+ *
187
+ * @deprecated
188
+ * @param request - The request {@link GetDHCPEntryRequest}
189
+ * @returns A Promise of DHCPEntry
190
+ */
191
+ getDHCPEntry: (request: Readonly<GetDHCPEntryRequest>) => Promise<DHCPEntry>;
192
+ /**
193
+ * 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.
194
+ *
195
+ * @deprecated
196
+ * @param request - The request {@link CreateDHCPEntryRequest}
197
+ * @returns A Promise of DHCPEntry
198
+ */
199
+ createDHCPEntry: (request: Readonly<CreateDHCPEntryRequest>) => Promise<DHCPEntry>;
200
+ /**
201
+ * 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.
202
+ *
203
+ * @deprecated
204
+ * @param request - The request {@link UpdateDHCPEntryRequest}
205
+ * @returns A Promise of DHCPEntry
206
+ */
207
+ updateDHCPEntry: (request: Readonly<UpdateDHCPEntryRequest>) => Promise<DHCPEntry>;
208
+ /**
209
+ * 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.
210
+ *
211
+ * @deprecated
212
+ * @param request - The request {@link SetDHCPEntriesRequest}
213
+ * @returns A Promise of SetDHCPEntriesResponse
214
+ */
215
+ setDHCPEntries: (request: Readonly<SetDHCPEntriesRequest>) => Promise<SetDHCPEntriesResponse>;
216
+ /**
217
+ * 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.
218
+ *
219
+ * @deprecated
220
+ * @param request - The request {@link DeleteDHCPEntryRequest}
221
+ */
222
+ deleteDHCPEntry: (request: Readonly<DeleteDHCPEntryRequest>) => Promise<void>;
223
+ protected pageOfListPATRules: (request?: Readonly<ListPATRulesRequest>) => Promise<ListPATRulesResponse>;
224
+ /**
225
+ * 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.
226
+ *
227
+ * @deprecated
228
+ * @param request - The request {@link ListPATRulesRequest}
229
+ * @returns A Promise of ListPATRulesResponse
230
+ */
231
+ listPATRules: (request?: Readonly<ListPATRulesRequest>) => Promise<ListPATRulesResponse> & {
232
+ all: () => Promise<PATRule[]>;
233
+ [Symbol.asyncIterator]: () => AsyncGenerator<PATRule[], void, void>;
234
+ };
235
+ /**
236
+ * 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.
237
+ *
238
+ * @deprecated
239
+ * @param request - The request {@link GetPATRuleRequest}
240
+ * @returns A Promise of PATRule
241
+ */
242
+ getPATRule: (request: Readonly<GetPATRuleRequest>) => Promise<PATRule>;
243
+ /**
244
+ * 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.
245
+ *
246
+ * @deprecated
247
+ * @param request - The request {@link CreatePATRuleRequest}
248
+ * @returns A Promise of PATRule
249
+ */
250
+ createPATRule: (request: Readonly<CreatePATRuleRequest>) => Promise<PATRule>;
251
+ /**
252
+ * 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.
253
+ *
254
+ * @deprecated
255
+ * @param request - The request {@link UpdatePATRuleRequest}
256
+ * @returns A Promise of PATRule
257
+ */
258
+ updatePATRule: (request: Readonly<UpdatePATRuleRequest>) => Promise<PATRule>;
259
+ /**
260
+ * 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.
261
+ *
262
+ * @deprecated
263
+ * @param request - The request {@link SetPATRulesRequest}
264
+ * @returns A Promise of SetPATRulesResponse
265
+ */
266
+ setPATRules: (request: Readonly<SetPATRulesRequest>) => Promise<SetPATRulesResponse>;
267
+ /**
268
+ * Delete a PAT rule. Delete a PAT rule, identified by its PAT rule ID. This action is irreversible.
269
+ *
270
+ * @deprecated
271
+ * @param request - The request {@link DeletePATRuleRequest}
272
+ */
273
+ deletePATRule: (request: Readonly<DeletePATRuleRequest>) => Promise<void>;
274
+ /**
275
+ * 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.
276
+ *
277
+ * @deprecated
278
+ * @param request - The request {@link ListGatewayTypesRequest}
279
+ * @returns A Promise of ListGatewayTypesResponse
280
+ */
281
+ listGatewayTypes: (request?: Readonly<ListGatewayTypesRequest>) => Promise<ListGatewayTypesResponse>;
282
+ protected pageOfListIPs: (request?: Readonly<ListIPsRequest>) => Promise<ListIPsResponse>;
283
+ /**
284
+ * List IPs. List Public Gateway flexible IP addresses. A number of filter options are available for limiting results in the response.
285
+ *
286
+ * @deprecated
287
+ * @param request - The request {@link ListIPsRequest}
288
+ * @returns A Promise of ListIPsResponse
289
+ */
290
+ listIPs: (request?: Readonly<ListIPsRequest>) => Promise<ListIPsResponse> & {
291
+ all: () => Promise<IP[]>;
292
+ [Symbol.asyncIterator]: () => AsyncGenerator<IP[], void, void>;
293
+ };
294
+ /**
295
+ * 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.
296
+ *
297
+ * @deprecated
298
+ * @param request - The request {@link GetIPRequest}
299
+ * @returns A Promise of IP
300
+ */
301
+ getIP: (request: Readonly<GetIPRequest>) => Promise<IP>;
302
+ /**
303
+ * Reserve an IP. Create (reserve) a new flexible IP address that can be used for a Public Gateway in a specified Scaleway Project.
304
+ *
305
+ * @deprecated
306
+ * @param request - The request {@link CreateIPRequest}
307
+ * @returns A Promise of IP
308
+ */
309
+ createIP: (request?: Readonly<CreateIPRequest>) => Promise<IP>;
310
+ /**
311
+ * Update an IP. Update details of an existing flexible IP address, including its tags, reverse and the Public Gateway it is assigned to.
312
+ *
313
+ * @deprecated
314
+ * @param request - The request {@link UpdateIPRequest}
315
+ * @returns A Promise of IP
316
+ */
317
+ updateIP: (request: Readonly<UpdateIPRequest>) => Promise<IP>;
318
+ /**
319
+ * Delete an IP. Delete a flexible IP address from your account. This action is irreversible.
320
+ *
321
+ * @deprecated
322
+ * @param request - The request {@link DeleteIPRequest}
323
+ */
324
+ deleteIP: (request: Readonly<DeleteIPRequest>) => Promise<void>;
325
+ /**
326
+ * 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.
327
+ *
328
+ * @deprecated
329
+ * @param request - The request {@link RefreshSSHKeysRequest}
330
+ * @returns A Promise of Gateway
331
+ */
332
+ refreshSSHKeys: (request: Readonly<RefreshSSHKeysRequest>) => Promise<Gateway>;
333
+ /**
334
+ * 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.
335
+ *
336
+ * @deprecated
337
+ * @param request - The request {@link MigrateToV2Request}
338
+ */
339
+ migrateToV2: (request: Readonly<MigrateToV2Request>) => Promise<void>;
340
+ }