Create
Create a Custom Image
gpu_droplets.images.create(ImageCreateParams**kwargs) -> ImageCreateResponse
post/v2/images
To create a new custom image, send a POST request to /v2/images. The body must contain a url attribute pointing to a Linux virtual machine image to be imported into DigitalOcean. The image must be in the raw, qcow2, vhdx, vdi, or vmdk format. It may be compressed using gzip or bzip2 and must be smaller than 100 GB after being decompressed.
Parameters
Returns
from gradient import Gradient
client = Gradient()
image = client.gpu_droplets.images.create()
print(image.image)
{
"image": {
"created_at": "2020-05-04T22:23:02Z",
"description": " ",
"distribution": "Ubuntu",
"error_message": " ",
"min_disk_size": 20,
"name": "Nifty New Snapshot",
"public": true,
"regions": [
"nyc1",
"nyc2"
],
"size_gigabytes": 2.34,
"slug": "nifty1",
"status": "NEW",
"tags": [
"base-image",
"prod"
],
"type": "snapshot"
}
}
Returns Examples
{
"image": {
"created_at": "2020-05-04T22:23:02Z",
"description": " ",
"distribution": "Ubuntu",
"error_message": " ",
"min_disk_size": 20,
"name": "Nifty New Snapshot",
"public": true,
"regions": [
"nyc1",
"nyc2"
],
"size_gigabytes": 2.34,
"slug": "nifty1",
"status": "NEW",
"tags": [
"base-image",
"prod"
],
"type": "snapshot"
}
}