@scaleway/sdk 2.59.0 → 2.61.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/api/applesilicon/v1alpha1/api.gen.cjs +117 -0
- package/dist/api/applesilicon/v1alpha1/api.gen.d.ts +54 -1
- package/dist/api/applesilicon/v1alpha1/api.gen.js +120 -3
- package/dist/api/applesilicon/v1alpha1/content.gen.cjs +4 -0
- package/dist/api/applesilicon/v1alpha1/content.gen.d.ts +5 -1
- package/dist/api/applesilicon/v1alpha1/content.gen.js +4 -0
- package/dist/api/applesilicon/v1alpha1/index.gen.cjs +3 -0
- package/dist/api/applesilicon/v1alpha1/index.gen.d.ts +2 -2
- package/dist/api/applesilicon/v1alpha1/index.gen.js +5 -2
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.cjs +60 -0
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.d.ts +6 -1
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +60 -0
- package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +100 -0
- package/dist/api/container/v1beta1/api.gen.cjs +6 -8
- package/dist/api/container/v1beta1/api.gen.d.ts +6 -8
- package/dist/api/container/v1beta1/api.gen.js +6 -8
- package/dist/api/edge_services/v1alpha1/types.gen.d.ts +4 -4
- package/dist/api/index.gen.d.ts +2 -1
- package/dist/api/interlink/index.gen.cjs +4 -0
- package/dist/api/interlink/index.gen.d.ts +5 -0
- package/dist/api/interlink/index.gen.js +4 -0
- package/dist/api/interlink/v1beta1/api.gen.cjs +405 -0
- package/dist/api/interlink/v1beta1/api.gen.d.ts +208 -0
- package/dist/api/interlink/v1beta1/api.gen.js +405 -0
- package/dist/api/interlink/v1beta1/index.gen.cjs +6 -0
- package/dist/api/interlink/v1beta1/index.gen.d.ts +3 -0
- package/dist/api/interlink/v1beta1/index.gen.js +6 -0
- package/dist/api/interlink/v1beta1/marshalling.gen.cjs +180 -0
- package/dist/api/interlink/v1beta1/marshalling.gen.d.ts +16 -0
- package/dist/api/interlink/v1beta1/marshalling.gen.js +180 -0
- package/dist/api/interlink/v1beta1/types.gen.d.ts +455 -0
- package/dist/api/interlink/v1beta1/validation-rules.gen.cjs +107 -0
- package/dist/api/interlink/v1beta1/validation-rules.gen.d.ts +93 -0
- package/dist/api/interlink/v1beta1/validation-rules.gen.js +107 -0
- package/dist/api/ipam/v1/api.gen.cjs +1 -0
- package/dist/api/ipam/v1/api.gen.js +1 -0
- package/dist/api/ipam/v1/types.gen.d.ts +12 -10
- package/dist/api/k8s/v1/api.gen.cjs +22 -20
- package/dist/api/k8s/v1/api.gen.d.ts +22 -20
- package/dist/api/k8s/v1/api.gen.js +22 -20
- package/dist/api/k8s/v1/marshalling.gen.cjs +2 -5
- package/dist/api/k8s/v1/marshalling.gen.js +2 -5
- package/dist/api/k8s/v1/types.gen.d.ts +65 -49
- package/dist/api/lb/v1/types.gen.d.ts +6 -6
- package/dist/api/mongodb/v1alpha1/api.gen.cjs +13 -1
- package/dist/api/mongodb/v1alpha1/api.gen.d.ts +8 -1
- package/dist/api/mongodb/v1alpha1/api.gen.js +13 -1
- package/dist/api/mongodb/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/mongodb/v1alpha1/types.gen.d.ts +11 -0
- package/dist/api/mongodb/v1alpha1/validation-rules.gen.cjs +8 -0
- package/dist/api/mongodb/v1alpha1/validation-rules.gen.d.ts +7 -0
- package/dist/api/mongodb/v1alpha1/validation-rules.gen.js +8 -0
- package/dist/api/secret/v1beta1/marshalling.gen.cjs +1 -0
- package/dist/api/secret/v1beta1/marshalling.gen.js +1 -0
- package/dist/api/secret/v1beta1/types.gen.d.ts +2 -0
- package/dist/api/vpcgw/v2/api.gen.cjs +49 -1
- package/dist/api/vpcgw/v2/api.gen.d.ts +25 -1
- package/dist/api/vpcgw/v2/api.gen.js +50 -2
- package/dist/api/vpcgw/v2/index.gen.d.ts +1 -1
- package/dist/api/vpcgw/v2/marshalling.gen.cjs +31 -0
- package/dist/api/vpcgw/v2/marshalling.gen.d.ts +5 -1
- package/dist/api/vpcgw/v2/marshalling.gen.js +31 -0
- package/dist/api/vpcgw/v2/types.gen.d.ts +39 -0
- package/dist/api/webhosting/v1/api.gen.cjs +20 -0
- package/dist/api/webhosting/v1/api.gen.d.ts +8 -1
- package/dist/api/webhosting/v1/api.gen.js +21 -1
- package/dist/api/webhosting/v1/index.gen.d.ts +1 -1
- package/dist/api/webhosting/v1/marshalling.gen.cjs +16 -1
- package/dist/api/webhosting/v1/marshalling.gen.d.ts +2 -1
- package/dist/api/webhosting/v1/marshalling.gen.js +16 -1
- package/dist/api/webhosting/v1/types.gen.d.ts +30 -2
- package/dist/index.cjs +26 -24
- package/dist/index.js +26 -24
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const api = require("../../../scw/api.cjs");
|
|
4
|
+
const marshalling = require("../../../helpers/marshalling.cjs");
|
|
5
|
+
require("../../../vendor/base64/index.cjs");
|
|
6
|
+
const resourcePaginator = require("../../../scw/fetch/resource-paginator.cjs");
|
|
7
|
+
const marshalling_gen = require("./marshalling.gen.cjs");
|
|
8
|
+
const jsonContentHeaders = {
|
|
9
|
+
"Content-Type": "application/json; charset=utf-8"
|
|
10
|
+
};
|
|
11
|
+
class API extends api.API {
|
|
12
|
+
/** Lists the available regions of the API. */
|
|
13
|
+
static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
|
|
14
|
+
pageOfListPartners = (request = {}) => this.client.fetch(
|
|
15
|
+
{
|
|
16
|
+
method: "GET",
|
|
17
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/partners`,
|
|
18
|
+
urlParams: marshalling.urlParams(
|
|
19
|
+
["order_by", request.orderBy],
|
|
20
|
+
["page", request.page],
|
|
21
|
+
[
|
|
22
|
+
"page_size",
|
|
23
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
24
|
+
],
|
|
25
|
+
["pop_ids", request.popIds]
|
|
26
|
+
)
|
|
27
|
+
},
|
|
28
|
+
marshalling_gen.unmarshalListPartnersResponse
|
|
29
|
+
);
|
|
30
|
+
/**
|
|
31
|
+
* List available partners. List all available partners. By default, the
|
|
32
|
+
* partners returned in the list are ordered by name in ascending order,
|
|
33
|
+
* though this can be modified via the `order_by` field.
|
|
34
|
+
*
|
|
35
|
+
* @param request - The request {@link ListPartnersRequest}
|
|
36
|
+
* @returns A Promise of ListPartnersResponse
|
|
37
|
+
*/
|
|
38
|
+
listPartners = (request = {}) => resourcePaginator.enrichForPagination("partners", this.pageOfListPartners, request);
|
|
39
|
+
/**
|
|
40
|
+
* Get a partner. Get a partner for the given partner IP. The response object
|
|
41
|
+
* includes information such as the partner's name, email address and portal
|
|
42
|
+
* URL.
|
|
43
|
+
*
|
|
44
|
+
* @param request - The request {@link GetPartnerRequest}
|
|
45
|
+
* @returns A Promise of Partner
|
|
46
|
+
*/
|
|
47
|
+
getPartner = (request) => this.client.fetch(
|
|
48
|
+
{
|
|
49
|
+
method: "GET",
|
|
50
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/partners/${marshalling.validatePathParam("partnerId", request.partnerId)}`
|
|
51
|
+
},
|
|
52
|
+
marshalling_gen.unmarshalPartner
|
|
53
|
+
);
|
|
54
|
+
pageOfListPops = (request = {}) => this.client.fetch(
|
|
55
|
+
{
|
|
56
|
+
method: "GET",
|
|
57
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/pops`,
|
|
58
|
+
urlParams: marshalling.urlParams(
|
|
59
|
+
["hosting_provider_name", request.hostingProviderName],
|
|
60
|
+
["link_bandwidth_mbps", request.linkBandwidthMbps],
|
|
61
|
+
["name", request.name],
|
|
62
|
+
["order_by", request.orderBy],
|
|
63
|
+
["page", request.page],
|
|
64
|
+
[
|
|
65
|
+
"page_size",
|
|
66
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
67
|
+
],
|
|
68
|
+
["partner_id", request.partnerId]
|
|
69
|
+
)
|
|
70
|
+
},
|
|
71
|
+
marshalling_gen.unmarshalListPopsResponse
|
|
72
|
+
);
|
|
73
|
+
/**
|
|
74
|
+
* List PoPs. List all available PoPs (locations) for a given region. By
|
|
75
|
+
* default, the results are returned in ascending alphabetical order by name.
|
|
76
|
+
*
|
|
77
|
+
* @param request - The request {@link ListPopsRequest}
|
|
78
|
+
* @returns A Promise of ListPopsResponse
|
|
79
|
+
*/
|
|
80
|
+
listPops = (request = {}) => resourcePaginator.enrichForPagination("pops", this.pageOfListPops, request);
|
|
81
|
+
/**
|
|
82
|
+
* Get a PoP. Get a PoP for the given PoP ID. The response object includes the
|
|
83
|
+
* PoP's name and information about its physical location.
|
|
84
|
+
*
|
|
85
|
+
* @param request - The request {@link GetPopRequest}
|
|
86
|
+
* @returns A Promise of Pop
|
|
87
|
+
*/
|
|
88
|
+
getPop = (request) => this.client.fetch(
|
|
89
|
+
{
|
|
90
|
+
method: "GET",
|
|
91
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/pops/${marshalling.validatePathParam("popId", request.popId)}`
|
|
92
|
+
},
|
|
93
|
+
marshalling_gen.unmarshalPop
|
|
94
|
+
);
|
|
95
|
+
pageOfListLinks = (request = {}) => this.client.fetch(
|
|
96
|
+
{
|
|
97
|
+
method: "GET",
|
|
98
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links`,
|
|
99
|
+
urlParams: marshalling.urlParams(
|
|
100
|
+
["bandwidth_mbps", request.bandwidthMbps],
|
|
101
|
+
["bgp_v4_status", request.bgpV4Status],
|
|
102
|
+
["bgp_v6_status", request.bgpV6Status],
|
|
103
|
+
["name", request.name],
|
|
104
|
+
["order_by", request.orderBy],
|
|
105
|
+
["organization_id", request.organizationId],
|
|
106
|
+
["page", request.page],
|
|
107
|
+
[
|
|
108
|
+
"page_size",
|
|
109
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
110
|
+
],
|
|
111
|
+
["pairing_key", request.pairingKey],
|
|
112
|
+
["partner_id", request.partnerId],
|
|
113
|
+
["pop_id", request.popId],
|
|
114
|
+
["project_id", request.projectId],
|
|
115
|
+
["routing_policy_id", request.routingPolicyId],
|
|
116
|
+
["status", request.status],
|
|
117
|
+
["tags", request.tags],
|
|
118
|
+
["vpc_id", request.vpcId]
|
|
119
|
+
)
|
|
120
|
+
},
|
|
121
|
+
marshalling_gen.unmarshalListLinksResponse
|
|
122
|
+
);
|
|
123
|
+
/**
|
|
124
|
+
* List links. List all your links (InterLink connections). A number of
|
|
125
|
+
* filters are available, including Project ID, name, tags and status.
|
|
126
|
+
*
|
|
127
|
+
* @param request - The request {@link ListLinksRequest}
|
|
128
|
+
* @returns A Promise of ListLinksResponse
|
|
129
|
+
*/
|
|
130
|
+
listLinks = (request = {}) => resourcePaginator.enrichForPagination("links", this.pageOfListLinks, request);
|
|
131
|
+
/**
|
|
132
|
+
* Get a link. Get a link (InterLink connection) for the given link ID. The
|
|
133
|
+
* response object includes information about the link's various configuration
|
|
134
|
+
* details.
|
|
135
|
+
*
|
|
136
|
+
* @param request - The request {@link GetLinkRequest}
|
|
137
|
+
* @returns A Promise of Link
|
|
138
|
+
*/
|
|
139
|
+
getLink = (request) => this.client.fetch(
|
|
140
|
+
{
|
|
141
|
+
method: "GET",
|
|
142
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links/${marshalling.validatePathParam("linkId", request.linkId)}`
|
|
143
|
+
},
|
|
144
|
+
marshalling_gen.unmarshalLink
|
|
145
|
+
);
|
|
146
|
+
/**
|
|
147
|
+
* Create a link. Create a link (InterLink connection) in a given PoP,
|
|
148
|
+
* specifying its various configuration details. For the moment only hosted
|
|
149
|
+
* links (faciliated by partners) are available, though in the future
|
|
150
|
+
* dedicated and shared links will also be possible.
|
|
151
|
+
*
|
|
152
|
+
* @param request - The request {@link CreateLinkRequest}
|
|
153
|
+
* @returns A Promise of Link
|
|
154
|
+
*/
|
|
155
|
+
createLink = (request) => this.client.fetch(
|
|
156
|
+
{
|
|
157
|
+
body: JSON.stringify(
|
|
158
|
+
marshalling_gen.marshalCreateLinkRequest(request, this.client.settings)
|
|
159
|
+
),
|
|
160
|
+
headers: jsonContentHeaders,
|
|
161
|
+
method: "POST",
|
|
162
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links`
|
|
163
|
+
},
|
|
164
|
+
marshalling_gen.unmarshalLink
|
|
165
|
+
);
|
|
166
|
+
/**
|
|
167
|
+
* Update a link. Update an existing link, specified by its link ID. Only its
|
|
168
|
+
* name and tags can be updated.
|
|
169
|
+
*
|
|
170
|
+
* @param request - The request {@link UpdateLinkRequest}
|
|
171
|
+
* @returns A Promise of Link
|
|
172
|
+
*/
|
|
173
|
+
updateLink = (request) => this.client.fetch(
|
|
174
|
+
{
|
|
175
|
+
body: JSON.stringify(
|
|
176
|
+
marshalling_gen.marshalUpdateLinkRequest(request, this.client.settings)
|
|
177
|
+
),
|
|
178
|
+
headers: jsonContentHeaders,
|
|
179
|
+
method: "PATCH",
|
|
180
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links/${marshalling.validatePathParam("linkId", request.linkId)}`
|
|
181
|
+
},
|
|
182
|
+
marshalling_gen.unmarshalLink
|
|
183
|
+
);
|
|
184
|
+
/**
|
|
185
|
+
* Delete a link. Delete an existing link, specified by its link ID. Note that
|
|
186
|
+
* as well as deleting the link here on the Scaleway side, it is also
|
|
187
|
+
* necessary to request deletion from the partner on their side. Only when
|
|
188
|
+
* this action has been carried out on both sides will the resource be
|
|
189
|
+
* completely deleted.
|
|
190
|
+
*
|
|
191
|
+
* @param request - The request {@link DeleteLinkRequest}
|
|
192
|
+
* @returns A Promise of Link
|
|
193
|
+
*/
|
|
194
|
+
deleteLink = (request) => this.client.fetch(
|
|
195
|
+
{
|
|
196
|
+
method: "DELETE",
|
|
197
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links/${marshalling.validatePathParam("linkId", request.linkId)}`
|
|
198
|
+
},
|
|
199
|
+
marshalling_gen.unmarshalLink
|
|
200
|
+
);
|
|
201
|
+
/**
|
|
202
|
+
* Attach a VPC. Attach a VPC to an existing link. This facilitates
|
|
203
|
+
* communication between the resources in your Scaleway VPC, and your
|
|
204
|
+
* on-premises infrastructure.
|
|
205
|
+
*
|
|
206
|
+
* @param request - The request {@link AttachVpcRequest}
|
|
207
|
+
* @returns A Promise of Link
|
|
208
|
+
*/
|
|
209
|
+
attachVpc = (request) => this.client.fetch(
|
|
210
|
+
{
|
|
211
|
+
body: JSON.stringify(
|
|
212
|
+
marshalling_gen.marshalAttachVpcRequest(request, this.client.settings)
|
|
213
|
+
),
|
|
214
|
+
headers: jsonContentHeaders,
|
|
215
|
+
method: "POST",
|
|
216
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links/${marshalling.validatePathParam("linkId", request.linkId)}/attach-vpc`
|
|
217
|
+
},
|
|
218
|
+
marshalling_gen.unmarshalLink
|
|
219
|
+
);
|
|
220
|
+
/**
|
|
221
|
+
* Detach a VPC. Detach a VPC from an existing link.
|
|
222
|
+
*
|
|
223
|
+
* @param request - The request {@link DetachVpcRequest}
|
|
224
|
+
* @returns A Promise of Link
|
|
225
|
+
*/
|
|
226
|
+
detachVpc = (request) => this.client.fetch(
|
|
227
|
+
{
|
|
228
|
+
body: "{}",
|
|
229
|
+
headers: jsonContentHeaders,
|
|
230
|
+
method: "POST",
|
|
231
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links/${marshalling.validatePathParam("linkId", request.linkId)}/detach-vpc`
|
|
232
|
+
},
|
|
233
|
+
marshalling_gen.unmarshalLink
|
|
234
|
+
);
|
|
235
|
+
/**
|
|
236
|
+
* Attach a routing policy. Attach a routing policy to an existing link. As
|
|
237
|
+
* all routes across the link are blocked by default, you must attach a
|
|
238
|
+
* routing policy to set IP prefix filters for allowed routes, facilitating
|
|
239
|
+
* traffic flow.
|
|
240
|
+
*
|
|
241
|
+
* @param request - The request {@link AttachRoutingPolicyRequest}
|
|
242
|
+
* @returns A Promise of Link
|
|
243
|
+
*/
|
|
244
|
+
attachRoutingPolicy = (request) => this.client.fetch(
|
|
245
|
+
{
|
|
246
|
+
body: JSON.stringify(
|
|
247
|
+
marshalling_gen.marshalAttachRoutingPolicyRequest(request, this.client.settings)
|
|
248
|
+
),
|
|
249
|
+
headers: jsonContentHeaders,
|
|
250
|
+
method: "POST",
|
|
251
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links/${marshalling.validatePathParam("linkId", request.linkId)}/attach-routing-policy`
|
|
252
|
+
},
|
|
253
|
+
marshalling_gen.unmarshalLink
|
|
254
|
+
);
|
|
255
|
+
/**
|
|
256
|
+
* Detach a routing policy. Detach a routing policy from an existing link.
|
|
257
|
+
* Without a routing policy, all routes across the link are blocked by
|
|
258
|
+
* default.
|
|
259
|
+
*
|
|
260
|
+
* @param request - The request {@link DetachRoutingPolicyRequest}
|
|
261
|
+
* @returns A Promise of Link
|
|
262
|
+
*/
|
|
263
|
+
detachRoutingPolicy = (request) => this.client.fetch(
|
|
264
|
+
{
|
|
265
|
+
body: "{}",
|
|
266
|
+
headers: jsonContentHeaders,
|
|
267
|
+
method: "POST",
|
|
268
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links/${marshalling.validatePathParam("linkId", request.linkId)}/detach-routing-policy`
|
|
269
|
+
},
|
|
270
|
+
marshalling_gen.unmarshalLink
|
|
271
|
+
);
|
|
272
|
+
/**
|
|
273
|
+
* Enable route propagation. Enable all allowed prefixes (defined in a routing
|
|
274
|
+
* policy) to be announced in the BGP session. This allows traffic to flow
|
|
275
|
+
* between the attached VPC and the on-premises infrastructure along the
|
|
276
|
+
* announced routes. Note that by default, even when route propagation is
|
|
277
|
+
* enabled, all routes are blocked. It is essential to attach a routing policy
|
|
278
|
+
* to define the ranges of routes to announce.
|
|
279
|
+
*
|
|
280
|
+
* @param request - The request {@link EnableRoutePropagationRequest}
|
|
281
|
+
* @returns A Promise of Link
|
|
282
|
+
*/
|
|
283
|
+
enableRoutePropagation = (request) => this.client.fetch(
|
|
284
|
+
{
|
|
285
|
+
body: "{}",
|
|
286
|
+
headers: jsonContentHeaders,
|
|
287
|
+
method: "POST",
|
|
288
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links/${marshalling.validatePathParam("linkId", request.linkId)}/enable-route-propagation`
|
|
289
|
+
},
|
|
290
|
+
marshalling_gen.unmarshalLink
|
|
291
|
+
);
|
|
292
|
+
/**
|
|
293
|
+
* Disable route propagation. Prevent any prefixes from being announced in the
|
|
294
|
+
* BGP session. Traffic will not be able to flow over the InterLink until
|
|
295
|
+
* route propagation is re-enabled.
|
|
296
|
+
*
|
|
297
|
+
* @param request - The request {@link DisableRoutePropagationRequest}
|
|
298
|
+
* @returns A Promise of Link
|
|
299
|
+
*/
|
|
300
|
+
disableRoutePropagation = (request) => this.client.fetch(
|
|
301
|
+
{
|
|
302
|
+
body: "{}",
|
|
303
|
+
headers: jsonContentHeaders,
|
|
304
|
+
method: "POST",
|
|
305
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links/${marshalling.validatePathParam("linkId", request.linkId)}/disable-route-propagation`
|
|
306
|
+
},
|
|
307
|
+
marshalling_gen.unmarshalLink
|
|
308
|
+
);
|
|
309
|
+
pageOfListRoutingPolicies = (request = {}) => this.client.fetch(
|
|
310
|
+
{
|
|
311
|
+
method: "GET",
|
|
312
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routing-policies`,
|
|
313
|
+
urlParams: marshalling.urlParams(
|
|
314
|
+
["name", request.name],
|
|
315
|
+
["order_by", request.orderBy],
|
|
316
|
+
["organization_id", request.organizationId],
|
|
317
|
+
["page", request.page],
|
|
318
|
+
[
|
|
319
|
+
"page_size",
|
|
320
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
321
|
+
],
|
|
322
|
+
["project_id", request.projectId],
|
|
323
|
+
["tags", request.tags]
|
|
324
|
+
)
|
|
325
|
+
},
|
|
326
|
+
marshalling_gen.unmarshalListRoutingPoliciesResponse
|
|
327
|
+
);
|
|
328
|
+
/**
|
|
329
|
+
* List routing policies. List all routing policies in a given region. A
|
|
330
|
+
* routing policy can be attached to one or multiple links (InterLink
|
|
331
|
+
* connections).
|
|
332
|
+
*
|
|
333
|
+
* @param request - The request {@link ListRoutingPoliciesRequest}
|
|
334
|
+
* @returns A Promise of ListRoutingPoliciesResponse
|
|
335
|
+
*/
|
|
336
|
+
listRoutingPolicies = (request = {}) => resourcePaginator.enrichForPagination(
|
|
337
|
+
"routingPolicies",
|
|
338
|
+
this.pageOfListRoutingPolicies,
|
|
339
|
+
request
|
|
340
|
+
);
|
|
341
|
+
/**
|
|
342
|
+
* Get routing policy. Get a routing policy for the given routing policy ID.
|
|
343
|
+
* The response object gives information including the policy's name, tags and
|
|
344
|
+
* prefix filters.
|
|
345
|
+
*
|
|
346
|
+
* @param request - The request {@link GetRoutingPolicyRequest}
|
|
347
|
+
* @returns A Promise of RoutingPolicy
|
|
348
|
+
*/
|
|
349
|
+
getRoutingPolicy = (request) => this.client.fetch(
|
|
350
|
+
{
|
|
351
|
+
method: "GET",
|
|
352
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routing-policies/${marshalling.validatePathParam("routingPolicyId", request.routingPolicyId)}`
|
|
353
|
+
},
|
|
354
|
+
marshalling_gen.unmarshalRoutingPolicy
|
|
355
|
+
);
|
|
356
|
+
/**
|
|
357
|
+
* Create a routing policy. Create a routing policy. Routing policies allow
|
|
358
|
+
* you to set IP prefix filters to define the incoming route announcements to
|
|
359
|
+
* accept from the peer, and the outgoing routes to announce to the peer.
|
|
360
|
+
*
|
|
361
|
+
* @param request - The request {@link CreateRoutingPolicyRequest}
|
|
362
|
+
* @returns A Promise of RoutingPolicy
|
|
363
|
+
*/
|
|
364
|
+
createRoutingPolicy = (request) => this.client.fetch(
|
|
365
|
+
{
|
|
366
|
+
body: JSON.stringify(
|
|
367
|
+
marshalling_gen.marshalCreateRoutingPolicyRequest(request, this.client.settings)
|
|
368
|
+
),
|
|
369
|
+
headers: jsonContentHeaders,
|
|
370
|
+
method: "POST",
|
|
371
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routing-policies`
|
|
372
|
+
},
|
|
373
|
+
marshalling_gen.unmarshalRoutingPolicy
|
|
374
|
+
);
|
|
375
|
+
/**
|
|
376
|
+
* Update a routing policy. Update an existing routing policy, specified by
|
|
377
|
+
* its routing policy ID. Its name, tags and incoming/outgoing prefix filters
|
|
378
|
+
* can be updated.
|
|
379
|
+
*
|
|
380
|
+
* @param request - The request {@link UpdateRoutingPolicyRequest}
|
|
381
|
+
* @returns A Promise of RoutingPolicy
|
|
382
|
+
*/
|
|
383
|
+
updateRoutingPolicy = (request) => this.client.fetch(
|
|
384
|
+
{
|
|
385
|
+
body: JSON.stringify(
|
|
386
|
+
marshalling_gen.marshalUpdateRoutingPolicyRequest(request, this.client.settings)
|
|
387
|
+
),
|
|
388
|
+
headers: jsonContentHeaders,
|
|
389
|
+
method: "PATCH",
|
|
390
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routing-policies/${marshalling.validatePathParam("routingPolicyId", request.routingPolicyId)}`
|
|
391
|
+
},
|
|
392
|
+
marshalling_gen.unmarshalRoutingPolicy
|
|
393
|
+
);
|
|
394
|
+
/**
|
|
395
|
+
* Delete a routing policy. Delete an existing routing policy, specified by
|
|
396
|
+
* its routing policy ID.
|
|
397
|
+
*
|
|
398
|
+
* @param request - The request {@link DeleteRoutingPolicyRequest}
|
|
399
|
+
*/
|
|
400
|
+
deleteRoutingPolicy = (request) => this.client.fetch({
|
|
401
|
+
method: "DELETE",
|
|
402
|
+
path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routing-policies/${marshalling.validatePathParam("routingPolicyId", request.routingPolicyId)}`
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
exports.API = API;
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { API as ParentAPI } from '../../../bridge';
|
|
2
|
+
import type { Region } from '../../../bridge';
|
|
3
|
+
import type { AttachRoutingPolicyRequest, AttachVpcRequest, CreateLinkRequest, CreateRoutingPolicyRequest, DeleteLinkRequest, DeleteRoutingPolicyRequest, DetachRoutingPolicyRequest, DetachVpcRequest, DisableRoutePropagationRequest, EnableRoutePropagationRequest, GetLinkRequest, GetPartnerRequest, GetPopRequest, GetRoutingPolicyRequest, Link, ListLinksRequest, ListLinksResponse, ListPartnersRequest, ListPartnersResponse, ListPopsRequest, ListPopsResponse, ListRoutingPoliciesRequest, ListRoutingPoliciesResponse, Partner, Pop, RoutingPolicy, UpdateLinkRequest, UpdateRoutingPolicyRequest } from './types.gen';
|
|
4
|
+
/**
|
|
5
|
+
* InterLink API.
|
|
6
|
+
*
|
|
7
|
+
* This API allows you to manage your Scaleway InterLink, to connect your
|
|
8
|
+
* on-premises infrastructure with your Scaleway VPC.
|
|
9
|
+
*/
|
|
10
|
+
export declare class API extends ParentAPI {
|
|
11
|
+
/** Lists the available regions of the API. */
|
|
12
|
+
static readonly LOCALITIES: Region[];
|
|
13
|
+
protected pageOfListPartners: (request?: Readonly<ListPartnersRequest>) => Promise<ListPartnersResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* List available partners. List all available partners. By default, the
|
|
16
|
+
* partners returned in the list are ordered by name in ascending order,
|
|
17
|
+
* though this can be modified via the `order_by` field.
|
|
18
|
+
*
|
|
19
|
+
* @param request - The request {@link ListPartnersRequest}
|
|
20
|
+
* @returns A Promise of ListPartnersResponse
|
|
21
|
+
*/
|
|
22
|
+
listPartners: (request?: Readonly<ListPartnersRequest>) => Promise<ListPartnersResponse> & {
|
|
23
|
+
all: () => Promise<Partner[]>;
|
|
24
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<Partner[], void, void>;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Get a partner. Get a partner for the given partner IP. The response object
|
|
28
|
+
* includes information such as the partner's name, email address and portal
|
|
29
|
+
* URL.
|
|
30
|
+
*
|
|
31
|
+
* @param request - The request {@link GetPartnerRequest}
|
|
32
|
+
* @returns A Promise of Partner
|
|
33
|
+
*/
|
|
34
|
+
getPartner: (request: Readonly<GetPartnerRequest>) => Promise<Partner>;
|
|
35
|
+
protected pageOfListPops: (request?: Readonly<ListPopsRequest>) => Promise<ListPopsResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* List PoPs. List all available PoPs (locations) for a given region. By
|
|
38
|
+
* default, the results are returned in ascending alphabetical order by name.
|
|
39
|
+
*
|
|
40
|
+
* @param request - The request {@link ListPopsRequest}
|
|
41
|
+
* @returns A Promise of ListPopsResponse
|
|
42
|
+
*/
|
|
43
|
+
listPops: (request?: Readonly<ListPopsRequest>) => Promise<ListPopsResponse> & {
|
|
44
|
+
all: () => Promise<Pop[]>;
|
|
45
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<Pop[], void, void>;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Get a PoP. Get a PoP for the given PoP ID. The response object includes the
|
|
49
|
+
* PoP's name and information about its physical location.
|
|
50
|
+
*
|
|
51
|
+
* @param request - The request {@link GetPopRequest}
|
|
52
|
+
* @returns A Promise of Pop
|
|
53
|
+
*/
|
|
54
|
+
getPop: (request: Readonly<GetPopRequest>) => Promise<Pop>;
|
|
55
|
+
protected pageOfListLinks: (request?: Readonly<ListLinksRequest>) => Promise<ListLinksResponse>;
|
|
56
|
+
/**
|
|
57
|
+
* List links. List all your links (InterLink connections). A number of
|
|
58
|
+
* filters are available, including Project ID, name, tags and status.
|
|
59
|
+
*
|
|
60
|
+
* @param request - The request {@link ListLinksRequest}
|
|
61
|
+
* @returns A Promise of ListLinksResponse
|
|
62
|
+
*/
|
|
63
|
+
listLinks: (request?: Readonly<ListLinksRequest>) => Promise<ListLinksResponse> & {
|
|
64
|
+
all: () => Promise<Link[]>;
|
|
65
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<Link[], void, void>;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Get a link. Get a link (InterLink connection) for the given link ID. The
|
|
69
|
+
* response object includes information about the link's various configuration
|
|
70
|
+
* details.
|
|
71
|
+
*
|
|
72
|
+
* @param request - The request {@link GetLinkRequest}
|
|
73
|
+
* @returns A Promise of Link
|
|
74
|
+
*/
|
|
75
|
+
getLink: (request: Readonly<GetLinkRequest>) => Promise<Link>;
|
|
76
|
+
/**
|
|
77
|
+
* Create a link. Create a link (InterLink connection) in a given PoP,
|
|
78
|
+
* specifying its various configuration details. For the moment only hosted
|
|
79
|
+
* links (faciliated by partners) are available, though in the future
|
|
80
|
+
* dedicated and shared links will also be possible.
|
|
81
|
+
*
|
|
82
|
+
* @param request - The request {@link CreateLinkRequest}
|
|
83
|
+
* @returns A Promise of Link
|
|
84
|
+
*/
|
|
85
|
+
createLink: (request: Readonly<CreateLinkRequest>) => Promise<Link>;
|
|
86
|
+
/**
|
|
87
|
+
* Update a link. Update an existing link, specified by its link ID. Only its
|
|
88
|
+
* name and tags can be updated.
|
|
89
|
+
*
|
|
90
|
+
* @param request - The request {@link UpdateLinkRequest}
|
|
91
|
+
* @returns A Promise of Link
|
|
92
|
+
*/
|
|
93
|
+
updateLink: (request: Readonly<UpdateLinkRequest>) => Promise<Link>;
|
|
94
|
+
/**
|
|
95
|
+
* Delete a link. Delete an existing link, specified by its link ID. Note that
|
|
96
|
+
* as well as deleting the link here on the Scaleway side, it is also
|
|
97
|
+
* necessary to request deletion from the partner on their side. Only when
|
|
98
|
+
* this action has been carried out on both sides will the resource be
|
|
99
|
+
* completely deleted.
|
|
100
|
+
*
|
|
101
|
+
* @param request - The request {@link DeleteLinkRequest}
|
|
102
|
+
* @returns A Promise of Link
|
|
103
|
+
*/
|
|
104
|
+
deleteLink: (request: Readonly<DeleteLinkRequest>) => Promise<Link>;
|
|
105
|
+
/**
|
|
106
|
+
* Attach a VPC. Attach a VPC to an existing link. This facilitates
|
|
107
|
+
* communication between the resources in your Scaleway VPC, and your
|
|
108
|
+
* on-premises infrastructure.
|
|
109
|
+
*
|
|
110
|
+
* @param request - The request {@link AttachVpcRequest}
|
|
111
|
+
* @returns A Promise of Link
|
|
112
|
+
*/
|
|
113
|
+
attachVpc: (request: Readonly<AttachVpcRequest>) => Promise<Link>;
|
|
114
|
+
/**
|
|
115
|
+
* Detach a VPC. Detach a VPC from an existing link.
|
|
116
|
+
*
|
|
117
|
+
* @param request - The request {@link DetachVpcRequest}
|
|
118
|
+
* @returns A Promise of Link
|
|
119
|
+
*/
|
|
120
|
+
detachVpc: (request: Readonly<DetachVpcRequest>) => Promise<Link>;
|
|
121
|
+
/**
|
|
122
|
+
* Attach a routing policy. Attach a routing policy to an existing link. As
|
|
123
|
+
* all routes across the link are blocked by default, you must attach a
|
|
124
|
+
* routing policy to set IP prefix filters for allowed routes, facilitating
|
|
125
|
+
* traffic flow.
|
|
126
|
+
*
|
|
127
|
+
* @param request - The request {@link AttachRoutingPolicyRequest}
|
|
128
|
+
* @returns A Promise of Link
|
|
129
|
+
*/
|
|
130
|
+
attachRoutingPolicy: (request: Readonly<AttachRoutingPolicyRequest>) => Promise<Link>;
|
|
131
|
+
/**
|
|
132
|
+
* Detach a routing policy. Detach a routing policy from an existing link.
|
|
133
|
+
* Without a routing policy, all routes across the link are blocked by
|
|
134
|
+
* default.
|
|
135
|
+
*
|
|
136
|
+
* @param request - The request {@link DetachRoutingPolicyRequest}
|
|
137
|
+
* @returns A Promise of Link
|
|
138
|
+
*/
|
|
139
|
+
detachRoutingPolicy: (request: Readonly<DetachRoutingPolicyRequest>) => Promise<Link>;
|
|
140
|
+
/**
|
|
141
|
+
* Enable route propagation. Enable all allowed prefixes (defined in a routing
|
|
142
|
+
* policy) to be announced in the BGP session. This allows traffic to flow
|
|
143
|
+
* between the attached VPC and the on-premises infrastructure along the
|
|
144
|
+
* announced routes. Note that by default, even when route propagation is
|
|
145
|
+
* enabled, all routes are blocked. It is essential to attach a routing policy
|
|
146
|
+
* to define the ranges of routes to announce.
|
|
147
|
+
*
|
|
148
|
+
* @param request - The request {@link EnableRoutePropagationRequest}
|
|
149
|
+
* @returns A Promise of Link
|
|
150
|
+
*/
|
|
151
|
+
enableRoutePropagation: (request: Readonly<EnableRoutePropagationRequest>) => Promise<Link>;
|
|
152
|
+
/**
|
|
153
|
+
* Disable route propagation. Prevent any prefixes from being announced in the
|
|
154
|
+
* BGP session. Traffic will not be able to flow over the InterLink until
|
|
155
|
+
* route propagation is re-enabled.
|
|
156
|
+
*
|
|
157
|
+
* @param request - The request {@link DisableRoutePropagationRequest}
|
|
158
|
+
* @returns A Promise of Link
|
|
159
|
+
*/
|
|
160
|
+
disableRoutePropagation: (request: Readonly<DisableRoutePropagationRequest>) => Promise<Link>;
|
|
161
|
+
protected pageOfListRoutingPolicies: (request?: Readonly<ListRoutingPoliciesRequest>) => Promise<ListRoutingPoliciesResponse>;
|
|
162
|
+
/**
|
|
163
|
+
* List routing policies. List all routing policies in a given region. A
|
|
164
|
+
* routing policy can be attached to one or multiple links (InterLink
|
|
165
|
+
* connections).
|
|
166
|
+
*
|
|
167
|
+
* @param request - The request {@link ListRoutingPoliciesRequest}
|
|
168
|
+
* @returns A Promise of ListRoutingPoliciesResponse
|
|
169
|
+
*/
|
|
170
|
+
listRoutingPolicies: (request?: Readonly<ListRoutingPoliciesRequest>) => Promise<ListRoutingPoliciesResponse> & {
|
|
171
|
+
all: () => Promise<RoutingPolicy[]>;
|
|
172
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<RoutingPolicy[], void, void>;
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Get routing policy. Get a routing policy for the given routing policy ID.
|
|
176
|
+
* The response object gives information including the policy's name, tags and
|
|
177
|
+
* prefix filters.
|
|
178
|
+
*
|
|
179
|
+
* @param request - The request {@link GetRoutingPolicyRequest}
|
|
180
|
+
* @returns A Promise of RoutingPolicy
|
|
181
|
+
*/
|
|
182
|
+
getRoutingPolicy: (request: Readonly<GetRoutingPolicyRequest>) => Promise<RoutingPolicy>;
|
|
183
|
+
/**
|
|
184
|
+
* Create a routing policy. Create a routing policy. Routing policies allow
|
|
185
|
+
* you to set IP prefix filters to define the incoming route announcements to
|
|
186
|
+
* accept from the peer, and the outgoing routes to announce to the peer.
|
|
187
|
+
*
|
|
188
|
+
* @param request - The request {@link CreateRoutingPolicyRequest}
|
|
189
|
+
* @returns A Promise of RoutingPolicy
|
|
190
|
+
*/
|
|
191
|
+
createRoutingPolicy: (request: Readonly<CreateRoutingPolicyRequest>) => Promise<RoutingPolicy>;
|
|
192
|
+
/**
|
|
193
|
+
* Update a routing policy. Update an existing routing policy, specified by
|
|
194
|
+
* its routing policy ID. Its name, tags and incoming/outgoing prefix filters
|
|
195
|
+
* can be updated.
|
|
196
|
+
*
|
|
197
|
+
* @param request - The request {@link UpdateRoutingPolicyRequest}
|
|
198
|
+
* @returns A Promise of RoutingPolicy
|
|
199
|
+
*/
|
|
200
|
+
updateRoutingPolicy: (request: Readonly<UpdateRoutingPolicyRequest>) => Promise<RoutingPolicy>;
|
|
201
|
+
/**
|
|
202
|
+
* Delete a routing policy. Delete an existing routing policy, specified by
|
|
203
|
+
* its routing policy ID.
|
|
204
|
+
*
|
|
205
|
+
* @param request - The request {@link DeleteRoutingPolicyRequest}
|
|
206
|
+
*/
|
|
207
|
+
deleteRoutingPolicy: (request: Readonly<DeleteRoutingPolicyRequest>) => Promise<void>;
|
|
208
|
+
}
|