Skip to main content

reference_instance_images

Creates, updates, deletes, gets or lists a reference_instance_images resource.

Overview​

Namereference_instance_images
TypeResource
Idovh.public_cloud.reference_instance_images

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Identifier. The OpenStack/Glance image ID. Stable within a region and used to reference the image when creating an instance.
namestringDisplay name of the image as reported by the backend, for example the distribution and version, such as Debian 12
created_atstring (date-time)Creation date. Timestamp at which the image was created on the backend, in RFC 3339 format. (wire: createdAt)
default_userstringDefault login user of the image, as set by its publisher, for example almalinux or ubuntu. Null when the image declares none. (wire: defaultUser)
locationobjectLocation. 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_diskintegerMinimum 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_ramintegerMinimum 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_typestringOperating system type. Operating system family of the image (see ImageOSTypeEnum). Windows images can only boot on Windows flavors. (BAREMETAL_LINUX, LINUX, WINDOWS) (wire: osType)
sizeintegerSize of the image on the backend, expressed in bytes
statusstringAvailability 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_atstring (date-time)Last update date. Timestamp of the last modification of the image on the backend, in RFC 3339 format. (wire: updatedAt)
visibilitystringVisibility 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:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, project_idReturns one operating system image. Use its id in targetSpec.image to create or rebuild an instance.
listselectproject_idx_pagination_cursor, x_pagination_size, regionReturns 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.

NameDatatypeDescription
api_hoststringThe 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"}})
idstring (uuid)Id
project_idstringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
regionstringOptional region filter
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

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
;