@scaleway/sdk 2.30.0 → 2.31.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/index.gen.d.ts +1 -1
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.cjs +23 -0
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +23 -0
- package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +11 -0
- package/dist/api/block/v1alpha1/content.gen.cjs +2 -1
- package/dist/api/block/v1alpha1/content.gen.js +2 -1
- package/dist/api/block/v1alpha1/types.gen.d.ts +1 -1
- package/dist/api/instance/v1/api.gen.cjs +25 -0
- package/dist/api/instance/v1/api.gen.d.ts +17 -1
- package/dist/api/instance/v1/api.gen.js +26 -1
- package/dist/api/instance/v1/index.gen.d.ts +1 -1
- package/dist/api/instance/v1/marshalling.gen.cjs +14 -0
- package/dist/api/instance/v1/marshalling.gen.d.ts +2 -1
- package/dist/api/instance/v1/marshalling.gen.js +14 -0
- package/dist/api/instance/v1/types.gen.d.ts +25 -0
- package/dist/api/vpc/v2/api.gen.cjs +28 -1
- package/dist/api/vpc/v2/api.gen.d.ts +14 -2
- package/dist/api/vpc/v2/api.gen.js +29 -2
- package/dist/api/vpc/v2/index.gen.d.ts +1 -1
- package/dist/api/vpc/v2/marshalling.gen.cjs +16 -1
- package/dist/api/vpc/v2/marshalling.gen.d.ts +2 -1
- package/dist/api/vpc/v2/marshalling.gen.js +16 -1
- package/dist/api/vpc/v2/types.gen.d.ts +41 -0
- 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,3 +1,3 @@
|
|
|
1
1
|
export { API } from './api.gen';
|
|
2
2
|
export * from './content.gen';
|
|
3
|
-
export type { CreateServerRequest, DeleteServerRequest, GetOSRequest, GetServerRequest, GetServerTypeRequest, ListOSRequest, ListOSResponse, ListServerTypesRequest, ListServerTypesResponse, ListServersRequest, ListServersRequestOrderBy, ListServersResponse, OS, RebootServerRequest, ReinstallServerRequest, Server, ServerStatus, ServerType, ServerTypeCPU, ServerTypeDisk, ServerTypeMemory, ServerTypeStock, UpdateServerRequest, } from './types.gen';
|
|
3
|
+
export type { CreateServerRequest, DeleteServerRequest, GetOSRequest, GetServerRequest, GetServerTypeRequest, ListOSRequest, ListOSResponse, ListServerTypesRequest, ListServerTypesResponse, ListServersRequest, ListServersRequestOrderBy, ListServersResponse, OS, RebootServerRequest, ReinstallServerRequest, Server, ServerStatus, ServerType, ServerTypeCPU, ServerTypeDisk, ServerTypeGPU, ServerTypeMemory, ServerTypeNetwork, ServerTypeStock, UpdateServerRequest, } from './types.gen';
|
|
@@ -29,6 +29,7 @@ const unmarshalServerTypeCPU = (data) => {
|
|
|
29
29
|
}
|
|
30
30
|
return {
|
|
31
31
|
coreCount: data.core_count,
|
|
32
|
+
frequency: data.frequency,
|
|
32
33
|
name: data.name
|
|
33
34
|
};
|
|
34
35
|
};
|
|
@@ -43,6 +44,16 @@ const unmarshalServerTypeDisk = (data) => {
|
|
|
43
44
|
type: data.type
|
|
44
45
|
};
|
|
45
46
|
};
|
|
47
|
+
const unmarshalServerTypeGPU = (data) => {
|
|
48
|
+
if (!json.isJSONObject(data)) {
|
|
49
|
+
throw new TypeError(
|
|
50
|
+
`Unmarshalling the type 'ServerTypeGPU' failed as data isn't a dictionary.`
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
count: data.count
|
|
55
|
+
};
|
|
56
|
+
};
|
|
46
57
|
const unmarshalServerTypeMemory = (data) => {
|
|
47
58
|
if (!json.isJSONObject(data)) {
|
|
48
59
|
throw new TypeError(
|
|
@@ -54,6 +65,16 @@ const unmarshalServerTypeMemory = (data) => {
|
|
|
54
65
|
type: data.type
|
|
55
66
|
};
|
|
56
67
|
};
|
|
68
|
+
const unmarshalServerTypeNetwork = (data) => {
|
|
69
|
+
if (!json.isJSONObject(data)) {
|
|
70
|
+
throw new TypeError(
|
|
71
|
+
`Unmarshalling the type 'ServerTypeNetwork' failed as data isn't a dictionary.`
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
publicBandwidthBps: data.public_bandwidth_bps
|
|
76
|
+
};
|
|
77
|
+
};
|
|
57
78
|
const unmarshalServerType = (data) => {
|
|
58
79
|
if (!json.isJSONObject(data)) {
|
|
59
80
|
throw new TypeError(
|
|
@@ -64,9 +85,11 @@ const unmarshalServerType = (data) => {
|
|
|
64
85
|
cpu: data.cpu ? unmarshalServerTypeCPU(data.cpu) : void 0,
|
|
65
86
|
defaultOs: data.default_os ? unmarshalOS(data.default_os) : void 0,
|
|
66
87
|
disk: data.disk ? unmarshalServerTypeDisk(data.disk) : void 0,
|
|
88
|
+
gpu: data.gpu ? unmarshalServerTypeGPU(data.gpu) : void 0,
|
|
67
89
|
memory: data.memory ? unmarshalServerTypeMemory(data.memory) : void 0,
|
|
68
90
|
minimumLeaseDuration: data.minimum_lease_duration,
|
|
69
91
|
name: data.name,
|
|
92
|
+
network: data.network ? unmarshalServerTypeNetwork(data.network) : void 0,
|
|
70
93
|
stock: data.stock
|
|
71
94
|
};
|
|
72
95
|
};
|
|
@@ -27,6 +27,7 @@ const unmarshalServerTypeCPU = (data) => {
|
|
|
27
27
|
}
|
|
28
28
|
return {
|
|
29
29
|
coreCount: data.core_count,
|
|
30
|
+
frequency: data.frequency,
|
|
30
31
|
name: data.name
|
|
31
32
|
};
|
|
32
33
|
};
|
|
@@ -41,6 +42,16 @@ const unmarshalServerTypeDisk = (data) => {
|
|
|
41
42
|
type: data.type
|
|
42
43
|
};
|
|
43
44
|
};
|
|
45
|
+
const unmarshalServerTypeGPU = (data) => {
|
|
46
|
+
if (!isJSONObject(data)) {
|
|
47
|
+
throw new TypeError(
|
|
48
|
+
`Unmarshalling the type 'ServerTypeGPU' failed as data isn't a dictionary.`
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
count: data.count
|
|
53
|
+
};
|
|
54
|
+
};
|
|
44
55
|
const unmarshalServerTypeMemory = (data) => {
|
|
45
56
|
if (!isJSONObject(data)) {
|
|
46
57
|
throw new TypeError(
|
|
@@ -52,6 +63,16 @@ const unmarshalServerTypeMemory = (data) => {
|
|
|
52
63
|
type: data.type
|
|
53
64
|
};
|
|
54
65
|
};
|
|
66
|
+
const unmarshalServerTypeNetwork = (data) => {
|
|
67
|
+
if (!isJSONObject(data)) {
|
|
68
|
+
throw new TypeError(
|
|
69
|
+
`Unmarshalling the type 'ServerTypeNetwork' failed as data isn't a dictionary.`
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
publicBandwidthBps: data.public_bandwidth_bps
|
|
74
|
+
};
|
|
75
|
+
};
|
|
55
76
|
const unmarshalServerType = (data) => {
|
|
56
77
|
if (!isJSONObject(data)) {
|
|
57
78
|
throw new TypeError(
|
|
@@ -62,9 +83,11 @@ const unmarshalServerType = (data) => {
|
|
|
62
83
|
cpu: data.cpu ? unmarshalServerTypeCPU(data.cpu) : void 0,
|
|
63
84
|
defaultOs: data.default_os ? unmarshalOS(data.default_os) : void 0,
|
|
64
85
|
disk: data.disk ? unmarshalServerTypeDisk(data.disk) : void 0,
|
|
86
|
+
gpu: data.gpu ? unmarshalServerTypeGPU(data.gpu) : void 0,
|
|
65
87
|
memory: data.memory ? unmarshalServerTypeMemory(data.memory) : void 0,
|
|
66
88
|
minimumLeaseDuration: data.minimum_lease_duration,
|
|
67
89
|
name: data.name,
|
|
90
|
+
network: data.network ? unmarshalServerTypeNetwork(data.network) : void 0,
|
|
68
91
|
stock: data.stock
|
|
69
92
|
};
|
|
70
93
|
};
|
|
@@ -25,15 +25,22 @@ export interface OS {
|
|
|
25
25
|
export interface ServerTypeCPU {
|
|
26
26
|
name: string;
|
|
27
27
|
coreCount: number;
|
|
28
|
+
frequency: number;
|
|
28
29
|
}
|
|
29
30
|
export interface ServerTypeDisk {
|
|
30
31
|
capacity: number;
|
|
31
32
|
type: string;
|
|
32
33
|
}
|
|
34
|
+
export interface ServerTypeGPU {
|
|
35
|
+
count: number;
|
|
36
|
+
}
|
|
33
37
|
export interface ServerTypeMemory {
|
|
34
38
|
capacity: number;
|
|
35
39
|
type: string;
|
|
36
40
|
}
|
|
41
|
+
export interface ServerTypeNetwork {
|
|
42
|
+
publicBandwidthBps: number;
|
|
43
|
+
}
|
|
37
44
|
export interface ServerType {
|
|
38
45
|
/** CPU description. */
|
|
39
46
|
cpu?: ServerTypeCPU;
|
|
@@ -47,6 +54,10 @@ export interface ServerType {
|
|
|
47
54
|
stock: ServerTypeStock;
|
|
48
55
|
/** Minimum duration of the lease in seconds (example. 3.4s). */
|
|
49
56
|
minimumLeaseDuration?: string;
|
|
57
|
+
/** GPU description. */
|
|
58
|
+
gpu?: ServerTypeGPU;
|
|
59
|
+
/** Network description. */
|
|
60
|
+
network?: ServerTypeNetwork;
|
|
50
61
|
/** The default OS for this server type. */
|
|
51
62
|
defaultOs?: OS;
|
|
52
63
|
}
|
|
@@ -13,7 +13,8 @@ const VOLUME_TRANSIENT_STATUSES = [
|
|
|
13
13
|
"creating",
|
|
14
14
|
"deleting",
|
|
15
15
|
"resizing",
|
|
16
|
-
"snapshotting"
|
|
16
|
+
"snapshotting",
|
|
17
|
+
"updating"
|
|
17
18
|
];
|
|
18
19
|
exports.REFERENCE_TRANSIENT_STATUSES = REFERENCE_TRANSIENT_STATUSES;
|
|
19
20
|
exports.SNAPSHOT_TRANSIENT_STATUSES = SNAPSHOT_TRANSIENT_STATUSES;
|
|
@@ -5,7 +5,7 @@ export type ReferenceStatus = 'unknown_status' | 'attaching' | 'attached' | 'det
|
|
|
5
5
|
export type ReferenceType = 'unknown_type' | 'link' | 'exclusive' | 'read_only';
|
|
6
6
|
export type SnapshotStatus = 'unknown_status' | 'creating' | 'available' | 'error' | 'deleting' | 'deleted' | 'in_use' | 'locked';
|
|
7
7
|
export type StorageClass = 'unknown_storage_class' | 'unspecified' | 'bssd' | 'sbs';
|
|
8
|
-
export type VolumeStatus = 'unknown_status' | 'creating' | 'available' | 'in_use' | 'deleting' | 'deleted' | 'resizing' | 'error' | 'snapshotting' | 'locked';
|
|
8
|
+
export type VolumeStatus = 'unknown_status' | 'creating' | 'available' | 'in_use' | 'deleting' | 'deleted' | 'resizing' | 'error' | 'snapshotting' | 'locked' | 'updating';
|
|
9
9
|
export interface Reference {
|
|
10
10
|
/** UUID of the reference. */
|
|
11
11
|
id: string;
|
|
@@ -1174,5 +1174,30 @@ class API extends api.API {
|
|
|
1174
1174
|
method: "POST",
|
|
1175
1175
|
path: `/instance/v1/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/block-migration/apply`
|
|
1176
1176
|
});
|
|
1177
|
+
/**
|
|
1178
|
+
* Get the encrypted RDP password. Get the initial administrator password for
|
|
1179
|
+
* Windows RDP. This password is encrypted using the SSH RSA key specified at
|
|
1180
|
+
* the time of Instance creation.
|
|
1181
|
+
*
|
|
1182
|
+
* @param request - The request {@link GetEncryptedRdpPasswordRequest}
|
|
1183
|
+
* @returns A Promise of GetEncryptedRdpPasswordResponse
|
|
1184
|
+
*/
|
|
1185
|
+
getEncryptedRdpPassword = (request) => this.client.fetch(
|
|
1186
|
+
{
|
|
1187
|
+
method: "GET",
|
|
1188
|
+
path: `/instance/v1/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${marshalling.validatePathParam("serverId", request.serverId)}/encrypted_rdp_password`
|
|
1189
|
+
},
|
|
1190
|
+
marshalling_gen.unmarshalGetEncryptedRdpPasswordResponse
|
|
1191
|
+
);
|
|
1192
|
+
/**
|
|
1193
|
+
* Delete the encrypted RDP password. Delete the initial administrator
|
|
1194
|
+
* password for Windows RDP.
|
|
1195
|
+
*
|
|
1196
|
+
* @param request - The request {@link DeleteEncryptedRdpPasswordRequest}
|
|
1197
|
+
*/
|
|
1198
|
+
deleteEncryptedRdpPassword = (request) => this.client.fetch({
|
|
1199
|
+
method: "DELETE",
|
|
1200
|
+
path: `/instance/v1/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${marshalling.validatePathParam("serverId", request.serverId)}/encrypted_rdp_password`
|
|
1201
|
+
});
|
|
1177
1202
|
}
|
|
1178
1203
|
exports.API = API;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { Zone } from '../../../bridge';
|
|
3
|
-
import type { ApplyBlockMigrationRequest, AttachServerVolumeRequest, AttachServerVolumeResponse, CreateImageRequest, CreateImageResponse, CreateIpRequest, CreateIpResponse, CreatePlacementGroupRequest, CreatePlacementGroupResponse, CreatePrivateNICRequest, CreatePrivateNICResponse, CreateSecurityGroupRequest, CreateSecurityGroupResponse, CreateSecurityGroupRuleRequest, CreateSecurityGroupRuleResponse, CreateServerRequest, CreateServerResponse, CreateSnapshotRequest, CreateSnapshotResponse, CreateVolumeRequest, CreateVolumeResponse, DeleteImageRequest, DeleteIpRequest, DeletePlacementGroupRequest, DeletePrivateNICRequest, DeleteSecurityGroupRequest, DeleteSecurityGroupRuleRequest, DeleteServerRequest, DeleteServerUserDataRequest, DeleteSnapshotRequest, DeleteVolumeRequest, DetachServerVolumeRequest, DetachServerVolumeResponse, ExportSnapshotRequest, ExportSnapshotResponse, GetBootscriptRequest, GetBootscriptResponse, GetDashboardRequest, GetDashboardResponse, GetImageRequest, GetImageResponse, GetIpRequest, GetIpResponse, GetPlacementGroupRequest, GetPlacementGroupResponse, GetPlacementGroupServersRequest, GetPlacementGroupServersResponse, GetPrivateNICRequest, GetPrivateNICResponse, GetSecurityGroupRequest, GetSecurityGroupResponse, GetSecurityGroupRuleRequest, GetSecurityGroupRuleResponse, GetServerRequest, GetServerResponse, GetServerTypesAvailabilityRequest, GetServerTypesAvailabilityResponse, GetSnapshotRequest, GetSnapshotResponse, GetVolumeRequest, GetVolumeResponse, ListBootscriptsRequest, ListBootscriptsResponse, ListDefaultSecurityGroupRulesRequest, ListImagesRequest, ListImagesResponse, ListIpsRequest, ListIpsResponse, ListPlacementGroupsRequest, ListPlacementGroupsResponse, ListPrivateNICsRequest, ListPrivateNICsResponse, ListSecurityGroupRulesRequest, ListSecurityGroupRulesResponse, ListSecurityGroupsRequest, ListSecurityGroupsResponse, ListServerActionsRequest, ListServerActionsResponse, ListServerUserDataRequest, ListServerUserDataResponse, ListServersRequest, ListServersResponse, ListServersTypesRequest, ListServersTypesResponse, ListSnapshotsRequest, ListSnapshotsResponse, ListVolumesRequest, ListVolumesResponse, ListVolumesTypesRequest, ListVolumesTypesResponse, MigrationPlan, PlanBlockMigrationRequest, PrivateNIC, ServerActionRequest, ServerActionResponse, SetImageRequest, SetPlacementGroupRequest, SetPlacementGroupResponse, SetPlacementGroupServersRequest, SetPlacementGroupServersResponse, SetSecurityGroupRulesRequest, SetSecurityGroupRulesResponse, UpdateImageRequest, UpdateImageResponse, UpdateIpRequest, UpdateIpResponse, UpdatePlacementGroupRequest, UpdatePlacementGroupResponse, UpdatePlacementGroupServersRequest, UpdatePlacementGroupServersResponse, UpdatePrivateNICRequest, UpdateSecurityGroupRequest, UpdateSecurityGroupResponse, UpdateSecurityGroupRuleRequest, UpdateSecurityGroupRuleResponse, UpdateServerRequest, UpdateServerResponse, UpdateSnapshotRequest, UpdateSnapshotResponse, UpdateVolumeRequest, UpdateVolumeResponse } from './types.gen';
|
|
3
|
+
import type { ApplyBlockMigrationRequest, AttachServerVolumeRequest, AttachServerVolumeResponse, CreateImageRequest, CreateImageResponse, CreateIpRequest, CreateIpResponse, CreatePlacementGroupRequest, CreatePlacementGroupResponse, CreatePrivateNICRequest, CreatePrivateNICResponse, CreateSecurityGroupRequest, CreateSecurityGroupResponse, CreateSecurityGroupRuleRequest, CreateSecurityGroupRuleResponse, CreateServerRequest, CreateServerResponse, CreateSnapshotRequest, CreateSnapshotResponse, CreateVolumeRequest, CreateVolumeResponse, DeleteEncryptedRdpPasswordRequest, DeleteImageRequest, DeleteIpRequest, DeletePlacementGroupRequest, DeletePrivateNICRequest, DeleteSecurityGroupRequest, DeleteSecurityGroupRuleRequest, DeleteServerRequest, DeleteServerUserDataRequest, DeleteSnapshotRequest, DeleteVolumeRequest, DetachServerVolumeRequest, DetachServerVolumeResponse, ExportSnapshotRequest, ExportSnapshotResponse, GetBootscriptRequest, GetBootscriptResponse, GetDashboardRequest, GetDashboardResponse, GetEncryptedRdpPasswordRequest, GetEncryptedRdpPasswordResponse, GetImageRequest, GetImageResponse, GetIpRequest, GetIpResponse, GetPlacementGroupRequest, GetPlacementGroupResponse, GetPlacementGroupServersRequest, GetPlacementGroupServersResponse, GetPrivateNICRequest, GetPrivateNICResponse, GetSecurityGroupRequest, GetSecurityGroupResponse, GetSecurityGroupRuleRequest, GetSecurityGroupRuleResponse, GetServerRequest, GetServerResponse, GetServerTypesAvailabilityRequest, GetServerTypesAvailabilityResponse, GetSnapshotRequest, GetSnapshotResponse, GetVolumeRequest, GetVolumeResponse, ListBootscriptsRequest, ListBootscriptsResponse, ListDefaultSecurityGroupRulesRequest, ListImagesRequest, ListImagesResponse, ListIpsRequest, ListIpsResponse, ListPlacementGroupsRequest, ListPlacementGroupsResponse, ListPrivateNICsRequest, ListPrivateNICsResponse, ListSecurityGroupRulesRequest, ListSecurityGroupRulesResponse, ListSecurityGroupsRequest, ListSecurityGroupsResponse, ListServerActionsRequest, ListServerActionsResponse, ListServerUserDataRequest, ListServerUserDataResponse, ListServersRequest, ListServersResponse, ListServersTypesRequest, ListServersTypesResponse, ListSnapshotsRequest, ListSnapshotsResponse, ListVolumesRequest, ListVolumesResponse, ListVolumesTypesRequest, ListVolumesTypesResponse, MigrationPlan, PlanBlockMigrationRequest, PrivateNIC, ServerActionRequest, ServerActionResponse, SetImageRequest, SetPlacementGroupRequest, SetPlacementGroupResponse, SetPlacementGroupServersRequest, SetPlacementGroupServersResponse, SetSecurityGroupRulesRequest, SetSecurityGroupRulesResponse, UpdateImageRequest, UpdateImageResponse, UpdateIpRequest, UpdateIpResponse, UpdatePlacementGroupRequest, UpdatePlacementGroupResponse, UpdatePlacementGroupServersRequest, UpdatePlacementGroupServersResponse, UpdatePrivateNICRequest, UpdateSecurityGroupRequest, UpdateSecurityGroupResponse, UpdateSecurityGroupRuleRequest, UpdateSecurityGroupRuleResponse, UpdateServerRequest, UpdateServerResponse, UpdateSnapshotRequest, UpdateSnapshotResponse, UpdateVolumeRequest, UpdateVolumeResponse } from './types.gen';
|
|
4
4
|
import type { SetImageResponse, SetSecurityGroupRequest, SetSecurityGroupResponse, SetSecurityGroupRuleRequest, SetSecurityGroupRuleResponse, SetServerRequest, SetServerResponse, SetSnapshotRequest, SetSnapshotResponse } from './types.private.gen';
|
|
5
5
|
/**
|
|
6
6
|
* Instance API.
|
|
@@ -529,4 +529,20 @@ export declare class API extends ParentAPI {
|
|
|
529
529
|
* @param request - The request {@link ApplyBlockMigrationRequest}
|
|
530
530
|
*/
|
|
531
531
|
applyBlockMigration: (request: Readonly<ApplyBlockMigrationRequest>) => Promise<void>;
|
|
532
|
+
/**
|
|
533
|
+
* Get the encrypted RDP password. Get the initial administrator password for
|
|
534
|
+
* Windows RDP. This password is encrypted using the SSH RSA key specified at
|
|
535
|
+
* the time of Instance creation.
|
|
536
|
+
*
|
|
537
|
+
* @param request - The request {@link GetEncryptedRdpPasswordRequest}
|
|
538
|
+
* @returns A Promise of GetEncryptedRdpPasswordResponse
|
|
539
|
+
*/
|
|
540
|
+
getEncryptedRdpPassword: (request: Readonly<GetEncryptedRdpPasswordRequest>) => Promise<GetEncryptedRdpPasswordResponse>;
|
|
541
|
+
/**
|
|
542
|
+
* Delete the encrypted RDP password. Delete the initial administrator
|
|
543
|
+
* password for Windows RDP.
|
|
544
|
+
*
|
|
545
|
+
* @param request - The request {@link DeleteEncryptedRdpPasswordRequest}
|
|
546
|
+
*/
|
|
547
|
+
deleteEncryptedRdpPassword: (request: Readonly<DeleteEncryptedRdpPasswordRequest>) => Promise<void>;
|
|
532
548
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { API as API$1 } from "../../../scw/api.js";
|
|
2
2
|
import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
|
|
3
3
|
import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
|
|
4
|
-
import { unmarshalGetServerTypesAvailabilityResponse, unmarshalListServersTypesResponse, unmarshalListVolumesTypesResponse, unmarshalListServersResponse, marshalCreateServerRequest, unmarshalCreateServerResponse, unmarshalGetServerResponse, marshalSetServerRequest, unmarshalSetServerResponse, marshalUpdateServerRequest, unmarshalUpdateServerResponse, unmarshalListServerActionsResponse, marshalServerActionRequest, unmarshalServerActionResponse, unmarshalListServerUserDataResponse, marshalAttachServerVolumeRequest, unmarshalAttachServerVolumeResponse, marshalDetachServerVolumeRequest, unmarshalDetachServerVolumeResponse, unmarshalListImagesResponse, unmarshalGetImageResponse, marshalCreateImageRequest, unmarshalCreateImageResponse, marshalSetImageRequest, unmarshalSetImageResponse, marshalUpdateImageRequest, unmarshalUpdateImageResponse, unmarshalListSnapshotsResponse, marshalCreateSnapshotRequest, unmarshalCreateSnapshotResponse, unmarshalGetSnapshotResponse, marshalSetSnapshotRequest, unmarshalSetSnapshotResponse, marshalUpdateSnapshotRequest, unmarshalUpdateSnapshotResponse, marshalExportSnapshotRequest, unmarshalExportSnapshotResponse, unmarshalListVolumesResponse, marshalCreateVolumeRequest, unmarshalCreateVolumeResponse, unmarshalGetVolumeResponse, marshalUpdateVolumeRequest, unmarshalUpdateVolumeResponse, unmarshalListSecurityGroupsResponse, marshalCreateSecurityGroupRequest, unmarshalCreateSecurityGroupResponse, unmarshalGetSecurityGroupResponse, marshalSetSecurityGroupRequest, unmarshalSetSecurityGroupResponse, marshalUpdateSecurityGroupRequest, unmarshalUpdateSecurityGroupResponse, unmarshalListSecurityGroupRulesResponse, marshalCreateSecurityGroupRuleRequest, unmarshalCreateSecurityGroupRuleResponse, marshalSetSecurityGroupRulesRequest, unmarshalSetSecurityGroupRulesResponse, unmarshalGetSecurityGroupRuleResponse, marshalSetSecurityGroupRuleRequest, unmarshalSetSecurityGroupRuleResponse, marshalUpdateSecurityGroupRuleRequest, unmarshalUpdateSecurityGroupRuleResponse, unmarshalListPlacementGroupsResponse, marshalCreatePlacementGroupRequest, unmarshalCreatePlacementGroupResponse, unmarshalGetPlacementGroupResponse, marshalSetPlacementGroupRequest, unmarshalSetPlacementGroupResponse, marshalUpdatePlacementGroupRequest, unmarshalUpdatePlacementGroupResponse, unmarshalGetPlacementGroupServersResponse, marshalSetPlacementGroupServersRequest, unmarshalSetPlacementGroupServersResponse, marshalUpdatePlacementGroupServersRequest, unmarshalUpdatePlacementGroupServersResponse, unmarshalListIpsResponse, marshalCreateIpRequest, unmarshalCreateIpResponse, unmarshalGetIpResponse, marshalUpdateIpRequest, unmarshalUpdateIpResponse, unmarshalListPrivateNICsResponse, marshalCreatePrivateNICRequest, unmarshalCreatePrivateNICResponse, unmarshalGetPrivateNICResponse, marshalUpdatePrivateNICRequest, unmarshalPrivateNIC, unmarshalListBootscriptsResponse, unmarshalGetBootscriptResponse, unmarshalGetDashboardResponse, marshalPlanBlockMigrationRequest, unmarshalMigrationPlan, marshalApplyBlockMigrationRequest } from "./marshalling.gen.js";
|
|
4
|
+
import { unmarshalGetServerTypesAvailabilityResponse, unmarshalListServersTypesResponse, unmarshalListVolumesTypesResponse, unmarshalListServersResponse, marshalCreateServerRequest, unmarshalCreateServerResponse, unmarshalGetServerResponse, marshalSetServerRequest, unmarshalSetServerResponse, marshalUpdateServerRequest, unmarshalUpdateServerResponse, unmarshalListServerActionsResponse, marshalServerActionRequest, unmarshalServerActionResponse, unmarshalListServerUserDataResponse, marshalAttachServerVolumeRequest, unmarshalAttachServerVolumeResponse, marshalDetachServerVolumeRequest, unmarshalDetachServerVolumeResponse, unmarshalListImagesResponse, unmarshalGetImageResponse, marshalCreateImageRequest, unmarshalCreateImageResponse, marshalSetImageRequest, unmarshalSetImageResponse, marshalUpdateImageRequest, unmarshalUpdateImageResponse, unmarshalListSnapshotsResponse, marshalCreateSnapshotRequest, unmarshalCreateSnapshotResponse, unmarshalGetSnapshotResponse, marshalSetSnapshotRequest, unmarshalSetSnapshotResponse, marshalUpdateSnapshotRequest, unmarshalUpdateSnapshotResponse, marshalExportSnapshotRequest, unmarshalExportSnapshotResponse, unmarshalListVolumesResponse, marshalCreateVolumeRequest, unmarshalCreateVolumeResponse, unmarshalGetVolumeResponse, marshalUpdateVolumeRequest, unmarshalUpdateVolumeResponse, unmarshalListSecurityGroupsResponse, marshalCreateSecurityGroupRequest, unmarshalCreateSecurityGroupResponse, unmarshalGetSecurityGroupResponse, marshalSetSecurityGroupRequest, unmarshalSetSecurityGroupResponse, marshalUpdateSecurityGroupRequest, unmarshalUpdateSecurityGroupResponse, unmarshalListSecurityGroupRulesResponse, marshalCreateSecurityGroupRuleRequest, unmarshalCreateSecurityGroupRuleResponse, marshalSetSecurityGroupRulesRequest, unmarshalSetSecurityGroupRulesResponse, unmarshalGetSecurityGroupRuleResponse, marshalSetSecurityGroupRuleRequest, unmarshalSetSecurityGroupRuleResponse, marshalUpdateSecurityGroupRuleRequest, unmarshalUpdateSecurityGroupRuleResponse, unmarshalListPlacementGroupsResponse, marshalCreatePlacementGroupRequest, unmarshalCreatePlacementGroupResponse, unmarshalGetPlacementGroupResponse, marshalSetPlacementGroupRequest, unmarshalSetPlacementGroupResponse, marshalUpdatePlacementGroupRequest, unmarshalUpdatePlacementGroupResponse, unmarshalGetPlacementGroupServersResponse, marshalSetPlacementGroupServersRequest, unmarshalSetPlacementGroupServersResponse, marshalUpdatePlacementGroupServersRequest, unmarshalUpdatePlacementGroupServersResponse, unmarshalListIpsResponse, marshalCreateIpRequest, unmarshalCreateIpResponse, unmarshalGetIpResponse, marshalUpdateIpRequest, unmarshalUpdateIpResponse, unmarshalListPrivateNICsResponse, marshalCreatePrivateNICRequest, unmarshalCreatePrivateNICResponse, unmarshalGetPrivateNICResponse, marshalUpdatePrivateNICRequest, unmarshalPrivateNIC, unmarshalListBootscriptsResponse, unmarshalGetBootscriptResponse, unmarshalGetDashboardResponse, marshalPlanBlockMigrationRequest, unmarshalMigrationPlan, marshalApplyBlockMigrationRequest, unmarshalGetEncryptedRdpPasswordResponse } from "./marshalling.gen.js";
|
|
5
5
|
const jsonContentHeaders = {
|
|
6
6
|
"Content-Type": "application/json; charset=utf-8"
|
|
7
7
|
};
|
|
@@ -1172,6 +1172,31 @@ class API extends API$1 {
|
|
|
1172
1172
|
method: "POST",
|
|
1173
1173
|
path: `/instance/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/block-migration/apply`
|
|
1174
1174
|
});
|
|
1175
|
+
/**
|
|
1176
|
+
* Get the encrypted RDP password. Get the initial administrator password for
|
|
1177
|
+
* Windows RDP. This password is encrypted using the SSH RSA key specified at
|
|
1178
|
+
* the time of Instance creation.
|
|
1179
|
+
*
|
|
1180
|
+
* @param request - The request {@link GetEncryptedRdpPasswordRequest}
|
|
1181
|
+
* @returns A Promise of GetEncryptedRdpPasswordResponse
|
|
1182
|
+
*/
|
|
1183
|
+
getEncryptedRdpPassword = (request) => this.client.fetch(
|
|
1184
|
+
{
|
|
1185
|
+
method: "GET",
|
|
1186
|
+
path: `/instance/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/encrypted_rdp_password`
|
|
1187
|
+
},
|
|
1188
|
+
unmarshalGetEncryptedRdpPasswordResponse
|
|
1189
|
+
);
|
|
1190
|
+
/**
|
|
1191
|
+
* Delete the encrypted RDP password. Delete the initial administrator
|
|
1192
|
+
* password for Windows RDP.
|
|
1193
|
+
*
|
|
1194
|
+
* @param request - The request {@link DeleteEncryptedRdpPasswordRequest}
|
|
1195
|
+
*/
|
|
1196
|
+
deleteEncryptedRdpPassword = (request) => this.client.fetch({
|
|
1197
|
+
method: "DELETE",
|
|
1198
|
+
path: `/instance/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/encrypted_rdp_password`
|
|
1199
|
+
});
|
|
1175
1200
|
}
|
|
1176
1201
|
export {
|
|
1177
1202
|
API
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { API } from './api.gen';
|
|
2
2
|
export * from './content.gen';
|
|
3
|
-
export type { ApplyBlockMigrationRequest, Arch, AttachServerVolumeRequest, AttachServerVolumeRequestVolumeType, AttachServerVolumeResponse, BootType, Bootscript, CreateImageRequest, CreateImageResponse, CreateIpRequest, CreateIpResponse, CreatePlacementGroupRequest, CreatePlacementGroupResponse, CreatePrivateNICRequest, CreatePrivateNICResponse, CreateSecurityGroupRequest, CreateSecurityGroupResponse, CreateSecurityGroupRuleRequest, CreateSecurityGroupRuleResponse, CreateServerRequest, CreateServerResponse, CreateSnapshotRequest, CreateSnapshotResponse, CreateVolumeRequest, CreateVolumeResponse, Dashboard, DeleteImageRequest, DeleteIpRequest, DeletePlacementGroupRequest, DeletePrivateNICRequest, DeleteSecurityGroupRequest, DeleteSecurityGroupRuleRequest, DeleteServerRequest, DeleteServerUserDataRequest, DeleteSnapshotRequest, DeleteVolumeRequest, DetachServerVolumeRequest, DetachServerVolumeResponse, ExportSnapshotRequest, ExportSnapshotResponse, GetBootscriptRequest, GetBootscriptResponse, GetDashboardRequest, GetDashboardResponse, GetImageRequest, GetImageResponse, GetIpRequest, GetIpResponse, GetPlacementGroupRequest, GetPlacementGroupResponse, GetPlacementGroupServersRequest, GetPlacementGroupServersResponse, GetPrivateNICRequest, GetPrivateNICResponse, GetSecurityGroupRequest, GetSecurityGroupResponse, GetSecurityGroupRuleRequest, GetSecurityGroupRuleResponse, GetServerRequest, GetServerResponse, GetServerTypesAvailabilityRequest, GetServerTypesAvailabilityResponse, GetServerTypesAvailabilityResponseAvailability, GetSnapshotRequest, GetSnapshotResponse, GetVolumeRequest, GetVolumeResponse, Image, ImageState, Ip, IpState, IpType, ListBootscriptsRequest, ListBootscriptsResponse, ListDefaultSecurityGroupRulesRequest, ListImagesRequest, ListImagesResponse, ListIpsRequest, ListIpsResponse, ListPlacementGroupsRequest, ListPlacementGroupsResponse, ListPrivateNICsRequest, ListPrivateNICsResponse, ListSecurityGroupRulesRequest, ListSecurityGroupRulesResponse, ListSecurityGroupsRequest, ListSecurityGroupsResponse, ListServerActionsRequest, ListServerActionsResponse, ListServerUserDataRequest, ListServerUserDataResponse, ListServersRequest, ListServersRequestOrder, ListServersResponse, ListServersTypesRequest, ListServersTypesResponse, ListSnapshotsRequest, ListSnapshotsResponse, ListVolumesRequest, ListVolumesResponse, ListVolumesTypesRequest, ListVolumesTypesResponse, MigrationPlan, PlacementGroup, PlacementGroupPolicyMode, PlacementGroupPolicyType, PlacementGroupServer, PlanBlockMigrationRequest, PrivateNIC, PrivateNICState, SecurityGroup, SecurityGroupPolicy, SecurityGroupRule, SecurityGroupRuleAction, SecurityGroupRuleDirection, SecurityGroupRuleProtocol, SecurityGroupState, SecurityGroupSummary, SecurityGroupTemplate, Server, ServerAction, ServerActionRequest, ServerActionRequestVolumeBackupTemplate, ServerActionResponse, ServerIp, ServerIpIpFamily, ServerIpProvisioningMode, ServerIpState, ServerIpv6, ServerLocation, ServerMaintenance, ServerState, ServerSummary, ServerType, ServerTypeCapabilities, ServerTypeNetwork, ServerTypeNetworkInterface, ServerTypeVolumeConstraintSizes, ServerTypeVolumeConstraintsByType, ServerTypesAvailability, SetImageRequest, SetPlacementGroupRequest, SetPlacementGroupResponse, SetPlacementGroupServersRequest, SetPlacementGroupServersResponse, SetSecurityGroupRulesRequest, SetSecurityGroupRulesRequestRule, SetSecurityGroupRulesResponse, Snapshot, SnapshotBaseVolume, SnapshotState, SnapshotVolumeType, Task, TaskStatus, UpdateImageRequest, UpdateImageResponse, UpdateIpRequest, UpdateIpResponse, UpdatePlacementGroupRequest, UpdatePlacementGroupResponse, UpdatePlacementGroupServersRequest, UpdatePlacementGroupServersResponse, UpdatePrivateNICRequest, UpdateSecurityGroupRequest, UpdateSecurityGroupResponse, UpdateSecurityGroupRuleRequest, UpdateSecurityGroupRuleResponse, UpdateServerRequest, UpdateServerResponse, UpdateSnapshotRequest, UpdateSnapshotResponse, UpdateVolumeRequest, UpdateVolumeResponse, Volume, VolumeImageUpdateTemplate, VolumeServer, VolumeServerState, VolumeServerTemplate, VolumeServerVolumeType, VolumeState, VolumeSummary, VolumeTemplate, VolumeType, VolumeTypeCapabilities, VolumeTypeConstraints, VolumeVolumeType, } from './types.gen';
|
|
3
|
+
export type { ApplyBlockMigrationRequest, Arch, AttachServerVolumeRequest, AttachServerVolumeRequestVolumeType, AttachServerVolumeResponse, BootType, Bootscript, CreateImageRequest, CreateImageResponse, CreateIpRequest, CreateIpResponse, CreatePlacementGroupRequest, CreatePlacementGroupResponse, CreatePrivateNICRequest, CreatePrivateNICResponse, CreateSecurityGroupRequest, CreateSecurityGroupResponse, CreateSecurityGroupRuleRequest, CreateSecurityGroupRuleResponse, CreateServerRequest, CreateServerResponse, CreateSnapshotRequest, CreateSnapshotResponse, CreateVolumeRequest, CreateVolumeResponse, Dashboard, DeleteEncryptedRdpPasswordRequest, DeleteImageRequest, DeleteIpRequest, DeletePlacementGroupRequest, DeletePrivateNICRequest, DeleteSecurityGroupRequest, DeleteSecurityGroupRuleRequest, DeleteServerRequest, DeleteServerUserDataRequest, DeleteSnapshotRequest, DeleteVolumeRequest, DetachServerVolumeRequest, DetachServerVolumeResponse, ExportSnapshotRequest, ExportSnapshotResponse, GetBootscriptRequest, GetBootscriptResponse, GetDashboardRequest, GetDashboardResponse, GetEncryptedRdpPasswordRequest, GetEncryptedRdpPasswordResponse, GetImageRequest, GetImageResponse, GetIpRequest, GetIpResponse, GetPlacementGroupRequest, GetPlacementGroupResponse, GetPlacementGroupServersRequest, GetPlacementGroupServersResponse, GetPrivateNICRequest, GetPrivateNICResponse, GetSecurityGroupRequest, GetSecurityGroupResponse, GetSecurityGroupRuleRequest, GetSecurityGroupRuleResponse, GetServerRequest, GetServerResponse, GetServerTypesAvailabilityRequest, GetServerTypesAvailabilityResponse, GetServerTypesAvailabilityResponseAvailability, GetSnapshotRequest, GetSnapshotResponse, GetVolumeRequest, GetVolumeResponse, Image, ImageState, Ip, IpState, IpType, ListBootscriptsRequest, ListBootscriptsResponse, ListDefaultSecurityGroupRulesRequest, ListImagesRequest, ListImagesResponse, ListIpsRequest, ListIpsResponse, ListPlacementGroupsRequest, ListPlacementGroupsResponse, ListPrivateNICsRequest, ListPrivateNICsResponse, ListSecurityGroupRulesRequest, ListSecurityGroupRulesResponse, ListSecurityGroupsRequest, ListSecurityGroupsResponse, ListServerActionsRequest, ListServerActionsResponse, ListServerUserDataRequest, ListServerUserDataResponse, ListServersRequest, ListServersRequestOrder, ListServersResponse, ListServersTypesRequest, ListServersTypesResponse, ListSnapshotsRequest, ListSnapshotsResponse, ListVolumesRequest, ListVolumesResponse, ListVolumesTypesRequest, ListVolumesTypesResponse, MigrationPlan, PlacementGroup, PlacementGroupPolicyMode, PlacementGroupPolicyType, PlacementGroupServer, PlanBlockMigrationRequest, PrivateNIC, PrivateNICState, SecurityGroup, SecurityGroupPolicy, SecurityGroupRule, SecurityGroupRuleAction, SecurityGroupRuleDirection, SecurityGroupRuleProtocol, SecurityGroupState, SecurityGroupSummary, SecurityGroupTemplate, Server, ServerAction, ServerActionRequest, ServerActionRequestVolumeBackupTemplate, ServerActionResponse, ServerIp, ServerIpIpFamily, ServerIpProvisioningMode, ServerIpState, ServerIpv6, ServerLocation, ServerMaintenance, ServerState, ServerSummary, ServerType, ServerTypeCapabilities, ServerTypeNetwork, ServerTypeNetworkInterface, ServerTypeVolumeConstraintSizes, ServerTypeVolumeConstraintsByType, ServerTypesAvailability, SetImageRequest, SetPlacementGroupRequest, SetPlacementGroupResponse, SetPlacementGroupServersRequest, SetPlacementGroupServersResponse, SetSecurityGroupRulesRequest, SetSecurityGroupRulesRequestRule, SetSecurityGroupRulesResponse, Snapshot, SnapshotBaseVolume, SnapshotState, SnapshotVolumeType, Task, TaskStatus, UpdateImageRequest, UpdateImageResponse, UpdateIpRequest, UpdateIpResponse, UpdatePlacementGroupRequest, UpdatePlacementGroupResponse, UpdatePlacementGroupServersRequest, UpdatePlacementGroupServersResponse, UpdatePrivateNICRequest, UpdateSecurityGroupRequest, UpdateSecurityGroupResponse, UpdateSecurityGroupRuleRequest, UpdateSecurityGroupRuleResponse, UpdateServerRequest, UpdateServerResponse, UpdateSnapshotRequest, UpdateSnapshotResponse, UpdateVolumeRequest, UpdateVolumeResponse, Volume, VolumeImageUpdateTemplate, VolumeServer, VolumeServerState, VolumeServerTemplate, VolumeServerVolumeType, VolumeState, VolumeSummary, VolumeTemplate, VolumeType, VolumeTypeCapabilities, VolumeTypeConstraints, VolumeVolumeType, } from './types.gen';
|
|
4
4
|
export * as ValidationRules from './validation-rules.gen';
|
|
@@ -542,6 +542,18 @@ const unmarshalGetDashboardResponse = (data) => {
|
|
|
542
542
|
dashboard: data.dashboard ? unmarshalDashboard(data.dashboard) : void 0
|
|
543
543
|
};
|
|
544
544
|
};
|
|
545
|
+
const unmarshalGetEncryptedRdpPasswordResponse = (data) => {
|
|
546
|
+
if (!json.isJSONObject(data)) {
|
|
547
|
+
throw new TypeError(
|
|
548
|
+
`Unmarshalling the type 'GetEncryptedRdpPasswordResponse' failed as data isn't a dictionary.`
|
|
549
|
+
);
|
|
550
|
+
}
|
|
551
|
+
return {
|
|
552
|
+
adminPasswordEncryptionSshKeyDescription: data.admin_password_encryption_ssh_key_description,
|
|
553
|
+
adminPasswordEncryptionSshKeyId: data.admin_password_encryption_ssh_key_id,
|
|
554
|
+
value: data.value
|
|
555
|
+
};
|
|
556
|
+
};
|
|
545
557
|
const unmarshalGetImageResponse = (data) => {
|
|
546
558
|
if (!json.isJSONObject(data)) {
|
|
547
559
|
throw new TypeError(
|
|
@@ -1286,6 +1298,7 @@ const marshalVolumeServerTemplate = (request, defaults) => ({
|
|
|
1286
1298
|
volume_type: request.volumeType
|
|
1287
1299
|
});
|
|
1288
1300
|
const marshalCreateServerRequest = (request, defaults) => ({
|
|
1301
|
+
admin_password_encryption_ssh_key_id: request.adminPasswordEncryptionSshKeyId,
|
|
1289
1302
|
boot_type: request.bootType,
|
|
1290
1303
|
bootscript: request.bootscript,
|
|
1291
1304
|
commercial_type: request.commercialType,
|
|
@@ -1766,6 +1779,7 @@ exports.unmarshalDetachServerVolumeResponse = unmarshalDetachServerVolumeRespons
|
|
|
1766
1779
|
exports.unmarshalExportSnapshotResponse = unmarshalExportSnapshotResponse;
|
|
1767
1780
|
exports.unmarshalGetBootscriptResponse = unmarshalGetBootscriptResponse;
|
|
1768
1781
|
exports.unmarshalGetDashboardResponse = unmarshalGetDashboardResponse;
|
|
1782
|
+
exports.unmarshalGetEncryptedRdpPasswordResponse = unmarshalGetEncryptedRdpPasswordResponse;
|
|
1769
1783
|
exports.unmarshalGetImageResponse = unmarshalGetImageResponse;
|
|
1770
1784
|
exports.unmarshalGetIpResponse = unmarshalGetIpResponse;
|
|
1771
1785
|
exports.unmarshalGetPlacementGroupResponse = unmarshalGetPlacementGroupResponse;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultValues } from '../../../bridge';
|
|
2
|
-
import type { ApplyBlockMigrationRequest, AttachServerVolumeRequest, AttachServerVolumeResponse, CreateImageRequest, CreateImageResponse, CreateIpRequest, CreateIpResponse, CreatePlacementGroupRequest, CreatePlacementGroupResponse, CreatePrivateNICRequest, CreatePrivateNICResponse, CreateSecurityGroupRequest, CreateSecurityGroupResponse, CreateSecurityGroupRuleRequest, CreateSecurityGroupRuleResponse, CreateServerRequest, CreateServerResponse, CreateSnapshotRequest, CreateSnapshotResponse, CreateVolumeRequest, CreateVolumeResponse, DetachServerVolumeRequest, DetachServerVolumeResponse, ExportSnapshotRequest, ExportSnapshotResponse, GetBootscriptResponse, GetDashboardResponse, GetImageResponse, GetIpResponse, GetPlacementGroupResponse, GetPlacementGroupServersResponse, GetPrivateNICResponse, GetSecurityGroupResponse, GetSecurityGroupRuleResponse, GetServerResponse, GetServerTypesAvailabilityResponse, GetSnapshotResponse, GetVolumeResponse, ListBootscriptsResponse, ListImagesResponse, ListIpsResponse, ListPlacementGroupsResponse, ListPrivateNICsResponse, ListSecurityGroupRulesResponse, ListSecurityGroupsResponse, ListServerActionsResponse, ListServerUserDataResponse, ListServersResponse, ListServersTypesResponse, ListSnapshotsResponse, ListVolumesResponse, ListVolumesTypesResponse, MigrationPlan, PlanBlockMigrationRequest, PrivateNIC, ServerActionRequest, ServerActionResponse, SetImageRequest, SetPlacementGroupRequest, SetPlacementGroupResponse, SetPlacementGroupServersRequest, SetPlacementGroupServersResponse, SetSecurityGroupRulesRequest, SetSecurityGroupRulesResponse, UpdateImageRequest, UpdateImageResponse, UpdateIpRequest, UpdateIpResponse, UpdatePlacementGroupRequest, UpdatePlacementGroupResponse, UpdatePlacementGroupServersRequest, UpdatePlacementGroupServersResponse, UpdatePrivateNICRequest, UpdateSecurityGroupRequest, UpdateSecurityGroupResponse, UpdateSecurityGroupRuleRequest, UpdateSecurityGroupRuleResponse, UpdateServerRequest, UpdateServerResponse, UpdateSnapshotRequest, UpdateSnapshotResponse, UpdateVolumeRequest, UpdateVolumeResponse } from './types.gen';
|
|
2
|
+
import type { ApplyBlockMigrationRequest, AttachServerVolumeRequest, AttachServerVolumeResponse, CreateImageRequest, CreateImageResponse, CreateIpRequest, CreateIpResponse, CreatePlacementGroupRequest, CreatePlacementGroupResponse, CreatePrivateNICRequest, CreatePrivateNICResponse, CreateSecurityGroupRequest, CreateSecurityGroupResponse, CreateSecurityGroupRuleRequest, CreateSecurityGroupRuleResponse, CreateServerRequest, CreateServerResponse, CreateSnapshotRequest, CreateSnapshotResponse, CreateVolumeRequest, CreateVolumeResponse, DetachServerVolumeRequest, DetachServerVolumeResponse, ExportSnapshotRequest, ExportSnapshotResponse, GetBootscriptResponse, GetDashboardResponse, GetEncryptedRdpPasswordResponse, GetImageResponse, GetIpResponse, GetPlacementGroupResponse, GetPlacementGroupServersResponse, GetPrivateNICResponse, GetSecurityGroupResponse, GetSecurityGroupRuleResponse, GetServerResponse, GetServerTypesAvailabilityResponse, GetSnapshotResponse, GetVolumeResponse, ListBootscriptsResponse, ListImagesResponse, ListIpsResponse, ListPlacementGroupsResponse, ListPrivateNICsResponse, ListSecurityGroupRulesResponse, ListSecurityGroupsResponse, ListServerActionsResponse, ListServerUserDataResponse, ListServersResponse, ListServersTypesResponse, ListSnapshotsResponse, ListVolumesResponse, ListVolumesTypesResponse, MigrationPlan, PlanBlockMigrationRequest, PrivateNIC, ServerActionRequest, ServerActionResponse, SetImageRequest, SetPlacementGroupRequest, SetPlacementGroupResponse, SetPlacementGroupServersRequest, SetPlacementGroupServersResponse, SetSecurityGroupRulesRequest, SetSecurityGroupRulesResponse, UpdateImageRequest, UpdateImageResponse, UpdateIpRequest, UpdateIpResponse, UpdatePlacementGroupRequest, UpdatePlacementGroupResponse, UpdatePlacementGroupServersRequest, UpdatePlacementGroupServersResponse, UpdatePrivateNICRequest, UpdateSecurityGroupRequest, UpdateSecurityGroupResponse, UpdateSecurityGroupRuleRequest, UpdateSecurityGroupRuleResponse, UpdateServerRequest, UpdateServerResponse, UpdateSnapshotRequest, UpdateSnapshotResponse, UpdateVolumeRequest, UpdateVolumeResponse } from './types.gen';
|
|
3
3
|
import type { SetImageResponse, SetSecurityGroupRequest, SetSecurityGroupResponse, SetSecurityGroupRuleRequest, SetSecurityGroupRuleResponse, SetServerRequest, SetServerResponse, SetSnapshotRequest, SetSnapshotResponse } from './types.private.gen';
|
|
4
4
|
export declare const unmarshalPrivateNIC: (data: unknown) => PrivateNIC;
|
|
5
5
|
export declare const unmarshalAttachServerVolumeResponse: (data: unknown) => AttachServerVolumeResponse;
|
|
@@ -16,6 +16,7 @@ export declare const unmarshalDetachServerVolumeResponse: (data: unknown) => Det
|
|
|
16
16
|
export declare const unmarshalExportSnapshotResponse: (data: unknown) => ExportSnapshotResponse;
|
|
17
17
|
export declare const unmarshalGetBootscriptResponse: (data: unknown) => GetBootscriptResponse;
|
|
18
18
|
export declare const unmarshalGetDashboardResponse: (data: unknown) => GetDashboardResponse;
|
|
19
|
+
export declare const unmarshalGetEncryptedRdpPasswordResponse: (data: unknown) => GetEncryptedRdpPasswordResponse;
|
|
19
20
|
export declare const unmarshalGetImageResponse: (data: unknown) => GetImageResponse;
|
|
20
21
|
export declare const unmarshalGetIpResponse: (data: unknown) => GetIpResponse;
|
|
21
22
|
export declare const unmarshalGetPlacementGroupResponse: (data: unknown) => GetPlacementGroupResponse;
|
|
@@ -540,6 +540,18 @@ const unmarshalGetDashboardResponse = (data) => {
|
|
|
540
540
|
dashboard: data.dashboard ? unmarshalDashboard(data.dashboard) : void 0
|
|
541
541
|
};
|
|
542
542
|
};
|
|
543
|
+
const unmarshalGetEncryptedRdpPasswordResponse = (data) => {
|
|
544
|
+
if (!isJSONObject(data)) {
|
|
545
|
+
throw new TypeError(
|
|
546
|
+
`Unmarshalling the type 'GetEncryptedRdpPasswordResponse' failed as data isn't a dictionary.`
|
|
547
|
+
);
|
|
548
|
+
}
|
|
549
|
+
return {
|
|
550
|
+
adminPasswordEncryptionSshKeyDescription: data.admin_password_encryption_ssh_key_description,
|
|
551
|
+
adminPasswordEncryptionSshKeyId: data.admin_password_encryption_ssh_key_id,
|
|
552
|
+
value: data.value
|
|
553
|
+
};
|
|
554
|
+
};
|
|
543
555
|
const unmarshalGetImageResponse = (data) => {
|
|
544
556
|
if (!isJSONObject(data)) {
|
|
545
557
|
throw new TypeError(
|
|
@@ -1284,6 +1296,7 @@ const marshalVolumeServerTemplate = (request, defaults) => ({
|
|
|
1284
1296
|
volume_type: request.volumeType
|
|
1285
1297
|
});
|
|
1286
1298
|
const marshalCreateServerRequest = (request, defaults) => ({
|
|
1299
|
+
admin_password_encryption_ssh_key_id: request.adminPasswordEncryptionSshKeyId,
|
|
1287
1300
|
boot_type: request.bootType,
|
|
1288
1301
|
bootscript: request.bootscript,
|
|
1289
1302
|
commercial_type: request.commercialType,
|
|
@@ -1765,6 +1778,7 @@ export {
|
|
|
1765
1778
|
unmarshalExportSnapshotResponse,
|
|
1766
1779
|
unmarshalGetBootscriptResponse,
|
|
1767
1780
|
unmarshalGetDashboardResponse,
|
|
1781
|
+
unmarshalGetEncryptedRdpPasswordResponse,
|
|
1768
1782
|
unmarshalGetImageResponse,
|
|
1769
1783
|
unmarshalGetIpResponse,
|
|
1770
1784
|
unmarshalGetPlacementGroupResponse,
|
|
@@ -878,6 +878,11 @@ export type CreateServerRequest = {
|
|
|
878
878
|
securityGroup?: string;
|
|
879
879
|
/** Placement group ID if Instance must be part of a placement group. */
|
|
880
880
|
placementGroup?: string;
|
|
881
|
+
/**
|
|
882
|
+
* UUID of the SSH RSA key that will be used to encrypt the initial admin
|
|
883
|
+
* password for OS requiring it. Mandatory for Windows OS.
|
|
884
|
+
*/
|
|
885
|
+
adminPasswordEncryptionSshKeyId?: string;
|
|
881
886
|
};
|
|
882
887
|
export interface CreateServerResponse {
|
|
883
888
|
server?: Server;
|
|
@@ -960,6 +965,12 @@ export type CreateVolumeRequest = {
|
|
|
960
965
|
export interface CreateVolumeResponse {
|
|
961
966
|
volume?: Volume;
|
|
962
967
|
}
|
|
968
|
+
export type DeleteEncryptedRdpPasswordRequest = {
|
|
969
|
+
/** Zone to target. If none is passed will use default zone from the config. */
|
|
970
|
+
zone?: Zone;
|
|
971
|
+
/** UUID of the Instance. */
|
|
972
|
+
serverId: string;
|
|
973
|
+
};
|
|
963
974
|
export type DeleteImageRequest = {
|
|
964
975
|
/** Zone to target. If none is passed will use default zone from the config. */
|
|
965
976
|
zone?: Zone;
|
|
@@ -1062,6 +1073,20 @@ export type GetDashboardRequest = {
|
|
|
1062
1073
|
export interface GetDashboardResponse {
|
|
1063
1074
|
dashboard?: Dashboard;
|
|
1064
1075
|
}
|
|
1076
|
+
export type GetEncryptedRdpPasswordRequest = {
|
|
1077
|
+
/** Zone to target. If none is passed will use default zone from the config. */
|
|
1078
|
+
zone?: Zone;
|
|
1079
|
+
/** UUID of the Instance. */
|
|
1080
|
+
serverId: string;
|
|
1081
|
+
};
|
|
1082
|
+
export interface GetEncryptedRdpPasswordResponse {
|
|
1083
|
+
/** The encrypted RDP password. */
|
|
1084
|
+
value?: string;
|
|
1085
|
+
/** The description of the SSH key used for ciphering. */
|
|
1086
|
+
adminPasswordEncryptionSshKeyDescription?: string;
|
|
1087
|
+
/** The UUID of the SSH key used for ciphering. */
|
|
1088
|
+
adminPasswordEncryptionSshKeyId?: string;
|
|
1089
|
+
}
|
|
1065
1090
|
export type GetImageRequest = {
|
|
1066
1091
|
/** Zone to target. If none is passed will use default zone from the config. */
|
|
1067
1092
|
zone?: Zone;
|
|
@@ -244,8 +244,35 @@ class API extends api.API {
|
|
|
244
244
|
},
|
|
245
245
|
marshalling_gen.unmarshalVPC
|
|
246
246
|
);
|
|
247
|
+
pageOfListSubnets = (request = {}) => this.client.fetch(
|
|
248
|
+
{
|
|
249
|
+
method: "GET",
|
|
250
|
+
path: `/vpc/v2/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/subnets`,
|
|
251
|
+
urlParams: marshalling.urlParams(
|
|
252
|
+
["order_by", request.orderBy],
|
|
253
|
+
["organization_id", request.organizationId],
|
|
254
|
+
["page", request.page],
|
|
255
|
+
[
|
|
256
|
+
"page_size",
|
|
257
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
258
|
+
],
|
|
259
|
+
["project_id", request.projectId],
|
|
260
|
+
["subnet_ids", request.subnetIds],
|
|
261
|
+
["vpc_id", request.vpcId]
|
|
262
|
+
)
|
|
263
|
+
},
|
|
264
|
+
marshalling_gen.unmarshalListSubnetsResponse
|
|
265
|
+
);
|
|
266
|
+
/**
|
|
267
|
+
* List subnets. List any Private Network's subnets. See ListPrivateNetworks
|
|
268
|
+
* to list a specific Private Network's subnets.
|
|
269
|
+
*
|
|
270
|
+
* @param request - The request {@link ListSubnetsRequest}
|
|
271
|
+
* @returns A Promise of ListSubnetsResponse
|
|
272
|
+
*/
|
|
273
|
+
listSubnets = (request = {}) => resourcePaginator.enrichForPagination("subnets", this.pageOfListSubnets, request);
|
|
247
274
|
/**
|
|
248
|
-
* Set
|
|
275
|
+
* Set a Private Network's subnets. Set subnets for an existing Private
|
|
249
276
|
* Network. Note that the method is PUT and not PATCH. Any existing subnets
|
|
250
277
|
* will be removed in favor of the new specified set of subnets.
|
|
251
278
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { Region } from '../../../bridge';
|
|
3
|
-
import type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateVPCRequest, DeletePrivateNetworkRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, DeleteVPCRequest, EnableDHCPRequest, EnableRoutingRequest, GetPrivateNetworkRequest, GetVPCRequest, ListPrivateNetworksRequest, ListPrivateNetworksResponse, ListVPCsRequest, ListVPCsResponse, MigrateZonalPrivateNetworksRequest, PrivateNetwork, SetSubnetsRequest, SetSubnetsResponse, UpdatePrivateNetworkRequest, UpdateVPCRequest, VPC } from './types.gen';
|
|
3
|
+
import type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateVPCRequest, DeletePrivateNetworkRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, DeleteVPCRequest, EnableDHCPRequest, EnableRoutingRequest, GetPrivateNetworkRequest, GetVPCRequest, ListPrivateNetworksRequest, ListPrivateNetworksResponse, ListSubnetsRequest, ListSubnetsResponse, ListVPCsRequest, ListVPCsResponse, MigrateZonalPrivateNetworksRequest, PrivateNetwork, SetSubnetsRequest, SetSubnetsResponse, UpdatePrivateNetworkRequest, UpdateVPCRequest, VPC } from './types.gen';
|
|
4
4
|
/**
|
|
5
5
|
* VPC API.
|
|
6
6
|
*
|
|
@@ -121,8 +121,20 @@ export declare class API extends ParentAPI {
|
|
|
121
121
|
* @returns A Promise of VPC
|
|
122
122
|
*/
|
|
123
123
|
enableRouting: (request: Readonly<EnableRoutingRequest>) => Promise<VPC>;
|
|
124
|
+
protected pageOfListSubnets: (request?: Readonly<ListSubnetsRequest>) => Promise<ListSubnetsResponse>;
|
|
124
125
|
/**
|
|
125
|
-
*
|
|
126
|
+
* List subnets. List any Private Network's subnets. See ListPrivateNetworks
|
|
127
|
+
* to list a specific Private Network's subnets.
|
|
128
|
+
*
|
|
129
|
+
* @param request - The request {@link ListSubnetsRequest}
|
|
130
|
+
* @returns A Promise of ListSubnetsResponse
|
|
131
|
+
*/
|
|
132
|
+
listSubnets: (request?: Readonly<ListSubnetsRequest>) => Promise<ListSubnetsResponse> & {
|
|
133
|
+
all: () => Promise<import("./types.gen").Subnet[]>;
|
|
134
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").Subnet[], void, void>;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Set a Private Network's subnets. Set subnets for an existing Private
|
|
126
138
|
* Network. Note that the method is PUT and not PATCH. Any existing subnets
|
|
127
139
|
* will be removed in favor of the new specified set of subnets.
|
|
128
140
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { API as API$1 } from "../../../scw/api.js";
|
|
2
2
|
import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
|
|
3
3
|
import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
|
|
4
|
-
import { unmarshalListVPCsResponse, marshalCreateVPCRequest, unmarshalVPC, marshalUpdateVPCRequest, unmarshalListPrivateNetworksResponse, marshalCreatePrivateNetworkRequest, unmarshalPrivateNetwork, marshalUpdatePrivateNetworkRequest, marshalMigrateZonalPrivateNetworksRequest, marshalSetSubnetsRequest, unmarshalSetSubnetsResponse, marshalAddSubnetsRequest, unmarshalAddSubnetsResponse, marshalDeleteSubnetsRequest, unmarshalDeleteSubnetsResponse } from "./marshalling.gen.js";
|
|
4
|
+
import { unmarshalListVPCsResponse, marshalCreateVPCRequest, unmarshalVPC, marshalUpdateVPCRequest, unmarshalListPrivateNetworksResponse, marshalCreatePrivateNetworkRequest, unmarshalPrivateNetwork, marshalUpdatePrivateNetworkRequest, marshalMigrateZonalPrivateNetworksRequest, unmarshalListSubnetsResponse, marshalSetSubnetsRequest, unmarshalSetSubnetsResponse, marshalAddSubnetsRequest, unmarshalAddSubnetsResponse, marshalDeleteSubnetsRequest, unmarshalDeleteSubnetsResponse } from "./marshalling.gen.js";
|
|
5
5
|
const jsonContentHeaders = {
|
|
6
6
|
"Content-Type": "application/json; charset=utf-8"
|
|
7
7
|
};
|
|
@@ -242,8 +242,35 @@ class API extends API$1 {
|
|
|
242
242
|
},
|
|
243
243
|
unmarshalVPC
|
|
244
244
|
);
|
|
245
|
+
pageOfListSubnets = (request = {}) => this.client.fetch(
|
|
246
|
+
{
|
|
247
|
+
method: "GET",
|
|
248
|
+
path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/subnets`,
|
|
249
|
+
urlParams: urlParams(
|
|
250
|
+
["order_by", request.orderBy],
|
|
251
|
+
["organization_id", request.organizationId],
|
|
252
|
+
["page", request.page],
|
|
253
|
+
[
|
|
254
|
+
"page_size",
|
|
255
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
256
|
+
],
|
|
257
|
+
["project_id", request.projectId],
|
|
258
|
+
["subnet_ids", request.subnetIds],
|
|
259
|
+
["vpc_id", request.vpcId]
|
|
260
|
+
)
|
|
261
|
+
},
|
|
262
|
+
unmarshalListSubnetsResponse
|
|
263
|
+
);
|
|
264
|
+
/**
|
|
265
|
+
* List subnets. List any Private Network's subnets. See ListPrivateNetworks
|
|
266
|
+
* to list a specific Private Network's subnets.
|
|
267
|
+
*
|
|
268
|
+
* @param request - The request {@link ListSubnetsRequest}
|
|
269
|
+
* @returns A Promise of ListSubnetsResponse
|
|
270
|
+
*/
|
|
271
|
+
listSubnets = (request = {}) => enrichForPagination("subnets", this.pageOfListSubnets, request);
|
|
245
272
|
/**
|
|
246
|
-
* Set
|
|
273
|
+
* Set a Private Network's subnets. Set subnets for an existing Private
|
|
247
274
|
* Network. Note that the method is PUT and not PATCH. Any existing subnets
|
|
248
275
|
* will be removed in favor of the new specified set of subnets.
|
|
249
276
|
*
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { API } from './api.gen';
|
|
2
|
-
export type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateVPCRequest, DeletePrivateNetworkRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, DeleteVPCRequest, EnableDHCPRequest, EnableRoutingRequest, GetPrivateNetworkRequest, GetVPCRequest, ListPrivateNetworksRequest, ListPrivateNetworksRequestOrderBy, ListPrivateNetworksResponse, ListVPCsRequest, ListVPCsRequestOrderBy, ListVPCsResponse, MigrateZonalPrivateNetworksRequest, PrivateNetwork, SetSubnetsRequest, SetSubnetsResponse, Subnet, UpdatePrivateNetworkRequest, UpdateVPCRequest, VPC, } from './types.gen';
|
|
2
|
+
export type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateVPCRequest, DeletePrivateNetworkRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, DeleteVPCRequest, EnableDHCPRequest, EnableRoutingRequest, GetPrivateNetworkRequest, GetVPCRequest, ListPrivateNetworksRequest, ListPrivateNetworksRequestOrderBy, ListPrivateNetworksResponse, ListSubnetsRequest, ListSubnetsRequestOrderBy, ListSubnetsResponse, ListVPCsRequest, ListVPCsRequestOrderBy, ListVPCsResponse, MigrateZonalPrivateNetworksRequest, PrivateNetwork, SetSubnetsRequest, SetSubnetsResponse, Subnet, UpdatePrivateNetworkRequest, UpdateVPCRequest, VPC, } from './types.gen';
|
|
@@ -12,8 +12,11 @@ const unmarshalSubnet = (data) => {
|
|
|
12
12
|
return {
|
|
13
13
|
createdAt: marshalling.unmarshalDate(data.created_at),
|
|
14
14
|
id: data.id,
|
|
15
|
+
privateNetworkId: data.private_network_id,
|
|
16
|
+
projectId: data.project_id,
|
|
15
17
|
subnet: data.subnet,
|
|
16
|
-
updatedAt: marshalling.unmarshalDate(data.updated_at)
|
|
18
|
+
updatedAt: marshalling.unmarshalDate(data.updated_at),
|
|
19
|
+
vpcId: data.vpc_id
|
|
17
20
|
};
|
|
18
21
|
};
|
|
19
22
|
const unmarshalPrivateNetwork = (data) => {
|
|
@@ -90,6 +93,17 @@ const unmarshalListPrivateNetworksResponse = (data) => {
|
|
|
90
93
|
totalCount: data.total_count
|
|
91
94
|
};
|
|
92
95
|
};
|
|
96
|
+
const unmarshalListSubnetsResponse = (data) => {
|
|
97
|
+
if (!json.isJSONObject(data)) {
|
|
98
|
+
throw new TypeError(
|
|
99
|
+
`Unmarshalling the type 'ListSubnetsResponse' failed as data isn't a dictionary.`
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
subnets: marshalling.unmarshalArrayOfObject(data.subnets, unmarshalSubnet),
|
|
104
|
+
totalCount: data.total_count
|
|
105
|
+
};
|
|
106
|
+
};
|
|
93
107
|
const unmarshalListVPCsResponse = (data) => {
|
|
94
108
|
if (!json.isJSONObject(data)) {
|
|
95
109
|
throw new TypeError(
|
|
@@ -167,6 +181,7 @@ exports.marshalUpdateVPCRequest = marshalUpdateVPCRequest;
|
|
|
167
181
|
exports.unmarshalAddSubnetsResponse = unmarshalAddSubnetsResponse;
|
|
168
182
|
exports.unmarshalDeleteSubnetsResponse = unmarshalDeleteSubnetsResponse;
|
|
169
183
|
exports.unmarshalListPrivateNetworksResponse = unmarshalListPrivateNetworksResponse;
|
|
184
|
+
exports.unmarshalListSubnetsResponse = unmarshalListSubnetsResponse;
|
|
170
185
|
exports.unmarshalListVPCsResponse = unmarshalListVPCsResponse;
|
|
171
186
|
exports.unmarshalPrivateNetwork = unmarshalPrivateNetwork;
|
|
172
187
|
exports.unmarshalSetSubnetsResponse = unmarshalSetSubnetsResponse;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { DefaultValues } from '../../../bridge';
|
|
2
|
-
import type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateVPCRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, ListPrivateNetworksResponse, ListVPCsResponse, MigrateZonalPrivateNetworksRequest, PrivateNetwork, SetSubnetsRequest, SetSubnetsResponse, UpdatePrivateNetworkRequest, UpdateVPCRequest, VPC } from './types.gen';
|
|
2
|
+
import type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateVPCRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, ListPrivateNetworksResponse, ListSubnetsResponse, ListVPCsResponse, MigrateZonalPrivateNetworksRequest, PrivateNetwork, SetSubnetsRequest, SetSubnetsResponse, UpdatePrivateNetworkRequest, UpdateVPCRequest, VPC } from './types.gen';
|
|
3
3
|
export declare const unmarshalPrivateNetwork: (data: unknown) => PrivateNetwork;
|
|
4
4
|
export declare const unmarshalVPC: (data: unknown) => VPC;
|
|
5
5
|
export declare const unmarshalAddSubnetsResponse: (data: unknown) => AddSubnetsResponse;
|
|
6
6
|
export declare const unmarshalDeleteSubnetsResponse: (data: unknown) => DeleteSubnetsResponse;
|
|
7
7
|
export declare const unmarshalListPrivateNetworksResponse: (data: unknown) => ListPrivateNetworksResponse;
|
|
8
|
+
export declare const unmarshalListSubnetsResponse: (data: unknown) => ListSubnetsResponse;
|
|
8
9
|
export declare const unmarshalListVPCsResponse: (data: unknown) => ListVPCsResponse;
|
|
9
10
|
export declare const unmarshalSetSubnetsResponse: (data: unknown) => SetSubnetsResponse;
|
|
10
11
|
export declare const marshalAddSubnetsRequest: (request: AddSubnetsRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -10,8 +10,11 @@ const unmarshalSubnet = (data) => {
|
|
|
10
10
|
return {
|
|
11
11
|
createdAt: unmarshalDate(data.created_at),
|
|
12
12
|
id: data.id,
|
|
13
|
+
privateNetworkId: data.private_network_id,
|
|
14
|
+
projectId: data.project_id,
|
|
13
15
|
subnet: data.subnet,
|
|
14
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
16
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
17
|
+
vpcId: data.vpc_id
|
|
15
18
|
};
|
|
16
19
|
};
|
|
17
20
|
const unmarshalPrivateNetwork = (data) => {
|
|
@@ -88,6 +91,17 @@ const unmarshalListPrivateNetworksResponse = (data) => {
|
|
|
88
91
|
totalCount: data.total_count
|
|
89
92
|
};
|
|
90
93
|
};
|
|
94
|
+
const unmarshalListSubnetsResponse = (data) => {
|
|
95
|
+
if (!isJSONObject(data)) {
|
|
96
|
+
throw new TypeError(
|
|
97
|
+
`Unmarshalling the type 'ListSubnetsResponse' failed as data isn't a dictionary.`
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
subnets: unmarshalArrayOfObject(data.subnets, unmarshalSubnet),
|
|
102
|
+
totalCount: data.total_count
|
|
103
|
+
};
|
|
104
|
+
};
|
|
91
105
|
const unmarshalListVPCsResponse = (data) => {
|
|
92
106
|
if (!isJSONObject(data)) {
|
|
93
107
|
throw new TypeError(
|
|
@@ -166,6 +180,7 @@ export {
|
|
|
166
180
|
unmarshalAddSubnetsResponse,
|
|
167
181
|
unmarshalDeleteSubnetsResponse,
|
|
168
182
|
unmarshalListPrivateNetworksResponse,
|
|
183
|
+
unmarshalListSubnetsResponse,
|
|
169
184
|
unmarshalListVPCsResponse,
|
|
170
185
|
unmarshalPrivateNetwork,
|
|
171
186
|
unmarshalSetSubnetsResponse,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Region } from '../../../bridge';
|
|
2
2
|
export type ListPrivateNetworksRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
|
|
3
|
+
export type ListSubnetsRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
3
4
|
export type ListVPCsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
|
|
4
5
|
export interface Subnet {
|
|
5
6
|
/** ID of the subnet. */
|
|
@@ -10,6 +11,12 @@ export interface Subnet {
|
|
|
10
11
|
updatedAt?: Date;
|
|
11
12
|
/** Subnet CIDR. */
|
|
12
13
|
subnet: string;
|
|
14
|
+
/** Scaleway Project the subnet belongs to. */
|
|
15
|
+
projectId: string;
|
|
16
|
+
/** Private Network the subnet belongs to. */
|
|
17
|
+
privateNetworkId: string;
|
|
18
|
+
/** VPC the subnet belongs to. */
|
|
19
|
+
vpcId: string;
|
|
13
20
|
}
|
|
14
21
|
export interface PrivateNetwork {
|
|
15
22
|
/** Private Network ID. */
|
|
@@ -224,6 +231,40 @@ export interface ListPrivateNetworksResponse {
|
|
|
224
231
|
privateNetworks: PrivateNetwork[];
|
|
225
232
|
totalCount: number;
|
|
226
233
|
}
|
|
234
|
+
export type ListSubnetsRequest = {
|
|
235
|
+
/**
|
|
236
|
+
* Region to target. If none is passed will use default region from the
|
|
237
|
+
* config.
|
|
238
|
+
*/
|
|
239
|
+
region?: Region;
|
|
240
|
+
/** Sort order of the returned subnets. */
|
|
241
|
+
orderBy?: ListSubnetsRequestOrderBy;
|
|
242
|
+
/** Page number to return, from the paginated results. */
|
|
243
|
+
page?: number;
|
|
244
|
+
/** Maximum number of Private Networks to return per page. */
|
|
245
|
+
pageSize?: number;
|
|
246
|
+
/**
|
|
247
|
+
* Organization ID to filter for. Only subnets belonging to this Organization
|
|
248
|
+
* will be returned.
|
|
249
|
+
*/
|
|
250
|
+
organizationId?: string;
|
|
251
|
+
/**
|
|
252
|
+
* Project ID to filter for. Only subnets belonging to this Project will be
|
|
253
|
+
* returned.
|
|
254
|
+
*/
|
|
255
|
+
projectId?: string;
|
|
256
|
+
/**
|
|
257
|
+
* Subnet IDs to filter for. Only subnets matching the specified IDs will be
|
|
258
|
+
* returned.
|
|
259
|
+
*/
|
|
260
|
+
subnetIds?: string[];
|
|
261
|
+
/** VPC ID to filter for. Only subnets belonging to this VPC will be returned. */
|
|
262
|
+
vpcId?: string;
|
|
263
|
+
};
|
|
264
|
+
export interface ListSubnetsResponse {
|
|
265
|
+
subnets: Subnet[];
|
|
266
|
+
totalCount: number;
|
|
267
|
+
}
|
|
227
268
|
export type ListVPCsRequest = {
|
|
228
269
|
/**
|
|
229
270
|
* Region to target. If none is passed will use default region from the
|
package/dist/scw/constants.cjs
CHANGED
package/dist/scw/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "v2.
|
|
2
|
-
export declare const userAgent = "scaleway-sdk-js/v2.
|
|
1
|
+
export declare const version = "v2.30.0";
|
|
2
|
+
export declare const userAgent = "scaleway-sdk-js/v2.30.0";
|
package/dist/scw/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.31.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Scaleway SDK.",
|
|
6
6
|
"keywords": [
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"bundledDependencies": [
|
|
40
40
|
"@scaleway/random-name"
|
|
41
41
|
],
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "a9fa1d2c895a7e630dc9d42513df022c3996ae50"
|
|
43
43
|
}
|