Skip to content

Update Plan

PUT
/notebooks/{Instance_id}/
curl --request PUT \
--url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/{Instance_id}/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"cluster_type": "string",
"sku_id": 0,
"sku_item_price_id": 0,
"committed_instance_policy": "auto_renew",
"next_sku_item_price_id": 0
}'

Changes the plan of an hourly Instance or Virtual Machine, or converts it to a committed plan. The VM must be stopped before its plan changes (“Please stop your notebook before Updation.”); a conversion to a committed plan works in any state except stopped, stopping or error. A plan change is refused when the new plan is the current plan (“This plan is already selected”) or a free plan (“You cannot update notebook to a free plan”). After the change, a VM that was stopped starts again. To convert, send a committed sku_item_price_id with committed_instance_policy. A private cluster VM cannot be converted (“Compute resources running on Private Cloud cannot be converted to a Committed Plan”). The plan of a committed VM cannot change; sending committed_instance_policy and next_sku_item_price_id changes only what happens when its term ends.

Instance_id
required
integer

Instance ID

project_id
required
integer

Project ID

active_iam
integer

Active IAM ID (To access contact person account) Find your Active IAM ID here

location
required
string
Allowed values: Delhi Chennai

Location

Media typeapplication/json
object
cluster_type

The type of the cluster

string
sku_id

The SKU ID

integer
sku_item_price_id

The SKU item price ID. A committed one converts the VM to that committed plan.

integer
committed_instance_policy

What happens when the committed term ends: auto_renew, convert_to_hourly_billing or auto_terminate. Required with a committed sku_item_price_id. Anything else is refused with “Invalid Updation policy chosen for committed instance”.

string
Allowed values: auto_renew convert_to_hourly_billing auto_terminate
next_sku_item_price_id

The plan to continue on after the term, for auto_renew and convert_to_hourly_billing. Not used with auto_terminate.

integer

Notebook details retrieved successfully

Media typeapplication/json
object
code
integer
message
string
data
object
id
integer
name
string
project_id
integer
image_type
string
image_details
object
image_id
integer
version_id
integer
name
string
icon_url
string
image_description
string
version_description
string
sku_details
object
specs
object
sku_id
integer
name
string
series
string
cpu
integer
gpu
integer
memory
integer
is_free
boolean
is_active
boolean
gpu_switch_type
string
nullable
local_storage_in_gb
integer
plan
object
sku_item_price_id
integer
sku_type
string
committed_days
integer
unit_price
number format: float
currency
string
is_active
boolean
description
string
nullable
status
string
last_activity
string
nullable
created_by
object
id
integer
name
string
email
string
username
string
created_at
string format: date-time
updated_at
string format: date-time
lab_url
string
nullable
disk_size_in_gb
integer
instance_type
string
ssh_keys
Array<string>
disable_ssh_login_password
boolean
public_ip
string
e2e_registry_image_url
string
nullable
egress_gateway_ip
string
add_ons
object
is_jupyterlab_enabled
boolean
is_ssh_enabled
boolean
custom_ports
Array<string>
private_cloud_id
string
nullable
custom_sku
string
nullable
errors
object

Example

{
"code": 200,
"message": "Success",
"data": {
"id": 5633,
"name": "node-11131656asd3232",
"project_id": 124,
"image_type": "pre-built",
"image_details": {
"image_id": 9,
"version_id": 56,
"name": "Transformers",
"icon_url": "/notebook_images/hf-logo.png",
"image_description": "Transformers v4.31.0 with Python 3.10 and NVIDIA Cuda 12.1 pre-installed on Ubuntu 22.04",
"version_description": "Transformers v4.45.2 with Python 3.10 and NVIDIA Cuda 12.4 pre-installed on Ubuntu 22.04"
},
"sku_details": {
"specs": {
"sku_id": 4,
"name": "C3.8GB",
"series": "CPU",
"cpu": 4,
"gpu": 0,
"memory": 8,
"is_free": false,
"is_active": true,
"gpu_switch_type": null,
"local_storage_in_gb": 0
},
"plan": {
"sku_item_price_id": 5,
"sku_type": "hourly",
"committed_days": 0,
"unit_price": 3.1,
"currency": "INR",
"is_active": true,
"description": null
}
},
"status": "stopped",
"last_activity": null,
"created_by": {
"id": 3573,
"name": "Nipun",
"email": "nipun.arora@e2enetworks.com",
"username": "nipun.arora@e2enetworks.com"
},
"created_at": "2024-11-13T11:30:13.267193Z",
"updated_at": "2024-11-13T12:04:13.981427Z",
"lab_url": null,
"disk_size_in_gb": 30,
"instance_type": "paid_usage",
"ssh_keys": [],
"disable_ssh_login_password": true,
"public_ip": "",
"e2e_registry_image_url": null,
"egress_gateway_ip": "116.204.174.145",
"add_ons": {},
"is_jupyterlab_enabled": true,
"is_ssh_enabled": false,
"custom_ports": [],
"private_cloud_id": null,
"custom_sku": null
},
"errors": {}
}