BackupPoliciesResource


Create a backup policy in a datacenter


When creating a backup policy, the administrator can choose to allow the user to select options in the VM (by not specifying these options) or to use the backup system configuration (by using the value "NOT_APPLY" for the "time" attribute, for example). If the user is to define the time, they will require the appropriate privileges in order to save the VM after applying a backup.

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

Roles : [ROLE_PHYS_DC_ALLOW_BACKUP_CONFIG]

Content-Type : backuppolicy Accept : backuppolicy

Error Codes

  • BC-24 - The backup policy code is duplicated in this datacenter
  • CONSTR-LENGTH - The property 'description' length must be between 1 and 255.
  • CONSTR-REQUIRED - The property 'type' must have a value.

Example

List backup policies in a datacenter


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

Roles : [ROLE_PHYS_DC_ALLOW_BACKUP_CONFIG]

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)

Accept : backuppolicies

Error Codes

  • DC-0 - The requested datacenter does not exist

Example

Delete a backup policy in a datacenter


DELETE https://example.com/api/admin/datacenters/{datacenter}/backuppolicies/{backuppolicy}

Roles : [ROLE_PHYS_DC_ALLOW_BACKUP_CONFIG]

Example

Get a backup policy in a datacenter


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

Roles : [ROLE_PHYS_DC_ALLOW_BACKUP_CONFIG]

Accept : backuppolicy

Error Codes

  • BC-23 - The requested backup policy does not exist
  • DC-0 - The requested datacenter does not exist

Example

Update a backup policy in a datacenter


PUT https://example.com/api/admin/datacenters/{datacenter}/backuppolicies/{backuppolicy}

Roles : [ROLE_PHYS_DC_ALLOW_BACKUP_CONFIG]

Content-Type : backuppolicy Accept : backuppolicy

Error Codes

  • BC-23 - The requested backup policy does not exist
  • BC-24 - The backup policy code is duplicated in this datacenter
  • BC-29 - Cannot update the backup configurations of the backup policy because there are already virtual machines with that policy assigned
  • CONSTR-LENGTH - The property 'description' length must be between 1 and 255.
  • DC-0 - The requested datacenter does not exist

Example