2.3.4. Resize Server

Verb URI Description
POST /servers/id/action Resizes the specified server.

Normal Response Code(s): 202

Error Response Code(s): computeFault (400, 500, …), resizeNotAllowed (403), serviceUnavailable (503), unauthorized (401), forbidden (403), badRequest (400), badMethod (405), overLimit (413), itemNotFound (404), badMediaType (415), serverCapacityUnavailable (503), buildInProgress (409)

Status Transition: ACTIVE RESIZE VERIFY_RESIZE
ACTIVE RESIZE ACTIVE (on error)

The resize operation converts an existing server to a different flavor, in essence, scaling the server up or down. The original server is saved for a period of time to allow rollback if a problem occurs. You should test and explicitly confirm all resizes. When you confirm a resize, the original server is removed. All resizes are automatically confirmed after 24 hours if you do not explicitly confirm or revert them.

Depending on the cloud provider, this operation might result in billing you for a snapshot.

Specify the server ID as id in the URI.

In the request body, specify the resize action followed by attributes. The following table describes the attributes that you specify in the request body:

Table 2.6. Resize Server Request Attributes
Attribute Description Required
name The name for the resized server. Yes
flavorRef

The flavor ID :

flavor_id
Yes

This operation does not return a response body.

 

Example 2.33. Action Resize Request: XML

<?xml version="1.0" encoding="UTF-8"?>
<resize
    xmlns="http://docs.openstack.org/compute/api/v1.1"
    flavorRef="4"/>

 

Example 2.34. Action Resize Request: JSON

{
    "resize" : {
        "flavorRef" : "4"
    }
}

Questions? Discuss on ask.openstack.org
Found an error? Report a bug against this page


loading table of contents...