Skip to main content

images

Creates, updates, deletes, gets or lists an images resource.

Overview​

Nameimages
TypeResource
Idovh.cloud.images

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstringImage id
namestringImage name
creation_datestring (date-time)Image creation date (wire: creationDate)
flavor_typestringImage usable only for this type of flavor if not null (wire: flavorType)
min_diskintegerMinimum disks required to use image (in GB) (wire: minDisk)
min_ramintegerMinimum RAM required to use image (in MB) (wire: minRam)
plan_codestringOrder plan code (wire: planCode)
regionstringImage region
sizenumberImage size (in GiB)
statusstringImage status
tagsarrayTags about the image
typestringImage type
userstringUser to connect with
visibilitystringImage visibility

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectimage_id, service_nameGet image
listselectservice_nameflavor_type, os_type, regionGet images

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"}})
image_idstringImage ID (wire: imageId)
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
flavor_typestringGet compatible images with flavor type (wire: flavorType)
os_typestringImage OS (wire: osType)
regionstringImage region

SELECT examples​

Get image

SELECT
id,
name,
creation_date,
flavor_type,
min_disk,
min_ram,
plan_code,
region,
size,
status,
tags,
type,
user,
visibility
FROM ovh.cloud.images
WHERE image_id = '{{ image_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;