Apache CloudStack 4.19.0.0 Root Admin API Reference

createSecondaryStorageSelector

Creates a secondary storage selector, described by the heuristic rule.

Request parameters

Parameter NameDescriptionRequired
descriptionThe description of the heuristic rule.true
heuristicruleThe heuristic rule, in JavaScript language. It is required that it returns the UUID of a secondary storage pool. An example of a rule is `if (snapshot.hypervisorType === 'KVM') { '7832f261-c602-4e8e-8580-2496ffbbc45d'; }` would allocate all snapshots with the KVM hypervisor to the specified secondary storage UUID.true
nameThe name identifying the heuristic rule.true
typeThe resource type directed to a specific secondary storage by the selector. Valid options are: ISO, SNAPSHOT, TEMPLATE and VOLUME.true
zoneidThe zone in which the heuristic rule will be applied.true

Response Tags

Response NameDescription
idID of the heuristic.
createdWhen the heuristic was created.
descriptionDescription of the heuristic.
heuristicruleThe heuristic rule, in JavaScript language, used to select a secondary storage to be directed.
nameName of the heuristic.
removedWhen the heuristic was removed.
typeThe resource type directed to a specific secondary storage by the selector. Valid options are: ISO, SNAPSHOT, TEMPLATE and VOLUME.
zoneidThe zone which the heuristic is valid upon.