@scaleway/sdk-applesilicon 1.2.0 → 1.3.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/v1alpha1/api.gen.cjs +17 -0
- package/dist/v1alpha1/api.gen.d.ts +9 -2
- package/dist/v1alpha1/api.gen.js +18 -1
- package/dist/v1alpha1/index.gen.cjs +2 -0
- package/dist/v1alpha1/index.gen.d.ts +1 -1
- package/dist/v1alpha1/index.gen.js +3 -1
- package/dist/v1alpha1/marshalling.gen.cjs +28 -0
- package/dist/v1alpha1/marshalling.gen.d.ts +3 -1
- package/dist/v1alpha1/marshalling.gen.js +28 -0
- package/dist/v1alpha1/types.gen.d.ts +43 -0
- package/package.json +6 -6
|
@@ -57,6 +57,23 @@ class API extends sdkClient.API {
|
|
|
57
57
|
},
|
|
58
58
|
marshalling_gen.unmarshalServer
|
|
59
59
|
);
|
|
60
|
+
/**
|
|
61
|
+
* Create multiple servers atomically. Create multiple servers in the targeted zone specifying their configurations. If the request cannot entirely be fulfilled, no servers are created.
|
|
62
|
+
*
|
|
63
|
+
* @param request - The request {@link BatchCreateServersRequest}
|
|
64
|
+
* @returns A Promise of BatchCreateServersResponse
|
|
65
|
+
*/
|
|
66
|
+
batchCreateServers = (request) => this.client.fetch(
|
|
67
|
+
{
|
|
68
|
+
body: JSON.stringify(
|
|
69
|
+
marshalling_gen.marshalBatchCreateServersRequest(request, this.client.settings)
|
|
70
|
+
),
|
|
71
|
+
headers: jsonContentHeaders,
|
|
72
|
+
method: "POST",
|
|
73
|
+
path: `/apple-silicon/v1alpha1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/batch-create-servers`
|
|
74
|
+
},
|
|
75
|
+
marshalling_gen.unmarshalBatchCreateServersResponse
|
|
76
|
+
);
|
|
60
77
|
pageOfListServers = (request = {}) => this.client.fetch(
|
|
61
78
|
{
|
|
62
79
|
method: "GET",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
2
1
|
import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
|
|
3
|
-
import
|
|
2
|
+
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
3
|
+
import type { BatchCreateServersRequest, BatchCreateServersResponse, ConnectivityDiagnostic, CreateServerRequest, DeleteServerRequest, GetConnectivityDiagnosticRequest, GetOSRequest, GetServerRequest, GetServerTypeRequest, ListOSRequest, ListOSResponse, ListServerPrivateNetworksResponse, ListServersRequest, ListServersResponse, ListServerTypesRequest, ListServerTypesResponse, OS, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiDeleteServerPrivateNetworkRequest, PrivateNetworkApiGetServerPrivateNetworkRequest, PrivateNetworkApiListServerPrivateNetworksRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, RebootServerRequest, ReinstallServerRequest, Server, ServerPrivateNetwork, ServerType, SetServerPrivateNetworksResponse, StartConnectivityDiagnosticRequest, StartConnectivityDiagnosticResponse, UpdateServerRequest } from './types.gen';
|
|
4
4
|
/**
|
|
5
5
|
* Apple silicon API.
|
|
6
6
|
|
|
@@ -33,6 +33,13 @@ export declare class API extends ParentAPI {
|
|
|
33
33
|
* @returns A Promise of Server
|
|
34
34
|
*/
|
|
35
35
|
createServer: (request: Readonly<CreateServerRequest>) => Promise<Server>;
|
|
36
|
+
/**
|
|
37
|
+
* Create multiple servers atomically. Create multiple servers in the targeted zone specifying their configurations. If the request cannot entirely be fulfilled, no servers are created.
|
|
38
|
+
*
|
|
39
|
+
* @param request - The request {@link BatchCreateServersRequest}
|
|
40
|
+
* @returns A Promise of BatchCreateServersResponse
|
|
41
|
+
*/
|
|
42
|
+
batchCreateServers: (request: Readonly<BatchCreateServersRequest>) => Promise<BatchCreateServersResponse>;
|
|
36
43
|
protected pageOfListServers: (request?: Readonly<ListServersRequest>) => Promise<ListServersResponse>;
|
|
37
44
|
/**
|
|
38
45
|
* List all servers. List all servers in the specified zone. By default, returned servers in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
|
package/dist/v1alpha1/api.gen.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as API$1, toApiLocality, validatePathParam, urlParams, enrichForPagination, waitForResource } from "@scaleway/sdk-client";
|
|
2
2
|
import { SERVER_TRANSIENT_STATUSES, SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
|
-
import { unmarshalListServerTypesResponse, unmarshalServerType, marshalCreateServerRequest, unmarshalServer, unmarshalListServersResponse, unmarshalListOSResponse, unmarshalOS, marshalUpdateServerRequest, marshalReinstallServerRequest, marshalStartConnectivityDiagnosticRequest, unmarshalStartConnectivityDiagnosticResponse, unmarshalConnectivityDiagnostic, unmarshalServerPrivateNetwork, marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, unmarshalSetServerPrivateNetworksResponse, unmarshalListServerPrivateNetworksResponse } from "./marshalling.gen.js";
|
|
3
|
+
import { unmarshalListServerTypesResponse, unmarshalServerType, marshalCreateServerRequest, unmarshalServer, marshalBatchCreateServersRequest, unmarshalBatchCreateServersResponse, unmarshalListServersResponse, unmarshalListOSResponse, unmarshalOS, marshalUpdateServerRequest, marshalReinstallServerRequest, marshalStartConnectivityDiagnosticRequest, unmarshalStartConnectivityDiagnosticResponse, unmarshalConnectivityDiagnostic, unmarshalServerPrivateNetwork, marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, unmarshalSetServerPrivateNetworksResponse, unmarshalListServerPrivateNetworksResponse } from "./marshalling.gen.js";
|
|
4
4
|
const jsonContentHeaders = {
|
|
5
5
|
"Content-Type": "application/json; charset=utf-8"
|
|
6
6
|
};
|
|
@@ -55,6 +55,23 @@ class API extends API$1 {
|
|
|
55
55
|
},
|
|
56
56
|
unmarshalServer
|
|
57
57
|
);
|
|
58
|
+
/**
|
|
59
|
+
* Create multiple servers atomically. Create multiple servers in the targeted zone specifying their configurations. If the request cannot entirely be fulfilled, no servers are created.
|
|
60
|
+
*
|
|
61
|
+
* @param request - The request {@link BatchCreateServersRequest}
|
|
62
|
+
* @returns A Promise of BatchCreateServersResponse
|
|
63
|
+
*/
|
|
64
|
+
batchCreateServers = (request) => this.client.fetch(
|
|
65
|
+
{
|
|
66
|
+
body: JSON.stringify(
|
|
67
|
+
marshalBatchCreateServersRequest(request, this.client.settings)
|
|
68
|
+
),
|
|
69
|
+
headers: jsonContentHeaders,
|
|
70
|
+
method: "POST",
|
|
71
|
+
path: `/apple-silicon/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/batch-create-servers`
|
|
72
|
+
},
|
|
73
|
+
unmarshalBatchCreateServersResponse
|
|
74
|
+
);
|
|
58
75
|
pageOfListServers = (request = {}) => this.client.fetch(
|
|
59
76
|
{
|
|
60
77
|
method: "GET",
|
|
@@ -8,12 +8,14 @@ exports.PrivateNetworkAPI = api_gen.PrivateNetworkAPI;
|
|
|
8
8
|
exports.SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES = content_gen.SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES;
|
|
9
9
|
exports.SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES = content_gen.SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES;
|
|
10
10
|
exports.SERVER_TRANSIENT_STATUSES = content_gen.SERVER_TRANSIENT_STATUSES;
|
|
11
|
+
exports.marshalBatchCreateServersRequest = marshalling_gen.marshalBatchCreateServersRequest;
|
|
11
12
|
exports.marshalCreateServerRequest = marshalling_gen.marshalCreateServerRequest;
|
|
12
13
|
exports.marshalPrivateNetworkApiAddServerPrivateNetworkRequest = marshalling_gen.marshalPrivateNetworkApiAddServerPrivateNetworkRequest;
|
|
13
14
|
exports.marshalPrivateNetworkApiSetServerPrivateNetworksRequest = marshalling_gen.marshalPrivateNetworkApiSetServerPrivateNetworksRequest;
|
|
14
15
|
exports.marshalReinstallServerRequest = marshalling_gen.marshalReinstallServerRequest;
|
|
15
16
|
exports.marshalStartConnectivityDiagnosticRequest = marshalling_gen.marshalStartConnectivityDiagnosticRequest;
|
|
16
17
|
exports.marshalUpdateServerRequest = marshalling_gen.marshalUpdateServerRequest;
|
|
18
|
+
exports.unmarshalBatchCreateServersResponse = marshalling_gen.unmarshalBatchCreateServersResponse;
|
|
17
19
|
exports.unmarshalConnectivityDiagnostic = marshalling_gen.unmarshalConnectivityDiagnostic;
|
|
18
20
|
exports.unmarshalListOSResponse = marshalling_gen.unmarshalListOSResponse;
|
|
19
21
|
exports.unmarshalListServerPrivateNetworksResponse = marshalling_gen.unmarshalListServerPrivateNetworksResponse;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { API, PrivateNetworkAPI, } from './api.gen';
|
|
2
2
|
export * from './content.gen';
|
|
3
3
|
export * from './marshalling.gen';
|
|
4
|
-
export type { Commitment, CommitmentType, CommitmentTypeValue, ConnectivityDiagnostic, ConnectivityDiagnosticActionType, ConnectivityDiagnosticDiagnosticStatus, ConnectivityDiagnosticServerHealth, CreateServerRequest, DeleteServerRequest, GetConnectivityDiagnosticRequest, GetOSRequest, GetServerRequest, GetServerTypeRequest, ListOSRequest, ListOSResponse, ListServerPrivateNetworksRequestOrderBy, ListServerPrivateNetworksResponse,
|
|
4
|
+
export type { BatchCreateServersRequest, BatchCreateServersRequestBatchInnerCreateServerRequest, BatchCreateServersResponse, Commitment, CommitmentType, CommitmentTypeValue, ConnectivityDiagnostic, ConnectivityDiagnosticActionType, ConnectivityDiagnosticDiagnosticStatus, ConnectivityDiagnosticServerHealth, CreateServerRequest, DeleteServerRequest, GetConnectivityDiagnosticRequest, GetOSRequest, GetServerRequest, GetServerTypeRequest, ListOSRequest, ListOSResponse, ListServerPrivateNetworksRequestOrderBy, ListServerPrivateNetworksResponse, ListServersRequest, ListServersRequestOrderBy, ListServersResponse, ListServerTypesRequest, ListServerTypesResponse, OS, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiDeleteServerPrivateNetworkRequest, PrivateNetworkApiGetServerPrivateNetworkRequest, PrivateNetworkApiListServerPrivateNetworksRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, RebootServerRequest, ReinstallServerRequest, Server, ServerPrivateNetwork, ServerPrivateNetworkServerStatus, ServerPrivateNetworkStatus, ServerStatus, ServerType, ServerTypeCPU, ServerTypeDisk, ServerTypeGPU, ServerTypeMemory, ServerTypeNetwork, ServerTypeStock, SetServerPrivateNetworksResponse, StartConnectivityDiagnosticRequest, StartConnectivityDiagnosticResponse, UpdateServerRequest, } from './types.gen';
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { API, PrivateNetworkAPI } from "./api.gen.js";
|
|
2
2
|
import { SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES, SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
|
-
import { marshalCreateServerRequest, marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, marshalReinstallServerRequest, marshalStartConnectivityDiagnosticRequest, marshalUpdateServerRequest, unmarshalConnectivityDiagnostic, unmarshalListOSResponse, unmarshalListServerPrivateNetworksResponse, unmarshalListServerTypesResponse, unmarshalListServersResponse, unmarshalOS, unmarshalServer, unmarshalServerPrivateNetwork, unmarshalServerType, unmarshalSetServerPrivateNetworksResponse, unmarshalStartConnectivityDiagnosticResponse } from "./marshalling.gen.js";
|
|
3
|
+
import { marshalBatchCreateServersRequest, marshalCreateServerRequest, marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, marshalReinstallServerRequest, marshalStartConnectivityDiagnosticRequest, marshalUpdateServerRequest, unmarshalBatchCreateServersResponse, unmarshalConnectivityDiagnostic, unmarshalListOSResponse, unmarshalListServerPrivateNetworksResponse, unmarshalListServerTypesResponse, unmarshalListServersResponse, unmarshalOS, unmarshalServer, unmarshalServerPrivateNetwork, unmarshalServerType, unmarshalSetServerPrivateNetworksResponse, unmarshalStartConnectivityDiagnosticResponse } from "./marshalling.gen.js";
|
|
4
4
|
export {
|
|
5
5
|
API,
|
|
6
6
|
PrivateNetworkAPI,
|
|
7
7
|
SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES,
|
|
8
8
|
SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES,
|
|
9
9
|
SERVER_TRANSIENT_STATUSES,
|
|
10
|
+
marshalBatchCreateServersRequest,
|
|
10
11
|
marshalCreateServerRequest,
|
|
11
12
|
marshalPrivateNetworkApiAddServerPrivateNetworkRequest,
|
|
12
13
|
marshalPrivateNetworkApiSetServerPrivateNetworksRequest,
|
|
13
14
|
marshalReinstallServerRequest,
|
|
14
15
|
marshalStartConnectivityDiagnosticRequest,
|
|
15
16
|
marshalUpdateServerRequest,
|
|
17
|
+
unmarshalBatchCreateServersResponse,
|
|
16
18
|
unmarshalConnectivityDiagnostic,
|
|
17
19
|
unmarshalListOSResponse,
|
|
18
20
|
unmarshalListServerPrivateNetworksResponse,
|
|
@@ -152,6 +152,16 @@ const unmarshalServerType = (data) => {
|
|
|
152
152
|
stock: data.stock
|
|
153
153
|
};
|
|
154
154
|
};
|
|
155
|
+
const unmarshalBatchCreateServersResponse = (data) => {
|
|
156
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
157
|
+
throw new TypeError(
|
|
158
|
+
`Unmarshalling the type 'BatchCreateServersResponse' failed as data isn't a dictionary.`
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
servers: sdkClient.unmarshalArrayOfObject(data.servers, unmarshalServer)
|
|
163
|
+
};
|
|
164
|
+
};
|
|
155
165
|
const unmarshalConnectivityDiagnosticServerHealth = (data) => {
|
|
156
166
|
if (!sdkClient.isJSONObject(data)) {
|
|
157
167
|
throw new TypeError(
|
|
@@ -251,6 +261,22 @@ const unmarshalStartConnectivityDiagnosticResponse = (data) => {
|
|
|
251
261
|
diagnosticId: data.diagnostic_id
|
|
252
262
|
};
|
|
253
263
|
};
|
|
264
|
+
const marshalBatchCreateServersRequestBatchInnerCreateServerRequest = (request, defaults) => ({
|
|
265
|
+
name: request.name
|
|
266
|
+
});
|
|
267
|
+
const marshalBatchCreateServersRequest = (request, defaults) => ({
|
|
268
|
+
commitment_type: request.commitmentType,
|
|
269
|
+
enable_vpc: request.enableVpc,
|
|
270
|
+
os_id: request.osId,
|
|
271
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
272
|
+
public_bandwidth_bps: request.publicBandwidthBps,
|
|
273
|
+
requests: request.requests !== void 0 ? request.requests.map(
|
|
274
|
+
(elt) => marshalBatchCreateServersRequestBatchInnerCreateServerRequest(
|
|
275
|
+
elt
|
|
276
|
+
)
|
|
277
|
+
) : void 0,
|
|
278
|
+
type: request.type
|
|
279
|
+
});
|
|
254
280
|
const marshalCreateServerRequest = (request, defaults) => ({
|
|
255
281
|
commitment_type: request.commitmentType,
|
|
256
282
|
enable_vpc: request.enableVpc,
|
|
@@ -283,12 +309,14 @@ const marshalUpdateServerRequest = (request, defaults) => ({
|
|
|
283
309
|
public_bandwidth_bps: request.publicBandwidthBps,
|
|
284
310
|
schedule_deletion: request.scheduleDeletion
|
|
285
311
|
});
|
|
312
|
+
exports.marshalBatchCreateServersRequest = marshalBatchCreateServersRequest;
|
|
286
313
|
exports.marshalCreateServerRequest = marshalCreateServerRequest;
|
|
287
314
|
exports.marshalPrivateNetworkApiAddServerPrivateNetworkRequest = marshalPrivateNetworkApiAddServerPrivateNetworkRequest;
|
|
288
315
|
exports.marshalPrivateNetworkApiSetServerPrivateNetworksRequest = marshalPrivateNetworkApiSetServerPrivateNetworksRequest;
|
|
289
316
|
exports.marshalReinstallServerRequest = marshalReinstallServerRequest;
|
|
290
317
|
exports.marshalStartConnectivityDiagnosticRequest = marshalStartConnectivityDiagnosticRequest;
|
|
291
318
|
exports.marshalUpdateServerRequest = marshalUpdateServerRequest;
|
|
319
|
+
exports.unmarshalBatchCreateServersResponse = unmarshalBatchCreateServersResponse;
|
|
292
320
|
exports.unmarshalConnectivityDiagnostic = unmarshalConnectivityDiagnostic;
|
|
293
321
|
exports.unmarshalListOSResponse = unmarshalListOSResponse;
|
|
294
322
|
exports.unmarshalListServerPrivateNetworksResponse = unmarshalListServerPrivateNetworksResponse;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
-
import type { ConnectivityDiagnostic, CreateServerRequest, ListOSResponse, ListServerPrivateNetworksResponse,
|
|
2
|
+
import type { BatchCreateServersRequest, BatchCreateServersResponse, ConnectivityDiagnostic, CreateServerRequest, ListOSResponse, ListServerPrivateNetworksResponse, ListServersResponse, ListServerTypesResponse, OS, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, ReinstallServerRequest, Server, ServerPrivateNetwork, ServerType, SetServerPrivateNetworksResponse, StartConnectivityDiagnosticRequest, StartConnectivityDiagnosticResponse, UpdateServerRequest } from './types.gen';
|
|
3
3
|
export declare const unmarshalOS: (data: unknown) => OS;
|
|
4
4
|
export declare const unmarshalServer: (data: unknown) => Server;
|
|
5
5
|
export declare const unmarshalServerPrivateNetwork: (data: unknown) => ServerPrivateNetwork;
|
|
6
6
|
export declare const unmarshalServerType: (data: unknown) => ServerType;
|
|
7
|
+
export declare const unmarshalBatchCreateServersResponse: (data: unknown) => BatchCreateServersResponse;
|
|
7
8
|
export declare const unmarshalConnectivityDiagnostic: (data: unknown) => ConnectivityDiagnostic;
|
|
8
9
|
export declare const unmarshalListOSResponse: (data: unknown) => ListOSResponse;
|
|
9
10
|
export declare const unmarshalListServerPrivateNetworksResponse: (data: unknown) => ListServerPrivateNetworksResponse;
|
|
@@ -11,6 +12,7 @@ export declare const unmarshalListServerTypesResponse: (data: unknown) => ListSe
|
|
|
11
12
|
export declare const unmarshalListServersResponse: (data: unknown) => ListServersResponse;
|
|
12
13
|
export declare const unmarshalSetServerPrivateNetworksResponse: (data: unknown) => SetServerPrivateNetworksResponse;
|
|
13
14
|
export declare const unmarshalStartConnectivityDiagnosticResponse: (data: unknown) => StartConnectivityDiagnosticResponse;
|
|
15
|
+
export declare const marshalBatchCreateServersRequest: (request: BatchCreateServersRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
14
16
|
export declare const marshalCreateServerRequest: (request: CreateServerRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
15
17
|
export declare const marshalPrivateNetworkApiAddServerPrivateNetworkRequest: (request: PrivateNetworkApiAddServerPrivateNetworkRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
16
18
|
export declare const marshalPrivateNetworkApiSetServerPrivateNetworksRequest: (request: PrivateNetworkApiSetServerPrivateNetworksRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -150,6 +150,16 @@ const unmarshalServerType = (data) => {
|
|
|
150
150
|
stock: data.stock
|
|
151
151
|
};
|
|
152
152
|
};
|
|
153
|
+
const unmarshalBatchCreateServersResponse = (data) => {
|
|
154
|
+
if (!isJSONObject(data)) {
|
|
155
|
+
throw new TypeError(
|
|
156
|
+
`Unmarshalling the type 'BatchCreateServersResponse' failed as data isn't a dictionary.`
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
return {
|
|
160
|
+
servers: unmarshalArrayOfObject(data.servers, unmarshalServer)
|
|
161
|
+
};
|
|
162
|
+
};
|
|
153
163
|
const unmarshalConnectivityDiagnosticServerHealth = (data) => {
|
|
154
164
|
if (!isJSONObject(data)) {
|
|
155
165
|
throw new TypeError(
|
|
@@ -249,6 +259,22 @@ const unmarshalStartConnectivityDiagnosticResponse = (data) => {
|
|
|
249
259
|
diagnosticId: data.diagnostic_id
|
|
250
260
|
};
|
|
251
261
|
};
|
|
262
|
+
const marshalBatchCreateServersRequestBatchInnerCreateServerRequest = (request, defaults) => ({
|
|
263
|
+
name: request.name
|
|
264
|
+
});
|
|
265
|
+
const marshalBatchCreateServersRequest = (request, defaults) => ({
|
|
266
|
+
commitment_type: request.commitmentType,
|
|
267
|
+
enable_vpc: request.enableVpc,
|
|
268
|
+
os_id: request.osId,
|
|
269
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
270
|
+
public_bandwidth_bps: request.publicBandwidthBps,
|
|
271
|
+
requests: request.requests !== void 0 ? request.requests.map(
|
|
272
|
+
(elt) => marshalBatchCreateServersRequestBatchInnerCreateServerRequest(
|
|
273
|
+
elt
|
|
274
|
+
)
|
|
275
|
+
) : void 0,
|
|
276
|
+
type: request.type
|
|
277
|
+
});
|
|
252
278
|
const marshalCreateServerRequest = (request, defaults) => ({
|
|
253
279
|
commitment_type: request.commitmentType,
|
|
254
280
|
enable_vpc: request.enableVpc,
|
|
@@ -282,12 +308,14 @@ const marshalUpdateServerRequest = (request, defaults) => ({
|
|
|
282
308
|
schedule_deletion: request.scheduleDeletion
|
|
283
309
|
});
|
|
284
310
|
export {
|
|
311
|
+
marshalBatchCreateServersRequest,
|
|
285
312
|
marshalCreateServerRequest,
|
|
286
313
|
marshalPrivateNetworkApiAddServerPrivateNetworkRequest,
|
|
287
314
|
marshalPrivateNetworkApiSetServerPrivateNetworksRequest,
|
|
288
315
|
marshalReinstallServerRequest,
|
|
289
316
|
marshalStartConnectivityDiagnosticRequest,
|
|
290
317
|
marshalUpdateServerRequest,
|
|
318
|
+
unmarshalBatchCreateServersResponse,
|
|
291
319
|
unmarshalConnectivityDiagnostic,
|
|
292
320
|
unmarshalListOSResponse,
|
|
293
321
|
unmarshalListServerPrivateNetworksResponse,
|
|
@@ -70,6 +70,9 @@ export interface ServerTypeNetwork {
|
|
|
70
70
|
publicBandwidthBps: number;
|
|
71
71
|
supportedBandwidth: number[];
|
|
72
72
|
}
|
|
73
|
+
export interface BatchCreateServersRequestBatchInnerCreateServerRequest {
|
|
74
|
+
name: string;
|
|
75
|
+
}
|
|
73
76
|
export interface Server {
|
|
74
77
|
/**
|
|
75
78
|
* UUID of the server.
|
|
@@ -243,6 +246,46 @@ export interface ServerType {
|
|
|
243
246
|
export interface CommitmentTypeValue {
|
|
244
247
|
commitmentType: CommitmentType;
|
|
245
248
|
}
|
|
249
|
+
export type BatchCreateServersRequest = {
|
|
250
|
+
/**
|
|
251
|
+
* Zone to target. If none is passed will use default zone from the config.
|
|
252
|
+
*/
|
|
253
|
+
zone?: ScwZone;
|
|
254
|
+
/**
|
|
255
|
+
* Create servers in the given project ID.
|
|
256
|
+
*/
|
|
257
|
+
projectId?: string;
|
|
258
|
+
/**
|
|
259
|
+
* Create servers of the given type.
|
|
260
|
+
*/
|
|
261
|
+
type: string;
|
|
262
|
+
/**
|
|
263
|
+
* Create servers & install the given os_id, when no os_id provided the default OS for this server type is chosen. Requesting a non-default OS will induce an extended delivery time.
|
|
264
|
+
*/
|
|
265
|
+
osId?: string;
|
|
266
|
+
/**
|
|
267
|
+
* Activate the Private Network feature for these servers. This feature is configured through the Apple Silicon - Private Networks API.
|
|
268
|
+
*/
|
|
269
|
+
enableVpc: boolean;
|
|
270
|
+
/**
|
|
271
|
+
* Activate commitment for these servers. If not specified, there is a 24h commitment due to Apple licensing (commitment_type `duration_24h`). It can be updated with the Update Server request. Available commitment depends on server type.
|
|
272
|
+
*/
|
|
273
|
+
commitmentType?: CommitmentType;
|
|
274
|
+
/**
|
|
275
|
+
* Public bandwidth to configure for these servers. This defaults to the minimum bandwidth for the corresponding server type. For compatible server types, the bandwidth can be increased which incurs additional costs.
|
|
276
|
+
*/
|
|
277
|
+
publicBandwidthBps: number;
|
|
278
|
+
/**
|
|
279
|
+
* List of servers to create.
|
|
280
|
+
*/
|
|
281
|
+
requests?: BatchCreateServersRequestBatchInnerCreateServerRequest[];
|
|
282
|
+
};
|
|
283
|
+
export interface BatchCreateServersResponse {
|
|
284
|
+
/**
|
|
285
|
+
* List of created servers.
|
|
286
|
+
*/
|
|
287
|
+
servers: Server[];
|
|
288
|
+
}
|
|
246
289
|
export interface ConnectivityDiagnostic {
|
|
247
290
|
id: string;
|
|
248
291
|
status: ConnectivityDiagnosticDiagnosticStatus;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-applesilicon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Scaleway SDK applesilicon",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
"directory": "packages_generated/applesilicon"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
|
-
"node": ">=20.19.
|
|
29
|
+
"node": ">=20.19.4"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@scaleway/random-name": "5.1.
|
|
33
|
-
"@scaleway/sdk-std": "1.0.
|
|
32
|
+
"@scaleway/random-name": "5.1.2",
|
|
33
|
+
"@scaleway/sdk-std": "1.0.6"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^1.3.
|
|
36
|
+
"@scaleway/sdk-client": "^1.3.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@scaleway/sdk-client": "^1.3.
|
|
39
|
+
"@scaleway/sdk-client": "^1.3.1"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"package:check": "pnpm publint",
|