Create budget
Path Parameters
Parameter | Type | Required | Description |
|---|---|---|---|
resource_pool_id | String | Yes | Resource Pool ID |
Query Parameters
None
Request
Request body properties
Property | Type | Required | Description |
|---|---|---|---|
enabled | boolean | No | When set to true, the budget is calculated for the resource pool based on the configuration. When set to false, the budget calculation is ignored with the assumption that budget is not set for the resource pool. Default value is true. |
cycle | String | Yes | Enum of duration. Possible values are monthly, quarterly, half_yearly, yearly |
budget_amount | List (budgets) | Yes | Array of budget amounts. Array size depends on the cycle. Example: If budget is quarterly, there should be 4 entries. |
thresholds_underspenders | Integer | Yes | A number between 0 and 100 identifying the boundary for underspenders. If the actual cost goes below this number, this resource pool will be tagged as underspender. |
thresholds_overspenders | Integer | Yes | A number between 0 and 100 identifying the boundary for overspenders. If the actual cost goes beyond this number, this Resource Pool will be tagged as overspender. |
Example request JSON
"enabled": true,
"cycle":"quarterly",
"budget_amount":[
{
"end_time": 1540468011,
"start_time": 1532519211,
"amount": 1000
},
{
"end_time": 1540468012,
"start_time": 1532519212,
"amount": 1000
},
{
"end_time": 1540468013,
"start_time": 1532519213,
"amount": 1000
},
{
"end_time": 1540468014,
"start_time": 1532519215,
"amount": 1000
}
],
"thresholds_underspenders":40,
"thresholds_overspenders":100
}
Response
Example response JSON
"resource_pool_id":"12345-abcde"
"enabled": true,
"cycle":"quarterly",
"budget_amount":[
{
"end_time": 1540468011,
"start_time": 1532519211,
"amount": 1000
},
{
"end_time": 1540468012,
"start_time": 1532519212,
"amount": 1000
},
{
"end_time": 1540468013,
"start_time": 1532519213,
"amount": 1000
},
{
"end_time": 1540468014,
"start_time": 1532519215,
"amount": 1000
}
],
"thresholds_underspenders":40,
"thresholds_overspenders":100
}
Status codes and messages
HTTP code | Message | Description |
|---|---|---|
201 | Created | Request succeeded |
401 | Unauthorized | |
400 | Bad request | |
403 | Forbidden |