Skip to content

Commit c3dde15

Browse files
docs(bls): added API doc on volume increase MTA-5706 (#4547)
1 parent e227110 commit c3dde15

File tree

3 files changed

+63
-2
lines changed

3 files changed

+63
-2
lines changed

menu/navigation.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4998,6 +4998,10 @@
49984998
"label": "Managing a volume",
49994999
"slug": "managing-a-volume"
50005000
},
5001+
{
5002+
"label": "Increasing volume size via the API",
5003+
"slug": "increasing-volume-size"
5004+
},
50015005
{
50025006
"label": "Identifying the API managing Block Storage volumes and snapshots",
50035007
"slug": "identifying-volume-snapshot-api"
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
meta:
3+
title: &title Increasing the size of Block Storage volumes via the Scaleway API
4+
description: &desc This page explains how to increase the size of a Block Storage volume using the Scaleway API.
5+
content:
6+
h1: *title
7+
paragraph: *desc
8+
tags: increase expand increment raise storage volume block
9+
dates:
10+
validation: 2025-03-04
11+
posted: 2025-03-04
12+
categories:
13+
- block-storage
14+
- storage
15+
---
16+
17+
The Block storage API allows you to interact with Block Storage volumes programmatically through API calls. Refer to the [Developers reference website](https://www.scaleway.com/en/developers/api/block/) for more information on how to use the Block Storage API.
18+
19+
<Macro id="requirements" />
20+
21+
- A Scaleway account logged into the [console](https://console.scaleway.com)
22+
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
23+
- A valid [API key](/iam/how-to/create-api-keys/)
24+
- A [Block Storage volume](/instances/api-cli/creating-a-volume/)
25+
26+
1. Run the command below to list your Block Storage volumes. Do not forget to replace the `{zone}` placeholder with the desired Availability Zone (`fr-par-1`, `nl-ams-2`, etc.):
27+
```
28+
curl -X GET \
29+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
30+
"https://api.scaleway.com/block/v1alpha1/zones/{zone}/volumes"
31+
```
32+
33+
An output similar to the following displays:
34+
35+
```
36+
{"volume": {"creation_date": "2020-06-02T08:04:50.094118+00:00", "server": null, "id": "<VOLUME_ID>", "size": 25000000000, "name": "myAwesomeVolume", "zone": "<REGION>", "export_uri": null, "volume_type": "b_ssd", "modification_date": "2020-06-02T08:04:50.094118+00:00", "state": "available", "organization": "<ORGANIZATION_ID>"}}
37+
```
38+
39+
2. To modify the volume size, run the request below. Do not forget to replace the placeholders with the appropriate value:
40+
```
41+
curl -X PATCH \
42+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
43+
-H "Content-Type: application/json" \
44+
-d '{"size" : "{size_in_bytes}"}' \
45+
"https://api.scaleway.com/block/v1alpha1/zones/{zone}/volumes/{volume_id}"
46+
```
47+
<Message type="note">
48+
You can only increase the size of a Block Storage volume. Reducing its size is not permitted due to technical constraints.
49+
</Message>
50+
An output similar to the following displays:
51+
```
52+
{"volume": {"creation_date": "2020-06-02T08:04:50.094118+00:00", "server": null, "id": "VOLUME_ID", "size": 26000000000, "name": "new_name", "zone": "REGION", "export_uri": null, "volume_type": "b_ssd", "modification_date": "2020-06-02T08:08:27.385208+00:00", "state": "resizing", "organization": "ORGANIZATION_ID"}}
53+
```
54+
55+
The size of your volume has been updated.

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ meta:
55
content:
66
h1: Increasing Block Storage volumes via the Instance API
77
paragraph: This page explains how to increase a Block Storage volume
8-
tags: increase expland increment raise storage volume block
8+
tags: increase expand increment raise storage volume block
99
dates:
1010
validation: 2024-08-26
1111
posted: 2020-01-10
@@ -14,12 +14,14 @@ categories:
1414
- storage
1515
---
1616

17+
The Instances API allows you to interact with Block Storage volumes programmatically through API calls. To increase the size of a volume using the Block Storage API, refer to the [dedicated documentation](/block-storage/api-cli/increasing-volume-size/).
18+
1719
<Macro id="requirements" />
1820

1921
- A Scaleway account logged into the [console](https://console.scaleway.com)
2022
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
2123
- A valid [API key](/iam/how-to/create-api-keys/)
22-
- A [Block Storage volume](/instances/api-cli/creating-a-volume/)
24+
- A [Block Storage volume](/instances/api-cli/creating-a-volume/) attached to an Instance
2325

2426

2527
1. Inspect the volume and verify its name, size, and if the type is `b_ssd` by running the following request.

0 commit comments

Comments
 (0)