@scaleway/sdk-instance 1.0.5 → 1.2.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.
@@ -6,18 +6,23 @@ const jsonContentHeaders = {
6
6
  "Content-Type": "application/json; charset=utf-8"
7
7
  };
8
8
  class API extends sdkClient.API {
9
- /** Lists the available zones of the API. */
10
- static LOCALITIES = [
11
- "fr-par-1",
12
- "fr-par-2",
13
- "fr-par-3",
14
- "nl-ams-1",
15
- "nl-ams-2",
16
- "nl-ams-3",
17
- "pl-waw-1",
18
- "pl-waw-2",
19
- "pl-waw-3"
20
- ];
9
+ /**
10
+ * Locality of this API.
11
+ * type ∈ {'zone','region','global','unspecified'}
12
+ */
13
+ static LOCALITY = sdkClient.toApiLocality({
14
+ zones: [
15
+ "fr-par-1",
16
+ "fr-par-2",
17
+ "fr-par-3",
18
+ "nl-ams-1",
19
+ "nl-ams-2",
20
+ "nl-ams-3",
21
+ "pl-waw-1",
22
+ "pl-waw-2",
23
+ "pl-waw-3"
24
+ ]
25
+ });
21
26
  /**
22
27
  * Get availability. Get availability for all Instance types.
23
28
  *
@@ -186,11 +191,11 @@ class API extends sdkClient.API {
186
191
  * `stop_in_place`: Stop the Instance, but keep the slot on the hypervisor.
187
192
  * `reboot`: Stop the instance and restart it.
188
193
  * `backup`: Create an image with all the volumes of an Instance.
189
- * `terminate`: Delete the Instance along with its attached volumes, except for SBS volumes.
194
+ * `terminate`: Delete the Instance along with its attached local volumes.
190
195
  * `enable_routed_ip`: Migrate the Instance to the new network stack.
191
196
 
192
- The `terminate` action will result in the deletion of `l_ssd`, `b_ssd` and `scratch` volumes types, `sbs_volume` volumes type will only be detached.
193
- If you want to preserve your volumes, you should detach them before the Instance deletion or `terminate` action.
197
+ The `terminate` action will result in the deletion of `l_ssd` and `scratch` volumes types, `sbs_volume` volumes will only be detached.
198
+ If you want to preserve your `l_ssd` volumes, you should stop your Instance, detach the volumes to be preserved, then delete your Instance.
194
199
 
195
200
  The `backup` action can be done with:
196
201
  * No `volumes` key in the body: an image is created with snapshots of all the server volumes, except for the `scratch` volumes types.
@@ -250,6 +255,12 @@ class API extends sdkClient.API {
250
255
  },
251
256
  marshalling_gen.unmarshalServerCompatibleTypes
252
257
  );
258
+ /**
259
+ * Attach a volume to an Instance.
260
+ *
261
+ * @param request - The request {@link AttachServerVolumeRequest}
262
+ * @returns A Promise of AttachServerVolumeResponse
263
+ */
253
264
  attachServerVolume = (request) => this.client.fetch(
254
265
  {
255
266
  body: JSON.stringify(
@@ -261,6 +272,12 @@ class API extends sdkClient.API {
261
272
  },
262
273
  marshalling_gen.unmarshalAttachServerVolumeResponse
263
274
  );
275
+ /**
276
+ * Detach a volume from an Instance.
277
+ *
278
+ * @param request - The request {@link DetachServerVolumeRequest}
279
+ * @returns A Promise of DetachServerVolumeResponse
280
+ */
264
281
  detachServerVolume = (request) => this.client.fetch(
265
282
  {
266
283
  body: JSON.stringify(
@@ -290,7 +307,7 @@ class API extends sdkClient.API {
290
307
  marshalling_gen.unmarshalAttachServerFileSystemResponse
291
308
  );
292
309
  /**
293
- * Detach a filesystem volume to an Instance.
310
+ * Detach a filesystem volume from an Instance.
294
311
  *
295
312
  * @param request - The request {@link DetachServerFileSystemRequest}
296
313
  * @returns A Promise of DetachServerFileSystemResponse
@@ -561,7 +578,7 @@ class API extends sdkClient.API {
561
578
  marshalling_gen.unmarshalGetVolumeResponse
562
579
  );
563
580
  /**
564
- * Update a volume. Replace the name and/or size properties of a volume specified by its ID, with the specified value(s). Any volume name can be changed, however only `b_ssd` volumes can currently be increased in size.
581
+ * Update a volume. Replace the name and/or size properties of a volume specified by its ID, with the specified value(s).
565
582
  *
566
583
  * @param request - The request {@link UpdateVolumeRequest}
567
584
  * @returns A Promise of UpdateVolumeResponse
@@ -1,6 +1,6 @@
1
+ import type { ApiLocality } from '@scaleway/sdk-client';
1
2
  import { API as ParentAPI } from '@scaleway/sdk-client';
2
- import type { Zone as ScwZone } from '@scaleway/sdk-client';
3
- import type { ApplyBlockMigrationRequest, AttachServerFileSystemRequest, AttachServerFileSystemResponse, AttachServerVolumeRequest, AttachServerVolumeResponse, CheckBlockMigrationOrganizationQuotasRequest, 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, DetachServerFileSystemRequest, DetachServerFileSystemResponse, DetachServerVolumeRequest, DetachServerVolumeResponse, ExportSnapshotRequest, ExportSnapshotResponse, GetDashboardRequest, GetDashboardResponse, GetImageRequest, GetImageResponse, GetIpRequest, GetIpResponse, GetPlacementGroupRequest, GetPlacementGroupResponse, GetPlacementGroupServersRequest, GetPlacementGroupServersResponse, GetPrivateNICRequest, GetPrivateNICResponse, GetSecurityGroupRequest, GetSecurityGroupResponse, GetSecurityGroupRuleRequest, GetSecurityGroupRuleResponse, GetServerCompatibleTypesRequest, GetServerRequest, GetServerResponse, GetServerTypesAvailabilityRequest, GetServerTypesAvailabilityResponse, GetSnapshotRequest, GetSnapshotResponse, GetVolumeRequest, GetVolumeResponse, 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, ServerCompatibleTypes, 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, AttachServerFileSystemRequest, AttachServerFileSystemResponse, AttachServerVolumeRequest, AttachServerVolumeResponse, CheckBlockMigrationOrganizationQuotasRequest, 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, DetachServerFileSystemRequest, DetachServerFileSystemResponse, DetachServerVolumeRequest, DetachServerVolumeResponse, ExportSnapshotRequest, ExportSnapshotResponse, GetDashboardRequest, GetDashboardResponse, GetImageRequest, GetImageResponse, GetIpRequest, GetIpResponse, GetPlacementGroupRequest, GetPlacementGroupResponse, GetPlacementGroupServersRequest, GetPlacementGroupServersResponse, GetPrivateNICRequest, GetPrivateNICResponse, GetSecurityGroupRequest, GetSecurityGroupResponse, GetSecurityGroupRuleRequest, GetSecurityGroupRuleResponse, GetServerCompatibleTypesRequest, GetServerRequest, GetServerResponse, GetServerTypesAvailabilityRequest, GetServerTypesAvailabilityResponse, GetSnapshotRequest, GetSnapshotResponse, GetVolumeRequest, GetVolumeResponse, ListDefaultSecurityGroupRulesRequest, ListImagesRequest, ListImagesResponse, ListIpsRequest, ListIpsResponse, ListPlacementGroupsRequest, ListPlacementGroupsResponse, ListPrivateNICsRequest, ListPrivateNICsResponse, ListSecurityGroupRulesRequest, ListSecurityGroupRulesResponse, ListSecurityGroupsRequest, ListSecurityGroupsResponse, ListServerActionsRequest, ListServerActionsResponse, ListServersRequest, ListServersResponse, ListServersTypesRequest, ListServersTypesResponse, ListServerUserDataRequest, ListServerUserDataResponse, ListSnapshotsRequest, ListSnapshotsResponse, ListVolumesRequest, ListVolumesResponse, ListVolumesTypesRequest, ListVolumesTypesResponse, MigrationPlan, PlanBlockMigrationRequest, PrivateNIC, ServerActionRequest, ServerActionResponse, ServerCompatibleTypes, 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.
@@ -8,8 +8,11 @@ import type { SetImageResponse, SetSecurityGroupRequest, SetSecurityGroupRespons
8
8
  This API allows you to manage your CPU and GPU Instances.
9
9
  */
10
10
  export declare class API extends ParentAPI {
11
- /** Lists the available zones of the API. */
12
- static readonly LOCALITIES: ScwZone[];
11
+ /**
12
+ * Locality of this API.
13
+ * type ∈ {'zone','region','global','unspecified'}
14
+ */
15
+ static readonly LOCALITY: ApiLocality;
13
16
  /**
14
17
  * Get availability. Get availability for all Instance types.
15
18
  *
@@ -73,11 +76,11 @@ export declare class API extends ParentAPI {
73
76
  * `stop_in_place`: Stop the Instance, but keep the slot on the hypervisor.
74
77
  * `reboot`: Stop the instance and restart it.
75
78
  * `backup`: Create an image with all the volumes of an Instance.
76
- * `terminate`: Delete the Instance along with its attached volumes, except for SBS volumes.
79
+ * `terminate`: Delete the Instance along with its attached local volumes.
77
80
  * `enable_routed_ip`: Migrate the Instance to the new network stack.
78
81
 
79
- The `terminate` action will result in the deletion of `l_ssd`, `b_ssd` and `scratch` volumes types, `sbs_volume` volumes type will only be detached.
80
- If you want to preserve your volumes, you should detach them before the Instance deletion or `terminate` action.
82
+ The `terminate` action will result in the deletion of `l_ssd` and `scratch` volumes types, `sbs_volume` volumes will only be detached.
83
+ If you want to preserve your `l_ssd` volumes, you should stop your Instance, detach the volumes to be preserved, then delete your Instance.
81
84
 
82
85
  The `backup` action can be done with:
83
86
  * No `volumes` key in the body: an image is created with snapshots of all the server volumes, except for the `scratch` volumes types.
@@ -112,7 +115,19 @@ export declare class API extends ParentAPI {
112
115
  * @returns A Promise of ServerCompatibleTypes
113
116
  */
114
117
  getServerCompatibleTypes: (request: Readonly<GetServerCompatibleTypesRequest>) => Promise<ServerCompatibleTypes>;
118
+ /**
119
+ * Attach a volume to an Instance.
120
+ *
121
+ * @param request - The request {@link AttachServerVolumeRequest}
122
+ * @returns A Promise of AttachServerVolumeResponse
123
+ */
115
124
  attachServerVolume: (request: Readonly<AttachServerVolumeRequest>) => Promise<AttachServerVolumeResponse>;
125
+ /**
126
+ * Detach a volume from an Instance.
127
+ *
128
+ * @param request - The request {@link DetachServerVolumeRequest}
129
+ * @returns A Promise of DetachServerVolumeResponse
130
+ */
116
131
  detachServerVolume: (request: Readonly<DetachServerVolumeRequest>) => Promise<DetachServerVolumeResponse>;
117
132
  /**
118
133
  * Attach a filesystem volume to an Instance.
@@ -122,7 +137,7 @@ export declare class API extends ParentAPI {
122
137
  */
123
138
  attachServerFileSystem: (request: Readonly<AttachServerFileSystemRequest>) => Promise<AttachServerFileSystemResponse>;
124
139
  /**
125
- * Detach a filesystem volume to an Instance.
140
+ * Detach a filesystem volume from an Instance.
126
141
  *
127
142
  * @param request - The request {@link DetachServerFileSystemRequest}
128
143
  * @returns A Promise of DetachServerFileSystemResponse
@@ -239,7 +254,7 @@ export declare class API extends ParentAPI {
239
254
  */
240
255
  getVolume: (request: Readonly<GetVolumeRequest>) => Promise<GetVolumeResponse>;
241
256
  /**
242
- * Update a volume. Replace the name and/or size properties of a volume specified by its ID, with the specified value(s). Any volume name can be changed, however only `b_ssd` volumes can currently be increased in size.
257
+ * Update a volume. Replace the name and/or size properties of a volume specified by its ID, with the specified value(s).
243
258
  *
244
259
  * @param request - The request {@link UpdateVolumeRequest}
245
260
  * @returns A Promise of UpdateVolumeResponse
@@ -1,21 +1,26 @@
1
- import { API as API$1, urlParams, validatePathParam, enrichForPagination } from "@scaleway/sdk-client";
1
+ import { API as API$1, toApiLocality, urlParams, validatePathParam, enrichForPagination } from "@scaleway/sdk-client";
2
2
  import { unmarshalGetServerTypesAvailabilityResponse, unmarshalListServersTypesResponse, unmarshalListVolumesTypesResponse, unmarshalListServersResponse, marshalCreateServerRequest, unmarshalCreateServerResponse, unmarshalGetServerResponse, marshalSetServerRequest, unmarshalSetServerResponse, marshalUpdateServerRequest, unmarshalUpdateServerResponse, unmarshalListServerActionsResponse, marshalServerActionRequest, unmarshalServerActionResponse, unmarshalListServerUserDataResponse, unmarshalServerCompatibleTypes, marshalAttachServerVolumeRequest, unmarshalAttachServerVolumeResponse, marshalDetachServerVolumeRequest, unmarshalDetachServerVolumeResponse, marshalAttachServerFileSystemRequest, unmarshalAttachServerFileSystemResponse, marshalDetachServerFileSystemRequest, unmarshalDetachServerFileSystemResponse, 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, unmarshalGetDashboardResponse, marshalPlanBlockMigrationRequest, unmarshalMigrationPlan, marshalApplyBlockMigrationRequest, marshalCheckBlockMigrationOrganizationQuotasRequest } from "./marshalling.gen.js";
3
3
  const jsonContentHeaders = {
4
4
  "Content-Type": "application/json; charset=utf-8"
5
5
  };
6
6
  class API extends API$1 {
7
- /** Lists the available zones of the API. */
8
- static LOCALITIES = [
9
- "fr-par-1",
10
- "fr-par-2",
11
- "fr-par-3",
12
- "nl-ams-1",
13
- "nl-ams-2",
14
- "nl-ams-3",
15
- "pl-waw-1",
16
- "pl-waw-2",
17
- "pl-waw-3"
18
- ];
7
+ /**
8
+ * Locality of this API.
9
+ * type ∈ {'zone','region','global','unspecified'}
10
+ */
11
+ static LOCALITY = toApiLocality({
12
+ zones: [
13
+ "fr-par-1",
14
+ "fr-par-2",
15
+ "fr-par-3",
16
+ "nl-ams-1",
17
+ "nl-ams-2",
18
+ "nl-ams-3",
19
+ "pl-waw-1",
20
+ "pl-waw-2",
21
+ "pl-waw-3"
22
+ ]
23
+ });
19
24
  /**
20
25
  * Get availability. Get availability for all Instance types.
21
26
  *
@@ -184,11 +189,11 @@ class API extends API$1 {
184
189
  * `stop_in_place`: Stop the Instance, but keep the slot on the hypervisor.
185
190
  * `reboot`: Stop the instance and restart it.
186
191
  * `backup`: Create an image with all the volumes of an Instance.
187
- * `terminate`: Delete the Instance along with its attached volumes, except for SBS volumes.
192
+ * `terminate`: Delete the Instance along with its attached local volumes.
188
193
  * `enable_routed_ip`: Migrate the Instance to the new network stack.
189
194
 
190
- The `terminate` action will result in the deletion of `l_ssd`, `b_ssd` and `scratch` volumes types, `sbs_volume` volumes type will only be detached.
191
- If you want to preserve your volumes, you should detach them before the Instance deletion or `terminate` action.
195
+ The `terminate` action will result in the deletion of `l_ssd` and `scratch` volumes types, `sbs_volume` volumes will only be detached.
196
+ If you want to preserve your `l_ssd` volumes, you should stop your Instance, detach the volumes to be preserved, then delete your Instance.
192
197
 
193
198
  The `backup` action can be done with:
194
199
  * No `volumes` key in the body: an image is created with snapshots of all the server volumes, except for the `scratch` volumes types.
@@ -248,6 +253,12 @@ class API extends API$1 {
248
253
  },
249
254
  unmarshalServerCompatibleTypes
250
255
  );
256
+ /**
257
+ * Attach a volume to an Instance.
258
+ *
259
+ * @param request - The request {@link AttachServerVolumeRequest}
260
+ * @returns A Promise of AttachServerVolumeResponse
261
+ */
251
262
  attachServerVolume = (request) => this.client.fetch(
252
263
  {
253
264
  body: JSON.stringify(
@@ -259,6 +270,12 @@ class API extends API$1 {
259
270
  },
260
271
  unmarshalAttachServerVolumeResponse
261
272
  );
273
+ /**
274
+ * Detach a volume from an Instance.
275
+ *
276
+ * @param request - The request {@link DetachServerVolumeRequest}
277
+ * @returns A Promise of DetachServerVolumeResponse
278
+ */
262
279
  detachServerVolume = (request) => this.client.fetch(
263
280
  {
264
281
  body: JSON.stringify(
@@ -288,7 +305,7 @@ class API extends API$1 {
288
305
  unmarshalAttachServerFileSystemResponse
289
306
  );
290
307
  /**
291
- * Detach a filesystem volume to an Instance.
308
+ * Detach a filesystem volume from an Instance.
292
309
  *
293
310
  * @param request - The request {@link DetachServerFileSystemRequest}
294
311
  * @returns A Promise of DetachServerFileSystemResponse
@@ -559,7 +576,7 @@ class API extends API$1 {
559
576
  unmarshalGetVolumeResponse
560
577
  );
561
578
  /**
562
- * Update a volume. Replace the name and/or size properties of a volume specified by its ID, with the specified value(s). Any volume name can be changed, however only `b_ssd` volumes can currently be increased in size.
579
+ * Update a volume. Replace the name and/or size properties of a volume specified by its ID, with the specified value(s).
563
580
  *
564
581
  * @param request - The request {@link UpdateVolumeRequest}
565
582
  * @returns A Promise of UpdateVolumeResponse
@@ -6,6 +6,10 @@ const PRIVATE_NIC_TRANSIENT_STATUSES = ["syncing"];
6
6
  const SECURITY_GROUP_TRANSIENT_STATUSES = [
7
7
  "syncing"
8
8
  ];
9
+ const SERVER_FILESYSTEM_TRANSIENT_STATUSES = [
10
+ "attaching",
11
+ "detaching"
12
+ ];
9
13
  const SERVER_IP_TRANSIENT_STATUSES = ["pending"];
10
14
  const SERVER_TRANSIENT_STATUSES = ["starting", "stopping"];
11
15
  const SNAPSHOT_TRANSIENT_STATUSES = [
@@ -36,6 +40,7 @@ exports.IMAGE_TRANSIENT_STATUSES = IMAGE_TRANSIENT_STATUSES;
36
40
  exports.IP_TRANSIENT_STATUSES = IP_TRANSIENT_STATUSES;
37
41
  exports.PRIVATE_NIC_TRANSIENT_STATUSES = PRIVATE_NIC_TRANSIENT_STATUSES;
38
42
  exports.SECURITY_GROUP_TRANSIENT_STATUSES = SECURITY_GROUP_TRANSIENT_STATUSES;
43
+ exports.SERVER_FILESYSTEM_TRANSIENT_STATUSES = SERVER_FILESYSTEM_TRANSIENT_STATUSES;
39
44
  exports.SERVER_IP_TRANSIENT_STATUSES = SERVER_IP_TRANSIENT_STATUSES;
40
45
  exports.SERVER_TRANSIENT_STATUSES = SERVER_TRANSIENT_STATUSES;
41
46
  exports.SNAPSHOT_TRANSIENT_STATUSES = SNAPSHOT_TRANSIENT_STATUSES;
@@ -1,4 +1,4 @@
1
- import type { ImageState, IpState, PrivateNICState, SecurityGroupState, ServerIpState, ServerState, SnapshotState, TaskStatus, VolumeServerState, VolumeState } from './types.gen';
1
+ import type { ImageState, IpState, PrivateNICState, SecurityGroupState, ServerFilesystemState, ServerIpState, ServerState, SnapshotState, TaskStatus, VolumeServerState, VolumeState } from './types.gen';
2
2
  /** Lists transient statutes of the enum {@link ImageState}. */
3
3
  export declare const IMAGE_TRANSIENT_STATUSES: ImageState[];
4
4
  /** Lists transient statutes of the enum {@link IpState}. */
@@ -7,6 +7,8 @@ export declare const IP_TRANSIENT_STATUSES: IpState[];
7
7
  export declare const PRIVATE_NIC_TRANSIENT_STATUSES: PrivateNICState[];
8
8
  /** Lists transient statutes of the enum {@link SecurityGroupState}. */
9
9
  export declare const SECURITY_GROUP_TRANSIENT_STATUSES: SecurityGroupState[];
10
+ /** Lists transient statutes of the enum {@link ServerFilesystemState}. */
11
+ export declare const SERVER_FILESYSTEM_TRANSIENT_STATUSES: ServerFilesystemState[];
10
12
  /** Lists transient statutes of the enum {@link ServerIpState}. */
11
13
  export declare const SERVER_IP_TRANSIENT_STATUSES: ServerIpState[];
12
14
  /** Lists transient statutes of the enum {@link ServerState}. */
@@ -4,6 +4,10 @@ const PRIVATE_NIC_TRANSIENT_STATUSES = ["syncing"];
4
4
  const SECURITY_GROUP_TRANSIENT_STATUSES = [
5
5
  "syncing"
6
6
  ];
7
+ const SERVER_FILESYSTEM_TRANSIENT_STATUSES = [
8
+ "attaching",
9
+ "detaching"
10
+ ];
7
11
  const SERVER_IP_TRANSIENT_STATUSES = ["pending"];
8
12
  const SERVER_TRANSIENT_STATUSES = ["starting", "stopping"];
9
13
  const SNAPSHOT_TRANSIENT_STATUSES = [
@@ -35,6 +39,7 @@ export {
35
39
  IP_TRANSIENT_STATUSES,
36
40
  PRIVATE_NIC_TRANSIENT_STATUSES,
37
41
  SECURITY_GROUP_TRANSIENT_STATUSES,
42
+ SERVER_FILESYSTEM_TRANSIENT_STATUSES,
38
43
  SERVER_IP_TRANSIENT_STATUSES,
39
44
  SERVER_TRANSIENT_STATUSES,
40
45
  SNAPSHOT_TRANSIENT_STATUSES,
package/dist/v1/index.cjs CHANGED
@@ -7,6 +7,7 @@ exports.IMAGE_TRANSIENT_STATUSES = content_gen.IMAGE_TRANSIENT_STATUSES;
7
7
  exports.IP_TRANSIENT_STATUSES = content_gen.IP_TRANSIENT_STATUSES;
8
8
  exports.PRIVATE_NIC_TRANSIENT_STATUSES = content_gen.PRIVATE_NIC_TRANSIENT_STATUSES;
9
9
  exports.SECURITY_GROUP_TRANSIENT_STATUSES = content_gen.SECURITY_GROUP_TRANSIENT_STATUSES;
10
+ exports.SERVER_FILESYSTEM_TRANSIENT_STATUSES = content_gen.SERVER_FILESYSTEM_TRANSIENT_STATUSES;
10
11
  exports.SERVER_IP_TRANSIENT_STATUSES = content_gen.SERVER_IP_TRANSIENT_STATUSES;
11
12
  exports.SERVER_TRANSIENT_STATUSES = content_gen.SERVER_TRANSIENT_STATUSES;
12
13
  exports.SNAPSHOT_TRANSIENT_STATUSES = content_gen.SNAPSHOT_TRANSIENT_STATUSES;
@@ -1,5 +1,5 @@
1
1
  export { API } from './api.gen';
2
2
  export * from './content.gen';
3
3
  export * from './marshalling.gen';
4
- export type { ApplyBlockMigrationRequest, Arch, AttachServerFileSystemRequest, AttachServerFileSystemResponse, AttachServerVolumeRequest, AttachServerVolumeRequestVolumeType, AttachServerVolumeResponse, BootType, Bootscript, CheckBlockMigrationOrganizationQuotasRequest, 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, DetachServerFileSystemRequest, DetachServerFileSystemResponse, DetachServerVolumeRequest, DetachServerVolumeResponse, ExportSnapshotRequest, ExportSnapshotResponse, GetDashboardRequest, GetDashboardResponse, GetImageRequest, GetImageResponse, GetIpRequest, GetIpResponse, GetPlacementGroupRequest, GetPlacementGroupResponse, GetPlacementGroupServersRequest, GetPlacementGroupServersResponse, GetPrivateNICRequest, GetPrivateNICResponse, GetSecurityGroupRequest, GetSecurityGroupResponse, GetSecurityGroupRuleRequest, GetSecurityGroupRuleResponse, GetServerCompatibleTypesRequest, GetServerRequest, GetServerResponse, GetServerTypesAvailabilityRequest, GetServerTypesAvailabilityResponse, GetServerTypesAvailabilityResponseAvailability, GetSnapshotRequest, GetSnapshotResponse, GetVolumeRequest, GetVolumeResponse, Image, ImageState, Ip, IpState, IpType, 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, ServerCompatibleTypes, ServerIp, ServerIpIpFamily, ServerIpProvisioningMode, ServerIpState, ServerIpv6, ServerLocation, ServerMaintenance, ServerState, ServerSummary, ServerType, ServerTypeCapabilities, ServerTypeGPUInfo, 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
+ export type { ApplyBlockMigrationRequest, Arch, AttachServerFileSystemRequest, AttachServerFileSystemResponse, AttachServerVolumeRequest, AttachServerVolumeRequestVolumeType, AttachServerVolumeResponse, Bootscript, BootType, CheckBlockMigrationOrganizationQuotasRequest, 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, DetachServerFileSystemRequest, DetachServerFileSystemResponse, DetachServerVolumeRequest, DetachServerVolumeResponse, ExportSnapshotRequest, ExportSnapshotResponse, GetDashboardRequest, GetDashboardResponse, GetImageRequest, GetImageResponse, GetIpRequest, GetIpResponse, GetPlacementGroupRequest, GetPlacementGroupResponse, GetPlacementGroupServersRequest, GetPlacementGroupServersResponse, GetPrivateNICRequest, GetPrivateNICResponse, GetSecurityGroupRequest, GetSecurityGroupResponse, GetSecurityGroupRuleRequest, GetSecurityGroupRuleResponse, GetServerCompatibleTypesRequest, GetServerRequest, GetServerResponse, GetServerTypesAvailabilityRequest, GetServerTypesAvailabilityResponse, GetServerTypesAvailabilityResponseAvailability, GetSnapshotRequest, GetSnapshotResponse, GetVolumeRequest, GetVolumeResponse, Image, ImageState, Ip, IpState, IpType, ListDefaultSecurityGroupRulesRequest, ListImagesRequest, ListImagesResponse, ListIpsRequest, ListIpsResponse, ListPlacementGroupsRequest, ListPlacementGroupsResponse, ListPrivateNICsRequest, ListPrivateNICsResponse, ListSecurityGroupRulesRequest, ListSecurityGroupRulesResponse, ListSecurityGroupsRequest, ListSecurityGroupsResponse, ListServerActionsRequest, ListServerActionsResponse, ListServersRequest, ListServersRequestOrder, ListServersResponse, ListServersTypesRequest, ListServersTypesResponse, ListServerUserDataRequest, ListServerUserDataResponse, 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, ServerCompatibleTypes, ServerFilesystem, ServerFilesystemState, ServerIp, ServerIpIpFamily, ServerIpProvisioningMode, ServerIpState, ServerIpv6, ServerLocation, ServerMaintenance, ServerState, ServerSummary, ServerType, ServerTypeCapabilities, ServerTypeGPUInfo, ServerTypeNetwork, ServerTypeNetworkInterface, ServerTypesAvailability, ServerTypeVolumeConstraintSizes, ServerTypeVolumeConstraintsByType, 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';
5
5
  export * as ValidationRules from './validation-rules.gen';
package/dist/v1/index.js CHANGED
@@ -1,11 +1,12 @@
1
1
  import { InstanceV1UtilsAPI } from "./api.utils.js";
2
- import { IMAGE_TRANSIENT_STATUSES, IP_TRANSIENT_STATUSES, PRIVATE_NIC_TRANSIENT_STATUSES, SECURITY_GROUP_TRANSIENT_STATUSES, SERVER_IP_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, TASK_TRANSIENT_STATUSES, VOLUME_SERVER_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES } from "./content.gen.js";
2
+ import { IMAGE_TRANSIENT_STATUSES, IP_TRANSIENT_STATUSES, PRIVATE_NIC_TRANSIENT_STATUSES, SECURITY_GROUP_TRANSIENT_STATUSES, SERVER_FILESYSTEM_TRANSIENT_STATUSES, SERVER_IP_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, TASK_TRANSIENT_STATUSES, VOLUME_SERVER_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES } from "./content.gen.js";
3
3
  export {
4
4
  InstanceV1UtilsAPI as API,
5
5
  IMAGE_TRANSIENT_STATUSES,
6
6
  IP_TRANSIENT_STATUSES,
7
7
  PRIVATE_NIC_TRANSIENT_STATUSES,
8
8
  SECURITY_GROUP_TRANSIENT_STATUSES,
9
+ SERVER_FILESYSTEM_TRANSIENT_STATUSES,
9
10
  SERVER_IP_TRANSIENT_STATUSES,
10
11
  SERVER_TRANSIENT_STATUSES,
11
12
  SNAPSHOT_TRANSIENT_STATUSES,
@@ -137,6 +137,17 @@ const unmarshalSecurityGroupSummary = (data) => {
137
137
  name: data.name
138
138
  };
139
139
  };
140
+ const unmarshalServerFilesystem = (data) => {
141
+ if (!sdkClient.isJSONObject(data)) {
142
+ throw new TypeError(
143
+ `Unmarshalling the type 'ServerFilesystem' failed as data isn't a dictionary.`
144
+ );
145
+ }
146
+ return {
147
+ filesystemId: data.filesystem_id,
148
+ state: data.state
149
+ };
150
+ };
140
151
  const unmarshalServerIp = (data) => {
141
152
  if (!sdkClient.isJSONObject(data)) {
142
153
  throw new TypeError(
@@ -232,6 +243,10 @@ const unmarshalServer = (data) => {
232
243
  dynamicIpRequired: data.dynamic_ip_required,
233
244
  enableIpv6: data.enable_ipv6,
234
245
  endOfService: data.end_of_service,
246
+ filesystems: sdkClient.unmarshalArrayOfObject(
247
+ data.filesystems,
248
+ unmarshalServerFilesystem
249
+ ),
235
250
  hostname: data.hostname,
236
251
  id: data.id,
237
252
  image: data.image ? unmarshalImage(data.image) : void 0,
@@ -1,5 +1,5 @@
1
1
  import type { DefaultValues } from '@scaleway/sdk-client';
2
- import type { ApplyBlockMigrationRequest, AttachServerFileSystemRequest, AttachServerFileSystemResponse, AttachServerVolumeRequest, AttachServerVolumeResponse, CheckBlockMigrationOrganizationQuotasRequest, CreateImageRequest, CreateImageResponse, CreateIpRequest, CreateIpResponse, CreatePlacementGroupRequest, CreatePlacementGroupResponse, CreatePrivateNICRequest, CreatePrivateNICResponse, CreateSecurityGroupRequest, CreateSecurityGroupResponse, CreateSecurityGroupRuleRequest, CreateSecurityGroupRuleResponse, CreateServerRequest, CreateServerResponse, CreateSnapshotRequest, CreateSnapshotResponse, CreateVolumeRequest, CreateVolumeResponse, DetachServerFileSystemRequest, DetachServerFileSystemResponse, DetachServerVolumeRequest, DetachServerVolumeResponse, ExportSnapshotRequest, ExportSnapshotResponse, GetDashboardResponse, GetImageResponse, GetIpResponse, GetPlacementGroupResponse, GetPlacementGroupServersResponse, GetPrivateNICResponse, GetSecurityGroupResponse, GetSecurityGroupRuleResponse, GetServerResponse, GetServerTypesAvailabilityResponse, GetSnapshotResponse, GetVolumeResponse, ListImagesResponse, ListIpsResponse, ListPlacementGroupsResponse, ListPrivateNICsResponse, ListSecurityGroupRulesResponse, ListSecurityGroupsResponse, ListServerActionsResponse, ListServerUserDataResponse, ListServersResponse, ListServersTypesResponse, ListSnapshotsResponse, ListVolumesResponse, ListVolumesTypesResponse, MigrationPlan, PlanBlockMigrationRequest, PrivateNIC, ServerActionRequest, ServerActionResponse, ServerCompatibleTypes, 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, AttachServerFileSystemRequest, AttachServerFileSystemResponse, AttachServerVolumeRequest, AttachServerVolumeResponse, CheckBlockMigrationOrganizationQuotasRequest, CreateImageRequest, CreateImageResponse, CreateIpRequest, CreateIpResponse, CreatePlacementGroupRequest, CreatePlacementGroupResponse, CreatePrivateNICRequest, CreatePrivateNICResponse, CreateSecurityGroupRequest, CreateSecurityGroupResponse, CreateSecurityGroupRuleRequest, CreateSecurityGroupRuleResponse, CreateServerRequest, CreateServerResponse, CreateSnapshotRequest, CreateSnapshotResponse, CreateVolumeRequest, CreateVolumeResponse, DetachServerFileSystemRequest, DetachServerFileSystemResponse, DetachServerVolumeRequest, DetachServerVolumeResponse, ExportSnapshotRequest, ExportSnapshotResponse, GetDashboardResponse, GetImageResponse, GetIpResponse, GetPlacementGroupResponse, GetPlacementGroupServersResponse, GetPrivateNICResponse, GetSecurityGroupResponse, GetSecurityGroupRuleResponse, GetServerResponse, GetServerTypesAvailabilityResponse, GetSnapshotResponse, GetVolumeResponse, ListImagesResponse, ListIpsResponse, ListPlacementGroupsResponse, ListPrivateNICsResponse, ListSecurityGroupRulesResponse, ListSecurityGroupsResponse, ListServerActionsResponse, ListServersResponse, ListServersTypesResponse, ListServerUserDataResponse, ListSnapshotsResponse, ListVolumesResponse, ListVolumesTypesResponse, MigrationPlan, PlanBlockMigrationRequest, PrivateNIC, ServerActionRequest, ServerActionResponse, ServerCompatibleTypes, 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 unmarshalAttachServerFileSystemResponse: (data: unknown) => AttachServerFileSystemResponse;
@@ -135,6 +135,17 @@ const unmarshalSecurityGroupSummary = (data) => {
135
135
  name: data.name
136
136
  };
137
137
  };
138
+ const unmarshalServerFilesystem = (data) => {
139
+ if (!isJSONObject(data)) {
140
+ throw new TypeError(
141
+ `Unmarshalling the type 'ServerFilesystem' failed as data isn't a dictionary.`
142
+ );
143
+ }
144
+ return {
145
+ filesystemId: data.filesystem_id,
146
+ state: data.state
147
+ };
148
+ };
138
149
  const unmarshalServerIp = (data) => {
139
150
  if (!isJSONObject(data)) {
140
151
  throw new TypeError(
@@ -230,6 +241,10 @@ const unmarshalServer = (data) => {
230
241
  dynamicIpRequired: data.dynamic_ip_required,
231
242
  enableIpv6: data.enable_ipv6,
232
243
  endOfService: data.end_of_service,
244
+ filesystems: unmarshalArrayOfObject(
245
+ data.filesystems,
246
+ unmarshalServerFilesystem
247
+ ),
233
248
  hostname: data.hostname,
234
249
  id: data.id,
235
250
  image: data.image ? unmarshalImage(data.image) : void 0,
@@ -15,6 +15,7 @@ export type SecurityGroupRuleDirection = 'unknown_direction' | 'inbound' | 'outb
15
15
  export type SecurityGroupRuleProtocol = 'unknown_protocol' | 'TCP' | 'UDP' | 'ICMP' | 'ANY';
16
16
  export type SecurityGroupState = 'available' | 'syncing' | 'syncing_error';
17
17
  export type ServerAction = 'poweron' | 'backup' | 'stop_in_place' | 'poweroff' | 'terminate' | 'reboot' | 'enable_routed_ip';
18
+ export type ServerFilesystemState = 'unknown_state' | 'attaching' | 'available' | 'detaching';
18
19
  export type ServerIpIpFamily = 'inet' | 'inet6';
19
20
  export type ServerIpProvisioningMode = 'manual' | 'dhcp' | 'slaac';
20
21
  export type ServerIpState = 'unknown_state' | 'detached' | 'attached' | 'pending' | 'error';
@@ -220,6 +221,10 @@ export interface SecurityGroupSummary {
220
221
  id: string;
221
222
  name: string;
222
223
  }
224
+ export interface ServerFilesystem {
225
+ filesystemId: string;
226
+ state: ServerFilesystemState;
227
+ }
223
228
  export interface ServerIp {
224
229
  /**
225
230
  * Unique ID of the IP address.
@@ -510,6 +515,10 @@ export interface Server {
510
515
  * This value is reset when admin_password_encryption_ssh_key_id is set to an empty string.
511
516
  */
512
517
  adminPasswordEncryptedValue?: string;
518
+ /**
519
+ * List of attached filesystems.
520
+ */
521
+ filesystems: ServerFilesystem[];
513
522
  /**
514
523
  * True if the Instance type has reached end of service.
515
524
  */
@@ -1234,7 +1243,7 @@ export type CreateServerRequest = {
1234
1243
  */
1235
1244
  name?: string;
1236
1245
  /**
1237
- * Define if a dynamic IPv4 is required for the Instance.
1246
+ * By default, `dynamic_ip_required` is true, a dynamic ip is attached to the instance (if no flexible ip is already attached).
1238
1247
  */
1239
1248
  dynamicIpRequired?: boolean;
1240
1249
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-instance",
3
- "version": "1.0.5",
3
+ "version": "1.2.0",
4
4
  "description": "Scaleway SDK instance",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -26,17 +26,17 @@
26
26
  "directory": "packages_generated/instance"
27
27
  },
28
28
  "engines": {
29
- "node": ">=20.19.1"
29
+ "node": ">=20.19.4"
30
30
  },
31
31
  "dependencies": {
32
- "@scaleway/random-name": "5.1.1",
33
- "@scaleway/sdk-std": "1.0.4"
32
+ "@scaleway/random-name": "5.1.2",
33
+ "@scaleway/sdk-std": "1.0.6"
34
34
  },
35
35
  "peerDependencies": {
36
- "@scaleway/sdk-client": "^1.2.3"
36
+ "@scaleway/sdk-client": "^1.3.1"
37
37
  },
38
38
  "devDependencies": {
39
- "@scaleway/sdk-client": "^1.2.3"
39
+ "@scaleway/sdk-client": "^1.3.1"
40
40
  },
41
41
  "scripts": {
42
42
  "package:check": "pnpm publint",