@scaleway/sdk 2.63.0 → 2.64.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.d.ts +3 -3
- package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +20 -20
- package/dist/api/edge_services/v1alpha1/types.gen.d.ts +3 -3
- package/dist/api/iam/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/iam/v1alpha1/marshalling.gen.cjs +16 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.js +16 -0
- package/dist/api/iam/v1alpha1/types.gen.d.ts +48 -4
- package/dist/api/iam/v1alpha1/validation-rules.gen.cjs +7 -3
- package/dist/api/iam/v1alpha1/validation-rules.gen.d.ts +6 -3
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +7 -3
- package/dist/api/inference/v1beta1/api.gen.d.ts +2 -2
- package/dist/api/inference/v1beta1/types.gen.d.ts +21 -21
- package/dist/api/instance/v1/api.gen.d.ts +2 -2
- package/dist/api/instance/v1/types.gen.d.ts +87 -87
- package/dist/api/instance/v1/types.private.gen.d.ts +5 -5
- package/dist/api/interlink/v1beta1/api.gen.cjs +5 -1
- package/dist/api/interlink/v1beta1/api.gen.d.ts +2 -2
- package/dist/api/interlink/v1beta1/api.gen.js +5 -1
- package/dist/api/interlink/v1beta1/marshalling.gen.cjs +1 -0
- package/dist/api/interlink/v1beta1/marshalling.gen.js +1 -0
- package/dist/api/interlink/v1beta1/types.gen.d.ts +29 -24
- package/dist/api/vpc/v2/api.gen.cjs +5 -21
- package/dist/api/vpc/v2/api.gen.d.ts +3 -13
- package/dist/api/vpc/v2/api.gen.js +6 -22
- package/dist/api/vpc/v2/index.gen.d.ts +1 -1
- package/dist/api/vpc/v2/marshalling.gen.cjs +0 -16
- package/dist/api/vpc/v2/marshalling.gen.d.ts +1 -2
- package/dist/api/vpc/v2/marshalling.gen.js +1 -17
- package/dist/api/vpc/v2/types.gen.d.ts +24 -49
- package/dist/api/webhosting/v1/api.gen.cjs +40 -8
- package/dist/api/webhosting/v1/api.gen.d.ts +9 -9
- package/dist/api/webhosting/v1/api.gen.js +40 -8
- package/dist/api/webhosting/v1/types.gen.d.ts +36 -36
- package/dist/api/webhosting/v1alpha1/api.gen.cjs +5 -1
- package/dist/api/webhosting/v1alpha1/api.gen.d.ts +3 -3
- package/dist/api/webhosting/v1alpha1/api.gen.js +5 -1
- package/dist/api/webhosting/v1alpha1/types.gen.d.ts +19 -19
- 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,11 +1,11 @@
|
|
|
1
|
-
import type { Zone } from '../../../bridge';
|
|
1
|
+
import type { Zone as ScwZone } from '../../../bridge';
|
|
2
2
|
import type { Arch, BootType, Image, PlacementGroup, PrivateNIC, SecurityGroup, SecurityGroupPolicy, SecurityGroupRule, SecurityGroupRuleAction, SecurityGroupRuleDirection, SecurityGroupRuleProtocol, SecurityGroupSummary, Server, ServerAction, ServerIp, ServerIpv6, ServerLocation, ServerMaintenance, ServerState, ServerSummary, Snapshot, SnapshotBaseVolume, SnapshotState, Volume, VolumeVolumeType } from './types.gen';
|
|
3
3
|
export interface SetImageResponse {
|
|
4
4
|
image?: Image;
|
|
5
5
|
}
|
|
6
6
|
export type SetSecurityGroupRequest = {
|
|
7
7
|
/** Zone to target. If none is passed will use default zone from the config. */
|
|
8
|
-
zone?:
|
|
8
|
+
zone?: ScwZone;
|
|
9
9
|
/** UUID of the security group. */
|
|
10
10
|
id: string;
|
|
11
11
|
/** Name of the security group. */
|
|
@@ -45,7 +45,7 @@ export interface SetSecurityGroupResponse {
|
|
|
45
45
|
}
|
|
46
46
|
export type SetSecurityGroupRuleRequest = {
|
|
47
47
|
/** Zone to target. If none is passed will use default zone from the config. */
|
|
48
|
-
zone?:
|
|
48
|
+
zone?: ScwZone;
|
|
49
49
|
securityGroupId: string;
|
|
50
50
|
securityGroupRuleId: string;
|
|
51
51
|
id: string;
|
|
@@ -63,7 +63,7 @@ export interface SetSecurityGroupRuleResponse {
|
|
|
63
63
|
}
|
|
64
64
|
export type SetServerRequest = {
|
|
65
65
|
/** Zone to target. If none is passed will use default zone from the config. */
|
|
66
|
-
zone?:
|
|
66
|
+
zone?: ScwZone;
|
|
67
67
|
/** Instance unique ID. */
|
|
68
68
|
id: string;
|
|
69
69
|
/** Instance name. */
|
|
@@ -153,7 +153,7 @@ export interface SetServerResponse {
|
|
|
153
153
|
}
|
|
154
154
|
export type SetSnapshotRequest = {
|
|
155
155
|
/** Zone to target. If none is passed will use default zone from the config. */
|
|
156
|
-
zone?:
|
|
156
|
+
zone?: ScwZone;
|
|
157
157
|
snapshotId: string;
|
|
158
158
|
id: string;
|
|
159
159
|
name: string;
|
|
@@ -10,7 +10,11 @@ const jsonContentHeaders = {
|
|
|
10
10
|
};
|
|
11
11
|
class API extends api.API {
|
|
12
12
|
/** Lists the available regions of the API. */
|
|
13
|
-
static LOCALITIES = [
|
|
13
|
+
static LOCALITIES = [
|
|
14
|
+
"fr-par",
|
|
15
|
+
"nl-ams",
|
|
16
|
+
"pl-waw"
|
|
17
|
+
];
|
|
14
18
|
pageOfListPartners = (request = {}) => this.client.fetch(
|
|
15
19
|
{
|
|
16
20
|
method: "GET",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
|
-
import type { Region } from '../../../bridge';
|
|
2
|
+
import type { Region as ScwRegion } from '../../../bridge';
|
|
3
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
4
|
/**
|
|
5
5
|
* InterLink API.
|
|
@@ -9,7 +9,7 @@ import type { AttachRoutingPolicyRequest, AttachVpcRequest, CreateLinkRequest, C
|
|
|
9
9
|
*/
|
|
10
10
|
export declare class API extends ParentAPI {
|
|
11
11
|
/** Lists the available regions of the API. */
|
|
12
|
-
static readonly LOCALITIES:
|
|
12
|
+
static readonly LOCALITIES: ScwRegion[];
|
|
13
13
|
protected pageOfListPartners: (request?: Readonly<ListPartnersRequest>) => Promise<ListPartnersResponse>;
|
|
14
14
|
/**
|
|
15
15
|
* List available partners. List all available partners. By default, the
|
|
@@ -8,7 +8,11 @@ const jsonContentHeaders = {
|
|
|
8
8
|
};
|
|
9
9
|
class API extends API$1 {
|
|
10
10
|
/** Lists the available regions of the API. */
|
|
11
|
-
static LOCALITIES = [
|
|
11
|
+
static LOCALITIES = [
|
|
12
|
+
"fr-par",
|
|
13
|
+
"nl-ams",
|
|
14
|
+
"pl-waw"
|
|
15
|
+
];
|
|
12
16
|
pageOfListPartners = (request = {}) => this.client.fetch(
|
|
13
17
|
{
|
|
14
18
|
method: "GET",
|
|
@@ -14,6 +14,7 @@ const unmarshalLink = (data) => {
|
|
|
14
14
|
bgpV4Status: data.bgp_v4_status,
|
|
15
15
|
bgpV6Status: data.bgp_v6_status,
|
|
16
16
|
createdAt: marshalling.unmarshalDate(data.created_at),
|
|
17
|
+
disapprovedReason: data.disapproved_reason,
|
|
17
18
|
enableRoutePropagation: data.enable_route_propagation,
|
|
18
19
|
id: data.id,
|
|
19
20
|
name: data.name,
|
|
@@ -12,6 +12,7 @@ const unmarshalLink = (data) => {
|
|
|
12
12
|
bgpV4Status: data.bgp_v4_status,
|
|
13
13
|
bgpV6Status: data.bgp_v6_status,
|
|
14
14
|
createdAt: unmarshalDate(data.created_at),
|
|
15
|
+
disapprovedReason: data.disapproved_reason,
|
|
15
16
|
enableRoutePropagation: data.enable_route_propagation,
|
|
16
17
|
id: data.id,
|
|
17
18
|
name: data.name,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Region } from '../../../bridge';
|
|
1
|
+
import type { Region as ScwRegion } from '../../../bridge';
|
|
2
2
|
export type BgpStatus = 'unknown_bgp_status' | 'up' | 'down';
|
|
3
3
|
export type LinkStatus = 'unknown_link_status' | 'configuring' | 'failed' | 'requested' | 'refused' | 'expired' | 'provisioning' | 'active' | 'limited_connectivity' | 'all_down' | 'deprovisioning' | 'deleted' | 'locked';
|
|
4
4
|
export type ListLinksRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc' | 'status_asc' | 'status_desc';
|
|
@@ -43,8 +43,13 @@ export interface Link {
|
|
|
43
43
|
updatedAt?: Date;
|
|
44
44
|
/** Used to identify a link from a user or partner's point of view. */
|
|
45
45
|
pairingKey: string;
|
|
46
|
+
/**
|
|
47
|
+
* Reason given by partner to explain why they did not approve the request for
|
|
48
|
+
* a hosted link.
|
|
49
|
+
*/
|
|
50
|
+
disapprovedReason?: string;
|
|
46
51
|
/** Region of the link. */
|
|
47
|
-
region:
|
|
52
|
+
region: ScwRegion;
|
|
48
53
|
}
|
|
49
54
|
export interface Partner {
|
|
50
55
|
/** Unique identifier of the partner. */
|
|
@@ -84,7 +89,7 @@ export interface Pop {
|
|
|
84
89
|
*/
|
|
85
90
|
availableLinkBandwidthsMbps: number[];
|
|
86
91
|
/** Region of the PoP. */
|
|
87
|
-
region:
|
|
92
|
+
region: ScwRegion;
|
|
88
93
|
}
|
|
89
94
|
export interface RoutingPolicy {
|
|
90
95
|
/** Unique identifier of the routing policy. */
|
|
@@ -109,14 +114,14 @@ export interface RoutingPolicy {
|
|
|
109
114
|
/** Last modification date of the routing policy. */
|
|
110
115
|
updatedAt?: Date;
|
|
111
116
|
/** Region of the routing policy. */
|
|
112
|
-
region:
|
|
117
|
+
region: ScwRegion;
|
|
113
118
|
}
|
|
114
119
|
export type AttachRoutingPolicyRequest = {
|
|
115
120
|
/**
|
|
116
121
|
* Region to target. If none is passed will use default region from the
|
|
117
122
|
* config.
|
|
118
123
|
*/
|
|
119
|
-
region?:
|
|
124
|
+
region?: ScwRegion;
|
|
120
125
|
/** ID of the link to attach a routing policy to. */
|
|
121
126
|
linkId: string;
|
|
122
127
|
/** ID of the routing policy to be attached. */
|
|
@@ -127,7 +132,7 @@ export type AttachVpcRequest = {
|
|
|
127
132
|
* Region to target. If none is passed will use default region from the
|
|
128
133
|
* config.
|
|
129
134
|
*/
|
|
130
|
-
region?:
|
|
135
|
+
region?: ScwRegion;
|
|
131
136
|
/** ID of the link to attach VPC to. */
|
|
132
137
|
linkId: string;
|
|
133
138
|
/** ID of the VPC to attach. */
|
|
@@ -138,7 +143,7 @@ export type CreateLinkRequest = {
|
|
|
138
143
|
* Region to target. If none is passed will use default region from the
|
|
139
144
|
* config.
|
|
140
145
|
*/
|
|
141
|
-
region?:
|
|
146
|
+
region?: ScwRegion;
|
|
142
147
|
/** ID of the Project to create the link in. */
|
|
143
148
|
projectId?: string;
|
|
144
149
|
/** Name of the link. */
|
|
@@ -191,7 +196,7 @@ export type CreateRoutingPolicyRequest = {
|
|
|
191
196
|
* Region to target. If none is passed will use default region from the
|
|
192
197
|
* config.
|
|
193
198
|
*/
|
|
194
|
-
region?:
|
|
199
|
+
region?: ScwRegion;
|
|
195
200
|
/** ID of the Project to create the routing policy in. */
|
|
196
201
|
projectId?: string;
|
|
197
202
|
/** Name of the routing policy. */
|
|
@@ -211,7 +216,7 @@ export type DeleteLinkRequest = {
|
|
|
211
216
|
* Region to target. If none is passed will use default region from the
|
|
212
217
|
* config.
|
|
213
218
|
*/
|
|
214
|
-
region?:
|
|
219
|
+
region?: ScwRegion;
|
|
215
220
|
/** ID of the link to delete. */
|
|
216
221
|
linkId: string;
|
|
217
222
|
};
|
|
@@ -220,7 +225,7 @@ export type DeleteRoutingPolicyRequest = {
|
|
|
220
225
|
* Region to target. If none is passed will use default region from the
|
|
221
226
|
* config.
|
|
222
227
|
*/
|
|
223
|
-
region?:
|
|
228
|
+
region?: ScwRegion;
|
|
224
229
|
/** ID of the routing policy to delete. */
|
|
225
230
|
routingPolicyId: string;
|
|
226
231
|
};
|
|
@@ -229,7 +234,7 @@ export type DetachRoutingPolicyRequest = {
|
|
|
229
234
|
* Region to target. If none is passed will use default region from the
|
|
230
235
|
* config.
|
|
231
236
|
*/
|
|
232
|
-
region?:
|
|
237
|
+
region?: ScwRegion;
|
|
233
238
|
/** ID of the link to detach a routing policy from. */
|
|
234
239
|
linkId: string;
|
|
235
240
|
};
|
|
@@ -238,7 +243,7 @@ export type DetachVpcRequest = {
|
|
|
238
243
|
* Region to target. If none is passed will use default region from the
|
|
239
244
|
* config.
|
|
240
245
|
*/
|
|
241
|
-
region?:
|
|
246
|
+
region?: ScwRegion;
|
|
242
247
|
/** ID of the link to detach the VPC from. */
|
|
243
248
|
linkId: string;
|
|
244
249
|
};
|
|
@@ -247,7 +252,7 @@ export type DisableRoutePropagationRequest = {
|
|
|
247
252
|
* Region to target. If none is passed will use default region from the
|
|
248
253
|
* config.
|
|
249
254
|
*/
|
|
250
|
-
region?:
|
|
255
|
+
region?: ScwRegion;
|
|
251
256
|
/** ID of the link on which to disable route propagation. */
|
|
252
257
|
linkId: string;
|
|
253
258
|
};
|
|
@@ -256,7 +261,7 @@ export type EnableRoutePropagationRequest = {
|
|
|
256
261
|
* Region to target. If none is passed will use default region from the
|
|
257
262
|
* config.
|
|
258
263
|
*/
|
|
259
|
-
region?:
|
|
264
|
+
region?: ScwRegion;
|
|
260
265
|
/** ID of the link on which to enable route propagation. */
|
|
261
266
|
linkId: string;
|
|
262
267
|
};
|
|
@@ -265,7 +270,7 @@ export type GetLinkRequest = {
|
|
|
265
270
|
* Region to target. If none is passed will use default region from the
|
|
266
271
|
* config.
|
|
267
272
|
*/
|
|
268
|
-
region?:
|
|
273
|
+
region?: ScwRegion;
|
|
269
274
|
/** ID of the link to get. */
|
|
270
275
|
linkId: string;
|
|
271
276
|
};
|
|
@@ -274,7 +279,7 @@ export type GetPartnerRequest = {
|
|
|
274
279
|
* Region to target. If none is passed will use default region from the
|
|
275
280
|
* config.
|
|
276
281
|
*/
|
|
277
|
-
region?:
|
|
282
|
+
region?: ScwRegion;
|
|
278
283
|
/** ID of partner to get. */
|
|
279
284
|
partnerId: string;
|
|
280
285
|
};
|
|
@@ -283,7 +288,7 @@ export type GetPopRequest = {
|
|
|
283
288
|
* Region to target. If none is passed will use default region from the
|
|
284
289
|
* config.
|
|
285
290
|
*/
|
|
286
|
-
region?:
|
|
291
|
+
region?: ScwRegion;
|
|
287
292
|
/** ID of PoP to get. */
|
|
288
293
|
popId: string;
|
|
289
294
|
};
|
|
@@ -292,7 +297,7 @@ export type GetRoutingPolicyRequest = {
|
|
|
292
297
|
* Region to target. If none is passed will use default region from the
|
|
293
298
|
* config.
|
|
294
299
|
*/
|
|
295
|
-
region?:
|
|
300
|
+
region?: ScwRegion;
|
|
296
301
|
/** ID of the routing policy to get. */
|
|
297
302
|
routingPolicyId: string;
|
|
298
303
|
};
|
|
@@ -301,7 +306,7 @@ export type ListLinksRequest = {
|
|
|
301
306
|
* Region to target. If none is passed will use default region from the
|
|
302
307
|
* config.
|
|
303
308
|
*/
|
|
304
|
-
region?:
|
|
309
|
+
region?: ScwRegion;
|
|
305
310
|
/** Order in which to return results. */
|
|
306
311
|
orderBy?: ListLinksRequestOrderBy;
|
|
307
312
|
/** Page number to return. */
|
|
@@ -346,7 +351,7 @@ export type ListPartnersRequest = {
|
|
|
346
351
|
* Region to target. If none is passed will use default region from the
|
|
347
352
|
* config.
|
|
348
353
|
*/
|
|
349
|
-
region?:
|
|
354
|
+
region?: ScwRegion;
|
|
350
355
|
/** Order in which to return results. */
|
|
351
356
|
orderBy?: ListPartnersRequestOrderBy;
|
|
352
357
|
/** Page number to return. */
|
|
@@ -367,7 +372,7 @@ export type ListPopsRequest = {
|
|
|
367
372
|
* Region to target. If none is passed will use default region from the
|
|
368
373
|
* config.
|
|
369
374
|
*/
|
|
370
|
-
region?:
|
|
375
|
+
region?: ScwRegion;
|
|
371
376
|
/** Order in which to return results. */
|
|
372
377
|
orderBy?: ListPopsRequestOrderBy;
|
|
373
378
|
/** Page number to return. */
|
|
@@ -397,7 +402,7 @@ export type ListRoutingPoliciesRequest = {
|
|
|
397
402
|
* Region to target. If none is passed will use default region from the
|
|
398
403
|
* config.
|
|
399
404
|
*/
|
|
400
|
-
region?:
|
|
405
|
+
region?: ScwRegion;
|
|
401
406
|
/** Order in which to return results. */
|
|
402
407
|
orderBy?: ListRoutingPoliciesRequestOrderBy;
|
|
403
408
|
/** Page number to return. */
|
|
@@ -422,7 +427,7 @@ export type UpdateLinkRequest = {
|
|
|
422
427
|
* Region to target. If none is passed will use default region from the
|
|
423
428
|
* config.
|
|
424
429
|
*/
|
|
425
|
-
region?:
|
|
430
|
+
region?: ScwRegion;
|
|
426
431
|
/** ID of the link to update. */
|
|
427
432
|
linkId: string;
|
|
428
433
|
/** Name of the link. */
|
|
@@ -435,7 +440,7 @@ export type UpdateRoutingPolicyRequest = {
|
|
|
435
440
|
* Region to target. If none is passed will use default region from the
|
|
436
441
|
* config.
|
|
437
442
|
*/
|
|
438
|
-
region?:
|
|
443
|
+
region?: ScwRegion;
|
|
439
444
|
/** ID of the routing policy to update. */
|
|
440
445
|
routingPolicyId: string;
|
|
441
446
|
/** Name of the routing policy. */
|
|
@@ -10,7 +10,11 @@ const jsonContentHeaders = {
|
|
|
10
10
|
};
|
|
11
11
|
class API extends api.API {
|
|
12
12
|
/** Lists the available regions of the API. */
|
|
13
|
-
static LOCALITIES = [
|
|
13
|
+
static LOCALITIES = [
|
|
14
|
+
"fr-par",
|
|
15
|
+
"nl-ams",
|
|
16
|
+
"pl-waw"
|
|
17
|
+
];
|
|
14
18
|
pageOfListVPCs = (request = {}) => this.client.fetch(
|
|
15
19
|
{
|
|
16
20
|
method: "GET",
|
|
@@ -192,26 +196,6 @@ class API extends api.API {
|
|
|
192
196
|
method: "DELETE",
|
|
193
197
|
path: `/vpc/v2/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/${marshalling.validatePathParam("privateNetworkId", request.privateNetworkId)}`
|
|
194
198
|
});
|
|
195
|
-
/**
|
|
196
|
-
* Migrate Private Networks from zoned to regional. Transform multiple
|
|
197
|
-
* existing zoned Private Networks (scoped to a single Availability Zone) into
|
|
198
|
-
* regional Private Networks, scoped to an entire region. You can transform
|
|
199
|
-
* one or many Private Networks (specified by their Private Network IDs)
|
|
200
|
-
* within a single Scaleway Organization or Project, with the same call.
|
|
201
|
-
*
|
|
202
|
-
* @param request - The request {@link MigrateZonalPrivateNetworksRequest}
|
|
203
|
-
*/
|
|
204
|
-
migrateZonalPrivateNetworks = (request = {}) => this.client.fetch({
|
|
205
|
-
body: JSON.stringify(
|
|
206
|
-
marshalling_gen.marshalMigrateZonalPrivateNetworksRequest(
|
|
207
|
-
request,
|
|
208
|
-
this.client.settings
|
|
209
|
-
)
|
|
210
|
-
),
|
|
211
|
-
headers: jsonContentHeaders,
|
|
212
|
-
method: "POST",
|
|
213
|
-
path: `/vpc/v2/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/migrate-zonal`
|
|
214
|
-
});
|
|
215
199
|
/**
|
|
216
200
|
* Enable DHCP on a Private Network. Enable DHCP managed on an existing
|
|
217
201
|
* Private Network. Note that you will not be able to deactivate it
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
|
-
import type { Region } from '../../../bridge';
|
|
3
|
-
import type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCRequest, DeletePrivateNetworkRequest, DeleteRouteRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, DeleteVPCRequest, EnableDHCPRequest, EnableRoutingRequest, GetPrivateNetworkRequest, GetRouteRequest, GetVPCRequest, ListPrivateNetworksRequest, ListPrivateNetworksResponse, ListSubnetsRequest, ListSubnetsResponse, ListVPCsRequest, ListVPCsResponse,
|
|
2
|
+
import type { Region as ScwRegion } from '../../../bridge';
|
|
3
|
+
import type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCRequest, DeletePrivateNetworkRequest, DeleteRouteRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, DeleteVPCRequest, EnableDHCPRequest, EnableRoutingRequest, GetPrivateNetworkRequest, GetRouteRequest, GetVPCRequest, ListPrivateNetworksRequest, ListPrivateNetworksResponse, ListSubnetsRequest, ListSubnetsResponse, ListVPCsRequest, ListVPCsResponse, PrivateNetwork, Route, SetSubnetsRequest, SetSubnetsResponse, UpdatePrivateNetworkRequest, UpdateRouteRequest, UpdateVPCRequest, VPC } from './types.gen';
|
|
4
4
|
/**
|
|
5
5
|
* VPC API.
|
|
6
6
|
*
|
|
@@ -9,7 +9,7 @@ import type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest
|
|
|
9
9
|
*/
|
|
10
10
|
export declare class API extends ParentAPI {
|
|
11
11
|
/** Lists the available regions of the API. */
|
|
12
|
-
static readonly LOCALITIES:
|
|
12
|
+
static readonly LOCALITIES: ScwRegion[];
|
|
13
13
|
protected pageOfListVPCs: (request?: Readonly<ListVPCsRequest>) => Promise<ListVPCsResponse>;
|
|
14
14
|
/**
|
|
15
15
|
* List VPCs. List existing VPCs in the specified region.
|
|
@@ -94,16 +94,6 @@ export declare class API extends ParentAPI {
|
|
|
94
94
|
* @param request - The request {@link DeletePrivateNetworkRequest}
|
|
95
95
|
*/
|
|
96
96
|
deletePrivateNetwork: (request: Readonly<DeletePrivateNetworkRequest>) => Promise<void>;
|
|
97
|
-
/**
|
|
98
|
-
* Migrate Private Networks from zoned to regional. Transform multiple
|
|
99
|
-
* existing zoned Private Networks (scoped to a single Availability Zone) into
|
|
100
|
-
* regional Private Networks, scoped to an entire region. You can transform
|
|
101
|
-
* one or many Private Networks (specified by their Private Network IDs)
|
|
102
|
-
* within a single Scaleway Organization or Project, with the same call.
|
|
103
|
-
*
|
|
104
|
-
* @param request - The request {@link MigrateZonalPrivateNetworksRequest}
|
|
105
|
-
*/
|
|
106
|
-
migrateZonalPrivateNetworks: (request?: Readonly<MigrateZonalPrivateNetworksRequest>) => Promise<void>;
|
|
107
97
|
/**
|
|
108
98
|
* Enable DHCP on a Private Network. Enable DHCP managed on an existing
|
|
109
99
|
* Private Network. Note that you will not be able to deactivate it
|
|
@@ -2,13 +2,17 @@ import { API as API$1 } from "../../../scw/api.js";
|
|
|
2
2
|
import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
|
|
3
3
|
import "../../../vendor/base64/index.js";
|
|
4
4
|
import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
|
|
5
|
-
import { unmarshalListVPCsResponse, marshalCreateVPCRequest, unmarshalVPC, marshalUpdateVPCRequest, unmarshalListPrivateNetworksResponse, marshalCreatePrivateNetworkRequest, unmarshalPrivateNetwork, marshalUpdatePrivateNetworkRequest,
|
|
5
|
+
import { unmarshalListVPCsResponse, marshalCreateVPCRequest, unmarshalVPC, marshalUpdateVPCRequest, unmarshalListPrivateNetworksResponse, marshalCreatePrivateNetworkRequest, unmarshalPrivateNetwork, marshalUpdatePrivateNetworkRequest, unmarshalListSubnetsResponse, marshalSetSubnetsRequest, unmarshalSetSubnetsResponse, marshalAddSubnetsRequest, unmarshalAddSubnetsResponse, marshalDeleteSubnetsRequest, unmarshalDeleteSubnetsResponse, marshalCreateRouteRequest, unmarshalRoute, marshalUpdateRouteRequest } from "./marshalling.gen.js";
|
|
6
6
|
const jsonContentHeaders = {
|
|
7
7
|
"Content-Type": "application/json; charset=utf-8"
|
|
8
8
|
};
|
|
9
9
|
class API extends API$1 {
|
|
10
10
|
/** Lists the available regions of the API. */
|
|
11
|
-
static LOCALITIES = [
|
|
11
|
+
static LOCALITIES = [
|
|
12
|
+
"fr-par",
|
|
13
|
+
"nl-ams",
|
|
14
|
+
"pl-waw"
|
|
15
|
+
];
|
|
12
16
|
pageOfListVPCs = (request = {}) => this.client.fetch(
|
|
13
17
|
{
|
|
14
18
|
method: "GET",
|
|
@@ -190,26 +194,6 @@ class API extends API$1 {
|
|
|
190
194
|
method: "DELETE",
|
|
191
195
|
path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}`
|
|
192
196
|
});
|
|
193
|
-
/**
|
|
194
|
-
* Migrate Private Networks from zoned to regional. Transform multiple
|
|
195
|
-
* existing zoned Private Networks (scoped to a single Availability Zone) into
|
|
196
|
-
* regional Private Networks, scoped to an entire region. You can transform
|
|
197
|
-
* one or many Private Networks (specified by their Private Network IDs)
|
|
198
|
-
* within a single Scaleway Organization or Project, with the same call.
|
|
199
|
-
*
|
|
200
|
-
* @param request - The request {@link MigrateZonalPrivateNetworksRequest}
|
|
201
|
-
*/
|
|
202
|
-
migrateZonalPrivateNetworks = (request = {}) => this.client.fetch({
|
|
203
|
-
body: JSON.stringify(
|
|
204
|
-
marshalMigrateZonalPrivateNetworksRequest(
|
|
205
|
-
request,
|
|
206
|
-
this.client.settings
|
|
207
|
-
)
|
|
208
|
-
),
|
|
209
|
-
headers: jsonContentHeaders,
|
|
210
|
-
method: "POST",
|
|
211
|
-
path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/migrate-zonal`
|
|
212
|
-
});
|
|
213
197
|
/**
|
|
214
198
|
* Enable DHCP on a Private Network. Enable DHCP managed on an existing
|
|
215
199
|
* Private Network. Note that you will not be able to deactivate it
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { API } from './api.gen.js';
|
|
2
|
-
export type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCRequest, DeletePrivateNetworkRequest, DeleteRouteRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, DeleteVPCRequest, EnableDHCPRequest, EnableRoutingRequest, GetPrivateNetworkRequest, GetRouteRequest, GetVPCRequest, ListPrivateNetworksRequest, ListPrivateNetworksRequestOrderBy, ListPrivateNetworksResponse, ListSubnetsRequest, ListSubnetsRequestOrderBy, ListSubnetsResponse, ListVPCsRequest, ListVPCsRequestOrderBy, ListVPCsResponse,
|
|
2
|
+
export type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCRequest, DeletePrivateNetworkRequest, DeleteRouteRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, DeleteVPCRequest, EnableDHCPRequest, EnableRoutingRequest, GetPrivateNetworkRequest, GetRouteRequest, GetVPCRequest, ListPrivateNetworksRequest, ListPrivateNetworksRequestOrderBy, ListPrivateNetworksResponse, ListSubnetsRequest, ListSubnetsRequestOrderBy, ListSubnetsResponse, ListVPCsRequest, ListVPCsRequestOrderBy, ListVPCsResponse, PrivateNetwork, Route, SetSubnetsRequest, SetSubnetsResponse, Subnet, UpdatePrivateNetworkRequest, UpdateRouteRequest, UpdateVPCRequest, VPC, } from './types.gen';
|
|
3
3
|
export * as ValidationRules from './validation-rules.gen.js';
|
|
@@ -173,21 +173,6 @@ const marshalCreateVPCRequest = (request, defaults) => ({
|
|
|
173
173
|
const marshalDeleteSubnetsRequest = (request, defaults) => ({
|
|
174
174
|
subnets: request.subnets
|
|
175
175
|
});
|
|
176
|
-
const marshalMigrateZonalPrivateNetworksRequest = (request, defaults) => ({
|
|
177
|
-
private_network_ids: request.privateNetworkIds,
|
|
178
|
-
...marshalling.resolveOneOf([
|
|
179
|
-
{
|
|
180
|
-
default: defaults.defaultOrganizationId,
|
|
181
|
-
param: "organization_id",
|
|
182
|
-
value: request.organizationId
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
default: defaults.defaultProjectId,
|
|
186
|
-
param: "project_id",
|
|
187
|
-
value: request.projectId
|
|
188
|
-
}
|
|
189
|
-
])
|
|
190
|
-
});
|
|
191
176
|
const marshalSetSubnetsRequest = (request, defaults) => ({
|
|
192
177
|
subnets: request.subnets
|
|
193
178
|
});
|
|
@@ -211,7 +196,6 @@ exports.marshalCreatePrivateNetworkRequest = marshalCreatePrivateNetworkRequest;
|
|
|
211
196
|
exports.marshalCreateRouteRequest = marshalCreateRouteRequest;
|
|
212
197
|
exports.marshalCreateVPCRequest = marshalCreateVPCRequest;
|
|
213
198
|
exports.marshalDeleteSubnetsRequest = marshalDeleteSubnetsRequest;
|
|
214
|
-
exports.marshalMigrateZonalPrivateNetworksRequest = marshalMigrateZonalPrivateNetworksRequest;
|
|
215
199
|
exports.marshalSetSubnetsRequest = marshalSetSubnetsRequest;
|
|
216
200
|
exports.marshalUpdatePrivateNetworkRequest = marshalUpdatePrivateNetworkRequest;
|
|
217
201
|
exports.marshalUpdateRouteRequest = marshalUpdateRouteRequest;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultValues } from '../../../bridge';
|
|
2
|
-
import type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, ListPrivateNetworksResponse, ListSubnetsResponse, ListVPCsResponse,
|
|
2
|
+
import type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, ListPrivateNetworksResponse, ListSubnetsResponse, ListVPCsResponse, PrivateNetwork, Route, SetSubnetsRequest, SetSubnetsResponse, UpdatePrivateNetworkRequest, UpdateRouteRequest, UpdateVPCRequest, VPC } from './types.gen';
|
|
3
3
|
export declare const unmarshalPrivateNetwork: (data: unknown) => PrivateNetwork;
|
|
4
4
|
export declare const unmarshalRoute: (data: unknown) => Route;
|
|
5
5
|
export declare const unmarshalVPC: (data: unknown) => VPC;
|
|
@@ -14,7 +14,6 @@ export declare const marshalCreatePrivateNetworkRequest: (request: CreatePrivate
|
|
|
14
14
|
export declare const marshalCreateRouteRequest: (request: CreateRouteRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
15
15
|
export declare const marshalCreateVPCRequest: (request: CreateVPCRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
16
16
|
export declare const marshalDeleteSubnetsRequest: (request: DeleteSubnetsRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
17
|
-
export declare const marshalMigrateZonalPrivateNetworksRequest: (request: MigrateZonalPrivateNetworksRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
18
17
|
export declare const marshalSetSubnetsRequest: (request: SetSubnetsRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
19
18
|
export declare const marshalUpdatePrivateNetworkRequest: (request: UpdatePrivateNetworkRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
20
19
|
export declare const marshalUpdateRouteRequest: (request: UpdateRouteRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import randomName from "@scaleway/random-name";
|
|
2
2
|
import { isJSONObject } from "../../../helpers/json.js";
|
|
3
|
-
import { unmarshalDate, unmarshalArrayOfObject
|
|
3
|
+
import { unmarshalDate, unmarshalArrayOfObject } from "../../../helpers/marshalling.js";
|
|
4
4
|
import "../../../vendor/base64/index.js";
|
|
5
5
|
const unmarshalSubnet = (data) => {
|
|
6
6
|
if (!isJSONObject(data)) {
|
|
@@ -171,21 +171,6 @@ const marshalCreateVPCRequest = (request, defaults) => ({
|
|
|
171
171
|
const marshalDeleteSubnetsRequest = (request, defaults) => ({
|
|
172
172
|
subnets: request.subnets
|
|
173
173
|
});
|
|
174
|
-
const marshalMigrateZonalPrivateNetworksRequest = (request, defaults) => ({
|
|
175
|
-
private_network_ids: request.privateNetworkIds,
|
|
176
|
-
...resolveOneOf([
|
|
177
|
-
{
|
|
178
|
-
default: defaults.defaultOrganizationId,
|
|
179
|
-
param: "organization_id",
|
|
180
|
-
value: request.organizationId
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
default: defaults.defaultProjectId,
|
|
184
|
-
param: "project_id",
|
|
185
|
-
value: request.projectId
|
|
186
|
-
}
|
|
187
|
-
])
|
|
188
|
-
});
|
|
189
174
|
const marshalSetSubnetsRequest = (request, defaults) => ({
|
|
190
175
|
subnets: request.subnets
|
|
191
176
|
});
|
|
@@ -210,7 +195,6 @@ export {
|
|
|
210
195
|
marshalCreateRouteRequest,
|
|
211
196
|
marshalCreateVPCRequest,
|
|
212
197
|
marshalDeleteSubnetsRequest,
|
|
213
|
-
marshalMigrateZonalPrivateNetworksRequest,
|
|
214
198
|
marshalSetSubnetsRequest,
|
|
215
199
|
marshalUpdatePrivateNetworkRequest,
|
|
216
200
|
marshalUpdateRouteRequest,
|