Method | URI | Description |
---|---|---|
POST | /v2/{tenant_id}/flavors | Creates a flavor. |
Normal response codes: 200
This table shows the URI parameters for the create flavor request:
Name | Type | Description |
---|---|---|
| String | The unique ID of the tenant or account. |
Example 3.93. Create flavor: JSON request
{ "flavor": { "name": "test_flavor", "ram": 1024, "vcpus": 2, "disk": 10, "id": "10" } }
Example 3.94. Create flavor: XML request
<?xml version="1.0" encoding="UTF-8"?> <flavor> <name>test_flavor</name> <ram>1024</ram> <vcpus>2</vcpus> <disk>10</disk> <id>10</id> </flavor>
This operation does not require a request body.
Example 3.95. Create flavor: JSON response
{ "flavor": { "disk": 10, "id": "10", "links": [ { "href": "http://openstack.example.com/v2/openstack/flavors/10", "rel": "self" }, { "href": "http://openstack.example.com/openstack/flavors/10", "rel": "bookmark" } ], "name": "test_flavor", "ram": 1024, "vcpus": 2 } }
Example 3.96. Create flavor: XML response
<?xml version='1.0' encoding='UTF-8'?> <flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="10" vcpus="2" ram="1024" name="test_flavor" id="10"> <atom:link href="http://openstack.example.com/v2/openstack/flavors/10" rel="self"/> <atom:link href="http://openstack.example.com/openstack/flavors/10" rel="bookmark"/> </flavor>
This operation does not return a response body.