pem.setResourceTypeLimit
This method is supported by Operations starting from version 2.6.1
This method sets limits on a Resource Type within given Subscription.
The method has the following input parameters:
Name |
Type |
Short Description |
---|---|---|
|
int |
ID of the Subscription |
|
int |
ID of the Resource type |
|
int |
New Resource Type limit. Note: Use -1 value to make a resource unlimited. |
|
bigint |
64bit analog of the Note: Use -1 value to make a resource unlimited. |
|
boolean |
If the actual provisioning/un-provisioning should proceed |
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.