AllowedLocationsResource


List location of allowed datacenters


Returns a list of datacenters that the requesting user is allowed to access, based on the allowed datacenters and public cloud regions of the user's enterprise.

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

Roles : [ROLE_VDC_ENUMERATE, ROLE_APPLIB_VIEW, ROLE_MANAGE_FIREWALLS, ROLE_MANAGE_FLOATINGIPS, ROLE_MANAGE_LOADBALANCERS]

Parameter Type Default Value Description
enterprise Integer Requires cloud admin user. If present, returns datacenters that the enterprise with this identifier is allowed to access
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)
inscope Boolean false If true, also filter by allowed datacenters that are in the user's scope

Accept : datacenters

Example

List location of allowed public cloud regions


Returns a list of public cloud regions that the requesting user is allowed to access, based on the allowed datacenters and public cloud regions of the user's enterprise.

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

Roles : [ROLE_VDC_ENUMERATE, ROLE_APPLIB_VIEW, ROLE_MANAGE_FIREWALLS, ROLE_MANAGE_FLOATINGIPS, ROLE_MANAGE_LOADBALANCERS]

Parameter Type Default Value Description
enterprise Integer Requires cloud admin user. If present, return allowed public cloud regions to the enterprise with this identifier
startwith Integer 0 The first element to be retrieved of the filtered search
by String name Parameter for ordering. Valid values {@link com.abiquo.server.core.infrastructure.PublicCloudRegion.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)
inscope Boolean false Also filter by allowed public cloud regions in the user scope
onlywithcredentials Boolean If true, only return public cloud regions if they have public cloud credentials for the current enterprise
provider String If present, retrieve only the public cloud regions of the specified type

Error Codes

  • PUBLIC-4 - The requested provider is not supported.

Example

Get a location of an allowed datacenter


GET https://example.com/api/cloud/locations/{location}

Roles : [ROLE_VDC_ENUMERATE, ROLE_APPLIB_VIEW, ROLE_MANAGE_FIREWALLS, ROLE_MANAGE_FLOATINGIPS, ROLE_MANAGE_LOADBALANCERS]

Parameter Type Default Value Description
inscope Boolean false If true, consider the user scope

Accept : datacenter

Error Codes

  • DC-0 - The requested datacenter does not exist
  • LOCATION-4 - The location does not exist

Example

Get a location of an allowed region


GET https://example.com/api/cloud/locations/{location}

Roles : [ROLE_VDC_ENUMERATE, ROLE_APPLIB_VIEW, ROLE_MANAGE_FIREWALLS, ROLE_MANAGE_FLOATINGIPS, ROLE_MANAGE_LOADBALANCERS]

Parameter Type Default Value Description
inscope Boolean false If true, consider the user scope

Error Codes

  • LOCATION-4 - The location does not exist
  • PUBLICREGION-8 - The requested public cloud region does not exist

Example

Synchronize a location of an allowed public cloud region


This method synchronizes a location from a cloud provider region that does not support VDCs
Retrieves all the entities: networks, firewalls, loadBalancers and virtual machines.
For each entity and related components, check if there is already a virtualDatacenter containing one of them, and synchronize all of them into this VDC.
If none of the entities has been synchronized yet, create a default virtualDatacenter

POST https://example.com/api/cloud/locations/{location}/action/sync

Roles : [ROLE_VDC_ENUMERATE]

Accept : acceptedrequest

List tasks on a location of an allowed public cloud region


Displays the Tasks on the Location. Tasks are a set of jobs. Any of these Tasks may still be in progress.

GET https://example.com/api/cloud/locations/{location}/tasks

Roles : [ROLE_VDC_ENUMERATE]

Accept : tasks

Get a task on a location of an allowed public cloud region


Displays a specific task on the location. Tasks are a set of jobs. Any of these jobs may still be in progress. Every Task has a UUID.

GET https://example.com/api/cloud/locations/{location}/tasks/{id}

Roles : [ROLE_VDC_ENUMERATE]

Accept : task

Get an extended task on a location of an allowed public cloud region


Displays a specific task including additional job info (progress, errorCause) on a location. Tasks are a set of jobs. Any of these jobs may still be in progress. Every Task has a UUID.

GET https://example.com/api/cloud/locations/{location}/tasks/{id}

Roles : [ROLE_VDC_ENUMERATE]

Accept : taskextended

List remote virtual datacenters from a location of an allowed public cloud region


Retrieve a list of all remote virtual datacenters from a public cloud region provider (include virtual datacenters not present in Abiquo).

If the virtual datacenter is managed by Abiquo, the response object will contain the Abiquo edit link for the virtual datacenter. From this list of virtual datacenters you can select the virtual datacenters to synchronize.

GET https://example.com/api/cloud/locations/{location}/action/remotevirtualdatacenters

Roles : [ROLE_VDC_ENUMERATE]

Example

List remote virtual machines from a location of an allowed public cloud region


Retrieve a list of all VMs from a public cloud region provider (include VMs not present in Abiquo).

GET https://example.com/api/cloud/locations/{location}/action/remotevirtualmachines

Roles : [ROLE_VDC_ENUMERATE]

Parameter Type Default Value Description
vpcids String Filter by VPC identifiers in a comma separated list.
If set to "empty", filter by VMs that are not in a VPC (e.g. EC2 Classic VMs, which have no VPC identifier).

Accept : virtualmachines

Example

Get an async task


GET https://example.com/api/cloud/locations/{location}/asynctasks/{task}

Roles : [ROLE_VDC_ENUMERATE]

Accept : asynctask

Example

List backup datacenter properties in a location


Return the list of all backup properties set for an enterprise in a location. To manage backups, see the backup resources for the datacenter such as {@link BackupManagerResource}

GET https://example.com/api/cloud/locations/{location}/backupproperties

Roles : [ROLE_VAPP_MANAGE_BACKUP]

List hardware profiles for a location


Retrieve hardware profiles that are allowed in a given location that the enterprise allowed to use and are enabled for use.

GET https://example.com/api/cloud/locations/{location}/hardwareprofiles

Roles : [ROLE_VDC_ENUMERATE, ROLE_APPLIB_ALLOW_MODIFY]

Parameter Type Default Value Description
active Boolean If true returns only active hardware profiles. If false, returns only inactive hardware profiles
cpumin Integer If present filter by cpuMin
cpumax Integer If present filter by cpuMax
rammin Integer If present filter by ramMax
rammax Integer If present filter by ramMax
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 : hardwareprofiles

Example

Get a hardware profile for a location


Retrieve a hardware profile that is allowed in a given location that the enterprise allowed to use and is enabled for use.

GET https://example.com/api/cloud/locations/{location}/hardwareprofiles/{hardwareprofile}

Roles : [ROLE_VDC_ENUMERATE, ROLE_APPLIB_ALLOW_MODIFY]

Accept : hardwareprofile

Error Codes

  • DC-0 - The requested datacenter does not exist
  • PROFILE-1 - The requested hardware profile does not exist

Example

Create a metric metadata on a location


Creates a new metric metadata

POST https://example.com/api/cloud/locations/{location}/metrics

Roles : [ROLE_USERS_PUSH_METRICS]

Content-Type : metricmetadata Accept : metricmetadata

Error Codes

  • LOCATION-4 - The location does not exist
  • MONITORING-2 - Unable to create a new metric with null or empty name
  • MONITORING-9 - The metric name 'c7c22ce5-f055-49f6-808f-e4528c350bba' is already in use.

Example

List metrics metadata on a location


Returns the metadata of all the available, built-in, and custom metrics for the given allowed location

GET https://example.com/api/cloud/locations/{location}/metrics

Roles : [ROLE_USERS_SHOW_METRICS]

Accept : metricsmetadata

Error Codes

  • LOCATION-4 - The location does not exist

Example

Push collectd values on a location


Push values gathered by collectd. The metric metadata may not exist, in this case metadata will be created automatically by the system.

The pushed data is expected as JSON format.

POST https://example.com/api/cloud/locations/{location}/metrics/collectd

Roles : [ROLE_USERS_PUSH_METRICS]

Content-Type : application/json

Example

Get a metric metadata on a location


Returns the metadata of a specific metric (built-in or custom)

GET https://example.com/api/cloud/locations/{location}/metrics/{metric}

Roles : [ROLE_USERS_SHOW_METRICS]

Accept : metricmetadata

Error Codes

  • LOCATION-4 - The location does not exist
  • MONITORING-1 - Unknown metric 'ee4c6587-7be4-4478-9102-b923e4948193' for PublicCloudRegion with id '5871'

Example

Get a metric statistics on a location


By default, this query retrieves the available datapoints for the last hour using the 'Average' aggregator with a granularity of 60 seconds. All the defaults can be overridden.

Metric dimensions to filter by can be specified with query parameters in two ways:

  • Comma separated values: ?key1=value1,value2&key2=value3
  • Duplicated key parameters: ?key1=value1&key1=value2&key2=value3

Unknown metric dimensions are filtered and ignored.

GET https://example.com/api/cloud/locations/{location}/metrics/{metric}

Roles : [ROLE_USERS_SHOW_METRICS]

Parameter Type Default Value Description
startrelative String Relative start time following the ISO 8601 duration (cannot contain years or months)
startabsolute Long Absolute start time, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC
endabsolute Long Absolute end time, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC
granularity Integer Aggregator granularity in seconds. A minimum of 60 seconds.
statistic Enum : average, maximum, minimum, sum, count, dev Aggregator to apply to the datapoints in the given time range

Accept : metric

Error Codes

  • LOCATION-4 - The location does not exist
  • MONITORING-1 - Metadata for metric 'a723a7f1-50a5-444e-8366-67c794069653' in namespace 'cloudregion' not found
  • MONITORING-3 - End time must be later than start time
  • MONITORING-38 - The relative start time must be shorter than configured in 'abiquo.monitoring.max.statistic.period.days' property
  • MONITORING-39 - Absolute or relative queries are allowed but not both
  • MONITORING-4 - The supplied relative time contains years or months
  • MONITORING-6 - The supplied relative start time is invalid
  • MONITORING-8 - The minimum granularity is 60 seconds

Push metric datapoints on a location


Push metric datapoints to a custom metric. The metric metadata may not exist, in this case metadata will be created automatically by the system.

Push is not allowed for built-in metrics.

POST https://example.com/api/cloud/locations/{location}/metrics/{metric}

Roles : [ROLE_USERS_PUSH_METRICS]

Content-Type : datapoints

Example

Update a metric metadata on a location


Updates existing metric metadata

PUT https://example.com/api/cloud/locations/{location}/metrics/{metric}

Roles : [ROLE_USERS_PUSH_METRICS]

Content-Type : metricmetadata Accept : metricmetadata

Example

Create an alarm on a location


Creates a new alarm for an existing metric (built-in or custom)

POST https://example.com/api/cloud/locations/{location}/metrics/{metric}/alarms

Roles : [ROLE_USERS_MANAGE_ALARMS]

Parameter Type Default Value Description
allowunknowndimensions boolean false If true the given dimensions are not validated against the available dimensions in the metric metadata. False by default.

Content-Type : alarm Accept : alarm

Error Codes

  • GEN-4 - Not enough permissions to perform this action
  • LOCATION-4 - The location does not exist
  • MONITORING-1 - Metadata for metric '5a6ae94b-c65c-4d4b-b391-c29115d731cd' in namespace 'cloudregion' not found
  • MONITORING-16 - The alarm name is required
  • MONITORING-17 - The alarm formula is required
  • MONITORING-18 - The alarm statistic is required
  • MONITORING-21 - The supplied formula does not exist
  • MONITORING-22 - The supplied statistic does not exist
  • MONITORING-40 - The alarm time range must be >= 1
  • MONITORING-41 - The datapoints limit must be >= 1
  • MONITORING-47 - Unable to create alarm with unknown metric dimensions

Example

List alarms on a location


List the alarms associated with an existing metric

GET https://example.com/api/cloud/locations/{location}/metrics/{metric}/alarms

Roles : [ROLE_USERS_VIEW_ALARMS]

Accept : alarms

Error Codes

  • GEN-4 - Not enough permissions to perform this action
  • LOCATION-4 - The location does not exist

Example

Delete an alarm from a location


Deletes an existing alarm

DELETE https://example.com/api/cloud/locations/{location}/metrics/{metric}/alarms/{alarm}

Roles : [ROLE_USERS_MANAGE_ALARMS]

Example

Get an alarm on a location


Returns a concrete alarm

GET https://example.com/api/cloud/locations/{location}/metrics/{metric}/alarms/{alarm}

Roles : [ROLE_USERS_VIEW_ALARMS]

Accept : alarm

Error Codes

  • GEN-4 - Not enough permissions to perform this action
  • LOCATION-4 - The location does not exist
  • MONITORING-13 - Alarm with uuid b57252d9-3d07-4636-ae6e-9abf47600628 not found

Example

Update an alarm on a location


Updates an existing alarm

PUT https://example.com/api/cloud/locations/{location}/metrics/{metric}/alarms/{alarm}

Roles : [ROLE_USERS_MANAGE_ALARMS]

Parameter Type Default Value Description
allowunknowndimensions boolean false If true the given dimensions are not validated against the available dimensions in the metric metadata. False by default.

Content-Type : alarm Accept : alarm

Error Codes

  • GEN-4 - Not enough permissions to perform this action
  • LOCATION-4 - The location does not exist
  • MONITORING-13 - Alarm '8e20270a-8b14-4bbe-ab72-0943ae93e6fb' not found for metric '7f246d2d-57ed-4b03-9a20-7b6cc8f9b694-5897' in namespace 'cloudregion'
  • MONITORING-16 - The alarm name is required
  • MONITORING-17 - The alarm formula is required
  • MONITORING-18 - The alarm statistic is required
  • MONITORING-21 - The supplied formula does not exist
  • MONITORING-22 - The supplied statistic does not exist
  • MONITORING-40 - The alarm time range must be >= 1
  • MONITORING-41 - The datapoints limit must be >= 1
  • MONITORING-47 - Unable to create alarm with unknown metric dimensions

Example