LayersResource


Create a layer


Create a new layer given a name and a single VM (in any state)

POST https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/layers

Roles : [ROLE_VAPP_MANAGE_LAYERS]

List layers with virtual machines


Retrieve a list of layers with their VMs

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/layers

Roles : [ROLE_VDC_ENUMERATE, ROLE_VAPP_MANAGE_LAYERS]

Accept : layers

Error Codes

  • VAPP-0 - The requested virtual appliance does not exist

Example

Delete a layer


To delete a layer, the layer should be empty, or have a single VM in any state.

DELETE https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/layers/{layer}

Roles : [ROLE_VAPP_MANAGE_LAYERS]

Example

Get a layer


Retrieve a layer, including links to the VMs using it

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/layers/{layer}

Roles : [ROLE_VDC_ENUMERATE, ROLE_VAPP_MANAGE_LAYERS]

Accept : layer

Error Codes

  • VAPP-0 - The requested virtual appliance does not exist
  • VAPP-16 - There are no virtual machines in the specified layer

Example

Update a layer name


Rename a layer

PUT https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/layers/{layer}

Roles : [ROLE_VAPP_MANAGE_LAYERS]

Content-Type : layer Accept : layer

Error Codes

  • GEN-2 - Invalid XML document; please ensure all mandatory fields are correct
  • VM-60 - Cannot change the layer of a virtual machine that has been assigned to a hypervisor

Example