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