droplet_kernels
Creates, updates, deletes, gets or lists a droplet_kernels resource.
Overview
| Name | droplet_kernels |
| Type | Resource |
| Id | digitalocean.compute.droplet_kernels |
Fields
The following fields are returned by SELECT queries:
- droplets_list_kernels
A JSON object that has a key called kernels.
| Name | Datatype | Description |
|---|---|---|
id | integer | A unique number used to identify and reference a specific kernel. |
name | string | The display name of the kernel. This is shown in the web UI and is generally a descriptive title for the kernel in question. (example: DigitalOcean GrubLoader v0.2 (20160714)) |
version | string | A standard kernel version string representing the version, patch, and release information. (example: 2016.07.13-DigitalOcean_loader_Ubuntu) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
droplets_list_kernels | select | droplet_id | per_page, page | To retrieve a list of all kernels available to a Droplet, send a GET request to /v2/droplets/$DROPLET_ID/kernelsThe response will be a JSON object that has a key called kernels. This willbe set to an array of kernel objects, each of which contain the standardkernel attributes. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
droplet_id | integer | A unique identifier for a Droplet instance. (example: 3164444) |
page | integer | Which 'page' of paginated results to return. (example: 1) |
per_page | integer | Number of items returned per page (example: 2) |
SELECT examples
- droplets_list_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 standardkernel attributes.
SELECT
id,
name,
version
FROM digitalocean.compute.droplet_kernels
WHERE droplet_id = '{{ droplet_id }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;