Billing API, REST: Budget methods
A set of methods for managing Budget resources.
JSON Representation
{
"id": "string",
"name": "string",
"createdAt": "string",
"billingAccountId": "string",
"status": "string",
// includes only one of the fields `costBudget`, `expenseBudget`, `balanceBudget`
"costBudget": {
"amount": "string",
"notificationUserAccountIds": [
"string"
],
"thresholdRules": [
{
"type": "string",
"amount": "string",
"notificationUserAccountIds": [
"string"
]
}
],
"filter": {
"serviceIds": [
"string"
],
"cloudFoldersFilters": [
{
"cloudId": "string",
"folderIds": [
"string"
]
}
]
},
"endDate": "string",
// `costBudget` includes only one of the fields `resetPeriod`, `startDate`
"resetPeriod": "string",
"startDate": "string",
// end of the list of possible fields`costBudget`
},
"expenseBudget": {
"amount": "string",
"notificationUserAccountIds": [
"string"
],
"thresholdRules": [
{
"type": "string",
"amount": "string",
"notificationUserAccountIds": [
"string"
]
}
],
"filter": {
"serviceIds": [
"string"
],
"cloudFoldersFilters": [
{
"cloudId": "string",
"folderIds": [
"string"
]
}
]
},
"endDate": "string",
// `expenseBudget` includes only one of the fields `resetPeriod`, `startDate`
"resetPeriod": "string",
"startDate": "string",
// end of the list of possible fields`expenseBudget`
},
"balanceBudget": {
"amount": "string",
"notificationUserAccountIds": [
"string"
],
"thresholdRules": [
{
"type": "string",
"amount": "string",
"notificationUserAccountIds": [
"string"
]
}
],
"startDate": "string",
"endDate": "string"
},
// end of the list of possible fields
}
Field | Description |
---|---|
id | string ID of the budget. |
name | string Name of the budget. |
createdAt | string (date-time) Creation timestamp. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
billingAccountId | string ID of the billing account that the budget belongs to. |
status | string Status of the budget.
|
costBudget | object includes only one of the fields costBudget , expenseBudget , balanceBudget Cost budget specification describes budget that can be used to control cost of cloud resources usage. |
costBudget. amount |
string Required. Max cost threshold of the budget. Amount currency is the same as corresponding BillingAccount.currency. |
costBudget. notificationUserAccountIds[] |
string Required. IDs of the UserAccount. Specified users will be be notified if the budget exceeds. The minimum number of elements is 1. |
costBudget. thresholdRules[] |
object List of the |
costBudget. thresholdRules[]. type |
string Required. Type of the rule. Define the unit of the [ThesholdRule.amount].
|
costBudget. thresholdRules[]. amount |
string Required. Amount of the rule.
|
costBudget. thresholdRules[]. notificationUserAccountIds[] |
string IDs of the UserAccount. Specified users will be be notified if the threshold exceeds. |
costBudget. filter |
object Filter that can be used for specific resources selection. |
costBudget. filter. serviceIds[] |
string IDs of the Service. Only consumption of resources corresponding to the given services is used for the budget calculation. Empty sequence means no services filters. |
costBudget. filter. cloudFoldersFilters[] |
object Cloud and folders consumption filter. Only consumption within specified clouds and folders is used for the budget calculation. Empty sequence means no cloud and folders filters. |
costBudget. filter. cloudFoldersFilters[]. cloudId |
string ID of the Cloud. Only consumption within specified cloud is used for the budget calculation. |
costBudget. filter. cloudFoldersFilters[]. folderIds[] |
string IDs of the Folder. Only consumption within specified folders of the given cloud is used for the budget calculation. Empty sequence means no folders filters and the whole cloud consumption will be used. |
costBudget. endDate |
string Required. End date of the budget. Must be the last day of a month and must be formatted like YYYY-MM-DD. |
costBudget. resetPeriod |
string Periodic start type that resets budget after specified period is finished. First time budget is calculated in the current period, i.e. current month, quarter or year. costBudget includes only one of the fields resetPeriod , startDate
|
costBudget. startDate |
string costBudget includes only one of the fields resetPeriod , startDate Custom start date of the budget. Must be the first day of a month and must be formatted like YYYY-MM-DD. |
expenseBudget | object includes only one of the fields costBudget , expenseBudget , balanceBudget Expense budget specification describes budget that can be used to control expense of cloud resources usage. |
expenseBudget. amount |
string Required. Max expense threshold of the budget. Amount currency is the same as corresponding BillingAccount.currency. |
expenseBudget. notificationUserAccountIds[] |
string Required. IDs of the UserAccount. Specified users will be be notified if the budget exceeds. The minimum number of elements is 1. |
expenseBudget. thresholdRules[] |
object List of the |
expenseBudget. thresholdRules[]. type |
string Required. Type of the rule. Define the unit of the [ThesholdRule.amount].
|
expenseBudget. thresholdRules[]. amount |
string Required. Amount of the rule.
|
expenseBudget. thresholdRules[]. notificationUserAccountIds[] |
string IDs of the UserAccount. Specified users will be be notified if the threshold exceeds. |
expenseBudget. filter |
object Filter that can be used for specific resources selection. Only consumption cost of selected resources are used for the budget calculation. |
expenseBudget. filter. serviceIds[] |
string IDs of the Service. Only consumption of resources corresponding to the given services is used for the budget calculation. Empty sequence means no services filters. |
expenseBudget. filter. cloudFoldersFilters[] |
object Cloud and folders consumption filter. Only consumption within specified clouds and folders is used for the budget calculation. Empty sequence means no cloud and folders filters. |
expenseBudget. filter. cloudFoldersFilters[]. cloudId |
string ID of the Cloud. Only consumption within specified cloud is used for the budget calculation. |
expenseBudget. filter. cloudFoldersFilters[]. folderIds[] |
string IDs of the Folder. Only consumption within specified folders of the given cloud is used for the budget calculation. Empty sequence means no folders filters and the whole cloud consumption will be used. |
expenseBudget. endDate |
string Required. End date of the budget. Must be the last day of a month and must be formatted like YYYY-MM-DD. |
expenseBudget. resetPeriod |
string Periodic start type that resets budget after specified period is finished. First time budget is calculated in the current period, i.e. current month, quarter or year. expenseBudget includes only one of the fields resetPeriod , startDate
|
expenseBudget. startDate |
string expenseBudget includes only one of the fields resetPeriod , startDate Custom start date of the budget. Must be the first day of a month and must be formatted like YYYY-MM-DD. |
balanceBudget | object includes only one of the fields costBudget , expenseBudget , balanceBudget Balance budget specification describes budget that can be used to control BillingAccount.balance. |
balanceBudget. amount |
string Required. Max balance threshold of the budget. Amount currency is the same as corresponding BillingAccount.currency. |
balanceBudget. notificationUserAccountIds[] |
string Required. IDs of the UserAccount. Specified users will be be notified if the budget exceeds. The minimum number of elements is 1. |
balanceBudget. thresholdRules[] |
object List of the |
balanceBudget. thresholdRules[]. type |
string Required. Type of the rule. Define the unit of the [ThesholdRule.amount].
|
balanceBudget. thresholdRules[]. amount |
string Required. Amount of the rule.
|
balanceBudget. thresholdRules[]. notificationUserAccountIds[] |
string IDs of the UserAccount. Specified users will be be notified if the threshold exceeds. |
balanceBudget. startDate |
string Start_date of the budget. Must be the first day of a month and must be formatted like YYYY-MM-DD. |
balanceBudget. endDate |
string Required. End date of the budget. Must be the last day of a month and must be formatted like YYYY-MM-DD. |
Methods
Method | Description |
---|---|
create | Creates a budget for the specified billing account. |
get | Returns the specified budget. |
list | Retrieves the list of budgets corresponding to the specified billing account. |