dots.v2.images.byImage_id().put()

Generated on 13 Nov 2026 from DoTs version v1.24.0

Usage

client.v2.images.byImage_id(image_id).put(body: Image_update, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | WithImage_PutResponse>

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

Path Parameters

image_id integer required

Example: 62137902

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

Request Body

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 { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.images
    .byImage_id(62137902).put({
    name: "Nifty New Snapshot",
    distribution: "Ubuntu",
    description: " ",
});

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.