pydo.images.update()

Generated on 4 Jun 2026 from pydo version v0.35.0

Usage

client.images.update(
    image_id=62137902,
    body={
        "name": "Nifty New Snapshot",
        "distribution": "Ubuntu",
        "description": " ",
    },
)
Returns JSONRaises HttpResponseError

Description

To update an image, send a PUT request to /v2/images/{image_id}. Set the name attribute to the new value you would like to use. For custom images, the description and distribution attributes may also be updated.

Parameters

image_id integer required

A unique number that can be used to identify and reference a specific image.

name string optional

Example: Nifty New Snapshot

The display name that has been given to an image. This is what is shown in the control panel and is generally a descriptive title for the image in question.

distribution string optional

The name of a custom image's distribution. Currently, the valid values are Arch Linux, CentOS, CoreOS, Debian, Fedora, Fedora Atomic, FreeBSD, Gentoo, openSUSE, RancherOS, Rocky Linux, Ubuntu, and Unknown. Any other value will be accepted but ignored, and Unknown will be used in its place.

One of: Arch Linux, CentOS, CoreOS, Debian, Fedora, Fedora Atomic, FreeBSD, Gentoo, openSUSE, RancherOS, Rocky Linux, Ubuntu, Unknown

description string optional

An optional free-form text field to describe an image.

Request Sample

Show Request Sample
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
  "name": "Nifty New Snapshot",
  "distribution": "Ubuntu",
  "description": " "
}

resp = client.images.update(image_id=234532, body=req)

Response Example

Show Response Example
{
  "image": {
    "id": 7938391,
    "name": "new-image-name",
    "distribution": "Ubuntu",
    "slug": null,
    "public": false,
    "regions": [
      "nyc3",
      "nyc3"
    ],
    "created_at": "2014-11-14T16:44:03Z",
    "min_disk_size": 20,
    "size_gigabytes": 2.34,
    "description": "",
    "tags": [],
    "status": "available",
    "error_message": ""
  }
}

More Information

See /v2/images/{image_id} in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.