2.3.7. Create image

 
MethodURIDescription
POST/v2/{tenant_id}/servers/{server_id}/action

Creates a new image. Specify the createImage action in the request body.

Normal response codes: 202

Error response codes: computeFault (400, 500, ), backupOrResizeInProgress (409), serviceUnavailable (503), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), itemNotFound (404), badMediaType (415), serverCapacityUnavailable (503), buildInProgress (409)

 2.3.7.1. Request

This table shows the URI parameters for the create image request:

NameTypeDescription

{tenant_id}

​U​U​ID

The tenant ID in a multi-tenancy cloud.

{server_id}

​U​U​ID

The UUID for the server.

 

Example 2.39. Create image: JSON request

{
    "createImage" : {
        "name" : "foo-image",
        "metadata": {
            "myvar": "foobar"
        }
    }
}

 

Example 2.40. Create image: XML request

<?xml version="1.0" encoding="UTF-8"?>
<createImage
    xmlns="http://docs.openstack.org/compute/api/v1.1"
    name="foo-image">
    <metadata>
        <meta key="myvar">foobar</meta>
    </metadata>
</createImage>

 2.3.7.2. Response

This table shows the header parameters for the create image response:

NameTypeDescription

Location

​Any​U​RI

(Required)

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


loading table of contents...