pydo.images.update()
Generated on 17 Apr 2025
from pydo
version
v0.10.0
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
Name | Type | Required | Description | Default Value |
---|---|---|---|---|
image_id |
integer | True | A unique number that can be used to identify and reference a specific image. | |
body |
JSON or IO[bytes] | True |
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)
More Information
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.