A flavor is an available hardware configuration for a database instance. Each flavor has a unique combination of memory capacity and priority for CPU time. The larger the flavor size you use, the larger the amount of RAM and priority for CPU time your database instance will receive.
You need to use the List Flavors API call
(/flavors) to find the available
configurations for your database instance, and then decide
which size you need.
This operation does not require a request body.
The following examples show the cURL requests for List Flavors:
Example 6.1. cURL List Flavors Request: XML
curl -i \ -H 'X-Auth-Token: your_auth_token' \ -H 'Accept: application/xml' \ 'https://ord.databases.api.rackspacecloud.com/v1.0/your_acct_id/flavors'
Example 6.2. cURL List Flavors Request: JSON
curl -i \ -H 'X-Auth-Token: your_auth_token' \ -H 'Accept: application/json' \ 'https://ord.databases.api.rackspacecloud.com/v1.0/your_acct_id/flavors'
Remember to replace the names in the examples above with their actual respective values for all the cURL examples that follow:
your_auth_token — as returned in your authentication response (see the response examples in Chapter 4, Generate an Authentication Token)
your_acct_id — as returned in your authentication response (must be replaced in the request URL)
The following examples show the responses for List Flavors:
Example 6.3. List Flavors Response: XML
HTTP/1.1 200 OK
Content-Type: application/xml
Via: 1.1 Repose (Repose/2.6.7)
Content-Length: 1600
Date: Mon, 18 Mar 2013 19:09:17 GMT
Server: Jetty(8.0.y.z-SNAPSHOT)
<flavors xmlns="http://docs.openstack.org/database/api/v1.0">
<flavor id="1" name="512MB Instance" ram="512">
<links>
<link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1" rel="self"/>
<link href="https://ord.databases.api.rackspacecloud.com/flavors/1" rel="bookmark"/>
</links>
</flavor>
<flavor id="2" name="1GB Instance" ram="1024">
<links>
<link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/2" rel="self"/>
<link href="https://ord.databases.api.rackspacecloud.com/flavors/2" rel="bookmark"/>
</links>
</flavor>
<flavor id="3" name="2GB Instance" ram="2048">
<links>
<link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/3" rel="self"/>
<link href="https://ord.databases.api.rackspacecloud.com/flavors/3" rel="bookmark"/>
</links>
</flavor>
<flavor id="4" name="4GB Instance" ram="4096">
<links>
<link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/4" rel="self"/>
<link href="https://ord.databases.api.rackspacecloud.com/flavors/4" rel="bookmark"/>
</links>
</flavor>
<flavor id="5" name="8GB Instance" ram="8192">
<links>
<link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/5" rel="self"/>
<link href="https://ord.databases.api.rackspacecloud.com/flavors/5" rel="bookmark"/>
</links>
</flavor>
<flavor id="6" name="16GB Instance" ram="16384">
<links>
<link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/6" rel="self"/>
<link href="https://ord.databases.api.rackspacecloud.com/flavors/6" rel="bookmark"/>
</links>
</flavor>
</flavors>
Example 6.4. List Flavors Response: JSON
HTTP/1.1 200 OK
Content-Type: application/json
Via: 1.1 Repose (Repose/2.6.7)
Content-Length: 1186
Date: Mon, 18 Mar 2013 19:09:17 GMT
Server: Jetty(8.0.y.z-SNAPSHOT)
{
"flavors": [
{
"id": 1,
"links": [
{
"href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1",
"rel": "self"
},
{
"href": "https://ord.databases.api.rackspacecloud.com/flavors/1",
"rel": "bookmark"
}
],
"name": "512MB Instance",
"ram": 512
},
{
"id": 2,
"links": [
{
"href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/2",
"rel": "self"
},
{
"href": "https://ord.databases.api.rackspacecloud.com/flavors/2",
"rel": "bookmark"
}
],
"name": "1GB Instance",
"ram": 1024
},
{
"id": 3,
"links": [
{
"href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/3",
"rel": "self"
},
{
"href": "https://ord.databases.api.rackspacecloud.com/flavors/3",
"rel": "bookmark"
}
],
"name": "2GB Instance",
"ram": 2048
},
{
"id": 4,
"links": [
{
"href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/4",
"rel": "self"
},
{
"href": "https://ord.databases.api.rackspacecloud.com/flavors/4",
"rel": "bookmark"
}
],
"name": "4GB Instance",
"ram": 4096
},
{
"id": 5,
"links": [
{
"href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/5",
"rel": "self"
},
{
"href": "https://ord.databases.api.rackspacecloud.com/flavors/5",
"rel": "bookmark"
}
],
"name": "8GB Instance",
"ram": 8192
},
{
"id": 6,
"links": [
{
"href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/6",
"rel": "self"
},
{
"href": "https://ord.databases.api.rackspacecloud.com/flavors/6",
"rel": "bookmark"
}
],
"name": "16GB Instance",
"ram": 16384
}
]
}
In the previous examples, you can see from the flavor
name that there are multiple flavors
available, including 2GB Instance (with 1
virtual CPU and 2 gigabytes of memory) and 512MB
Instance (with 1 virtual CPU and 0.5 gigabytes
of memory).
In this example, assume that you decide to use the 512MB Instance (id 1) to provide the needed capacity for your database instance.
Notice that there are two kinds of link relations
associated with flavor resources. A self link
contains a versioned link to the
flavor resource. These links should be used in cases where
the link will be followed immediately (as you will see in
the next section). A bookmark link provides a
permanent link to a flavor resource that is appropriate
for long term storage and works across API
versions.

