| Verb | URI | Description |
|---|---|---|
| POST | /instances/{instanceId}/action | Resizes the memory of the instance. |
Normal Response Code(s): 202
Error Response Code(s): badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), unprocessableEntity (422), instanceFault (500), notImplemented (501), serviceUnavailable (503), itemNotFound (404), badMediaType (415)
This operation changes the memory size of the instance, assuming a valid flavorRef is provided. Restarts MySQL in the process.
| Name | Style | Type | Description |
|---|---|---|---|
accountId | Template | String | The account ID of the owner of the specified instance. |
instanceId | Template | String | The instance ID for the specified database instance. |
The following examples show the Resize Instance requests:
Example 4.37. Resize the Instance Request: XML
POST /v1.0/1234/instances/5d891bb6-6c61-4b0a-8b85-26f4ee461c9d/action HTTP/1.1 User-Agent: python-example-client Host: ord.databases.api.rackspacecloud.com X-Auth-Token: 2eeb3252-0164-40f5-8fb7-85df5faa2698 Accept: application/xml Content-Type: application/xml <?xml version="1.0" ?> <resize xmlns="http://docs.openstack.org/database/api/v1.0"> <flavorRef>https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/2</flavorRef> </resize>
Example 4.38. Resize the Instance Request: JSON
POST /v1.0/1234/instances/23a3d4fb-3731-497b-afd4-bf25bde2b5fc/action HTTP/1.1
User-Agent: python-example-client
Host: ord.databases.api.rackspacecloud.com
X-Auth-Token: 2eeb3252-0164-40f5-8fb7-85df5faa2698
Accept: application/json
Content-Type: application/json
{
"resize": {
"flavorRef": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/2"
}
}
The following examples show the Resize Instance responses:
Example 4.39. Resize the Instance Response: XML
HTTP/1.1 202 Accepted Content-Type: text/plain; charset=UTF-8 Content-Length: 58 Date: Mon, 06 Feb 2012 21:28:11 GMT
Example 4.40. Resize the Instance Response: JSON
HTTP/1.1 202 Accepted Content-Type: text/plain; charset=UTF-8 Content-Length: 58 Date: Mon, 06 Feb 2012 21:28:10 GMT

