Create a new server
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 SoftLayer_Hardware::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 SoftLayer_Hardware::generateOrderTemplate.
Input - SoftLayer_Hardware
hostname
domain
processorCoreAmount
memoryCapacity
hourlyBillingFlag
operatingSystemReferenceCode
datacenter.name
datacenter
property is a [SoftLayer_Location](/reference/datatypes/SoftLayer_Location) structure with the name
field set.networkComponents.maxSpeed
networkComponents
property is an array with a single [SoftLayer_Network_Component](/reference/datatypes/SoftLayer_Network_Component) structure. The maxSpeed
property must be set to specify the network uplink speed, in megabits per second, of the server.networkComponents.redundancyEnabledFlag
false
networkComponents
property is an array with a single [SoftLayer_Network_Component](/reference/datatypes/SoftLayer_Network_Component) structure. When the redundancyEnabledFlag
property is true the server's network components will be in redundancy groups.privateNetworkOnlyFlag
false
primaryNetworkComponent.networkVlan.id
primaryNetworkComponent
property is a [SoftLayer_Network_Component](/reference/datatypes/SoftLayer_Network_Component) structure with the networkVlan
property populated with a [SoftLayer_Network_Vlan](/reference/datatypes/SoftLayer_Network_Vlan) structure. The id
property must be set to specify the frontend network vlan of the server.primaryBackendNetworkComponent.networkVlan.id
primaryBackendNetworkComponent
property is a [SoftLayer_Network_Component](/reference/datatypes/SoftLayer_Network_Component) structure with the networkVlan
property populated with a [SoftLayer_Network_Vlan](/reference/datatypes/SoftLayer_Network_Vlan) structure. The id
property must be set to specify the backend network vlan of the server.fixedConfigurationPreset.keyName
fixedConfigurationPreset
property is a [SoftLayer_Product_Package_Preset](/reference/datatypes/SoftLayer_Product_Package_Preset) structure. The keyName
property must be set to specify preset to use.processorCoreAmount
, memoryCapacity
and hardDrives
properties must not be set.userData.value
userData
property is an array with a single [SoftLayer_Hardware_Attribute](/reference/datatypes/SoftLayer_Hardware_Attribute) structure with the value
property set to an arbitrary value.hardDrives
hardDrives
property is an array of [SoftLayer_Hardware_Component](/reference/datatypes/SoftLayer_Hardware_Component) structures.
capacity
property.sshKeys
sshKeys
property is an array of [SoftLayer_Security_Ssh_Key](/reference/datatypes/SoftLayer_Security_Ssh_Key) structures with the id
property set to the value of an existing SSH key.postInstallScriptUri
{ “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 }
Name | Type | Description |
---|---|---|
templateObject | SoftLayer_Hardware_SecurityModule750 | The SoftLayer_Hardware_SecurityModule750 object that you wish to create. |
curl -g -u $SL_USER:$SL_APIKEY -X POST -d '{"parameters": [SoftLayer_Hardware_SecurityModule750]}' \
'https://api.softlayer.com/rest/v3.1/SoftLayer_Hardware_SecurityModule750/createObject'