# GPU Droplets ## Create `gpu_droplets.create(GPUDropletCreateParams**kwargs) -> GPUDropletCreateResponse` **post** `/v2/droplets` To create a new Droplet, send a POST request to `/v2/droplets` setting the required attributes. A Droplet will be created using the provided information. The response body will contain a JSON object with a key called `droplet`. The value will be an object containing the standard attributes for your new Droplet. The response code, 202 Accepted, does not indicate the success or failure of the operation, just that the request has been accepted for processing. The `actions` returned as part of the response's `links` object can be used to check the status of the Droplet create event. ### Create Multiple Droplets Creating multiple Droplets is very similar to creating a single Droplet. Instead of sending `name` as a string, send `names` as an array of strings. A Droplet will be created for each name you send using the associated information. Up to ten Droplets may be created this way at a time. Rather than returning a single Droplet, the response body will contain a JSON array with a key called `droplets`. This will be set to an array of JSON objects, each of which will contain the standard Droplet attributes. The response code, 202 Accepted, does not indicate the success or failure of any operation, just that the request has been accepted for processing. The array of `actions` returned as part of the response's `links` object can be used to check the status of each individual Droplet create event. ### Parameters - **image:** `Union[str, int]` The image ID of a public or private image or the slug identifier for a public image. This image will be the base image for your Droplet.
Requires `image:read` scope. - **DropletSingleCreateImageUnionMember0:** `str` - **DropletSingleCreateImageUnionMember1:** `int` - **name:** `str` The human-readable string you wish to use when displaying the Droplet name. The name, if set to a domain name managed in the DigitalOcean DNS management system, will configure a PTR record for the Droplet. The name set during creation will also determine the hostname for the Droplet in its internal configuration. - **size:** `str` The slug identifier for the size that you wish to select for this Droplet. - **backup\_policy:** `DropletBackupPolicyParam` An object specifying the backup policy for the Droplet. If omitted and `backups` is `true`, the backup plan will default to daily. - **backups:** `bool` A boolean indicating whether automated backups should be enabled for the Droplet. - **ipv6:** `bool` A boolean indicating whether to enable IPv6 on the Droplet. - **monitoring:** `bool` A boolean indicating whether to install the DigitalOcean agent for monitoring. - **private\_networking:** `bool` This parameter has been deprecated. Use `vpc_uuid` instead to specify a VPC network for the Droplet. If no `vpc_uuid` is provided, the Droplet will be placed in your account's default VPC for the region. - **region:** `str` The slug identifier for the region that you wish to deploy the Droplet in. If the specific datacenter is not not important, a slug prefix (e.g. `nyc`) can be used to deploy the Droplet in any of the that region's locations (`nyc1`, `nyc2`, or `nyc3`). If the region is omitted from the create request completely, the Droplet may deploy in any region. - **ssh\_keys:** `List[Union[str, int]]` An array containing the IDs or fingerprints of the SSH keys that you wish to embed in the Droplet's root account upon creation. You must add the keys to your team before they can be embedded on a Droplet.
Requires `ssh_key:read` scope. - **DropletSingleCreateSSHKeyUnionMember0:** `str` - **DropletSingleCreateSSHKeyUnionMember1:** `int` - **tags:** `Optional[List[str]]` A flat array of tag names as strings to apply to the Droplet after it is created. Tag names can either be existing or new tags.
Requires `tag:create` scope. - **user\_data:** `str` A string containing 'user data' which may be used to configure the Droplet on first boot, often a 'cloud-config' file or Bash script. It must be plain text and may not exceed 64 KiB in size. - **volumes:** `List[str]` An array of IDs for block storage volumes that will be attached to the Droplet once created. The volumes must not already be attached to an existing Droplet.
Requires `block_storage:read` scpoe. - **vpc\_uuid:** `str` A string specifying the UUID of the VPC to which the Droplet will be assigned. If excluded, the Droplet will be assigned to your account's default VPC for the region.
Requires `vpc:read` scope. - **with\_droplet\_agent:** `bool` A boolean indicating whether to install the DigitalOcean agent used for providing access to the Droplet web console in the control panel. By default, the agent is installed on new Droplets but installation errors (i.e. OS not supported) are ignored. To prevent it from being installed, set to `false`. To make installation errors fatal, explicitly set it to `true`. ### Returns - **GPUDropletCreateResponse:** `GPUDropletCreateResponse` - `class SingleDropletResponse` - **droplet:** `Droplet` - **links:** `SingleDropletResponseLinks` - **actions:** `Optional[List[ActionLink]]` - **id:** `Optional[int]` A unique numeric ID that can be used to identify and reference an action. - **href:** `Optional[str]` A URL that can be used to access the action. - **rel:** `Optional[str]` A string specifying the type of the related action. - `class MultipleDropletResponse` - **droplets:** `List[Droplet]` - **id:** `int` A unique identifier for each Droplet instance. This is automatically generated upon Droplet creation. - **backup\_ids:** `List[int]` An array of backup IDs of any backups that have been taken of the Droplet instance. Droplet backups are enabled at the time of the instance creation.
Requires `image:read` scope. - **created\_at:** `datetime` A time value given in ISO8601 combined date and time format that represents when the Droplet was created. - **disk:** `int` The size of the Droplet's disk in gigabytes. - **features:** `List[str]` An array of features enabled on this Droplet. - **image:** `Image` The Droplet's image.
Requires `image:read` scope. - **locked:** `bool` A boolean value indicating whether the Droplet has been locked, preventing actions by users. - **memory:** `int` Memory of the Droplet in megabytes. - **name:** `str` The human-readable name set for the Droplet instance. - **networks:** `Networks` The details of the network that are configured for the Droplet instance. This is an object that contains keys for IPv4 and IPv6. The value of each of these is an array that contains objects describing an individual IP resource allocated to the Droplet. These will define attributes like the IP address, netmask, and gateway of the specific network depending on the type of network it is. - **v4:** `Optional[List[NetworkV4]]` - **gateway:** `Optional[str]` The gateway of the specified IPv4 network interface. For private interfaces, a gateway is not provided. This is denoted by returning `nil` as its value. - **ip\_address:** `Optional[str]` The IP address of the IPv4 network interface. - **netmask:** `Optional[str]` The netmask of the IPv4 network interface. - **type:** `Optional[Literal["public", "private"]]` The type of the IPv4 network interface. - `"public"` - `"private"` - **v6:** `Optional[List[NetworkV6]]` - **gateway:** `Optional[str]` The gateway of the specified IPv6 network interface. - **ip\_address:** `Optional[str]` The IP address of the IPv6 network interface. - **netmask:** `Optional[int]` The netmask of the IPv6 network interface. - **type:** `Optional[Literal["public"]]` The type of the IPv6 network interface. **Note**: IPv6 private networking is not currently supported. - `"public"` - **next\_backup\_window:** `Optional[DropletNextBackupWindow]` The details of the Droplet's backups feature, if backups are configured for the Droplet. This object contains keys for the start and end times of the window during which the backup will start. - **region:** `Region` - **size:** `Size` - **size\_slug:** `str` The unique slug identifier for the size of this Droplet. - **snapshot\_ids:** `List[int]` An array of snapshot IDs of any snapshots created from the Droplet instance.
Requires `image:read` scope. - **status:** `Literal["new", "active", "off", "archive"]` A status string indicating the state of the Droplet instance. This may be "new", "active", "off", or "archive". - `"new"` - `"active"` - `"off"` - `"archive"` - **tags:** `List[str]` An array of Tags the Droplet has been tagged with.
Requires `tag:read` scope. - **vcpus:** `int` The number of virtual CPUs. - **volume\_ids:** `List[str]` A flat array including the unique identifier for each Block Storage volume attached to the Droplet.
Requires `block_storage:read` scope. - **disk\_info:** `Optional[List[DiskInfo]]` An array of objects containing information about the disks available to the Droplet. - **size:** `Optional[Size]` - **amount:** `Optional[int]` The amount of space allocated to the disk. - **unit:** `Optional[str]` The unit of measure for the disk size. - **type:** `Optional[Literal["local", "scratch"]]` The type of disk. All Droplets contain a `local` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. - `"local"` - `"scratch"` - **gpu\_info:** `Optional[GPUInfo]` An object containing information about the GPU capabilities of Droplets created with this size. - **kernel:** `Optional[Kernel]` **Note**: All Droplets created after March 2017 use internal kernels by default. These Droplets will have this attribute set to `null`. The current [kernel](https://docs.digitalocean.com/products/droplets/how-to/kernel/) for Droplets with externally managed kernels. This will initially be set to the kernel of the base image when the Droplet is created. - **vpc\_uuid:** `Optional[str]` A string specifying the UUID of the VPC to which the Droplet is assigned.
Requires `vpc:read` scope. - **links:** `MultipleDropletResponseLinks` - **actions:** `Optional[List[ActionLink]]` - **id:** `Optional[int]` A unique numeric ID that can be used to identify and reference an action. - **href:** `Optional[str]` A URL that can be used to access the action. - **rel:** `Optional[str]` A string specifying the type of the related action. ### Example ```python from do_gradientai import GradientAI client = GradientAI() gpu_droplet = client.gpu_droplets.create( image="ubuntu-20-04-x64", name="example.com", size="s-1vcpu-1gb", backups=True, ipv6=True, monitoring=True, region="nyc3", ssh_keys=[289794, "3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45"], tags=["env:prod", "web"], user_data="#cloud-config\nruncmd:\n - touch /test.txt\n", vpc_uuid="760e09ef-dc84-11e8-981e-3cfdfeaae000", ) print(gpu_droplet) ``` ## Retrieve `gpu_droplets.retrieve(intdroplet_id) -> GPUDropletRetrieveResponse` **get** `/v2/droplets/{droplet_id}` To show information about an individual Droplet, send a GET request to `/v2/droplets/$DROPLET_ID`. ### Parameters - **droplet\_id:** `int` ### Returns - `class GPUDropletRetrieveResponse` - **droplet:** `Optional[Droplet]` ### Example ```python from do_gradientai import GradientAI client = GradientAI() gpu_droplet = client.gpu_droplets.retrieve( 1, ) print(gpu_droplet.droplet) ``` ## List `gpu_droplets.list(GPUDropletListParams**kwargs) -> GPUDropletListResponse` **get** `/v2/droplets` To list all Droplets in your account, send a GET request to `/v2/droplets`. The response body will be a JSON object with a key of `droplets`. This will be set to an array containing objects each representing a Droplet. These will contain the standard Droplet attributes. ### Filtering Results by Tag It's possible to request filtered results by including certain query parameters. To only list Droplets assigned to a specific tag, include the `tag_name` query parameter set to the name of the tag in your GET request. For example, `/v2/droplets?tag_name=$TAG_NAME`. ### GPU Droplets By default, only non-GPU Droplets are returned. To list only GPU Droplets, set the `type` query parameter to `gpus`. For example, `/v2/droplets?type=gpus`. ### Parameters - **name:** `str` Used to filter list response by Droplet name returning only exact matches. It is case-insensitive and can not be combined with `tag_name`. - **page:** `int` Which 'page' of paginated results to return. - **per\_page:** `int` Number of items returned per page - **tag\_name:** `str` Used to filter Droplets by a specific tag. Can not be combined with `name` or `type`.
Requires `tag:read` scope. - **type:** `Literal["droplets", "gpus"]` When `type` is set to `gpus`, only GPU Droplets will be returned. By default, only non-GPU Droplets are returned. Can not be combined with `tag_name`. - `"droplets"` - `"gpus"` ### Returns - `class GPUDropletListResponse` - **meta:** `MetaProperties` Information about the response itself. - **droplets:** `Optional[List[Droplet]]` - **id:** `int` A unique identifier for each Droplet instance. This is automatically generated upon Droplet creation. - **backup\_ids:** `List[int]` An array of backup IDs of any backups that have been taken of the Droplet instance. Droplet backups are enabled at the time of the instance creation.
Requires `image:read` scope. - **created\_at:** `datetime` A time value given in ISO8601 combined date and time format that represents when the Droplet was created. - **disk:** `int` The size of the Droplet's disk in gigabytes. - **features:** `List[str]` An array of features enabled on this Droplet. - **image:** `Image` The Droplet's image.
Requires `image:read` scope. - **locked:** `bool` A boolean value indicating whether the Droplet has been locked, preventing actions by users. - **memory:** `int` Memory of the Droplet in megabytes. - **name:** `str` The human-readable name set for the Droplet instance. - **networks:** `Networks` The details of the network that are configured for the Droplet instance. This is an object that contains keys for IPv4 and IPv6. The value of each of these is an array that contains objects describing an individual IP resource allocated to the Droplet. These will define attributes like the IP address, netmask, and gateway of the specific network depending on the type of network it is. - **v4:** `Optional[List[NetworkV4]]` - **gateway:** `Optional[str]` The gateway of the specified IPv4 network interface. For private interfaces, a gateway is not provided. This is denoted by returning `nil` as its value. - **ip\_address:** `Optional[str]` The IP address of the IPv4 network interface. - **netmask:** `Optional[str]` The netmask of the IPv4 network interface. - **type:** `Optional[Literal["public", "private"]]` The type of the IPv4 network interface. - `"public"` - `"private"` - **v6:** `Optional[List[NetworkV6]]` - **gateway:** `Optional[str]` The gateway of the specified IPv6 network interface. - **ip\_address:** `Optional[str]` The IP address of the IPv6 network interface. - **netmask:** `Optional[int]` The netmask of the IPv6 network interface. - **type:** `Optional[Literal["public"]]` The type of the IPv6 network interface. **Note**: IPv6 private networking is not currently supported. - `"public"` - **next\_backup\_window:** `Optional[DropletNextBackupWindow]` The details of the Droplet's backups feature, if backups are configured for the Droplet. This object contains keys for the start and end times of the window during which the backup will start. - **region:** `Region` - **size:** `Size` - **size\_slug:** `str` The unique slug identifier for the size of this Droplet. - **snapshot\_ids:** `List[int]` An array of snapshot IDs of any snapshots created from the Droplet instance.
Requires `image:read` scope. - **status:** `Literal["new", "active", "off", "archive"]` A status string indicating the state of the Droplet instance. This may be "new", "active", "off", or "archive". - `"new"` - `"active"` - `"off"` - `"archive"` - **tags:** `List[str]` An array of Tags the Droplet has been tagged with.
Requires `tag:read` scope. - **vcpus:** `int` The number of virtual CPUs. - **volume\_ids:** `List[str]` A flat array including the unique identifier for each Block Storage volume attached to the Droplet.
Requires `block_storage:read` scope. - **disk\_info:** `Optional[List[DiskInfo]]` An array of objects containing information about the disks available to the Droplet. - **size:** `Optional[Size]` - **amount:** `Optional[int]` The amount of space allocated to the disk. - **unit:** `Optional[str]` The unit of measure for the disk size. - **type:** `Optional[Literal["local", "scratch"]]` The type of disk. All Droplets contain a `local` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. - `"local"` - `"scratch"` - **gpu\_info:** `Optional[GPUInfo]` An object containing information about the GPU capabilities of Droplets created with this size. - **kernel:** `Optional[Kernel]` **Note**: All Droplets created after March 2017 use internal kernels by default. These Droplets will have this attribute set to `null`. The current [kernel](https://docs.digitalocean.com/products/droplets/how-to/kernel/) for Droplets with externally managed kernels. This will initially be set to the kernel of the base image when the Droplet is created. - **vpc\_uuid:** `Optional[str]` A string specifying the UUID of the VPC to which the Droplet is assigned.
Requires `vpc:read` scope. - **links:** `Optional[PageLinks]` ### Example ```python from do_gradientai import GradientAI client = GradientAI() gpu_droplets = client.gpu_droplets.list() print(gpu_droplets.meta) ``` ## Delete `gpu_droplets.delete(intdroplet_id)` **delete** `/v2/droplets/{droplet_id}` To delete a Droplet, send a DELETE request to `/v2/droplets/$DROPLET_ID`. A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully. ### Parameters - **droplet\_id:** `int` ### Example ```python from do_gradientai import GradientAI client = GradientAI() client.gpu_droplets.delete( 1, ) ``` ## Delete By Tag `gpu_droplets.delete_by_tag(GPUDropletDeleteByTagParams**kwargs)` **delete** `/v2/droplets` To delete **all** Droplets assigned to a specific tag, include the `tag_name` query parameter set to the name of the tag in your DELETE request. For example, `/v2/droplets?tag_name=$TAG_NAME`. This endpoint requires `tag:read` scope. A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully. ### Parameters - **tag\_name:** `str` Specifies Droplets to be deleted by tag. ### Example ```python from do_gradientai import GradientAI client = GradientAI() client.gpu_droplets.delete_by_tag( tag_name="tag_name", ) ``` ## List Firewalls `gpu_droplets.list_firewalls(intdroplet_id, GPUDropletListFirewallsParams**kwargs) -> GPUDropletListFirewallsResponse` **get** `/v2/droplets/{droplet_id}/firewalls` To retrieve a list of all firewalls available to a Droplet, send a GET request to `/v2/droplets/$DROPLET_ID/firewalls` The response will be a JSON object that has a key called `firewalls`. This will be set to an array of `firewall` objects, each of which contain the standard `firewall` attributes. ### Parameters - **droplet\_id:** `int` - **page:** `int` Which 'page' of paginated results to return. - **per\_page:** `int` Number of items returned per page ### Returns - `class GPUDropletListFirewallsResponse` - **meta:** `MetaProperties` Information about the response itself. - **firewalls:** `Optional[List[Firewall]]` - **id:** `Optional[str]` A unique ID that can be used to identify and reference a firewall. - **created\_at:** `Optional[datetime]` A time value given in ISO8601 combined date and time format that represents when the firewall was created. - **droplet\_ids:** `Optional[List[int]]` An array containing the IDs of the Droplets assigned to the firewall.

Requires `droplet:read` scope. - **inbound\_rules:** `Optional[List[InboundRule]]` - **ports:** `str` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". - **protocol:** `Literal["tcp", "udp", "icmp"]` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. - `"tcp"` - `"udp"` - `"icmp"` - **sources:** `FirewallRuleTarget` An object specifying locations from which inbound traffic will be accepted. - **name:** `Optional[str]` A human-readable name for a firewall. The name must begin with an alphanumeric character. Subsequent characters must either be alphanumeric characters, a period (.), or a dash (-). - **outbound\_rules:** `Optional[List[OutboundRule]]` - **destinations:** `FirewallRuleTarget` An object specifying locations to which outbound traffic that will be allowed. - **ports:** `str` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". - **protocol:** `Literal["tcp", "udp", "icmp"]` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. - `"tcp"` - `"udp"` - `"icmp"` - **pending\_changes:** `Optional[List[PendingChange]]` An array of objects each containing the fields "droplet_id", "removing", and "status". It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied. - **droplet\_id:** `Optional[int]` - **removing:** `Optional[bool]` - **status:** `Optional[str]` - **status:** `Optional[Literal["waiting", "succeeded", "failed"]]` A status string indicating the current state of the firewall. This can be "waiting", "succeeded", or "failed". - `"waiting"` - `"succeeded"` - `"failed"` - **tags:** `Optional[List[str]]` A flat array of tag names as strings to be applied to the resource. Tag names must exist in order to be referenced in a request.

Requires `tag:create` and `tag:read` scopes. - **links:** `Optional[PageLinks]` ### Example ```python from do_gradientai import GradientAI client = GradientAI() response = client.gpu_droplets.list_firewalls( droplet_id=3164444, ) print(response.meta) ``` ## List Kernels `gpu_droplets.list_kernels(intdroplet_id, GPUDropletListKernelsParams**kwargs) -> GPUDropletListKernelsResponse` **get** `/v2/droplets/{droplet_id}/kernels` To retrieve a list of all kernels available to a Droplet, send a GET request to `/v2/droplets/$DROPLET_ID/kernels` The response will be a JSON object that has a key called `kernels`. This will be set to an array of `kernel` objects, each of which contain the standard `kernel` attributes. ### Parameters - **droplet\_id:** `int` - **page:** `int` Which 'page' of paginated results to return. - **per\_page:** `int` Number of items returned per page ### Returns - `class GPUDropletListKernelsResponse` - **meta:** `MetaProperties` Information about the response itself. - **kernels:** `Optional[List[Optional[Kernel]]]` - **id:** `Optional[int]` A unique number used to identify and reference a specific kernel. - **name:** `Optional[str]` The display name of the kernel. This is shown in the web UI and is generally a descriptive title for the kernel in question. - **version:** `Optional[str]` A standard kernel version string representing the version, patch, and release information. - **links:** `Optional[PageLinks]` ### Example ```python from do_gradientai import GradientAI client = GradientAI() response = client.gpu_droplets.list_kernels( droplet_id=3164444, ) print(response.meta) ``` ## List Neighbors `gpu_droplets.list_neighbors(intdroplet_id) -> GPUDropletListNeighborsResponse` **get** `/v2/droplets/{droplet_id}/neighbors` To retrieve a list of any "neighbors" (i.e. Droplets that are co-located on the same physical hardware) for a specific Droplet, send a GET request to `/v2/droplets/$DROPLET_ID/neighbors`. The results will be returned as a JSON object with a key of `droplets`. This will be set to an array containing objects representing any other Droplets that share the same physical hardware. An empty array indicates that the Droplet is not co-located any other Droplets associated with your account. ### Parameters - **droplet\_id:** `int` ### Returns - `class GPUDropletListNeighborsResponse` - **droplets:** `Optional[List[Droplet]]` - **id:** `int` A unique identifier for each Droplet instance. This is automatically generated upon Droplet creation. - **backup\_ids:** `List[int]` An array of backup IDs of any backups that have been taken of the Droplet instance. Droplet backups are enabled at the time of the instance creation.
Requires `image:read` scope. - **created\_at:** `datetime` A time value given in ISO8601 combined date and time format that represents when the Droplet was created. - **disk:** `int` The size of the Droplet's disk in gigabytes. - **features:** `List[str]` An array of features enabled on this Droplet. - **image:** `Image` The Droplet's image.
Requires `image:read` scope. - **locked:** `bool` A boolean value indicating whether the Droplet has been locked, preventing actions by users. - **memory:** `int` Memory of the Droplet in megabytes. - **name:** `str` The human-readable name set for the Droplet instance. - **networks:** `Networks` The details of the network that are configured for the Droplet instance. This is an object that contains keys for IPv4 and IPv6. The value of each of these is an array that contains objects describing an individual IP resource allocated to the Droplet. These will define attributes like the IP address, netmask, and gateway of the specific network depending on the type of network it is. - **v4:** `Optional[List[NetworkV4]]` - **gateway:** `Optional[str]` The gateway of the specified IPv4 network interface. For private interfaces, a gateway is not provided. This is denoted by returning `nil` as its value. - **ip\_address:** `Optional[str]` The IP address of the IPv4 network interface. - **netmask:** `Optional[str]` The netmask of the IPv4 network interface. - **type:** `Optional[Literal["public", "private"]]` The type of the IPv4 network interface. - `"public"` - `"private"` - **v6:** `Optional[List[NetworkV6]]` - **gateway:** `Optional[str]` The gateway of the specified IPv6 network interface. - **ip\_address:** `Optional[str]` The IP address of the IPv6 network interface. - **netmask:** `Optional[int]` The netmask of the IPv6 network interface. - **type:** `Optional[Literal["public"]]` The type of the IPv6 network interface. **Note**: IPv6 private networking is not currently supported. - `"public"` - **next\_backup\_window:** `Optional[DropletNextBackupWindow]` The details of the Droplet's backups feature, if backups are configured for the Droplet. This object contains keys for the start and end times of the window during which the backup will start. - **region:** `Region` - **size:** `Size` - **size\_slug:** `str` The unique slug identifier for the size of this Droplet. - **snapshot\_ids:** `List[int]` An array of snapshot IDs of any snapshots created from the Droplet instance.
Requires `image:read` scope. - **status:** `Literal["new", "active", "off", "archive"]` A status string indicating the state of the Droplet instance. This may be "new", "active", "off", or "archive". - `"new"` - `"active"` - `"off"` - `"archive"` - **tags:** `List[str]` An array of Tags the Droplet has been tagged with.
Requires `tag:read` scope. - **vcpus:** `int` The number of virtual CPUs. - **volume\_ids:** `List[str]` A flat array including the unique identifier for each Block Storage volume attached to the Droplet.
Requires `block_storage:read` scope. - **disk\_info:** `Optional[List[DiskInfo]]` An array of objects containing information about the disks available to the Droplet. - **size:** `Optional[Size]` - **amount:** `Optional[int]` The amount of space allocated to the disk. - **unit:** `Optional[str]` The unit of measure for the disk size. - **type:** `Optional[Literal["local", "scratch"]]` The type of disk. All Droplets contain a `local` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. - `"local"` - `"scratch"` - **gpu\_info:** `Optional[GPUInfo]` An object containing information about the GPU capabilities of Droplets created with this size. - **kernel:** `Optional[Kernel]` **Note**: All Droplets created after March 2017 use internal kernels by default. These Droplets will have this attribute set to `null`. The current [kernel](https://docs.digitalocean.com/products/droplets/how-to/kernel/) for Droplets with externally managed kernels. This will initially be set to the kernel of the base image when the Droplet is created. - **vpc\_uuid:** `Optional[str]` A string specifying the UUID of the VPC to which the Droplet is assigned.
Requires `vpc:read` scope. ### Example ```python from do_gradientai import GradientAI client = GradientAI() response = client.gpu_droplets.list_neighbors( 1, ) print(response.droplets) ``` ## List Snapshots `gpu_droplets.list_snapshots(intdroplet_id, GPUDropletListSnapshotsParams**kwargs) -> GPUDropletListSnapshotsResponse` **get** `/v2/droplets/{droplet_id}/snapshots` To retrieve the snapshots that have been created from a Droplet, send a GET request to `/v2/droplets/$DROPLET_ID/snapshots`. You will get back a JSON object that has a `snapshots` key. This will be set to an array of snapshot objects, each of which contain the standard Droplet snapshot attributes. ### Parameters - **droplet\_id:** `int` - **page:** `int` Which 'page' of paginated results to return. - **per\_page:** `int` Number of items returned per page ### Returns - `class GPUDropletListSnapshotsResponse` - **meta:** `MetaProperties` Information about the response itself. - **links:** `Optional[PageLinks]` - **snapshots:** `Optional[List[Snapshot]]` - **id:** `int` The unique identifier for the snapshot or backup. - **created\_at:** `datetime` A time value given in ISO8601 combined date and time format that represents when the snapshot was created. - **min\_disk\_size:** `int` The minimum size in GB required for a volume or Droplet to use this snapshot. - **name:** `str` A human-readable name for the snapshot. - **regions:** `List[str]` An array of the regions that the snapshot is available in. The regions are represented by their identifying slug values. - **size\_gigabytes:** `float` The billable size of the snapshot in gigabytes. - **type:** `Literal["snapshot", "backup"]` Describes the kind of image. It may be one of `snapshot` or `backup`. This specifies whether an image is a user-generated Droplet snapshot or automatically created Droplet backup. - `"snapshot"` - `"backup"` ### Example ```python from do_gradientai import GradientAI client = GradientAI() response = client.gpu_droplets.list_snapshots( droplet_id=3164444, ) print(response.meta) ``` ## Domain Types ### Droplet Backup Policy - `class DropletBackupPolicy` - **hour:** `Optional[Literal[0, 4, 8, 3 more]]` The hour of the day that the backup window will start. - `0` - `4` - `8` - `12` - `16` - `20` - **plan:** `Optional[Literal["daily", "weekly"]]` The backup plan used for the Droplet. The plan can be either `daily` or `weekly`. - `"daily"` - `"weekly"` - **retention\_period\_days:** `Optional[int]` The number of days the backup will be retained. - **weekday:** `Optional[Literal["SUN", "MON", "TUE", 4 more]]` The day of the week on which the backup will occur. - `"SUN"` - `"MON"` - `"TUE"` - `"WED"` - `"THU"` - `"FRI"` - `"SAT"` - **window\_length\_hours:** `Optional[int]` The length of the backup window starting from `hour`.