createObject() enables the creation of servers on an account. This
method is a simplified alternative to interacting with the ordering system directly.
In order to create a server, a template object must be sent in with a few required
values.
When this method returns an order will have been placed for a server of the specified configuration.
To determine when the server is available you can poll the server via getObject,
checking the provisionDate property.
When provisionDate is not null, the server will be ready. Be sure to use the globalIdentifier
as your initialization parameter.
Warning: Servers created via this method will incur charges on your account. For testing input parameters see generateOrderTemplate.
Input - SoftLayer_Hardware
hostname
domain
processorCoreAmount
memoryCapacity
hourlyBillingFlag
operatingSystemReferenceCode
datacenter.name
datacenter property is a location structure with the name field set.
"datacenter": {
"name": "dal05"
}
}
networkComponents.maxSpeed
networkComponents property is an array with a single network component structure. The maxSpeed property must be set to specify the network uplink speed, in megabits per second, of the server.
"networkComponents": [
{
"maxSpeed": 1000
}
]
}
networkComponents.redundancyEnabledFlag
falsenetworkComponents property is an array with a single network component structure. When the redundancyEnabledFlag property is true the server's network components will be in redundancy groups.
"networkComponents": [
{
"redundancyEnabledFlag": false
}
]
}
privateNetworkOnlyFlag
false
primaryNetworkComponent.networkVlan.id
primaryNetworkComponent property is a network component structure with the networkVlan property populated with a vlan structure. The id property must be set to specify the frontend network vlan of the server.
"primaryNetworkComponent": {
"networkVlan": {
"id": 1
}
}
}
primaryBackendNetworkComponent.networkVlan.id
primaryBackendNetworkComponent property is a network component structure with the networkVlan property populated with a vlan structure. The id property must be set to specify the backend network vlan of the server.
"primaryBackendNetworkComponent": {
"networkVlan": {
"id": 2
}
}
}
fixedConfigurationPreset.keyName
fixedConfigurationPreset property is a fixed configuration preset structure. The keyName property must be set to specify preset to use.processorCoreAmount, memoryCapacity and hardDrives properties must not be set.
"fixedConfigurationPreset": {
"keyName": "SOME_KEY_NAME"
}
}
userData.value
userData property is an array with a single attribute structure with the value property set to an arbitrary value.
"userData": [
{
"value": "someValue"
}
]
}
hardDrives
hardDrives property is an array of hardware component structures.
capacity property.
"hardDrives": [
{
"capacity": 500
}
]
}
sshKeys
sshKeys property is an array of SSH Key structures with the id property set to the value of an existing SSH key.
"sshKeys": [
{
"id": 123
}
]
}
postInstallScriptUri
"parameters":[
{
"hostname": "host1",
"domain": "example.com",
"processorCoreAmount": 2,
"memoryCapacity": 2,
"hourlyBillingFlag": true,
"operatingSystemReferenceCode": "UBUNTU_LATEST"
}
]
}' http://www.softlayersolution.com/rest/v3/SoftLayer_Hardware.json
Location: http://www.softlayersolution.com/rest/v3/SoftLayer_Hardware/f5a3fcff-db1d-4b7c-9fa0-0349e41c29c5/getObject
{
"accountId": 232298,
"bareMetalInstanceFlag": null,
"domain": "example.com",
"hardwareStatusId": null,
"hostname": "host1",
"id": null,
"serviceProviderId": null,
"serviceProviderResourceId": null,
"globalIdentifier": "f5a3fcff-db1d-4b7c-9fa0-0349e41c29c5",
"hourlyBillingFlag": true,
"memoryCapacity": 2,
"operatingSystemReferenceCode": "UBUNTU_LATEST",
"processorCoreAmount": 2
}
| templateObject | The SoftLayer_Hardware object that you wish to create. |