GET
/
cloud
/
v1
/
instances
/
{project_id}
/
{region_id}
/
{instance_id}
/
available_flavors
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
instance_flavor_list = client.cloud.instances.flavors.list_for_resize(
    instance_id="instance_id",
    project_id=0,
    region_id=0,
)
print(instance_flavor_list.count)
{
  "count": 1,
  "results": [
    {
      "architecture": "x86_64",
      "capacity": 1,
      "currency_code": "USD",
      "disabled": false,
      "flavor_id": "g2-standard-32-64",
      "flavor_name": "g2-standard-32-64",
      "hardware_description": {},
      "os_type": "linux",
      "price_per_hour": 1,
      "price_per_month": 720,
      "price_status": "show",
      "ram": 2048,
      "vcpus": 1
    }
  ]
}

Authorizations

APIKey
string
header
required

API key for authentication.

Path Parameters

project_id
integer
required

Project ID

region_id
integer
required

Region ID

instance_id
string
required

Instance ID

Query Parameters

include_prices
boolean

Set to true if flavor listing should include flavor prices

Response

200 - application/json

List of available flavors

The response is of type object.