@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
|
@@ -241,4 +241,121 @@ class API extends api.API {
|
|
|
241
241
|
marshalling_gen.unmarshalConnectivityDiagnostic
|
|
242
242
|
);
|
|
243
243
|
}
|
|
244
|
+
class PrivateNetworkAPI extends api.API {
|
|
245
|
+
/** Lists the available zones of the API. */
|
|
246
|
+
static LOCALITIES = ["fr-par-1", "fr-par-3"];
|
|
247
|
+
getServerPrivateNetwork = (request) => this.client.fetch(
|
|
248
|
+
{
|
|
249
|
+
method: "GET",
|
|
250
|
+
path: `/apple-silicon/v1alpha1/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${marshalling.validatePathParam("serverId", request.serverId)}/private-networks/${marshalling.validatePathParam("privateNetworkId", request.privateNetworkId)}`
|
|
251
|
+
},
|
|
252
|
+
marshalling_gen.unmarshalServerPrivateNetwork
|
|
253
|
+
);
|
|
254
|
+
/**
|
|
255
|
+
* Waits for {@link ServerPrivateNetwork} to be in a final state.
|
|
256
|
+
*
|
|
257
|
+
* @param request - The request
|
|
258
|
+
* {@link PrivateNetworkApiGetServerPrivateNetworkRequest}
|
|
259
|
+
* @param options - The waiting options
|
|
260
|
+
* @returns A Promise of ServerPrivateNetwork
|
|
261
|
+
*/
|
|
262
|
+
waitForServerPrivateNetwork = (request, options) => intervalRetrier.waitForResource(
|
|
263
|
+
options?.stop ?? ((res) => Promise.resolve(
|
|
264
|
+
!content_gen.SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES.includes(
|
|
265
|
+
res.status
|
|
266
|
+
)
|
|
267
|
+
)),
|
|
268
|
+
this.getServerPrivateNetwork,
|
|
269
|
+
request,
|
|
270
|
+
options
|
|
271
|
+
);
|
|
272
|
+
/**
|
|
273
|
+
* Add a server to a Private Network. Add an Apple silicon server to a Private
|
|
274
|
+
* Network.
|
|
275
|
+
*
|
|
276
|
+
* @param request - The request
|
|
277
|
+
* {@link PrivateNetworkApiAddServerPrivateNetworkRequest}
|
|
278
|
+
* @returns A Promise of ServerPrivateNetwork
|
|
279
|
+
*/
|
|
280
|
+
addServerPrivateNetwork = (request) => this.client.fetch(
|
|
281
|
+
{
|
|
282
|
+
body: JSON.stringify(
|
|
283
|
+
marshalling_gen.marshalPrivateNetworkApiAddServerPrivateNetworkRequest(
|
|
284
|
+
request,
|
|
285
|
+
this.client.settings
|
|
286
|
+
)
|
|
287
|
+
),
|
|
288
|
+
headers: jsonContentHeaders,
|
|
289
|
+
method: "POST",
|
|
290
|
+
path: `/apple-silicon/v1alpha1/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${marshalling.validatePathParam("serverId", request.serverId)}/private-networks`
|
|
291
|
+
},
|
|
292
|
+
marshalling_gen.unmarshalServerPrivateNetwork
|
|
293
|
+
);
|
|
294
|
+
/**
|
|
295
|
+
* Set multiple Private Networks on a server. Configure multiple Private
|
|
296
|
+
* Networks on an Apple silicon server.
|
|
297
|
+
*
|
|
298
|
+
* @param request - The request
|
|
299
|
+
* {@link PrivateNetworkApiSetServerPrivateNetworksRequest}
|
|
300
|
+
* @returns A Promise of SetServerPrivateNetworksResponse
|
|
301
|
+
*/
|
|
302
|
+
setServerPrivateNetworks = (request) => this.client.fetch(
|
|
303
|
+
{
|
|
304
|
+
body: JSON.stringify(
|
|
305
|
+
marshalling_gen.marshalPrivateNetworkApiSetServerPrivateNetworksRequest(
|
|
306
|
+
request,
|
|
307
|
+
this.client.settings
|
|
308
|
+
)
|
|
309
|
+
),
|
|
310
|
+
headers: jsonContentHeaders,
|
|
311
|
+
method: "PUT",
|
|
312
|
+
path: `/apple-silicon/v1alpha1/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${marshalling.validatePathParam("serverId", request.serverId)}/private-networks`
|
|
313
|
+
},
|
|
314
|
+
marshalling_gen.unmarshalSetServerPrivateNetworksResponse
|
|
315
|
+
);
|
|
316
|
+
pageOfListServerPrivateNetworks = (request = {}) => this.client.fetch(
|
|
317
|
+
{
|
|
318
|
+
method: "GET",
|
|
319
|
+
path: `/apple-silicon/v1alpha1/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/server-private-networks`,
|
|
320
|
+
urlParams: marshalling.urlParams(
|
|
321
|
+
["ipam_ip_ids", request.ipamIpIds],
|
|
322
|
+
["order_by", request.orderBy],
|
|
323
|
+
["organization_id", request.organizationId],
|
|
324
|
+
["page", request.page],
|
|
325
|
+
[
|
|
326
|
+
"page_size",
|
|
327
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
328
|
+
],
|
|
329
|
+
["private_network_id", request.privateNetworkId],
|
|
330
|
+
["project_id", request.projectId],
|
|
331
|
+
["server_id", request.serverId]
|
|
332
|
+
)
|
|
333
|
+
},
|
|
334
|
+
marshalling_gen.unmarshalListServerPrivateNetworksResponse
|
|
335
|
+
);
|
|
336
|
+
/**
|
|
337
|
+
* List the Private Networks of a server. List the Private Networks of an
|
|
338
|
+
* Apple silicon server.
|
|
339
|
+
*
|
|
340
|
+
* @param request - The request
|
|
341
|
+
* {@link PrivateNetworkApiListServerPrivateNetworksRequest}
|
|
342
|
+
* @returns A Promise of ListServerPrivateNetworksResponse
|
|
343
|
+
*/
|
|
344
|
+
listServerPrivateNetworks = (request = {}) => resourcePaginator.enrichForPagination(
|
|
345
|
+
"serverPrivateNetworks",
|
|
346
|
+
this.pageOfListServerPrivateNetworks,
|
|
347
|
+
request
|
|
348
|
+
);
|
|
349
|
+
/**
|
|
350
|
+
* Delete a Private Network.
|
|
351
|
+
*
|
|
352
|
+
* @param request - The request
|
|
353
|
+
* {@link PrivateNetworkApiDeleteServerPrivateNetworkRequest}
|
|
354
|
+
*/
|
|
355
|
+
deleteServerPrivateNetwork = (request) => this.client.fetch({
|
|
356
|
+
method: "DELETE",
|
|
357
|
+
path: `/apple-silicon/v1alpha1/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${marshalling.validatePathParam("serverId", request.serverId)}/private-networks/${marshalling.validatePathParam("privateNetworkId", request.privateNetworkId)}`
|
|
358
|
+
});
|
|
359
|
+
}
|
|
244
360
|
exports.API = API;
|
|
361
|
+
exports.PrivateNetworkAPI = PrivateNetworkAPI;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { WaitForOptions, Zone } from '../../../bridge';
|
|
3
|
-
import type { ConnectivityDiagnostic, CreateServerRequest, DeleteServerRequest, GetConnectivityDiagnosticRequest, GetOSRequest, GetServerRequest, GetServerTypeRequest, ListOSRequest, ListOSResponse, ListServerTypesRequest, ListServerTypesResponse, ListServersRequest, ListServersResponse, OS, RebootServerRequest, ReinstallServerRequest, Server, ServerType, StartConnectivityDiagnosticRequest, StartConnectivityDiagnosticResponse, UpdateServerRequest } from './types.gen';
|
|
3
|
+
import type { ConnectivityDiagnostic, CreateServerRequest, DeleteServerRequest, GetConnectivityDiagnosticRequest, GetOSRequest, GetServerRequest, GetServerTypeRequest, ListOSRequest, ListOSResponse, ListServerPrivateNetworksResponse, ListServerTypesRequest, ListServerTypesResponse, ListServersRequest, ListServersResponse, 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
|
*
|
|
@@ -123,3 +123,56 @@ export declare class API extends ParentAPI {
|
|
|
123
123
|
startConnectivityDiagnostic: (request: Readonly<StartConnectivityDiagnosticRequest>) => Promise<StartConnectivityDiagnosticResponse>;
|
|
124
124
|
getConnectivityDiagnostic: (request: Readonly<GetConnectivityDiagnosticRequest>) => Promise<ConnectivityDiagnostic>;
|
|
125
125
|
}
|
|
126
|
+
/** Apple silicon - Private Networks API. */
|
|
127
|
+
export declare class PrivateNetworkAPI extends ParentAPI {
|
|
128
|
+
/** Lists the available zones of the API. */
|
|
129
|
+
static readonly LOCALITIES: Zone[];
|
|
130
|
+
getServerPrivateNetwork: (request: Readonly<PrivateNetworkApiGetServerPrivateNetworkRequest>) => Promise<ServerPrivateNetwork>;
|
|
131
|
+
/**
|
|
132
|
+
* Waits for {@link ServerPrivateNetwork} to be in a final state.
|
|
133
|
+
*
|
|
134
|
+
* @param request - The request
|
|
135
|
+
* {@link PrivateNetworkApiGetServerPrivateNetworkRequest}
|
|
136
|
+
* @param options - The waiting options
|
|
137
|
+
* @returns A Promise of ServerPrivateNetwork
|
|
138
|
+
*/
|
|
139
|
+
waitForServerPrivateNetwork: (request: Readonly<PrivateNetworkApiGetServerPrivateNetworkRequest>, options?: Readonly<WaitForOptions<ServerPrivateNetwork>>) => Promise<ServerPrivateNetwork>;
|
|
140
|
+
/**
|
|
141
|
+
* Add a server to a Private Network. Add an Apple silicon server to a Private
|
|
142
|
+
* Network.
|
|
143
|
+
*
|
|
144
|
+
* @param request - The request
|
|
145
|
+
* {@link PrivateNetworkApiAddServerPrivateNetworkRequest}
|
|
146
|
+
* @returns A Promise of ServerPrivateNetwork
|
|
147
|
+
*/
|
|
148
|
+
addServerPrivateNetwork: (request: Readonly<PrivateNetworkApiAddServerPrivateNetworkRequest>) => Promise<ServerPrivateNetwork>;
|
|
149
|
+
/**
|
|
150
|
+
* Set multiple Private Networks on a server. Configure multiple Private
|
|
151
|
+
* Networks on an Apple silicon server.
|
|
152
|
+
*
|
|
153
|
+
* @param request - The request
|
|
154
|
+
* {@link PrivateNetworkApiSetServerPrivateNetworksRequest}
|
|
155
|
+
* @returns A Promise of SetServerPrivateNetworksResponse
|
|
156
|
+
*/
|
|
157
|
+
setServerPrivateNetworks: (request: Readonly<PrivateNetworkApiSetServerPrivateNetworksRequest>) => Promise<SetServerPrivateNetworksResponse>;
|
|
158
|
+
protected pageOfListServerPrivateNetworks: (request?: Readonly<PrivateNetworkApiListServerPrivateNetworksRequest>) => Promise<ListServerPrivateNetworksResponse>;
|
|
159
|
+
/**
|
|
160
|
+
* List the Private Networks of a server. List the Private Networks of an
|
|
161
|
+
* Apple silicon server.
|
|
162
|
+
*
|
|
163
|
+
* @param request - The request
|
|
164
|
+
* {@link PrivateNetworkApiListServerPrivateNetworksRequest}
|
|
165
|
+
* @returns A Promise of ListServerPrivateNetworksResponse
|
|
166
|
+
*/
|
|
167
|
+
listServerPrivateNetworks: (request?: Readonly<PrivateNetworkApiListServerPrivateNetworksRequest>) => Promise<ListServerPrivateNetworksResponse> & {
|
|
168
|
+
all: () => Promise<ServerPrivateNetwork[]>;
|
|
169
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<ServerPrivateNetwork[], void, void>;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* Delete a Private Network.
|
|
173
|
+
*
|
|
174
|
+
* @param request - The request
|
|
175
|
+
* {@link PrivateNetworkApiDeleteServerPrivateNetworkRequest}
|
|
176
|
+
*/
|
|
177
|
+
deleteServerPrivateNetwork: (request: Readonly<PrivateNetworkApiDeleteServerPrivateNetworkRequest>) => Promise<void>;
|
|
178
|
+
}
|
|
@@ -3,8 +3,8 @@ import { API as API$1 } from "../../../scw/api.js";
|
|
|
3
3
|
import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
|
|
4
4
|
import "../../../vendor/base64/index.js";
|
|
5
5
|
import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
|
|
6
|
-
import { SERVER_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
7
|
-
import { unmarshalListServerTypesResponse, unmarshalServerType, marshalCreateServerRequest, unmarshalServer, unmarshalListServersResponse, unmarshalListOSResponse, unmarshalOS, marshalUpdateServerRequest, marshalReinstallServerRequest, marshalStartConnectivityDiagnosticRequest, unmarshalStartConnectivityDiagnosticResponse, unmarshalConnectivityDiagnostic } from "./marshalling.gen.js";
|
|
6
|
+
import { SERVER_TRANSIENT_STATUSES, SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
7
|
+
import { unmarshalListServerTypesResponse, unmarshalServerType, marshalCreateServerRequest, unmarshalServer, unmarshalListServersResponse, unmarshalListOSResponse, unmarshalOS, marshalUpdateServerRequest, marshalReinstallServerRequest, marshalStartConnectivityDiagnosticRequest, unmarshalStartConnectivityDiagnosticResponse, unmarshalConnectivityDiagnostic, unmarshalServerPrivateNetwork, marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, unmarshalSetServerPrivateNetworksResponse, unmarshalListServerPrivateNetworksResponse } from "./marshalling.gen.js";
|
|
8
8
|
const jsonContentHeaders = {
|
|
9
9
|
"Content-Type": "application/json; charset=utf-8"
|
|
10
10
|
};
|
|
@@ -239,6 +239,123 @@ class API extends API$1 {
|
|
|
239
239
|
unmarshalConnectivityDiagnostic
|
|
240
240
|
);
|
|
241
241
|
}
|
|
242
|
+
class PrivateNetworkAPI extends API$1 {
|
|
243
|
+
/** Lists the available zones of the API. */
|
|
244
|
+
static LOCALITIES = ["fr-par-1", "fr-par-3"];
|
|
245
|
+
getServerPrivateNetwork = (request) => this.client.fetch(
|
|
246
|
+
{
|
|
247
|
+
method: "GET",
|
|
248
|
+
path: `/apple-silicon/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}`
|
|
249
|
+
},
|
|
250
|
+
unmarshalServerPrivateNetwork
|
|
251
|
+
);
|
|
252
|
+
/**
|
|
253
|
+
* Waits for {@link ServerPrivateNetwork} to be in a final state.
|
|
254
|
+
*
|
|
255
|
+
* @param request - The request
|
|
256
|
+
* {@link PrivateNetworkApiGetServerPrivateNetworkRequest}
|
|
257
|
+
* @param options - The waiting options
|
|
258
|
+
* @returns A Promise of ServerPrivateNetwork
|
|
259
|
+
*/
|
|
260
|
+
waitForServerPrivateNetwork = (request, options) => waitForResource(
|
|
261
|
+
options?.stop ?? ((res) => Promise.resolve(
|
|
262
|
+
!SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES.includes(
|
|
263
|
+
res.status
|
|
264
|
+
)
|
|
265
|
+
)),
|
|
266
|
+
this.getServerPrivateNetwork,
|
|
267
|
+
request,
|
|
268
|
+
options
|
|
269
|
+
);
|
|
270
|
+
/**
|
|
271
|
+
* Add a server to a Private Network. Add an Apple silicon server to a Private
|
|
272
|
+
* Network.
|
|
273
|
+
*
|
|
274
|
+
* @param request - The request
|
|
275
|
+
* {@link PrivateNetworkApiAddServerPrivateNetworkRequest}
|
|
276
|
+
* @returns A Promise of ServerPrivateNetwork
|
|
277
|
+
*/
|
|
278
|
+
addServerPrivateNetwork = (request) => this.client.fetch(
|
|
279
|
+
{
|
|
280
|
+
body: JSON.stringify(
|
|
281
|
+
marshalPrivateNetworkApiAddServerPrivateNetworkRequest(
|
|
282
|
+
request,
|
|
283
|
+
this.client.settings
|
|
284
|
+
)
|
|
285
|
+
),
|
|
286
|
+
headers: jsonContentHeaders,
|
|
287
|
+
method: "POST",
|
|
288
|
+
path: `/apple-silicon/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/private-networks`
|
|
289
|
+
},
|
|
290
|
+
unmarshalServerPrivateNetwork
|
|
291
|
+
);
|
|
292
|
+
/**
|
|
293
|
+
* Set multiple Private Networks on a server. Configure multiple Private
|
|
294
|
+
* Networks on an Apple silicon server.
|
|
295
|
+
*
|
|
296
|
+
* @param request - The request
|
|
297
|
+
* {@link PrivateNetworkApiSetServerPrivateNetworksRequest}
|
|
298
|
+
* @returns A Promise of SetServerPrivateNetworksResponse
|
|
299
|
+
*/
|
|
300
|
+
setServerPrivateNetworks = (request) => this.client.fetch(
|
|
301
|
+
{
|
|
302
|
+
body: JSON.stringify(
|
|
303
|
+
marshalPrivateNetworkApiSetServerPrivateNetworksRequest(
|
|
304
|
+
request,
|
|
305
|
+
this.client.settings
|
|
306
|
+
)
|
|
307
|
+
),
|
|
308
|
+
headers: jsonContentHeaders,
|
|
309
|
+
method: "PUT",
|
|
310
|
+
path: `/apple-silicon/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/private-networks`
|
|
311
|
+
},
|
|
312
|
+
unmarshalSetServerPrivateNetworksResponse
|
|
313
|
+
);
|
|
314
|
+
pageOfListServerPrivateNetworks = (request = {}) => this.client.fetch(
|
|
315
|
+
{
|
|
316
|
+
method: "GET",
|
|
317
|
+
path: `/apple-silicon/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/server-private-networks`,
|
|
318
|
+
urlParams: urlParams(
|
|
319
|
+
["ipam_ip_ids", request.ipamIpIds],
|
|
320
|
+
["order_by", request.orderBy],
|
|
321
|
+
["organization_id", request.organizationId],
|
|
322
|
+
["page", request.page],
|
|
323
|
+
[
|
|
324
|
+
"page_size",
|
|
325
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
326
|
+
],
|
|
327
|
+
["private_network_id", request.privateNetworkId],
|
|
328
|
+
["project_id", request.projectId],
|
|
329
|
+
["server_id", request.serverId]
|
|
330
|
+
)
|
|
331
|
+
},
|
|
332
|
+
unmarshalListServerPrivateNetworksResponse
|
|
333
|
+
);
|
|
334
|
+
/**
|
|
335
|
+
* List the Private Networks of a server. List the Private Networks of an
|
|
336
|
+
* Apple silicon server.
|
|
337
|
+
*
|
|
338
|
+
* @param request - The request
|
|
339
|
+
* {@link PrivateNetworkApiListServerPrivateNetworksRequest}
|
|
340
|
+
* @returns A Promise of ListServerPrivateNetworksResponse
|
|
341
|
+
*/
|
|
342
|
+
listServerPrivateNetworks = (request = {}) => enrichForPagination(
|
|
343
|
+
"serverPrivateNetworks",
|
|
344
|
+
this.pageOfListServerPrivateNetworks,
|
|
345
|
+
request
|
|
346
|
+
);
|
|
347
|
+
/**
|
|
348
|
+
* Delete a Private Network.
|
|
349
|
+
*
|
|
350
|
+
* @param request - The request
|
|
351
|
+
* {@link PrivateNetworkApiDeleteServerPrivateNetworkRequest}
|
|
352
|
+
*/
|
|
353
|
+
deleteServerPrivateNetwork = (request) => this.client.fetch({
|
|
354
|
+
method: "DELETE",
|
|
355
|
+
path: `/apple-silicon/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}`
|
|
356
|
+
});
|
|
357
|
+
}
|
|
242
358
|
export {
|
|
243
|
-
API
|
|
359
|
+
API,
|
|
360
|
+
PrivateNetworkAPI
|
|
244
361
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES = ["attaching", "detaching"];
|
|
4
|
+
const SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES = ["vpc_updating"];
|
|
3
5
|
const SERVER_TRANSIENT_STATUSES = [
|
|
4
6
|
"starting",
|
|
5
7
|
"rebooting",
|
|
@@ -9,4 +11,6 @@ const SERVER_TRANSIENT_STATUSES = [
|
|
|
9
11
|
"reinstalling",
|
|
10
12
|
"busy"
|
|
11
13
|
];
|
|
14
|
+
exports.SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES = SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES;
|
|
15
|
+
exports.SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES = SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES;
|
|
12
16
|
exports.SERVER_TRANSIENT_STATUSES = SERVER_TRANSIENT_STATUSES;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import type { ServerStatus } from './types.gen';
|
|
1
|
+
import type { ServerPrivateNetworkServerStatus, ServerPrivateNetworkStatus, ServerStatus } from './types.gen';
|
|
2
|
+
/** Lists transient statutes of the enum {@link ServerPrivateNetworkServerStatus}. */
|
|
3
|
+
export declare const SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES: ServerPrivateNetworkServerStatus[];
|
|
4
|
+
/** Lists transient statutes of the enum {@link ServerPrivateNetworkStatus}. */
|
|
5
|
+
export declare const SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES: ServerPrivateNetworkStatus[];
|
|
2
6
|
/** Lists transient statutes of the enum {@link ServerStatus}. */
|
|
3
7
|
export declare const SERVER_TRANSIENT_STATUSES: ServerStatus[];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES = ["attaching", "detaching"];
|
|
2
|
+
const SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES = ["vpc_updating"];
|
|
1
3
|
const SERVER_TRANSIENT_STATUSES = [
|
|
2
4
|
"starting",
|
|
3
5
|
"rebooting",
|
|
@@ -8,5 +10,7 @@ const SERVER_TRANSIENT_STATUSES = [
|
|
|
8
10
|
"busy"
|
|
9
11
|
];
|
|
10
12
|
export {
|
|
13
|
+
SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES,
|
|
14
|
+
SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES,
|
|
11
15
|
SERVER_TRANSIENT_STATUSES
|
|
12
16
|
};
|
|
@@ -3,4 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const api_gen = require("./api.gen.cjs");
|
|
4
4
|
const content_gen = require("./content.gen.cjs");
|
|
5
5
|
exports.API = api_gen.API;
|
|
6
|
+
exports.PrivateNetworkAPI = api_gen.PrivateNetworkAPI;
|
|
7
|
+
exports.SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES = content_gen.SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES;
|
|
8
|
+
exports.SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES = content_gen.SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES;
|
|
6
9
|
exports.SERVER_TRANSIENT_STATUSES = content_gen.SERVER_TRANSIENT_STATUSES;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { API } from './api.gen';
|
|
1
|
+
export { API, PrivateNetworkAPI } from './api.gen';
|
|
2
2
|
export * from './content.gen';
|
|
3
|
-
export type { ConnectivityDiagnostic, ConnectivityDiagnosticActionType, ConnectivityDiagnosticDiagnosticStatus, ConnectivityDiagnosticServerHealth, CreateServerRequest, DeleteServerRequest, GetConnectivityDiagnosticRequest, GetOSRequest, GetServerRequest, GetServerTypeRequest, ListOSRequest, ListOSResponse, ListServerTypesRequest, ListServerTypesResponse, ListServersRequest, ListServersRequestOrderBy, ListServersResponse, OS, RebootServerRequest, ReinstallServerRequest, Server, ServerStatus, ServerType, ServerTypeCPU, ServerTypeDisk, ServerTypeGPU, ServerTypeMemory, ServerTypeNetwork, ServerTypeStock, StartConnectivityDiagnosticRequest, StartConnectivityDiagnosticResponse, UpdateServerRequest, } from './types.gen';
|
|
3
|
+
export type { ConnectivityDiagnostic, ConnectivityDiagnosticActionType, ConnectivityDiagnosticDiagnosticStatus, ConnectivityDiagnosticServerHealth, CreateServerRequest, DeleteServerRequest, GetConnectivityDiagnosticRequest, GetOSRequest, GetServerRequest, GetServerTypeRequest, ListOSRequest, ListOSResponse, ListServerPrivateNetworksRequestOrderBy, ListServerPrivateNetworksResponse, ListServerTypesRequest, ListServerTypesResponse, ListServersRequest, ListServersRequestOrderBy, ListServersResponse, 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,6 +1,9 @@
|
|
|
1
|
-
import { API } from "./api.gen.js";
|
|
2
|
-
import { SERVER_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
1
|
+
import { API, PrivateNetworkAPI } from "./api.gen.js";
|
|
2
|
+
import { SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES, SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
3
|
export {
|
|
4
4
|
API,
|
|
5
|
+
PrivateNetworkAPI,
|
|
6
|
+
SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES,
|
|
7
|
+
SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES,
|
|
5
8
|
SERVER_TRANSIENT_STATUSES
|
|
6
9
|
};
|
|
@@ -22,6 +22,24 @@ const unmarshalOS = (data) => {
|
|
|
22
22
|
xcodeVersion: data.xcode_version
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
|
+
const unmarshalServerPrivateNetwork = (data) => {
|
|
26
|
+
if (!json.isJSONObject(data)) {
|
|
27
|
+
throw new TypeError(
|
|
28
|
+
`Unmarshalling the type 'ServerPrivateNetwork' failed as data isn't a dictionary.`
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
createdAt: marshalling.unmarshalDate(data.created_at),
|
|
33
|
+
id: data.id,
|
|
34
|
+
ipamIpIds: data.ipam_ip_ids,
|
|
35
|
+
privateNetworkId: data.private_network_id,
|
|
36
|
+
projectId: data.project_id,
|
|
37
|
+
serverId: data.server_id,
|
|
38
|
+
status: data.status,
|
|
39
|
+
updatedAt: marshalling.unmarshalDate(data.updated_at),
|
|
40
|
+
vlan: data.vlan
|
|
41
|
+
};
|
|
42
|
+
};
|
|
25
43
|
const unmarshalServerTypeCPU = (data) => {
|
|
26
44
|
if (!json.isJSONObject(data)) {
|
|
27
45
|
throw new TypeError(
|
|
@@ -118,6 +136,7 @@ const unmarshalServer = (data) => {
|
|
|
118
136
|
updatedAt: marshalling.unmarshalDate(data.updated_at),
|
|
119
137
|
vncPort: data.vnc_port,
|
|
120
138
|
vncUrl: data.vnc_url,
|
|
139
|
+
vpcStatus: data.vpc_status,
|
|
121
140
|
zone: data.zone
|
|
122
141
|
};
|
|
123
142
|
};
|
|
@@ -162,6 +181,20 @@ const unmarshalListOSResponse = (data) => {
|
|
|
162
181
|
totalCount: data.total_count
|
|
163
182
|
};
|
|
164
183
|
};
|
|
184
|
+
const unmarshalListServerPrivateNetworksResponse = (data) => {
|
|
185
|
+
if (!json.isJSONObject(data)) {
|
|
186
|
+
throw new TypeError(
|
|
187
|
+
`Unmarshalling the type 'ListServerPrivateNetworksResponse' failed as data isn't a dictionary.`
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
return {
|
|
191
|
+
serverPrivateNetworks: marshalling.unmarshalArrayOfObject(
|
|
192
|
+
data.server_private_networks,
|
|
193
|
+
unmarshalServerPrivateNetwork
|
|
194
|
+
),
|
|
195
|
+
totalCount: data.total_count
|
|
196
|
+
};
|
|
197
|
+
};
|
|
165
198
|
const unmarshalListServerTypesResponse = (data) => {
|
|
166
199
|
if (!json.isJSONObject(data)) {
|
|
167
200
|
throw new TypeError(
|
|
@@ -183,6 +216,19 @@ const unmarshalListServersResponse = (data) => {
|
|
|
183
216
|
totalCount: data.total_count
|
|
184
217
|
};
|
|
185
218
|
};
|
|
219
|
+
const unmarshalSetServerPrivateNetworksResponse = (data) => {
|
|
220
|
+
if (!json.isJSONObject(data)) {
|
|
221
|
+
throw new TypeError(
|
|
222
|
+
`Unmarshalling the type 'SetServerPrivateNetworksResponse' failed as data isn't a dictionary.`
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
return {
|
|
226
|
+
serverPrivateNetworks: marshalling.unmarshalArrayOfObject(
|
|
227
|
+
data.server_private_networks,
|
|
228
|
+
unmarshalServerPrivateNetwork
|
|
229
|
+
)
|
|
230
|
+
};
|
|
231
|
+
};
|
|
186
232
|
const unmarshalStartConnectivityDiagnosticResponse = (data) => {
|
|
187
233
|
if (!json.isJSONObject(data)) {
|
|
188
234
|
throw new TypeError(
|
|
@@ -194,11 +240,19 @@ const unmarshalStartConnectivityDiagnosticResponse = (data) => {
|
|
|
194
240
|
};
|
|
195
241
|
};
|
|
196
242
|
const marshalCreateServerRequest = (request, defaults) => ({
|
|
243
|
+
enable_vpc: request.enableVpc,
|
|
197
244
|
name: request.name || randomName("as"),
|
|
198
245
|
os_id: request.osId,
|
|
199
246
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
200
247
|
type: request.type
|
|
201
248
|
});
|
|
249
|
+
const marshalPrivateNetworkApiAddServerPrivateNetworkRequest = (request, defaults) => ({
|
|
250
|
+
ipam_ip_ids: request.ipamIpIds,
|
|
251
|
+
private_network_id: request.privateNetworkId
|
|
252
|
+
});
|
|
253
|
+
const marshalPrivateNetworkApiSetServerPrivateNetworksRequest = (request, defaults) => ({
|
|
254
|
+
per_private_network_ipam_ip_ids: request.perPrivateNetworkIpamIpIds
|
|
255
|
+
});
|
|
202
256
|
const marshalReinstallServerRequest = (request, defaults) => ({
|
|
203
257
|
os_id: request.osId
|
|
204
258
|
});
|
|
@@ -206,18 +260,24 @@ const marshalStartConnectivityDiagnosticRequest = (request, defaults) => ({
|
|
|
206
260
|
server_id: request.serverId
|
|
207
261
|
});
|
|
208
262
|
const marshalUpdateServerRequest = (request, defaults) => ({
|
|
263
|
+
enable_vpc: request.enableVpc,
|
|
209
264
|
name: request.name,
|
|
210
265
|
schedule_deletion: request.scheduleDeletion
|
|
211
266
|
});
|
|
212
267
|
exports.marshalCreateServerRequest = marshalCreateServerRequest;
|
|
268
|
+
exports.marshalPrivateNetworkApiAddServerPrivateNetworkRequest = marshalPrivateNetworkApiAddServerPrivateNetworkRequest;
|
|
269
|
+
exports.marshalPrivateNetworkApiSetServerPrivateNetworksRequest = marshalPrivateNetworkApiSetServerPrivateNetworksRequest;
|
|
213
270
|
exports.marshalReinstallServerRequest = marshalReinstallServerRequest;
|
|
214
271
|
exports.marshalStartConnectivityDiagnosticRequest = marshalStartConnectivityDiagnosticRequest;
|
|
215
272
|
exports.marshalUpdateServerRequest = marshalUpdateServerRequest;
|
|
216
273
|
exports.unmarshalConnectivityDiagnostic = unmarshalConnectivityDiagnostic;
|
|
217
274
|
exports.unmarshalListOSResponse = unmarshalListOSResponse;
|
|
275
|
+
exports.unmarshalListServerPrivateNetworksResponse = unmarshalListServerPrivateNetworksResponse;
|
|
218
276
|
exports.unmarshalListServerTypesResponse = unmarshalListServerTypesResponse;
|
|
219
277
|
exports.unmarshalListServersResponse = unmarshalListServersResponse;
|
|
220
278
|
exports.unmarshalOS = unmarshalOS;
|
|
221
279
|
exports.unmarshalServer = unmarshalServer;
|
|
280
|
+
exports.unmarshalServerPrivateNetwork = unmarshalServerPrivateNetwork;
|
|
222
281
|
exports.unmarshalServerType = unmarshalServerType;
|
|
282
|
+
exports.unmarshalSetServerPrivateNetworksResponse = unmarshalSetServerPrivateNetworksResponse;
|
|
223
283
|
exports.unmarshalStartConnectivityDiagnosticResponse = unmarshalStartConnectivityDiagnosticResponse;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import type { DefaultValues } from '../../../bridge';
|
|
2
|
-
import type { ConnectivityDiagnostic, CreateServerRequest, ListOSResponse, ListServerTypesResponse, ListServersResponse, OS, ReinstallServerRequest, Server, ServerType, StartConnectivityDiagnosticRequest, StartConnectivityDiagnosticResponse, UpdateServerRequest } from './types.gen';
|
|
2
|
+
import type { ConnectivityDiagnostic, CreateServerRequest, ListOSResponse, ListServerPrivateNetworksResponse, ListServerTypesResponse, ListServersResponse, OS, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, ReinstallServerRequest, Server, ServerPrivateNetwork, ServerType, SetServerPrivateNetworksResponse, StartConnectivityDiagnosticRequest, StartConnectivityDiagnosticResponse, UpdateServerRequest } from './types.gen';
|
|
3
3
|
export declare const unmarshalOS: (data: unknown) => OS;
|
|
4
|
+
export declare const unmarshalServerPrivateNetwork: (data: unknown) => ServerPrivateNetwork;
|
|
4
5
|
export declare const unmarshalServerType: (data: unknown) => ServerType;
|
|
5
6
|
export declare const unmarshalServer: (data: unknown) => Server;
|
|
6
7
|
export declare const unmarshalConnectivityDiagnostic: (data: unknown) => ConnectivityDiagnostic;
|
|
7
8
|
export declare const unmarshalListOSResponse: (data: unknown) => ListOSResponse;
|
|
9
|
+
export declare const unmarshalListServerPrivateNetworksResponse: (data: unknown) => ListServerPrivateNetworksResponse;
|
|
8
10
|
export declare const unmarshalListServerTypesResponse: (data: unknown) => ListServerTypesResponse;
|
|
9
11
|
export declare const unmarshalListServersResponse: (data: unknown) => ListServersResponse;
|
|
12
|
+
export declare const unmarshalSetServerPrivateNetworksResponse: (data: unknown) => SetServerPrivateNetworksResponse;
|
|
10
13
|
export declare const unmarshalStartConnectivityDiagnosticResponse: (data: unknown) => StartConnectivityDiagnosticResponse;
|
|
11
14
|
export declare const marshalCreateServerRequest: (request: CreateServerRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
15
|
+
export declare const marshalPrivateNetworkApiAddServerPrivateNetworkRequest: (request: PrivateNetworkApiAddServerPrivateNetworkRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
16
|
+
export declare const marshalPrivateNetworkApiSetServerPrivateNetworksRequest: (request: PrivateNetworkApiSetServerPrivateNetworksRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
12
17
|
export declare const marshalReinstallServerRequest: (request: ReinstallServerRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
13
18
|
export declare const marshalStartConnectivityDiagnosticRequest: (request: StartConnectivityDiagnosticRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
14
19
|
export declare const marshalUpdateServerRequest: (request: UpdateServerRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -20,6 +20,24 @@ const unmarshalOS = (data) => {
|
|
|
20
20
|
xcodeVersion: data.xcode_version
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
+
const unmarshalServerPrivateNetwork = (data) => {
|
|
24
|
+
if (!isJSONObject(data)) {
|
|
25
|
+
throw new TypeError(
|
|
26
|
+
`Unmarshalling the type 'ServerPrivateNetwork' failed as data isn't a dictionary.`
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
createdAt: unmarshalDate(data.created_at),
|
|
31
|
+
id: data.id,
|
|
32
|
+
ipamIpIds: data.ipam_ip_ids,
|
|
33
|
+
privateNetworkId: data.private_network_id,
|
|
34
|
+
projectId: data.project_id,
|
|
35
|
+
serverId: data.server_id,
|
|
36
|
+
status: data.status,
|
|
37
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
38
|
+
vlan: data.vlan
|
|
39
|
+
};
|
|
40
|
+
};
|
|
23
41
|
const unmarshalServerTypeCPU = (data) => {
|
|
24
42
|
if (!isJSONObject(data)) {
|
|
25
43
|
throw new TypeError(
|
|
@@ -116,6 +134,7 @@ const unmarshalServer = (data) => {
|
|
|
116
134
|
updatedAt: unmarshalDate(data.updated_at),
|
|
117
135
|
vncPort: data.vnc_port,
|
|
118
136
|
vncUrl: data.vnc_url,
|
|
137
|
+
vpcStatus: data.vpc_status,
|
|
119
138
|
zone: data.zone
|
|
120
139
|
};
|
|
121
140
|
};
|
|
@@ -160,6 +179,20 @@ const unmarshalListOSResponse = (data) => {
|
|
|
160
179
|
totalCount: data.total_count
|
|
161
180
|
};
|
|
162
181
|
};
|
|
182
|
+
const unmarshalListServerPrivateNetworksResponse = (data) => {
|
|
183
|
+
if (!isJSONObject(data)) {
|
|
184
|
+
throw new TypeError(
|
|
185
|
+
`Unmarshalling the type 'ListServerPrivateNetworksResponse' failed as data isn't a dictionary.`
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
return {
|
|
189
|
+
serverPrivateNetworks: unmarshalArrayOfObject(
|
|
190
|
+
data.server_private_networks,
|
|
191
|
+
unmarshalServerPrivateNetwork
|
|
192
|
+
),
|
|
193
|
+
totalCount: data.total_count
|
|
194
|
+
};
|
|
195
|
+
};
|
|
163
196
|
const unmarshalListServerTypesResponse = (data) => {
|
|
164
197
|
if (!isJSONObject(data)) {
|
|
165
198
|
throw new TypeError(
|
|
@@ -181,6 +214,19 @@ const unmarshalListServersResponse = (data) => {
|
|
|
181
214
|
totalCount: data.total_count
|
|
182
215
|
};
|
|
183
216
|
};
|
|
217
|
+
const unmarshalSetServerPrivateNetworksResponse = (data) => {
|
|
218
|
+
if (!isJSONObject(data)) {
|
|
219
|
+
throw new TypeError(
|
|
220
|
+
`Unmarshalling the type 'SetServerPrivateNetworksResponse' failed as data isn't a dictionary.`
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
return {
|
|
224
|
+
serverPrivateNetworks: unmarshalArrayOfObject(
|
|
225
|
+
data.server_private_networks,
|
|
226
|
+
unmarshalServerPrivateNetwork
|
|
227
|
+
)
|
|
228
|
+
};
|
|
229
|
+
};
|
|
184
230
|
const unmarshalStartConnectivityDiagnosticResponse = (data) => {
|
|
185
231
|
if (!isJSONObject(data)) {
|
|
186
232
|
throw new TypeError(
|
|
@@ -192,11 +238,19 @@ const unmarshalStartConnectivityDiagnosticResponse = (data) => {
|
|
|
192
238
|
};
|
|
193
239
|
};
|
|
194
240
|
const marshalCreateServerRequest = (request, defaults) => ({
|
|
241
|
+
enable_vpc: request.enableVpc,
|
|
195
242
|
name: request.name || randomName("as"),
|
|
196
243
|
os_id: request.osId,
|
|
197
244
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
198
245
|
type: request.type
|
|
199
246
|
});
|
|
247
|
+
const marshalPrivateNetworkApiAddServerPrivateNetworkRequest = (request, defaults) => ({
|
|
248
|
+
ipam_ip_ids: request.ipamIpIds,
|
|
249
|
+
private_network_id: request.privateNetworkId
|
|
250
|
+
});
|
|
251
|
+
const marshalPrivateNetworkApiSetServerPrivateNetworksRequest = (request, defaults) => ({
|
|
252
|
+
per_private_network_ipam_ip_ids: request.perPrivateNetworkIpamIpIds
|
|
253
|
+
});
|
|
200
254
|
const marshalReinstallServerRequest = (request, defaults) => ({
|
|
201
255
|
os_id: request.osId
|
|
202
256
|
});
|
|
@@ -204,20 +258,26 @@ const marshalStartConnectivityDiagnosticRequest = (request, defaults) => ({
|
|
|
204
258
|
server_id: request.serverId
|
|
205
259
|
});
|
|
206
260
|
const marshalUpdateServerRequest = (request, defaults) => ({
|
|
261
|
+
enable_vpc: request.enableVpc,
|
|
207
262
|
name: request.name,
|
|
208
263
|
schedule_deletion: request.scheduleDeletion
|
|
209
264
|
});
|
|
210
265
|
export {
|
|
211
266
|
marshalCreateServerRequest,
|
|
267
|
+
marshalPrivateNetworkApiAddServerPrivateNetworkRequest,
|
|
268
|
+
marshalPrivateNetworkApiSetServerPrivateNetworksRequest,
|
|
212
269
|
marshalReinstallServerRequest,
|
|
213
270
|
marshalStartConnectivityDiagnosticRequest,
|
|
214
271
|
marshalUpdateServerRequest,
|
|
215
272
|
unmarshalConnectivityDiagnostic,
|
|
216
273
|
unmarshalListOSResponse,
|
|
274
|
+
unmarshalListServerPrivateNetworksResponse,
|
|
217
275
|
unmarshalListServerTypesResponse,
|
|
218
276
|
unmarshalListServersResponse,
|
|
219
277
|
unmarshalOS,
|
|
220
278
|
unmarshalServer,
|
|
279
|
+
unmarshalServerPrivateNetwork,
|
|
221
280
|
unmarshalServerType,
|
|
281
|
+
unmarshalSetServerPrivateNetworksResponse,
|
|
222
282
|
unmarshalStartConnectivityDiagnosticResponse
|
|
223
283
|
};
|