PUT
/api/v1/block_storage/{block_id}/vm/upgrade/
curl --request PUT \ --url 'https://api.e2enetworks.com/myaccount/api/v1/block_storage/{block_id}/vm/upgrade/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "vm_id": 11584, "block_storage_size": 300, "name": "V_100GB_200"}'import requests
response = requests.put( "https://api.e2enetworks.com/myaccount/api/v1/block_storage/{block_id}/vm/upgrade/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "vm_id": 11584, "block_storage_size": 300, "name": "V_100GB_200", },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/block_storage/{block_id}/vm/upgrade/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "PUT", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "vm_id": 11584, "block_storage_size": 300, "name": "V_100GB_200" }),});console.log(await response.json());Notes:
- The volume must be attached to a node before it can be upgraded.
- Volume cannot be upgraded when there exists a snapshot. Either delete the snapshot and then upgrade, or use the snapshot to create a new volume.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”block_id
required
string
Block ID
Query Parameters
Section titled “Query Parameters”project_id
required
integer
Project ID Find your project id here
location
required
string
Deployment region for the resource. Accepted values: Delhi, Chennai.
Mumbai region has been discontinued. Delhi and Chennai are the only supported regions.
Request Body
Section titled “Request Body”Media typeapplication/json
object
vm_id
required
ID of the virtual machine the volume is attached to.
integer
Example
11584block_storage_size
required
New size of the block storage in GB.
integer
Example
300name
required
Updated name for the block storage.
string
Example
V_100GB_200Responses
Section titled “Responses”A successful response indicating block storage has been upgraded
Media typeapplication/json
object
code
Response status code
integer
data
object
image_id
Identifier of the block storage image
integer
vm_id
Identifier of the virtual machine the block storage is attached to
integer
errors
Any errors that occurred during the operation (if applicable)
object
message
Response message indicating the operation result
string
Example
{ "code": 200, "data": { "image_id": 2020, "vm_id": 11584 }, "message": "Block Storage is upgraded."}