Skip to content

Commit ddbdce6

Browse files
Add additional docs on Image.
1 parent 99e59bd commit ddbdce6

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

digitalocean/Image.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,41 @@
55
class Image(BaseAPI):
66
"""
77
An object representing an DigitalOcean Image.
8+
9+
Attributes accepted at creation time:
10+
11+
Args:
12+
name (str): The name to be given to an image.
13+
url (str): A URL from which the virtual machine image may be retrieved.
14+
region (str): The slug of the region where the image will be available.
15+
distribution (str, optional): The name of the image's distribution.
16+
description (str, optional): Free-form text field to describe an image.
17+
tags (obj:`list` of `str`, optional): List of tag names to apply to
18+
the image.
19+
20+
Attributes returned by API:
21+
22+
id (int): A unique number to identify and reference a image.
23+
name (str): The display name given to an image.
24+
type (str): The kind of image. This will be either "snapshot",
25+
"backup", or "custom".
26+
distribution (str): The name of the image's distribution.
27+
slug (str): A uniquely identifying string that is associated with each
28+
of the DigitalOcean-provided public images.
29+
public (bool): Indicates whether the image is public or not.
30+
regions (obj:`list` of `str`): A list of the slugs of the regions where
31+
the image is available for use.
32+
created_at (str): A time value given in ISO8601 combined date and time
33+
format that represents when the image was created.
34+
min_disk_size (int): The minimum disk size in GB required for a Droplet
35+
to use this image.
36+
size_gigabytes (int): The size of the image in gigabytes.
37+
description (str): Free-form text field to describing an image.
38+
tags (obj:`list` of `str`): List of tag names to applied to the image.
39+
status (str): Indicates the state of a custom image. This may be "NEW",
40+
"available", "pending", or "deleted".
41+
error_message (str): Information about errors that may occur when
42+
importing a custom image.
843
"""
944
def __init__(self, *args, **kwargs):
1045
self.id = None

0 commit comments

Comments
 (0)