@scaleway/sdk 2.59.0 → 2.60.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/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 +2 -1
- package/dist/api/vpcgw/v2/api.gen.js +2 -1
- package/dist/api/vpcgw/v2/types.gen.d.ts +2 -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
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { Zone } from '../../../bridge';
|
|
2
2
|
export type ConnectivityDiagnosticActionType = 'reboot_server' | 'reinstall_server';
|
|
3
3
|
export type ConnectivityDiagnosticDiagnosticStatus = 'unknown_status' | 'processing' | 'error' | 'completed';
|
|
4
|
+
export type ListServerPrivateNetworksRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc';
|
|
4
5
|
export type ListServersRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
6
|
+
export type ServerPrivateNetworkServerStatus = 'unknown_status' | 'attaching' | 'attached' | 'error' | 'detaching' | 'locked';
|
|
7
|
+
export type ServerPrivateNetworkStatus = 'vpc_unknown_status' | 'vpc_enabled' | 'vpc_updating' | 'vpc_disabled';
|
|
5
8
|
export type ServerStatus = 'unknown_status' | 'starting' | 'ready' | 'error' | 'rebooting' | 'updating' | 'locking' | 'locked' | 'unlocking' | 'reinstalling' | 'busy';
|
|
6
9
|
export type ServerTypeStock = 'unknown_stock' | 'no_stock' | 'low_stock' | 'high_stock';
|
|
7
10
|
export interface OS {
|
|
@@ -51,6 +54,26 @@ export interface ConnectivityDiagnosticServerHealth {
|
|
|
51
54
|
isSshPortUp: boolean;
|
|
52
55
|
isVncPortUp: boolean;
|
|
53
56
|
}
|
|
57
|
+
export interface ServerPrivateNetwork {
|
|
58
|
+
/** ID of the Server-to-Private Network mapping. */
|
|
59
|
+
id: string;
|
|
60
|
+
/** Private Network Project ID. */
|
|
61
|
+
projectId: string;
|
|
62
|
+
/** Apple silicon server ID. */
|
|
63
|
+
serverId: string;
|
|
64
|
+
/** Private Network ID. */
|
|
65
|
+
privateNetworkId: string;
|
|
66
|
+
/** ID of the VLAN associated with the Private Network. */
|
|
67
|
+
vlan?: number;
|
|
68
|
+
/** Configuration status of the Private Network. */
|
|
69
|
+
status: ServerPrivateNetworkServerStatus;
|
|
70
|
+
/** Private Network creation date. */
|
|
71
|
+
createdAt?: Date;
|
|
72
|
+
/** Date the Private Network was last modified. */
|
|
73
|
+
updatedAt?: Date;
|
|
74
|
+
/** IPAM IP IDs of the server, if it has any. */
|
|
75
|
+
ipamIpIds: string[];
|
|
76
|
+
}
|
|
54
77
|
export interface ServerType {
|
|
55
78
|
/** CPU description. */
|
|
56
79
|
cpu?: ServerTypeCPU;
|
|
@@ -121,6 +144,11 @@ export interface Server {
|
|
|
121
144
|
* using the server status.
|
|
122
145
|
*/
|
|
123
146
|
delivered: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Activation status of optional Private Network feature support for this
|
|
149
|
+
* server.
|
|
150
|
+
*/
|
|
151
|
+
vpcStatus: ServerPrivateNetworkStatus;
|
|
124
152
|
}
|
|
125
153
|
export interface ConnectivityDiagnostic {
|
|
126
154
|
id: string;
|
|
@@ -145,6 +173,11 @@ export type CreateServerRequest = {
|
|
|
145
173
|
* induce an extended delivery time.
|
|
146
174
|
*/
|
|
147
175
|
osId?: string;
|
|
176
|
+
/**
|
|
177
|
+
* Activate the Private Network feature for this server. This feature is
|
|
178
|
+
* configured through the Apple Silicon - Private Networks API.
|
|
179
|
+
*/
|
|
180
|
+
enableVpc: boolean;
|
|
148
181
|
};
|
|
149
182
|
export type DeleteServerRequest = {
|
|
150
183
|
/** Zone to target. If none is passed will use default zone from the config. */
|
|
@@ -199,6 +232,10 @@ export interface ListOSResponse {
|
|
|
199
232
|
/** List of OS. */
|
|
200
233
|
os: OS[];
|
|
201
234
|
}
|
|
235
|
+
export interface ListServerPrivateNetworksResponse {
|
|
236
|
+
serverPrivateNetworks: ServerPrivateNetwork[];
|
|
237
|
+
totalCount: number;
|
|
238
|
+
}
|
|
202
239
|
export type ListServerTypesRequest = {
|
|
203
240
|
/** Zone to target. If none is passed will use default zone from the config. */
|
|
204
241
|
zone?: Zone;
|
|
@@ -230,6 +267,64 @@ export interface ListServersResponse {
|
|
|
230
267
|
/** Paginated returned servers. */
|
|
231
268
|
servers: Server[];
|
|
232
269
|
}
|
|
270
|
+
export type PrivateNetworkApiAddServerPrivateNetworkRequest = {
|
|
271
|
+
/** Zone to target. If none is passed will use default zone from the config. */
|
|
272
|
+
zone?: Zone;
|
|
273
|
+
/** ID of the server. */
|
|
274
|
+
serverId: string;
|
|
275
|
+
/** ID of the Private Network. */
|
|
276
|
+
privateNetworkId: string;
|
|
277
|
+
/** IPAM IDs of IPs to attach to the server. */
|
|
278
|
+
ipamIpIds?: string[];
|
|
279
|
+
};
|
|
280
|
+
export type PrivateNetworkApiDeleteServerPrivateNetworkRequest = {
|
|
281
|
+
/** Zone to target. If none is passed will use default zone from the config. */
|
|
282
|
+
zone?: Zone;
|
|
283
|
+
/** ID of the server. */
|
|
284
|
+
serverId: string;
|
|
285
|
+
/** ID of the Private Network. */
|
|
286
|
+
privateNetworkId: string;
|
|
287
|
+
};
|
|
288
|
+
export type PrivateNetworkApiGetServerPrivateNetworkRequest = {
|
|
289
|
+
/** Zone to target. If none is passed will use default zone from the config. */
|
|
290
|
+
zone?: Zone;
|
|
291
|
+
serverId: string;
|
|
292
|
+
privateNetworkId: string;
|
|
293
|
+
};
|
|
294
|
+
export type PrivateNetworkApiListServerPrivateNetworksRequest = {
|
|
295
|
+
/** Zone to target. If none is passed will use default zone from the config. */
|
|
296
|
+
zone?: Zone;
|
|
297
|
+
/** Sort order for the returned Private Networks. */
|
|
298
|
+
orderBy?: ListServerPrivateNetworksRequestOrderBy;
|
|
299
|
+
/** Page number for the returned Private Networks. */
|
|
300
|
+
page?: number;
|
|
301
|
+
/** Maximum number of Private Networks per page. */
|
|
302
|
+
pageSize?: number;
|
|
303
|
+
/** Filter Private Networks by server ID. */
|
|
304
|
+
serverId?: string;
|
|
305
|
+
/** Filter Private Networks by Private Network ID. */
|
|
306
|
+
privateNetworkId?: string;
|
|
307
|
+
/** Filter Private Networks by Organization ID. */
|
|
308
|
+
organizationId?: string;
|
|
309
|
+
/** Filter Private Networks by Project ID. */
|
|
310
|
+
projectId?: string;
|
|
311
|
+
/** Filter Private Networks by IPAM IP IDs. */
|
|
312
|
+
ipamIpIds?: string[];
|
|
313
|
+
};
|
|
314
|
+
export type PrivateNetworkApiSetServerPrivateNetworksRequest = {
|
|
315
|
+
/** Zone to target. If none is passed will use default zone from the config. */
|
|
316
|
+
zone?: Zone;
|
|
317
|
+
/** ID of the server. */
|
|
318
|
+
serverId: string;
|
|
319
|
+
/**
|
|
320
|
+
* Object where the keys are the IDs of Private Networks and the values are
|
|
321
|
+
* arrays of IPAM IDs representing the IPs to assign to this Apple silicon
|
|
322
|
+
* server on the Private Network. If the array supplied for a Private Network
|
|
323
|
+
* is empty, the next available IP from the Private Network's CIDR block will
|
|
324
|
+
* automatically be used for attachment.
|
|
325
|
+
*/
|
|
326
|
+
perPrivateNetworkIpamIpIds: Record<string, string[]>;
|
|
327
|
+
};
|
|
233
328
|
export type RebootServerRequest = {
|
|
234
329
|
/** Zone to target. If none is passed will use default zone from the config. */
|
|
235
330
|
zone?: Zone;
|
|
@@ -247,6 +342,9 @@ export type ReinstallServerRequest = {
|
|
|
247
342
|
*/
|
|
248
343
|
osId?: string;
|
|
249
344
|
};
|
|
345
|
+
export interface SetServerPrivateNetworksResponse {
|
|
346
|
+
serverPrivateNetworks: ServerPrivateNetwork[];
|
|
347
|
+
}
|
|
250
348
|
export type StartConnectivityDiagnosticRequest = {
|
|
251
349
|
/** Zone to target. If none is passed will use default zone from the config. */
|
|
252
350
|
zone?: Zone;
|
|
@@ -264,4 +362,6 @@ export type UpdateServerRequest = {
|
|
|
264
362
|
name?: string;
|
|
265
363
|
/** Specify whether the server should be flagged for automatic deletion. */
|
|
266
364
|
scheduleDeletion?: boolean;
|
|
365
|
+
/** Activate or deactivate Private Network support for this server. */
|
|
366
|
+
enableVpc?: boolean;
|
|
267
367
|
};
|
|
@@ -433,22 +433,22 @@ export interface GetBillingResponse {
|
|
|
433
433
|
pipelineNumber: number;
|
|
434
434
|
/**
|
|
435
435
|
* Cost to date (this month) of pipelines not included in the subscription
|
|
436
|
-
*
|
|
436
|
+
* plans.
|
|
437
437
|
*/
|
|
438
438
|
extraPipelinesCost?: Money;
|
|
439
439
|
/**
|
|
440
440
|
* Total amount of data egressed from the cache in gigabytes from the
|
|
441
|
-
* beginning of the month,
|
|
441
|
+
* beginning of the month, for the active subscription plan.
|
|
442
442
|
*/
|
|
443
443
|
currentPlanCacheUsage: number;
|
|
444
444
|
/**
|
|
445
445
|
* Total amount of extra data egressed from cache in gigabytes from the
|
|
446
|
-
* beginning of the month, not included in the
|
|
446
|
+
* beginning of the month, not included in the subscription plans.
|
|
447
447
|
*/
|
|
448
448
|
extraCacheUsage: number;
|
|
449
449
|
/**
|
|
450
450
|
* Cost to date (this month) of the data egressed from the cache that is not
|
|
451
|
-
* included in the
|
|
451
|
+
* included in the subscription plans.
|
|
452
452
|
*/
|
|
453
453
|
extraCacheCost?: Money;
|
|
454
454
|
/**
|
package/dist/api/index.gen.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ import * as Function from './function/index.gen';
|
|
|
19
19
|
import * as Iam from './iam/index.gen';
|
|
20
20
|
import * as Inference from './inference/index.gen';
|
|
21
21
|
import * as Instance from './instance/index.gen';
|
|
22
|
+
import * as Interlink from './interlink/index.gen';
|
|
22
23
|
import * as Iot from './iot/index.gen';
|
|
23
24
|
import * as Ipam from './ipam/index.gen';
|
|
24
25
|
import * as Ipfs from './ipfs/index.gen';
|
|
@@ -42,4 +43,4 @@ import * as Test from './test/index.gen';
|
|
|
42
43
|
import * as Vpc from './vpc/index.gen';
|
|
43
44
|
import * as Vpcgw from './vpcgw/index.gen';
|
|
44
45
|
import * as Webhosting from './webhosting/index.gen';
|
|
45
|
-
export { Account, Applesilicon, AuditTrail, Baremetal, Billing, Block, Cockpit, Container, Dedibox, DocumentDb, Domain, EdgeServices, Flexibleip, Function, Iam, Inference, Instance, Iot, Ipam, Ipfs, Jobs, K8s, KeyManager, Lb, LlmInference, Marketplace, Mnq, Mongodb, Qaas, Rdb, Redis, Registry, Secret, ServerlessSqldb, Std, Tem, Test, Vpc, Vpcgw, Webhosting, };
|
|
46
|
+
export { Account, Applesilicon, AuditTrail, Baremetal, Billing, Block, Cockpit, Container, Dedibox, DocumentDb, Domain, EdgeServices, Flexibleip, Function, Iam, Inference, Instance, Interlink, Iot, Ipam, Ipfs, Jobs, K8s, KeyManager, Lb, LlmInference, Marketplace, Mnq, Mongodb, Qaas, Rdb, Redis, Registry, Secret, ServerlessSqldb, Std, Tem, Test, Vpc, Vpcgw, Webhosting, };
|
|
@@ -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;
|