createObject

Services

Overview

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|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|generateOrderTemplate]].

Input - [[SoftLayer_Hardware (type)|SoftLayer_Hardware]]

hostname

Hostname for the server.

Required

Type - string

domain

Domain for the server.

Required

Type - string

processorCoreAmount

The number of logical CPU cores to allocate.

Required

Type - int

See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.

memoryCapacity

The amount of memory to allocate in gigabytes.

Required

Type - int

See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.

hourlyBillingFlag

Specifies the billing type for the server.

Required

Type - boolean

When true the server will be billed on hourly usage, otherwise it will be billed on a monthly basis.

operatingSystemReferenceCode

An identifier for the operating system to provision the server with.

Required

Type - string

See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.

datacenter.name

Specifies which datacenter the server is to be provisioned in.

Required

Type - string

The datacenter property is a [[SoftLayer_Location (type)|location]] structure with the name field set.

See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.

{
“datacenter”: {
“name”: “dal05”
}
}

networkComponents.maxSpeed

Specifies the connection speed for the server’s network components.

Optional

Type - int

Default - The highest available zero cost port speed will be used.

Description - The networkComponents property is an array with a single [[SoftLayer_Network_Component (type)|network component]] structure. The maxSpeed property must be set to specify the network uplink speed, in megabits per second, of the server.

See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.

{
“networkComponents”: [
{
“maxSpeed”: 1000
}
]
}

networkComponents.redundancyEnabledFlag

Specifies whether or not the server’s network components should be in redundancy groups.

Optional

Type - bool

Default - false

Description - The networkComponents property is an array with a single [[SoftLayer_Network_Component (type)|network component]] structure. When the redundancyEnabledFlag property is true the server’s network components will be in redundancy groups.

{
“networkComponents”: [
{
“redundancyEnabledFlag”: false
}
]
}

privateNetworkOnlyFlag

Specifies whether or not the server only has access to the private network

Optional

Type - boolean

Default - false

When true this flag specifies that a server is to only have access to the private network.

primaryNetworkComponent.networkVlan.id

Specifies the network vlan which is to be used for the frontend interface of the server.

Optional

Type - int

Description - The primaryNetworkComponent property is a [[SoftLayer_Network_Component (type)|network component]] structure with the networkVlan property populated with a [[SoftLayer_Network_Vlan (type)|vlan]] structure. The id property must be set to specify the frontend network vlan of the server.

{
“primaryNetworkComponent”: {
“networkVlan”: {
“id”: 1
}
}
}

primaryBackendNetworkComponent.networkVlan.id

Specifies the network vlan which is to be used for the backend interface of the server.

Optional

Type - int

Description - The primaryBackendNetworkComponent property is a [[SoftLayer_Network_Component (type)|network component]] structure with the networkVlan property populated with a [[SoftLayer_Network_Vlan (type)|vlan]] structure. The id property must be set to specify the backend network vlan of the server.

{
“primaryBackendNetworkComponent”: {
“networkVlan”: {
“id”: 2
}
}
}

fixedConfigurationPreset.keyName

Optional

Type - string

Description - The fixedConfigurationPreset property is a [[SoftLayer_Product_Package_Preset (type)|fixed configuration preset]] structure. The keyName property must be set to specify preset to use.

If a fixed configuration preset is used processorCoreAmount, memoryCapacity and hardDrives properties must not be set.

See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.

{
“fixedConfigurationPreset”: {
“keyName”: “SOME_KEY_NAME”
}
}

userData.value

Arbitrary data to be made available to the server.

Optional

Type - string

Description - The userData property is an array with a single [[SoftLayer_Hardware_Attribute (type)|attribute]] structure with the value property set to an arbitrary value.

This value can be retrieved via the [[SoftLayer_Resource_Metadata/getUserMetadata|getUserMetadata]] method from a request originating from the server. This is primarily useful for providing data to software that may be on the server and configured to execute upon first boot.

{
“userData”: [
{
“value”: “someValue”
}
]
}

hardDrives

Hard drive settings for the server

Optional

Type - SoftLayer_Hardware_Component

Default - The largest available capacity for a zero cost primary disk will be used.

Description - The hardDrives property is an array of [[SoftLayer_Hardware_Component (type)|hardware component]] structures.

Each hard drive must specify the capacity property.

See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.