pem.setResourceTypeLimits
This method is supported by Operations starting from version 2.6.1
The pem.setResourceTypeLimits method is responsible for changing limits of set of Resource Types in a specific Subscription. This method also can control resource provisioning status according to their new limits.
The method has the following input parameters:
Name |
Type |
Short Description |
---|---|---|
|
int |
Subscription ID |
|
boolean |
If the actual provisioning/un-provisioning should proceed. |
|
array of structs |
|
|
int |
Resource Type ID. |
|
string |
New limit for specific Resource Type. Only numeric value can be passed. Note: Use -1 value to make a resource unlimited. |
parameters |
array of structs |
Note: At present time, it is used only for any specific resources in a context of SaaS resources up-selling. |
|
string |
Name of the Activation Parameter. |
|
string |
Value of the Activation Parameter. |
This method has no output parameters.
The method can include new resource types into current subscription's resource type tree.
If the autoprovide flag is set to 1 (true), then the method performs the following additional tasks:
- If a particular resource was either added or its limit was changed from zero to any non-zero value, then it will be auto-provided.
- If limit of a particular resource is changed from non-zero value to zero, then it will be automatically un-provided.
Note: For a resource that belongs to the Application service reference resource class, setting its limit to zero leads to overusage (usage will not be decreased, and unprovisioning will not be initiated for this resource).
The method performs the following tasks depending on the cases outlined in the table below:
|
|
|
limit=L (L < N) |
Returns an error (exception) |
Returns an error (exception) |
limit=0 |
Un-provide |
Overuse (N - L) |
Note: Operations resource type structure has a tree-like form, so auto-provisioning of leaf resources is impossible without provisioning of root ones. Be aware of what resources to send with this method to get predictable results.