curl --request POST \
--url https://api.gcore.com/cloud/v1/instances/{project_id}/{region_id}/available_flavors \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"volumes": [
{
"attachment_tag": "root",
"boot_index": 0,
"image_id": "f01fd9a0-9548-48ba-82dc-a8c8b2d6f2f1",
"name": "TestVM5 Ubuntu boot image",
"size": 10,
"source": "image",
"type_name": "ssd_hiiops"
}
]
}'
{
"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
}
]
}
List all flavors that are suitable for instance creation based on volume requirements.
curl --request POST \
--url https://api.gcore.com/cloud/v1/instances/{project_id}/{region_id}/available_flavors \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"volumes": [
{
"attachment_tag": "root",
"boot_index": 0,
"image_id": "f01fd9a0-9548-48ba-82dc-a8c8b2d6f2f1",
"name": "TestVM5 Ubuntu boot image",
"size": 10,
"source": "image",
"type_name": "ssd_hiiops"
}
]
}'
{
"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
}
]
}
API key for authentication. Make sure to include the word apikey
, followed by a single space and then your token.
Example: apikey 1234$abcdef
Set to true if flavor listing should include flavor prices
CreateInstanceVolumeList schema
List of available flavors
The response is of type object
.
Was this page helpful?