VirtualDatacentersResource


Create a virtual datacenter


Create a virtual datacenter.

Requires links to the location and enterprise.
If not in public cloud, it also requires a link to the hypervisor type.
Can specify (as an embedded object) the default private network or supply another default network at the Enterprise level (external or unmanaged network).

POST https://example.com/api/cloud/virtualdatacenters

Roles : [ROLE_VDC_MANAGE]

Content-Type : virtualdatacenter Accept : asynctask

Error Codes

  • CONSTR-LIMITRANGE - The property 'hdLimitsInMb' invalid limit range for hd: soft = 2; hard = 1.
  • EN-0 - The requested enterprise does not exist
  • ENTERPRISE-8 - Missing enterprise link
  • GEN-18 - The requested operation is not supported by the hypervisor plugin
  • GEN-27 - Cannot create VPC, use synchronize
  • GEN-4 - Not enough permissions to perform this action
  • LOCATION-1 - The location link is required
  • LOCATION-2 - The location link is not valid
  • LOCATION-3 - The given provider type is not compatible with the given location
  • LOCATION-4 - The location does not exist
  • NAT-IP-13 - Cannot use NAT IP: it is already attached to another virtual datacenter, unavailable, or in quarantine
  • NET-0 - Invalid network configuration for the virtual datacenter
  • VDC-13 - Cannot create a VDC in this region because the user will not be allowed to manage the VDC
  • VLAN-41 - IP format is invalid

Example

List virtual datacenters


Retrieve virtual datacenters the current user can view

GET https://example.com/api/cloud/virtualdatacenters

Roles : [ROLE_AUTHENTICATED, ROLE_VDC_ENUMERATE]

Parameter Type Default Value Description
enterprise Integer If present, filter by enterprise identifier
datacenter Integer If present, filter by datacenter or public cloud region identifier
startwith Integer 0 The first element to be retrieved of the filtered search
by String name Ordering: "id", "hypervisorType", "name", "vlan"
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)

Example

Synchronize a virtual datacenter


Synchronize (onboard and update) a remote virtual datacenter (VDC) entity from a cloud provider region.
Examples of supported VDC entities are Azure virtual networks, vCD virtual appliances, and Amazon VPCs. Where supported, in addition to VMs and their templates, this request may also synchronize resources such as private networks, external networks, floating IPs, firewalls and load balancers.

Requires a link to the location that is the public cloud region you would like to synchronize from.
If the provider supports VDC entities, you must supply a providerID to identify a VDC entity in the cloud provider. During the first synchronization action, Abiquo will onboard the VDC entity and create its VDC, and during subsequent actions, it will update the existing VDC.
If the region does not support VDC entities, then the providerId will be null, and the platform will synchronize the entire public cloud region. During the first synchronization action, Abiquo will create a default VPC for the region's resources, and during subsequent actions, it will update the resources in the platform.

POST https://example.com/api/cloud/virtualdatacenters

Roles : [ROLE_VDC_MANAGE]

Content-Type : syncvirtualdatacenter Accept : acceptedrequest

Error Codes

  • PUBLICREGION-19 - VDC synchronization is not possible for providers not implementing VPC. Synchronize region instead

Example

Search for alarms on virtual datacenters


Retrieve alarms in a recursive way from the virtual datacenters including the alarms of the entities:
  • Virtual appliances
  • Virtual machines
  • Scaling groups

GET https://example.com/api/cloud/virtualdatacenters/alarms

Roles : [ROLE_USERS_VIEW_ALARMS]

Parameter Type Default Value Description
startwith Integer 0 First element to retrieve, By default 0.
by String alarm Field to order by. Possible values: 'alarm', 'entity_type', 'metric', 'time_range', 'datapoints_limit', 'statistic', 'formula', 'threshold', 'description'. Uses 'alarm' as default.
limit Integer 25 Number of alarms to return. By default 25.
asc Boolean true If true, sort in ascending order of the field specified with the 'by' parameter, otherwise, sort in descending order.
alarm String Filter alarms by name, accepts wildcards. Empty by default.
metric String Filter alarm by metric name, accepts wildcards. Empty by default.
state String Filter by alarm state. Possible values: 'all', 'active' or 'inactive'

Accept : alarms

Delete a virtual datacenter


Initiate the remove of a virtual datacenter

DELETE https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}

Roles : [ROLE_VDC_MANAGE]

Parameter Type Default Value Description
force boolean false If true, a logical delete is performed.

Accept : asynctask

Error Codes

  • ENTERPRISE-10 - The enterprise does not have permission to use the requested datacenter
  • PUBLIC-10 - The enterprise does not have credentials for this provider
  • VDC-11 - This virtual datacenter has load balancers and cannot be deleted without removing them first
  • VDC-12 - Cannot perform logical delete. You should do it over virtual datacenter of public cloud region
  • VDC-2 - This virtual datacenter contains virtual appliances and cannot be deleted without removing them first

Example

Get a virtual datacenter


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

Roles : [ROLE_VDC_ENUMERATE]

Error Codes

  • VDC-0 - The requested virtual datacenter does not exist

Example

Update a virtual datacenter


PUT https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}

Roles : [ROLE_VDC_MANAGE]

Content-Type : virtualdatacenter Accept : virtualdatacenter

Error Codes

  • CONSTR-LIMITRANGE - The property 'cpuCountLimits' invalid limit range for cpu: soft = 0; hard = 1001.
  • FIREWALLPOLICY-11 - A default firewall is required
  • FIREWALLPOLICY-5 - The requested firewall policy does not exist
  • GEN-4 - Not enough permissions to perform this action
  • ROLE-12 - Cannot assign the same user to different roles.

Example

Get the default network of a virtual datacenter


Retrieve the default VLAN network used in the virtual datacenter

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/action/defaultvlan

Roles : [ROLE_VDC_MANAGE, ROLE_VDC_MANAGE_NETWORK]

Accept : vlan

Example

Set default network of a virtual datacenter


Set a network as the default network vlan.

Body contains the link to the network: 'rel' value must be "externalnetwork", "publicnetwork" or "internalnetwork".
Change the retrieved network rel link, e.g. rel="edit", to the appropriate rel value, for example, rel="internalnetwork".

PUT https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/action/defaultvlan

Roles : [ROLE_VDC_MANAGE, ROLE_VDC_MANAGE_NETWORK]

Content-Type : links

Example

List external ips of a virtual datacenter


Retrieve external IPs of a virtual datacenter

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/action/externalips

Roles : [ROLE_VDC_ENUMERATE, ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String ip 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)
all Boolean false If true, also return the IPs that are not available

Accept : externalips

Example

List private ips of a virtual datacenter


Retrieve external IPs of a virtual datacenter

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/action/privateips

Roles : [ROLE_VDC_ENUMERATE, ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
startwith Integer The first element to be retrieved of the filtered search
by String ip 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)
all Boolean false If true, also return the IPs that are not available

Accept : privateips

Error Codes

  • QUERY-0 - Invalid 'by' parameter

Example

List unmanaged ips of a virtual datacenter


Retrieve unmanaged IPs from a virtual datacenter

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/action/unmanagedips

Roles : [ROLE_VDC_ENUMERATE, ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String ip 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)
all Boolean false If true, only return the available IPs (not used by any VM).

Accept : unmanagedips

Error Codes

  • ENTERPRISE-10 - The enterprise does not have permission to use the requested datacenter

Example

List public ip purchased for a virtual datacenter


Retrieve public IPs available to be purchased or obtained by a virtual datacenter.
These are the public IPs offered by a datacenter and available to be acquired by Virtual Datacenters. Until the IPs are reserved or purchased, they cannot be used by VMs in the virtual datacenter.

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/publicips/purchased

Roles : [ROLE_VDC_ENUMERATE]

Parameter Type Default Value Description
onlyavailable Boolean false If true, only return the available IPs (not used by any VM).
startwith Integer 0 The first element to be retrieved of the filtered search
by String ip 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)
vlanId Integer If true, filter by VLAN identifier.

Accept : publicips

Example

Get a public ip purchased for a virtual datacenter


Retrieve a reserved or purchased public IP in a virtual datacenter.

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/publicips/purchased/{ip}

Roles : [ROLE_VDC_ENUMERATE]

Accept : publicip

Error Codes

  • VLAN-21 - The IP does not exist or is not purchased

Example

Purchase a public ip for a virtual datacenter


Purchase (acquire) a public IP to be used in a VM of the virtual datacenter.

PUT https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/publicips/purchased/{ip}

Roles : [ROLE_MANAGE_PUBLICIPS]

Accept : publicip

Example

List public ips available to purchase for a virtual datacenter


Retrieve reserved or purchased public IPs available to be used by the VMs in the virtual datacenter.

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/publicips/topurchase

Roles : [ROLE_VDC_ENUMERATE]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String ip 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)
vlanId Integer If true, filter by VLAN identifier.

Accept : publicips

Example

Get a public ip available to purchase for a virtual datacenter


Retrieve a public IP to be purchased by a virtual datacenter

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/publicips/topurchase/{ip}

Roles : [ROLE_VDC_ENUMERATE]

Accept : publicip

Example

Release a public ip from a virtual datacenter


Release a public IP that will not be usable any more in the virtual datacenter.
If the IP is attached to a VM, you must detach it from the VM before you can release it.

PUT https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/publicips/topurchase/{ip}

Roles : [ROLE_MANAGE_PUBLICIPS]

Accept : publicip

Error Codes

  • VLAN-22 - This IP address is currently used by a virtual machine. It cannot be released

Example

List public networks in a virtual datacenter


Retrieve public networks that can be used in a virtual datacenter

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/publicvlans

Roles : [ROLE_VDC_MANAGE, ROLE_VDC_MANAGE_NETWORK, ROLE_VDC_ENUMERATE]

Accept : vlans

Get a public network in a virtual datacenter


Retrieve a public network usable in a virtual datacenter

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/publicvlans/{publicvlan}

Roles : [ROLE_VDC_MANAGE, ROLE_VDC_MANAGE_NETWORK, ROLE_VDC_ENUMERATE]

Accept : vlan

List tasks for a virtual datacenter


Displays the tasks on the virtual datacenter. Tasks are a set of jobs (operations on the provider). Any of these tasks may still be in progress.

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/tasks

Roles : [ROLE_AUTHENTICATED, ROLE_VDC_ENUMERATE]

Accept : tasks

Get a task on a virtual datacenter


Displays a specific task on the virtual datacenter. Tasks are a set of jobs (operations on the provider). Any of these tasks may still be in progress.

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/tasks/{id}

Roles : [ROLE_AUTHENTICATED, ROLE_VDC_ENUMERATE]

Accept : task

Get an extended task on a virtual datacenter


Displays a specific task on the virtual datacenter. Tasks are a set of jobs (operations on the provider). Any of these tasks may still be in progress.

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/tasks/{id}

Roles : [ROLE_AUTHENTICATED, ROLE_VDC_ENUMERATE]

Accept : taskextended

List nat ips in a virtual datacenter


Retrieve NAT IPs in a virtual datacenter.

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/action/natips

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_VDC_ENUMERATE]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String ip 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)
all Boolean false If true, also include unavailble NAT IPs
usable Boolean false If true, only return usable NAT IPs for creating a DNAT rule. A NAT IP is not usable if there is a DNAT rule using protocol ANY for all the ports.
snatdefault Boolean false If true, only returns the single NAT IP used as the default for SNAT in all the networks in the virtual datacenter

Accept : natips

Example

List nat rules in a virtual datacenter


Retrieve NAT rules defined in the virtual datacenter.
Can be used on VMs or load balancers.

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/action/natrules

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_VDC_ENUMERATE]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String ip 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)
snat Boolean If true, only return SNAT rules. If false, only return DNAT rules

Accept : natrules

Example

List user privileges for a virtual datacenter


Retrieve the privileges the current user can use in the virtual datacenter.

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/action/role

Roles : [ROLE_VDC_ENUMERATE]

Accept : links

Example

List virtual machine templates available in a virtual datacenter


Retrieve VM templates available in a virtual datacenter.

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/action/templates

Roles : [ROLE_VDC_ENUMERATE, ROLE_VDC_MANAGE, ROLE_VDC_MANAGE_VAPP]

Parameter Type Default Value Description
categoryName String If present, filter by category name *
stateful String If present, filter persistent VM templates by ALL, USED or NOTUSED
imported Boolean false If true, include imported VM templates (from captured virtual machines)
ostype String If present, filter by operating system
64bits Boolean If true, only return x64 architecture; if false, only return x86 architectures.
Requires ''ostype'' param set to null (null for any filter)
startwith Integer 0 The first element to be retrieved of the filtered search
description String If present, filter by the description
name String If present, filter by name
path String If present, filter by path
ovfId String If present, filter by Uri of the template definition.
For public clouds used for ''image id''
creationUser String If present, filter by the user who created the template.
Can be a deleted user or a simple identifier
by String id 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)
master Boolean If true, only returns VM templates with one or more instances. If false, only returns VM template instances.
includeorphaninstances boolean false If true, requires ''masterInclusion=true'', includes instances with the master not visible (not shared and in another enterprise)
states String If present, filter by comma separated value of VM template states
external Boolean true If false, do not include external VM templates in the public cloud region provider. Only return the templates that physically exist in the datacenter repository
When using Docker, the container images are not physically downloaded to the datacenter repository (NFS).
boot boolean true If true, include only VM templates with one or more bootable disks
diskformattypes String If present, filter by comma separated values of disk format types {@DiskFormatType}

Example

List virtual machines in a virtual datacenter


Retrieve virtual machines in a datacenter (from any virtual appliance).

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/action/virtualmachines

Roles : [ROLE_VDC_MANAGE_VAPP, ROLE_VAPP_CUSTOMISE_SETTINGS, ROLE_VAPP_ASSIGN_NETWORK, ROLE_VAPP_PERFORM_ACTIONS, ROLE_VAPP_DEPLOY_UNDEPLOY, ROLE_VAPP_CREATE_STATEFUL, ROLE_VAPP_ASSIGN_VOLUME, ROLE_MANAGE_HARD_DISKS, ROLE_VAPP_CREATE_INSTANCE]

Parameter Type Default Value Description
vdc String If present, filter by virtual datacenter name
vapp String If present, filter by virtual appliance name
fqdn String If present, filter by virtual machine fqdn
vmname String If present, filter by virtual machine name
vmlabel String If present, filter by virtual machine label
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)

Accept : virtualmachines

Error Codes

  • VDC-0 - The requested virtual datacenter does not exist

Example

Search for alarms on a virtual datacenter


Retrieve alarms from the virtual datacenter, and with the recursive option also includes the alarms of the following entities on the cloud path:
  • Virtual appliances>/li>
  • Virtual machines
  • Scaling groups

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/alarms

Roles : [ROLE_USERS_VIEW_ALARMS]

Parameter Type Default Value Description
startwith Integer 0 First element to retrieve, by default 0.
by String alarm Field to order by. Possible values: 'alarm', 'entity_type', 'metric', 'time_range', 'datapoints_limit', 'statistic', 'formula', 'threshold', 'description'. Uses 'alarm' as default.
limit Integer 25 Number of alarms to return. By default 25.
asc Boolean true If true, sort in ascending order of the field specified with the 'by' parameter, otherwise, sort in descending order.
alarm String Filter alarms by name, accepts wildcards. Empty by default.
metric String Filter alarms by metric name, accepts wildcards. Empty by default.
state String Filter by alarm state. Possible values: 'all', 'active' or 'inactive'

Accept : alarms

List async tasks for a virtual datacenter


GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/asynctasks

Roles : [ROLE_AUTHENTICATED, ROLE_VDC_ENUMERATE]

Accept : asynctasks

Example

List load balancers in a virtual datacenter


Retrieve load balancers in a virtual datacenter

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/loadbalancers

Roles : [ROLE_VDC_ENUMERATE, ROLE_MANAGE_LOADBALANCERS, ROLE_ASSIGN_LOADBALANCERS]

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)
source String LOCAL Use ''REMOTE'' to force synchronization with the provider
syncvms boolean false Requires source==REMOTE. Registered VMs will be synchronized.

Accept : loadbalancers

Error Codes

  • VDC-0 - The requested virtual datacenter does not exist

Example

List firewall policies in a virtual datacenter


Retrieve firewall policies in a virtual datacenter

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/firewalls

Roles : [ROLE_VDC_ENUMERATE, ROLE_ASSIGN_FIREWALLS, ROLE_MANAGE_FIREWALLS]

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)
source String LOCAL use ''REMOTE'' to force the synchronization in the provider

Accept : firewallpolicies

Error Codes

  • GEN-4 - Not enough permissions to perform this action
  • VDC-0 - The requested virtual datacenter does not exist

Example

Create a volume in a generic iscsi pool


Import an existing volume into a Generic iSCSI pool.
Instead of providing a link to the Tier where the volume will be created, the direct link to the iSCSI Storage pool must be provided.
Only in private datacenter, will fail if the virtual datacenter is in a public cloud.

POST https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/volumes

Roles : [ROLE_VDC_MANAGE_STORAGE]

Content-Type : iscsivolume Accept : iscsivolume

Error Codes

  • DEVICE-0 - The requested device does not exist
  • SP-13 - Missing storage pool link
  • SP-14 - Access to this tier is restricted for your enterprise
  • SP-3 - The requested storage pool does not exist
  • VOL-43 - The pool must be iSCSI when creating generic iSCSI volumes
  • VOL-44 - There is already a volume with that internal name
  • VOL-45 - The internal name of the volume is required
  • VOL-9 - The connection field of the volume is required

Example

Create a volume in a virtual datacenter


Create a volume in a virtual datacenter.
The tier must be specified as a link in the request body.

POST https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/volumes

Roles : [ROLE_VDC_MANAGE_STORAGE]

Content-Type : volume Accept : volume

Error Codes

  • GEN-24 - The requested disk controller is not supported by the hypervisor plugin
  • TIER-0 - The requested storage tier does not exist
  • TIER-2 - Missing link to storage tier
  • TIER-3 - Missing storage tier parameter
  • TIER-9 - The location link of the storage tier does not match the location of the virtual datacenter supplied
  • VDC-0 - The requested virtual datacenter does not exist
  • VOL-0 - Could not create the volume in the selected tier
  • VOL-1 - There are not enough resources in the selected tier to create the volume
  • VOL-2 - The name of the volume is required
  • VOL-51 - Need to select an availability zone to create a volume

Example

List volumes in a virtual datacenter


Retrieve the volumes in a virtual datacenter

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/volumes

Roles : [ROLE_VDC_MANAGE_STORAGE, ROLE_VDC_ENUMERATE, ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_VAPP_CREATE_STATEFUL]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String id How to order the search. Available values are: \{NAME, VIRTUALDATACENTER, VIRTUALAPPLIANCE, VIRUTALMACHINE, TIER, TOTALSIZE, USEDSIZE, AVAILABLESIZE\}
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)
available Boolean true If true, only return available volumes, not attached to any virtual machine. In public cloud also includes volumes not assigned to any virtual datacenter.
availabilityzone String filter by volumes in the specified availability zone providerId
persistent Boolean true If false, do not return volumes used in persistent virtual machine templates

Accept : volumes

Error Codes

  • VDC-0 - The requested virtual datacenter does not exist

Example

List volumes including virtual machine in a virtual datacenter


Retrieve volumes in a virtual datacenter, including the representation of the virtual machine, virtual appliance and virtual datacenter, if the volume is attached to a virtual machine

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/volumes

Roles : [ROLE_VDC_MANAGE_STORAGE, ROLE_VDC_ENUMERATE, ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_VAPP_CREATE_STATEFUL]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String id How to order the search. Available values are: \{NAME, VIRTUALDATACENTER, VIRTUALAPPLIANCE, VIRUTALMACHINE, TIER, TOTALSIZE, USEDSIZE, AVAILABLESIZE\}
has String How to filter the search. It can be filtered by: Volume name, Virtual Datacenter name, Virtual Appliance name, Virtual Machine name, Tier name, Total size
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)
availabilityzone String filter by volumes in the specified availability zone providerId
persistent Boolean true If false, do not return volumes used in persistent virtual machine templates

Example

List persistent volume candidates in a virtual datacenter


Get volumes of the given virtual datacenter that can be used to hold a persistent template.
This method will be called when generating a persistent template that will reside on a GENERIC volume.Since cannot create volumes in the target device, a volume must be selected to be used as the volume in a persistent virtual machine template.

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/volumes/action/statefulcandidates

Roles : [ROLE_VAPP_CREATE_STATEFUL]

Accept : volumes

Error Codes

  • VDC-0 - The requested virtual datacenter does not exist

Example