Create Machine

Create Machine

Create machine

Request
URI
POST
https://{api_host}/iaas/api/machines
COPY
Query Parameters
string
apiVersion
Optional

The version of the API in yyyy-MM-dd format (UTC). For versioning information please refer to /iaas/api/about


Request Body

Machine Specification instance

MachineSpecification of type(s) application/json
Required
{
    "name": "string",
    "projectId": "e058",
    "description": "string",
    "flavor": "small, medium, large",
    "image": "vmware-gold-master, ubuntu-latest, rhel-compliant, windows",
    "imageRef": "ami-f6795a8c",
    "nics": [
        {
            "name": "string",
            "description": "string",
            "deviceIndex": 1,
            "networkId": "dcd9",
            "addresses": [
                "string"
            ],
            "securityGroupIds": [
                "string"
            ]
        }
    ],
    "disks": [
        {
            "name": "string",
            "description": "string",
            "blockDeviceId": "1298765"
        }
    ],
    "bootConfig": {
        "content": "#cloud-config\nrepo_update: true\nrepo_upgrade: all\n\npackages:\n - mysql-server\n\nruncmd:\n - sed -e '/bind-address/ s/^#*/#/' -i /etc/mysql/mysql.conf.d/mysqld.cnf\n - service mysql restart\n - mysql -e \"GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'mysqlpassword';\"\n - mysql -e \"FLUSH PRIVILEGES;\"\n"
    },
    "machineCount": 3,
    "constraints": [
        {
            "mandatory": false,
            "expression": "ha:strong"
        }
    ],
    "imageDiskConstraints": [
        {
            "mandatory": false,
            "expression": "ha:strong"
        }
    ],
    "tags": [
        {
            "key": "string",
            "value": "string"
        }
    ]
}
string
name
Required

A human-friendly name used as an identifier in APIs that support this option.

string
projectId
Required

The id of the project the current user belongs to.

string
description
Optional

Describes machine within the scope of your organization and is not propagated to the cloud

string
flavor
Required

Flavor of machine instance.

string
image
Required

Type of image used for this machine.

string
imageRef
Required

Direct image reference used for this machine (name, path, location, uri, etc.). Valid if no image property is provided

nics
Optional

A set of network interface controller specifications for this machine. If not specified, then a default network connection will be created.

disks
Optional

A set of disk specifications for this machine.

bootConfig
Optional

bootConfig

integer As int32 As int32
machineCount
Optional

Number of machines to provision - default 1.

array of Constraint
constraints
Optional

Constraints that are used to drive placement policies for the virtual machine that is produced from this specification. Constraint expressions are matched against tags on existing placement targets.

array of Constraint
imageDiskConstraints
Optional

Constraints that are used to drive placement policies for the image disk. Constraint expressions are matched against tags on existing placement targets.

array of Tag
tags
Optional

A set of tag keys and optional values that should be set on any resource that is produced from this specification.

object
customProperties
Optional

Additional custom properties that may be used toextend the machine.

Responses
202

successful operation

Returns RequestTracker of type(s) application/json
{
    "progress": 90,
    "message": "In Progress",
    "status": "FINISHED",
    "resources": [
        "string"
    ],
    "name": "Power-off",
    "id": "we655aew4e8e",
    "selfLink": "/.../request-tracker/we655aew4e8e"
}
integer As int32 As int32
progress
Required

Progress of the request as percentage.

string
message
Optional

Status message of the request.

string
status
Required

Status of the request.

Possible values are : FINISHED, INPROGRESS, FAILED,
array of string
resources
Optional

Collection of resources.

string
name
Optional

Name of the operation.

string
id
Required

ID of this request.

string
selfLink
Required

Self link of this request.


400

Invalid Request - bad data

Operation doesn't return any data structure

403

Forbidden

Operation doesn't return any data structure