HardwareProfilesDatacenterResource


Create a hardware profile in a datacenter


You can create a hardware profile for a datacenter to define a unique combination of CPU and RAM with a unique name. After you create a hardware profile, you can control which enterprises will use the hardware profile in the enterprise-datacenter limit. Abiquo will automatically create hardware profiles when there are no matching profiles already in the datacenter, for example, when capturing a VM.

POST https://example.com/api/admin/datacenters/{datacenter}/hardwareprofiles

Roles : [ROLE_PHYS_DC_MANAGE]

Content-Type : hardwareprofile Accept : hardwareprofile

Error Codes

  • COSTCODE-0 - The requested cost code does not exist
  • PROFILE-10 - CPU/RAM have invalid values
  • PROFILEDC-0 - Hardware profile name must be unique for each datacenter
  • PROFILEDC-1 - Hardware profile with same combination of CPU/RAM/COSTCODE or dynamic fields already exists for this datacenter

Example

List hardware profiles in a datacenter


GET https://example.com/api/admin/datacenters/{datacenter}/hardwareprofiles

Roles : [ROLE_PHYS_DC_ENUMERATE, ROLE_USERS_MANAGE_ENTERPRISE]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String name Order by
has String If present filter to apply in the search.
limit Integer 25 The number of entities to retrieve
asc Boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)
active Boolean If true, returns only active hardware profiles. If false, returns only inactive hardware profiles

Accept : hardwareprofiles

Example

Delete a hardware profile in a datacenter


DELETE https://example.com/api/admin/datacenters/{datacenter}/hardwareprofiles/{hardwareprofile}

Roles : [ROLE_PHYS_DC_MANAGE]

Example

Get a hardware profile in a datacenter


GET https://example.com/api/admin/datacenters/{datacenter}/hardwareprofiles/{hardwareprofile}

Roles : [ROLE_PHYS_DC_ENUMERATE]

Accept : hardwareprofile

Error Codes

  • DC-0 - The requested datacenter does not exist
  • PROFILEDC-2 - The requested hardware profile does not exist in this datacenter

Example

Update a hardware profile in a datacenter


PUT https://example.com/api/admin/datacenters/{datacenter}/hardwareprofiles/{hardwareprofile}

Roles : [ROLE_PHYS_DC_MANAGE]

Content-Type : hardwareprofile Accept : hardwareprofile

Error Codes

  • PROFILE-10 - CPU/RAM have invalid values
  • PROFILE-9 - CPU/RAM values cannot be empty for not dynamic fields of CPU/RAM
  • PROFILEDC-0 - Hardware profile name must be unique for each datacenter
  • PROFILEDC-1 - Hardware profile with same combination of CPU/RAM/COSTCODE or dynamic fields already exists for this datacenter
  • PROFILEDC-4 - Cannot update a datacenter hardware profile that is being used by virtual machines

Example