Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Div
classwidecode tinycode

API roles required:


Code Block
titleCREATE a Virtual Appliancevirtual appliance
* This action requires the privilege VDC_MANAGE_VAPP


cURL:


Code Block
curl -X POST https://example.com/api/cloud/virtualdatacenters/490/virtualappliances \ 
	 -H 'Accept:application/vnd.abiquo.virtualappliance+json; version=4.2' \ 
	 -H 'Content-Type:application/vnd.abiquo.virtualappliance+json; version=4.2' \ 
	 -d @requestpayload.xml \ 
	 -u user:password --verbose 


Success status code: 201

Request payload:


Code Block
{
	"name":"vapp_vdc_m01j_001",
	"iconUrl":"https://upload.wikimedia.org/wikipedia/commons/a/af/Tux.png"
}


Response payload:


Expand
titleClick here to show/hide the example response



Code Block
{
   "id":836,
   "error":0,
   "highDisponibility":0,
   "name":"vapp_vdc_m01j_001",
   "publicApp":0,
   "state":"NOT_DEPLOYED",
   "iconUrl":"https://upload.wikimedia.org/wikipedia/commons/a/af/Tux.png",
   "notAllocatedVirtualMachines":0,
   "onVirtualMachines":0,
   "offVirtualMachines":0,
   "pausedVirtualMachines":0,
   "allocatedVirtualMachines":0,
   "configuredVirtualMachines":0,
   "unknownVirtualMachines":0,
   "lockedVirtualMachines":0,
   "links":[
      {
         "title":"vapp_vdc_m01j_001",
         "rel":"edit",
         "type":"application/vnd.abiquo.virtualappliance+json",
         "href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836"
      },
      {
         "title":"vdc_m01j",
         "rel":"virtualdatacenter",
         "type":"application/vnd.abiquo.virtualdatacenter+json",
         "href":"https://example.com:443/api/cloud/virtualdatacenters/490"
      },
      {
         "title":"AWS_enterprise_forBilling",
         "rel":"enterprise",
         "type":"application/vnd.abiquo.enterprise+json",
         "href":"https://example.com:443/api/admin/enterprises/65"
      },
      {
         "title":"virtual machines",
         "rel":"virtualmachines",
         "type":"application/vnd.abiquo.virtualmachines+json",
         "href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/virtualmachines"
      },
      {
         "title":"virtual appliances state",
         "rel":"state",
         "type":"application/vnd.abiquo.virtualappliancestate+json",
         "href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/state"
      },
      {
         "title":"undeploy",
         "rel":"undeploy",
         "type":"application/vnd.abiquo.acceptedrequest+json",
         "href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/action/undeploy"
      },
      {
         "title":"deploy",
         "rel":"deploy",
         "type":"application/vnd.abiquo.acceptedrequest+json",
         "href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/action/deploy"
      },
      {
         "title":"price",
         "rel":"price",
         "type":"text/plain",
         "href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/action/price"
      },
      {
         "title":"layers",
         "rel":"layers",
         "type":"application/vnd.abiquo.layers+json",
         "href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/layers"
      },
      {
         "title":"alerts",
         "rel":"alerts",
         "type":"application/vnd.abiquo.alerts+json",
         "href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/alerts"
      },
      {
         "title":"spec",
         "rel":"spec",
         "type":"application/vnd.abiquo.virtualappliancespec+json",
         "href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/action/spec"
      },
      {
         "title":"tasks",
         "rel":"tasks",
         "type":"application/vnd.abiquo.tasks+json",
         "href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/tasks"
      },
      {
         "title":"scalinggroups",
         "rel":"scalinggroups",
         "type":"application/vnd.abiquo.scalinggroups+json",
         "href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/scalinggroups"
      },
      {
         "title":"metricsmetadata",
         "rel":"metricsmetadata",
         "type":"application/vnd.abiquo.metricsmetadata+json",
         "href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/metrics"
      },
      {
         "title":"collectd",
         "rel":"collectd",
         "type":"application/json",
         "href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/metrics/collectd"
      }
   ]
}





  

...