compute_instance_compatible_flavors
Creates, updates, deletes, gets or lists a compute_instance_compatible_flavors resource.
Overview​
| Name | compute_instance_compatible_flavors |
| Type | Resource |
| Id | ovh.public_cloud.compute_instance_compatible_flavors |
Fields​
The following fields are returned by SELECT queries:
- list
Instance flavor (catalog entry). A single compute flavor as advertised by the backend (OpenStack/Nova) for a given region. This is read-only reference data served under /reference: it describes a hardware sizing (vCPUs, RAM, disks) the project can create instances from, not an existing resource. The catalog is per-region. A flavor returned for one region is not guaranteed to exist, or to carry the same characteristics, in another (see location).
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Identifier. The OpenStack/Nova flavor ID. Stable within a region and used to reference the flavor when creating an instance. |
name | string | The backend flavor name, for example b2-7, c2-15. This is the commercial/technical name used to identify the sizing in the catalog. |
bandwidth | object | Network bandwidth an instance of the flavor gets in Mbit/s |
description | string | Free-form description of the flavor as reported by the backend. Null when no description is advertised for this flavor. |
disk | integer | Size of the flavor's root disk in GB. This is the primary system disk provisioned for instances created from this flavor. |
ephemeral | integer | Size 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. |
gpus | integer | Number of physical GPUs provided by the flavor. Zero for flavors without GPU. |
is_public | boolean | Public 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) |
location | object | Location. 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. |
ram | integer | RAM in MB. Amount of memory provided by the flavor, expressed in MB. |
swap | integer | Size of the flavor's swap space in MB. Zero when the flavor provides no swap. |
vcpus | integer | vCPUs. Number of virtual CPUs provided by the flavor. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | instance_id, project_id | x_pagination_cursor, x_pagination_size | ### Compatible flavors<br /><br />Returns the list of flavors this instance can be resized to. The list is computed from the instance's current flavor and the catalog of flavors available in the instance's region.<br /><br />The following rules apply to the returned list:<br /><br />- It excludes the instance's current flavor.<br />- It includes only flavors whose disk size is greater than or equal to the current flavor's disk size (a resize cannot shrink the root disk).<br />- It includes only flavors in the same region as the instance.<br />- It includes only flavors whose plan is available in the instance's region.<br />- It is empty for baremetal instances, which cannot be resized.<br /><br />Each item has the same shape as an entry from the flavor reference catalog (publicCloud.reference.instance.Flavor). Its location.regionActivated is true, since the instance's region is activated on the project. 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. |
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"}}) |
instance_id | string (uuid) | Instance ID (wire: instanceId) |
project_id | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
x_pagination_cursor | string | Pagination cursor (wire: X-Pagination-Cursor) |
x_pagination_size | integer | Pagination size (wire: X-Pagination-Size) |
SELECT examples​
- list
Compatible flavors<br /><br />Returns the list of flavors this instance can be resized to. The list is computed from the instance's current flavor and the catalog of flavors available in the instance's region.<br /><br />The following rules apply to the returned list:<br /><br />- It excludes the instance's current flavor.<br />- It includes only flavors whose disk size is greater than or equal to the current flavor's disk size (a resize cannot shrink the root disk).<br />- It includes only flavors in the same region as the instance.<br />- It includes only flavors whose plan is available in the instance's region.<br />- It is empty for baremetal instances, which cannot be resized.<br /><br />Each item has the same shape as an entry from the flavor reference catalog (publicCloud.reference.instance.Flavor). Its location.regionActivated is true, since the instance's region is activated on the project. 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.​
SELECT
id,
name,
bandwidth,
description,
disk,
ephemeral,
gpus,
is_public,
location,
ram,
swap,
vcpus
FROM ovh.public_cloud.compute_instance_compatible_flavors
WHERE instance_id = '{{ instance_id }}' -- required
AND 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 }}'
;