Skip to main content

reference_instance_flavors

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

Overview​

Namereference_instance_flavors
TypeResource
Idovh.public_cloud.reference_instance_flavors

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Identifier. The OpenStack/Nova flavor ID. Stable within a region and used to reference the flavor when creating an instance.
namestringThe backend flavor name, for example b2-7, c2-15. This is the commercial/technical name used to identify the sizing in the catalog.
bandwidthobjectNetwork bandwidth an instance of the flavor gets in Mbit/s
descriptionstringFree-form description of the flavor as reported by the backend. Null when no description is advertised for this flavor.
diskintegerSize of the flavor's root disk in GB. This is the primary system disk provisioned for instances created from this flavor.
ephemeralintegerSize of the flavor's ephemeral disk in GB. Ephemeral storage is transient. Its contents do not survive a rebuild or deletion of the instance. Zero when the flavor provides no ephemeral disk.
gpusintegerNumber of physical GPUs provided by the flavor. Zero for flavors without GPU.
is_publicbooleanPublic availability. Whether the flavor is publicly available to the project. Private flavors are only visible to the projects they have been explicitly shared with. (wire: isPublic)
locationobjectLocation. Region where this flavor is offered. The flavor catalog is per-region: a flavor returned for one region is not guaranteed to exist, or to carry the same characteristics, in another. regionActivated tells whether the region is already activated on the project. When false, the region must be activated on the project before use. availabilityZones lists the availability zones of the region, empty for a single-AZ region.
ramintegerRAM in MB. Amount of memory provided by the flavor, expressed in MB.
swapintegerSize of the flavor's swap space in MB. Zero when the flavor provides no swap.
vcpusintegervCPUs. Number of virtual CPUs provided by the flavor.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, project_idReturns one instance flavor with its vCPUs, RAM and disk. location.regionActivated tells whether the flavor's region is already activated on the project. When false, the region must be activated on the project before use. location.availabilityZones lists the availability zones of the region, for example eu-west-par-a, eu-west-par-b and eu-west-par-c, and is empty for a single-AZ region. Use its id in targetSpec.flavor to create or resize an instance.
listselectproject_idx_pagination_cursor, x_pagination_size, name, regionReturns the instance flavors available to the project, in the regions activated on the project and in those the project can activate. location.regionActivated on each flavor tells which regions must be activated on the project before use. location.availabilityZones lists the availability zones of the region, for example eu-west-par-a, eu-west-par-b and eu-west-par-c, and is empty for a single-AZ region. A region filter on a region that does not exist is rejected. On a region the project can neither use nor activate, it returns an empty list. A flavor is a read-only sizing template (vCPUs, RAM, disk) used to create or resize an instance. A new or disabled flavor, or a private flavor newly granted to the project, can take up to one minute to show in this list.

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.
namestringOptional flavor name filter, for example b2-7
regionstringOptional region filter
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

Returns one instance flavor with its vCPUs, RAM and disk. location.regionActivated tells whether the flavor's region is already activated on the project. When false, the region must be activated on the project before use. location.availabilityZones lists the availability zones of the region, for example eu-west-par-a, eu-west-par-b and eu-west-par-c, and is empty for a single-AZ region. Use its id in targetSpec.flavor to create or resize an instance.

SELECT
id,
name,
bandwidth,
description,
disk,
ephemeral,
gpus,
is_public,
location,
ram,
swap,
vcpus
FROM ovh.public_cloud.reference_instance_flavors
WHERE id = '{{ id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;