Create Machine

Create Machine

Create machine

Request
URI
POST
https://vra-interop-222-139.lvn.broadcom.net/iaas/api/machines
COPY
Query Parameters
string
apiVersion
Optional

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


Request Body

Machine Specification instance

MachineSpecification of type(s) application/json
Required

Show optional properties

{
    "name": "string",
    "projectId": "e058",
    "flavor": "small, medium, large",
    "flavorRef": "t2.micro",
    "image": "vmware-gold-master, ubuntu-latest, rhel-compliant, windows",
    "imageRef": "ami-f6795a8c"
}
{
    "name": "string",
    "projectId": "e058",
    "deploymentId": "123e4567-e89b-12d3-a456-426655440000",
    "customProperties": {
        "customProperties": "string"
    },
    "description": "string",
    "flavor": "small, medium, large",
    "flavorRef": "t2.micro",
    "image": "vmware-gold-master, ubuntu-latest, rhel-compliant, windows",
    "imageRef": "ami-f6795a8c",
    "nics": [
        {
            "name": "string",
            "description": "string",
            "deviceIndex": 1,
            "networkId": "54097407-4532-460c-94a8-8f9e18f4c925",
            "fabricNetworkId": "54097407-4532-460c-94a8-8f9e18f4c925",
            "addresses": [
                "10.1.2.190"
            ],
            "macAddress": "[\"00:50:56:99:d8:34\"]",
            "securityGroupIds": [
                "string"
            ],
            "customProperties": {
                "awaitIp": "true"
            }
        }
    ],
    "disks": [
        {
            "name": "string",
            "description": "string",
            "blockDeviceId": "1298765",
            "scsiController": "SCSI_Controller_0, SCSI_Controller_1, SCSI_Controller_2, SCSI_Controller_3",
            "unitNumber": "0",
            "diskAttachmentProperties": {
                "scsiController": "SCSI_Controller_0",
                "unitNumber": "2"
            }
        }
    ],
    "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"
    },
    "bootConfigSettings": {
        "phoneHomeShouldWait": true,
        "phoneHomeTimeoutSeconds": 100,
        "phoneHomeFailOnTimeout": false,
        "deploymentFailOnCloudConfigRuntimeError": true
    },
    "machineCount": 3,
    "constraints": [
        {
            "mandatory": false,
            "expression": "ha:strong"
        }
    ],
    "imageDiskConstraints": [
        {
            "mandatory": "true",
            "expression": "environment:prod"
        },
        {
            "mandatory": "false",
            "expression": "pci"
        }
    ],
    "tags": [
        {
            "key": "ownedBy",
            "value": "Rainpole"
        }
    ],
    "remoteAccess": {
        "authentication": "publicPrivateKey",
        "keyPair": "string",
        "sshKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCu74dLkAGGYIgNuszEAM0HaS2Y6boTPw+HqsFmtPSOpxPQoosws/OWGZlW1uue6Y4lIvdRqZOaLK+2di5512etY67ZwFHc5h1kx4az433DsnoZhIzXEKKI+EXfH/w72CIyG/uVhIzmA4FvRVQKXinE1vaVen6v1CBQEZibx9RXrVRP1VRibsKFRXYxywNEl1VtPK7KaxCEYO9IXi4SKVulSAhOVequwjlo5E8bKNT61/g/YyMvwCbaTTPPeCpS/7i+JHYY3QZ8fQY/Syn+bOFpKCCHl+7VpsL8gjWe6fI4bUp6KUiW7ZkQpL/47rxawKnRMKKEU9P0ICp3RRB39lXT",
        "username": "string",
        "password": "string",
        "skipUserCreation": false
    },
    "saltConfiguration": {
        "masterId": "string",
        "minionId": "string",
        "saltEnvironment": "string",
        "pillarEnvironment": "string",
        "installerFileName": "string",
        "stateFiles": [
            "string"
        ],
        "variables": {
            "variables": "string"
        },
        "additionalAuthParams": {
            "additionalAuthParams": "string"
        },
        "additionalMinionParams": {
            "additionalMinionParams": "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
deploymentId
Optional

The id of the deployment that is associated with this resource

object
customProperties
Optional

Additional custom properties that may be used to extend this resource.

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
flavorRef
Required

Provider specific flavor reference. Valid if no flavor property is provided

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

array of object
nics
Optional

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

array of object
disks
Optional

A set of disk specifications for this machine.

object
bootConfig
Optional

Machine boot config that will be passed to the instance that can be used to perform common automated configuration tasks and even run scripts after the instance starts.

object
bootConfigSettings
Optional

Machine boot config settings that will define how the provisioning will handle the boot config script execution.

integer As int32 As int32
machineCount
Optional

Number of machines to provision - default 1.

array of object
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 object
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 object
tags
Optional

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

object
remoteAccess
Optional

Represents a specification for machine's remote access settings.

object
saltConfiguration
Optional

Represents salt configuration settings that has to be applied on the machine. To successfully apply the configurations, remoteAccess property is mandatory.The supported remoteAccess authentication types are usernamePassword and generatedPublicPrivateKey

Authentication
This operation uses the following authentication methods.
Responses
202

Accepted

Returns RequestTracker of type(s) application/json
"RequestTracker Object"
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.

string
deploymentId
Optional

ID of the deployment, this request is connected to.


400

Invalid Request - bad data

Returns ServiceErrorResponse of type(s) application/json
"ServiceErrorResponse Object"
string
message
Optional

message

string
messageId
Optional

messageId

array of string
stackTrace
Optional

stackTrace

integer As int32 As int32
statusCode
Optional

statusCode

integer As int32 As int32
errorCode
Optional

errorCode

array of string
details
Optional

details

string
serverErrorId
Optional

serverErrorId

string
documentKind
Optional

documentKind

integer As int32 As int32
internalErrorCode
Optional

internalErrorCode


403

Forbidden

Returns ServiceErrorResponse of type(s) application/json
"ServiceErrorResponse Object"
string
message
Optional

message

string
messageId
Optional

messageId

array of string
stackTrace
Optional

stackTrace

integer As int32 As int32
statusCode
Optional

statusCode

integer As int32 As int32
errorCode
Optional

errorCode

array of string
details
Optional

details

string
serverErrorId
Optional

serverErrorId

string
documentKind
Optional

documentKind

integer As int32 As int32
internalErrorCode
Optional

internalErrorCode


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"flavor:"string","flavorRef:"string","image:"string","imageRef:"string","name:"string","projectId:"string"}' https://{api_host}/iaas/api/machines