@scaleway/sdk-instance 1.0.4 → 1.1.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.
@@ -561,7 +566,7 @@ class API extends sdkClient.API {
561
566
  marshalling_gen.unmarshalGetVolumeResponse
562
567
  );
563
568
  /**
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.
569
+ * Update a volume. Replace the name and/or size properties of a volume specified by its ID, with the specified value(s).
565
570
  *
566
571
  * @param request - The request {@link UpdateVolumeRequest}
567
572
  * @returns A Promise of UpdateVolumeResponse
@@ -1,5 +1,5 @@
1
1
  import { API as ParentAPI } from '@scaleway/sdk-client';
2
- import type { Zone as ScwZone } from '@scaleway/sdk-client';
2
+ import type { ApiLocality } from '@scaleway/sdk-client';
3
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';
4
4
  import type { SetImageResponse, SetSecurityGroupRequest, SetSecurityGroupResponse, SetSecurityGroupRuleRequest, SetSecurityGroupRuleResponse, SetServerRequest, SetServerResponse, SetSnapshotRequest, SetSnapshotResponse } from './types.private.gen';
5
5
  /**
@@ -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.
@@ -239,7 +242,7 @@ export declare class API extends ParentAPI {
239
242
  */
240
243
  getVolume: (request: Readonly<GetVolumeRequest>) => Promise<GetVolumeResponse>;
241
244
  /**
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.
245
+ * Update a volume. Replace the name and/or size properties of a volume specified by its ID, with the specified value(s).
243
246
  *
244
247
  * @param request - The request {@link UpdateVolumeRequest}
245
248
  * @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.
@@ -559,7 +564,7 @@ class API extends API$1 {
559
564
  unmarshalGetVolumeResponse
560
565
  );
561
566
  /**
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.
567
+ * Update a volume. Replace the name and/or size properties of a volume specified by its ID, with the specified value(s).
563
568
  *
564
569
  * @param request - The request {@link UpdateVolumeRequest}
565
570
  * @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, 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, ServerFilesystem, ServerFilesystemState, 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';
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,
@@ -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
  */
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-instance",
3
- "version": "1.0.4",
3
+ "version": "1.1.0",
4
4
  "description": "Scaleway SDK instance",
5
- "types": "dist/index.d.ts",
5
+ "license": "Apache-2.0",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
@@ -30,13 +30,13 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@scaleway/random-name": "5.1.1",
33
- "@scaleway/sdk-std": "1.0.3"
33
+ "@scaleway/sdk-std": "1.0.5"
34
34
  },
35
35
  "peerDependencies": {
36
- "@scaleway/sdk-client": "^1.2.2"
36
+ "@scaleway/sdk-client": "^1.3.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@scaleway/sdk-client": "^1.2.2"
39
+ "@scaleway/sdk-client": "^1.3.0"
40
40
  },
41
41
  "scripts": {
42
42
  "package:check": "pnpm publint",