reference_instance_images
Creates, updates, deletes, gets or lists a reference_instance_images resource.
Overview​
| Name | reference_instance_images |
| Type | Resource |
| Id | ovh.public_cloud.reference_instance_images |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Identifier. The OpenStack/Glance image ID. Stable within a region and used to reference the image when creating an instance. |
name | string | Display name of the image as reported by the backend, for example the distribution and version, such as Debian 12 |
created_at | string (date-time) | Creation date. Timestamp at which the image was created on the backend, in RFC 3339 format. (wire: createdAt) |
default_user | string | Default login user of the image, as set by its publisher, for example almalinux or ubuntu. Null when the image declares none. (wire: defaultUser) |
location | object | Location. Region (and, where applicable, availability zone) where this image is offered. The image catalog is per-region: an image returned for one region is not guaranteed to exist in another. |
min_disk | integer | Minimum root disk size in GB that an instance must provide to boot from this image. A flavor whose disk is smaller than this value cannot be used with the image. (wire: minDisk) |
min_ram | integer | Minimum amount of memory in MB that an instance must provide to boot from this image. A flavor whose RAM is below this value cannot be used with the image. (wire: minRam) |
os_type | string | Operating system type. Operating system family of the image (see ImageOSTypeEnum). Windows images can only boot on Windows flavors. (BAREMETAL_LINUX, LINUX, WINDOWS) (wire: osType) |
size | integer | Size of the image on the backend, expressed in bytes |
status | string | Availability status of the image as reported by the backend (see ImageStatusEnum). Only images in an active status can be used to create an instance. (ACTIVE, DEACTIVATED, DELETED, IMPORTING, KILLED, PENDING_DELETE, QUEUED, SAVING) |
updated_at | string (date-time) | Last update date. Timestamp of the last modification of the image on the backend, in RFC 3339 format. (wire: updatedAt) |
visibility | string | Visibility scope of the image (see ImageVisibilityEnum), for example whether it is a public OVHcloud-provided image or private to the project (COMMUNITY, PRIVATE, PUBLIC, SHARED) |
Instance image (catalog entry). A single OS image as advertised by the backend (OpenStack/Glance) for a given region. This is read-only reference data served under /reference: it describes a bootable image the project can create instances from, not an existing resource. The image catalog is read-only in APIv2. There is no create, update or delete on images. The catalog is per-region: an image returned for one region is not guaranteed to exist in another (see location).
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Identifier. The OpenStack/Glance image ID. Stable within a region and used to reference the image when creating an instance. |
name | string | Display name of the image as reported by the backend, for example the distribution and version, such as Debian 12 |
created_at | string (date-time) | Creation date. Timestamp at which the image was created on the backend, in RFC 3339 format. (wire: createdAt) |
default_user | string | Default login user of the image, as set by its publisher, for example almalinux or ubuntu. Null when the image declares none. (wire: defaultUser) |
location | object | Location. Region (and, where applicable, availability zone) where this image is offered. The image catalog is per-region: an image returned for one region is not guaranteed to exist in another. |
min_disk | integer | Minimum root disk size in GB that an instance must provide to boot from this image. A flavor whose disk is smaller than this value cannot be used with the image. (wire: minDisk) |
min_ram | integer | Minimum amount of memory in MB that an instance must provide to boot from this image. A flavor whose RAM is below this value cannot be used with the image. (wire: minRam) |
os_type | string | Operating system type. Operating system family of the image (see ImageOSTypeEnum). Windows images can only boot on Windows flavors. (BAREMETAL_LINUX, LINUX, WINDOWS) (wire: osType) |
size | integer | Size of the image on the backend, expressed in bytes |
status | string | Availability status of the image as reported by the backend (see ImageStatusEnum). Only images in an active status can be used to create an instance. (ACTIVE, DEACTIVATED, DELETED, IMPORTING, KILLED, PENDING_DELETE, QUEUED, SAVING) |
updated_at | string (date-time) | Last update date. Timestamp of the last modification of the image on the backend, in RFC 3339 format. (wire: updatedAt) |
visibility | string | Visibility scope of the image (see ImageVisibilityEnum), for example whether it is a public OVHcloud-provided image or private to the project (COMMUNITY, PRIVATE, PUBLIC, SHARED) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, project_id | Returns one operating system image. Use its id in targetSpec.image to create or rebuild an instance. | |
list | select | project_id | x_pagination_cursor, x_pagination_size, region | Returns the operating system images available to the project. Images are provided by the platform and are read-only. |
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 |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
id | string (uuid) | Id |
project_id | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
region | string | Optional region filter |
x_pagination_cursor | string | Pagination cursor (wire: X-Pagination-Cursor) |
x_pagination_size | integer | Pagination size (wire: X-Pagination-Size) |
SELECT examples​
- get
- list
Returns one operating system image. Use its id in targetSpec.image to create or rebuild an instance.
SELECT
id,
name,
created_at,
default_user,
location,
min_disk,
min_ram,
os_type,
size,
status,
updated_at,
visibility
FROM ovh.public_cloud.reference_instance_images
WHERE id = '{{ id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
Returns the operating system images available to the project. Images are provided by the platform and are read-only.
SELECT
id,
name,
created_at,
default_user,
location,
min_disk,
min_ram,
os_type,
size,
status,
updated_at,
visibility
FROM ovh.public_cloud.reference_instance_images
WHERE project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
AND x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
AND region = '{{ region }}'
;