FitPoliciesResource


Create a fit policy rule


You can create a global fit policy rule or a datacenter fit policy rule. To apply a fit policy to a specific datacenter, add a link to the datacenter in the fit policy rule entity. To apply a global fit policy rule, do not supply a link to a datacenter.

POST https://example.com/api/admin/rules/fitsPolicy

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_ALLOCATION]

Content-Type : fitpolicyrule Accept : fitpolicyrule

Example

List fit policy rules


Get a list of global or datacenter fit policy rules

GET https://example.com/api/admin/rules/fitsPolicy

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
idDatacenter Integer If present, filter by the datacenter identifier

Accept : fitpolicyrules

Example

Delete a fit policy rule


DELETE https://example.com/api/admin/rules/fitsPolicy/{fitPolicy}

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_ALLOCATION]

Example

Get a fit policy rule


Get a fit policy rule. If the fit policy rule contains a link to a datacenter, then the rule applies to that datacenter. Otherwise, it is a global rule.

GET https://example.com/api/admin/rules/fitsPolicy/{fitPolicy}

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Accept : fitpolicyrule

Error Codes

  • RULE-2 - The requested load balance rule does not exist

Example