Skip to content

Commit 0e339b9

Browse files
committed
feat(ins): update documentation
1 parent 95ee9ae commit 0e339b9

File tree

6 files changed

+80
-72
lines changed

6 files changed

+80
-72
lines changed

pages/instances/api-cli/attaching-a-volume.mdx

Lines changed: 53 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
meta:
3-
title: Attaching a Block Storage volume via the Instance API
3+
title: Attaching a Block Storage volume via the Block Storage API
44
description: This page explains how to attach a Block Storage volume using the Scaleway API.
55
content:
66
h1: Attaching a Block Storage volume via the Instance API
@@ -24,31 +24,37 @@ dates:
2424

2525
1. Query the current volumes of the Instance.
2626
```
27-
curl -q \
28-
-H "X-Auth-Token: $SECRET_KEY" \
29-
-H 'Content-Type: application/json' \
30-
https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/be3c50af-e8f3-4ff4-90fe-66972f06670d
27+
curl -X GET \
28+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
29+
"https://api.scaleway.com/instance/v1/zones/{zone}/servers/{server_id}"
30+
```
31+
32+
The output displays as follows:
33+
```
3134
{
32-
"server": {
33-
"allowed_actions": [
34-
...
35-
"volumes": {
36-
"0": {
37-
...
38-
"id": "7fe25caf-0a68-46a7-aeb9-63a278d33e2b",
39-
"volume_type": "l_ssd",
40-
...
41-
}
42-
},
43-
...
35+
"server": {
36+
"id": "de0f4d6a-3289-4716-97a8-d24b2a58dcd9",
37+
"name": "scw-priceless-diffie",
38+
"arch": "x86_64",
39+
...
40+
},
41+
"volumes": {
42+
"0": {
43+
"boot": false,
44+
"volume_type": "sbs_volume",
45+
"id": "1469d160-bfb2-4fdd-bb5d-f8d7c1d0439d",
46+
"zone": "pl-waw-2"
47+
}
48+
},
49+
...
4450
}
4551
```
4652

4753
As displayed, our current volumes are only constituted of the root volume.
4854
2. Hot-plug the volume created earlier:
4955
```bash
5056
curl -q \
51-
-H "X-Auth-Token: $SECRET_KEY" \
57+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
5258
-H 'Content-Type: application/json' \
5359
-X PATCH \
5460
-d '{
@@ -63,44 +69,34 @@ dates:
6369
}
6470
}
6571
}' \
66-
https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/be3c50af-e8f3-4ff4-90fe-66972f06670d
67-
{
68-
"server": {
69-
...
70-
"id": "be3c50af-e8f3-4ff4-90fe-66972f06670d",
71-
...
72-
"name": "scw-blissful-engelbart",
73-
"protected": false,
74-
"volumes": {
75-
"0": {
76-
"size": 20000000000,
77-
"state": "available",
78-
...
79-
"id": "7fe25caf-0a68-46a7-aeb9-63a278d33e2b",
80-
"volume_type": "l_ssd",
81-
"server": {
82-
"id": "be3c50af-e8f3-4ff4-90fe-66972f06670d",
83-
"name": "scw-blissful-engelbart"
84-
}
85-
},
86-
"1": {
87-
"size": 10000000000,
88-
"state": "available",
89-
"name": "block-volume101",
90-
"modification_date": "2019-09-03T10:17:40.800839+00:00",
91-
...
92-
"id": "b3a42fb1-e85c-46e9-b0a6-9adb62278295",
93-
"volume_type": "sbs_volume",
94-
"server": {
95-
"id": "be3c50af-e8f3-4ff4-90fe-66972f06670d",
96-
"name": "scw-blissful-engelbart"
97-
}
98-
}
99-
},
100-
...
101-
}
102-
}
72+
https://api.scaleway.com/instance/v1/zones/{zone}/servers/{server_id}
10373
```
74+
The output looks like the following example:
75+
```
76+
{
77+
"server": {
78+
"id": "1de0f4d6a-3289-4716-97a8-d24b2a58dcd9",
79+
"name": "scw-priceless-diffie",
80+
"arch": "x86_64",
81+
...
82+
},
83+
"volumes": {
84+
"0": {
85+
"boot": false,
86+
"volume_type": "sbs_volume",
87+
"id": "7fe25caf-0a68-46a7-aeb9-63a278d33e2b",
88+
"zone": "pl-waw-2"
89+
},
90+
"1": {
91+
"boot": false,
92+
"volume_type": "sbs_volume",
93+
"id": "b3a42fb1-e85c-46e9-b0a6-9adb62278295",
94+
"zone": "pl-waw-2"
95+
}
96+
},
97+
...
98+
}
99+
```
104100
3. Use [SSH](/instances/how-to/connect-to-instance/) to log into your server and verify that the new disk exists:
105101
```bash
106102
lsblk
@@ -125,7 +121,7 @@ dates:
125121

126122
```
127123
curl -q \
128-
-H "X-Auth-Token: $SECRET_KEY" \
124+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
129125
-H 'Content-Type: application/json' \
130126
https://api.scaleway.com/instance/v1/zones/fr-par-1/volumes/b3a42fb1-e85c-46e9-b0a6-9adb62278295
131127
{
@@ -135,7 +131,7 @@ dates:
135131
"name": "block-volume101",
136132
...
137133
"id": "b3a42fb1-e85c-46e9-b0a6-9adb62278295",
138-
"volume_type": "b_ssd",
134+
"volume_type": "sbs_volume",
139135
"server": {
140136
"id": "be3c50af-e8f3-4ff4-90fe-66972f06670d",
141137
"name": "scw-blissful-engelbart"

pages/instances/api-cli/creating-a-volume.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ categories:
1414
- storage
1515
---
1616

17+
<Message type="important">
18+
Creating Block Storage volumes via the Instances API is deprected and the information below is proposed for informative purposes only. [Learn how to create a volume using the Block Storage API.](https://www.scaleway.com/en/developers/api/block/#path-volume-create-a-volume)
19+
</Message>
20+
1721
<Macro id="requirements" />
1822

1923
- A Scaleway account logged into the [console](https://console.scaleway.com)
@@ -24,7 +28,7 @@ categories:
2428
1. Create a block volume from the API by launching the following command:
2529
```
2630
curl -q \
27-
-H "X-Auth-Token: $SECRET_KEY" \
31+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
2832
-H 'Content-Type: application/json' \
2933
-X POST \
3034
-d '{"name": "block-volume-101", "organization": "'$SCW_ORGANIZATION'", "size": 10000000000, "volume_type": "b_ssd"}' \
@@ -33,7 +37,7 @@ categories:
3337
2. To retrieve the current status of the block volume, query the volume endpoint.
3438
```
3539
curl -q \
36-
-H "X-Auth-Token: $SECRET_KEY" \
40+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
3741
-H 'Content-Type: application/json' \
3842
https://api.scaleway.com/instance/v1/zones/fr-par-1/volumes/b3a42fb1-e85c-46e9-b0a6-9adb62278295
3943
{

pages/instances/api-cli/creating-backups.mdx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ content:
77
paragraph: This page explains how to create backups of your Instaces using the Scaleway API
88
tags: instance create backup scaleway-api
99
dates:
10-
validation: 2025-01-02
10+
validation: 2025-05-28
1111
posted: 2021-05-26
1212
categories:
1313
- compute
@@ -38,12 +38,12 @@ The Backup feature is used to back up your Instance data. It creates an image of
3838
<Message type="tip">
3939
By default, the name of the image is built according to the name of the server and the date. You can specify a name for the image in the request:
4040
```sh
41-
scw instance server backp server-id zone=fr-par-1 name=myimagename
41+
scw instance server backup <server-id> zone=fr-par-1 name=<my-image-name>
4242
```
4343
</Message>
4444
A backup request will create an image object. You can view it using:
4545
```sh
46-
scw instance image get image-uid zone=fr-par-1
46+
scw instance image get <image-uid> zone=fr-par-1
4747
```
4848
An image contains one snapshot for each volume of the Instance. These snapshots are visible within the image response as `root_volume` and `extra_volumes` fields.
4949
</TabsTab>
@@ -78,22 +78,26 @@ The Backup feature is used to back up your Instance data. It creates an image of
7878
<TabsTab label="CLI">
7979
To delete a backup, run the following command:
8080
```sh
81-
scw instance image delete image-uid zone=fr-par1
81+
scw instance image delete <image-uid> zone=fr-par1
8282
```
8383
It is also recommended to remove every snapshot related to the image by running the following command for each snapshot that is no longer needed:
8484
```sh
85-
scw instance snapshot delete snapshot-uid zone=fr-par-1
85+
scw block snapshot delete <snapshot-uid> zone=fr-par-1
8686
```
8787
</TabsTab>
8888

8989
<TabsTab label="API">
9090
Run the following call to delete the image that contains a backup:
9191
```
92-
DELETE https://api.scaleway.com/instance/v1/zones/<region>/images/<image_uid>
92+
curl -X DELETE \
93+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
94+
"https://api.scaleway.com/instance/v1/zones/{zone}/images/{image_id}"
9395
```
9496
It is also recommended to remove every snapshot related to the image by running the following API call for each snapshot that is no longer needed:
9597
```
96-
DELETE https://api.scaleway.com/instance/v1/zones/<region>/snapshots/<snapshot_uid>
98+
curl -X DELETE \
99+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
100+
"https://api.scaleway.com/block/v1/zones/{zone}/snapshots/{snapshot_id}"
97101
```
98102
</TabsTab>
99103
</Tabs>

pages/instances/api-cli/detaching-a-volume.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ content:
77
paragraph: This page explains how to detach a Block Storage volume from an Instance using the Scaleway API.
88
tags: detach volume block storage unlink unplug api
99
dates:
10-
validation: 2025-01-02
10+
validation: 2025-06-02
1111
posted: 2020-01-10
1212
categories:
1313
- block-storage
@@ -23,15 +23,15 @@ To detach a block volume from a running Instance, relaunch the API call and omit
2323

2424
```
2525
curl -q \
26-
-H "X-Auth-Token: $SECRET_KEY" \
26+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
2727
-H 'Content-Type: application/json' \
2828
-X PATCH \
2929
-d '{
3030
"volumes": {
3131
"0": "7fe25caf-0a68-46a7-aeb9-63a278d33e2b",
3232
}
3333
}' \
34-
https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/be3c50af-e8f3-4ff4-90fe-66972f06670d
34+
ttps://api.scaleway.com/instance/v1/zones/{zone}/servers/{server_id}
3535
```
3636

3737

pages/instances/api-cli/increasing-volume-size.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The Instances API allows you to interact with Block Storage volumes programmatic
3030

3131
1. Inspect the volume and verify its name, size, and if the type is `b_ssd` by running the following request.
3232
```
33-
curl -q -H "X-Auth-Token: $SECRET_KEY" -X GET https://api.scaleway.com/instance/v1/zones/<REGION>/volumes/<VOLUME_ID>
33+
curl -q -H "X-Auth-Token: $SCW_SECRET_KEY" -X GET https://api.scaleway.com/instance/v1/zones/<REGION>/volumes/<VOLUME_ID>
3434
```
3535

3636
<Message type="note">
@@ -44,7 +44,7 @@ The Instances API allows you to interact with Block Storage volumes programmatic
4444
```
4545
2. To modify the volume size, run the request below:
4646
```
47-
curl https://api.scaleway.com/instance/v1/zones/REGION/volumes/VOLUME_ID -H "X-Auth-Token: $SECRET_KEY" -X PATCH -H 'Content-Type: application/json;charset=utf-8' --data '{ "name":"new_name", "size":26000000000 }'
47+
curl https://api.scaleway.com/instance/v1/zones/REGION/volumes/VOLUME_ID -H "X-Auth-Token: $SCW_SECRET_KEY" -X PATCH -H 'Content-Type: application/json;charset=utf-8' --data '{ "name":"new_name", "size":26000000000 }'
4848
```
4949
Replace `REGION` and `VOLUME_ID` following the guidelines mentioned previously and replace the existing size value with the new one.
5050

pages/instances/how-to/snapshot-import-export-feature.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ content:
77
paragraph: This page explains how to import/export snapshots of Instances using the Scaleway console.
88
tags: snapshot, import, export, instance, availability zone, qcow2
99
dates:
10-
validation: 2025-05-28
10+
validation: 2025-06-02
1111
posted: 2021-07-27
1212
categories:
1313
- compute
@@ -33,6 +33,10 @@ More information on the QCOW2 file format and how to use it can be found in the
3333
For this guide, we assume you have an Instance running in the `fr-par-1` AZ, your Object Storage bucket is located in the region `fr-par`, and you want to create a new Instance in the `fr-par-2` AZ.
3434
</Message>
3535

36+
<Message type="note">
37+
The snapshot export from the console is currently available for **Local Storage** volumes. Use the CLI or API to export a **Block Storage** volume. [Learn more about exporting Block Storage volumes using the API.](/instances/api-cli/snapshot-import-export-feature)
38+
</Message>
39+
3640
1. Click the [CPU & GPU Instances section](https://console.scaleway.com/instance/servers) of the Scaleway console, then click the Instance you want to snapshot.
3741
2. The Instance overview displays. Click the **Storage** tab to display the storage resources attached to the Instance. Scroll to the **Snapshots** section of the page.
3842
3. Click the name of the snapshot you want to export. The snapshot overview displays.

0 commit comments

Comments
 (0)