reference_instance_flavors
Creates, updates, deletes, gets or lists a reference_instance_flavors resource.
Overview​
| Name | reference_instance_flavors |
| Type | Resource |
| Id | ovh.public_cloud.reference_instance_flavors |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| 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. |
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 |
|---|---|---|---|---|
get | select | id, project_id | 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. | |
list | select | project_id | x_pagination_cursor, x_pagination_size, name, region | Returns 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.
| 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. |
name | string | Optional flavor name filter, for example b2-7 |
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 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
;
Returns 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.
SELECT
id,
name,
bandwidth,
description,
disk,
ephemeral,
gpus,
is_public,
location,
ram,
swap,
vcpus
FROM ovh.public_cloud.reference_instance_flavors
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 name = '{{ name }}'
AND region = '{{ region }}'
;