Billing API, REST: Budget.list
Retrieves the list of budgets corresponding to the specified billing account.
HTTP request
GET https://billing.api.cloud.yandex.net/billing/v1/budgets
Query parameters
Parameter | Description |
---|---|
billingAccountId | Required. ID of the billing account to list budgets corresponding to. To get the billing account ID, use list request. The maximum string length in characters is 50. |
pageSize | The maximum number of results per page to return. If the number of available results is larger than pageSize, the service returns a nextPageToken that can be used to get the next page of results in subsequent list requests. The maximum value is 1000. |
pageToken | Page token. To get the next page of results, set pageToken to the nextPageToken returned by a previous list request. The maximum string length in characters is 100. |
Response
HTTP Code: 200 - OK
{
"budgets": [
{
"id": "string",
"name": "string",
"createdAt": "string",
"billingAccountId": "string",
"status": "string",
// `budgets[]` 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",
// `budgets[].costBudget` includes only one of the fields `resetPeriod`, `startDate`
"resetPeriod": "string",
"startDate": "string",
// end of the list of possible fields`budgets[].costBudget`
},
"expenseBudget": {
"amount": "string",
"notificationUserAccountIds": [
"string"
],
"thresholdRules": [
{
"type": "string",
"amount": "string",
"notificationUserAccountIds": [
"string"
]
}
],
"filter": {
"serviceIds": [
"string"
],
"cloudFoldersFilters": [
{
"cloudId": "string",
"folderIds": [
"string"
]
}
]
},
"endDate": "string",
// `budgets[].expenseBudget` includes only one of the fields `resetPeriod`, `startDate`
"resetPeriod": "string",
"startDate": "string",
// end of the list of possible fields`budgets[].expenseBudget`
},
"balanceBudget": {
"amount": "string",
"notificationUserAccountIds": [
"string"
],
"thresholdRules": [
{
"type": "string",
"amount": "string",
"notificationUserAccountIds": [
"string"
]
}
],
"startDate": "string",
"endDate": "string"
},
// end of the list of possible fields`budgets[]`
}
],
"nextPageToken": "string"
}
Field | Description |
---|---|
budgets[] | object List of budgets. |
budgets[]. id |
string ID of the budget. |
budgets[]. name |
string Name of the budget. |
budgets[]. 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). |
budgets[]. billingAccountId |
string ID of the billing account that the budget belongs to. |
budgets[]. status |
string Status of the budget.
|
budgets[]. costBudget |
object Cost budget specification. budgets[] includes only one of the fields costBudget , expenseBudget , balanceBudget |
budgets[]. costBudget. amount |
string Required. Max cost threshold of the budget. Amount currency is the same as corresponding BillingAccount.currency. |
budgets[]. 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. |
budgets[]. costBudget. thresholdRules[] |
object List of the |
budgets[]. costBudget. thresholdRules[]. type |
string Required. Type of the rule. Define the unit of the [ThesholdRule.amount].
|
budgets[]. costBudget. thresholdRules[]. amount |
string Required. Amount of the rule.
|
budgets[]. costBudget. thresholdRules[]. notificationUserAccountIds[] |
string IDs of the UserAccount. Specified users will be be notified if the threshold exceeds. |
budgets[]. costBudget. filter |
object Filter that can be used for specific resources selection. Only consumption cost of selected resources are used for the budget calculation. |
budgets[]. 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. |
budgets[]. 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. |
budgets[]. costBudget. filter. cloudFoldersFilters[]. cloudId |
string ID of the Cloud. Only consumption within specified cloud is used for the budget calculation. |
budgets[]. 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. |
budgets[]. 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. |
budgets[]. 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. budgets[].costBudget includes only one of the fields resetPeriod , startDate
|
budgets[]. costBudget. startDate |
string budgets[].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. |
budgets[]. expenseBudget |
object Expense budget specification. budgets[] includes only one of the fields costBudget , expenseBudget , balanceBudget |
budgets[]. expenseBudget. amount |
string Required. Max expense threshold of the budget. Amount currency is the same as corresponding BillingAccount.currency. |
budgets[]. 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. |
budgets[]. expenseBudget. thresholdRules[] |
object List of the |
budgets[]. expenseBudget. thresholdRules[]. type |
string Required. Type of the rule. Define the unit of the [ThesholdRule.amount].
|
budgets[]. expenseBudget. thresholdRules[]. amount |
string Required. Amount of the rule.
|
budgets[]. expenseBudget. thresholdRules[]. notificationUserAccountIds[] |
string IDs of the UserAccount. Specified users will be be notified if the threshold exceeds. |
budgets[]. expenseBudget. filter |
object Filter that can be used for specific resources selection. Only consumption expense of selected resources are used for the budget calculation. |
budgets[]. 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. |
budgets[]. 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. |
budgets[]. expenseBudget. filter. cloudFoldersFilters[]. cloudId |
string ID of the Cloud. Only consumption within specified cloud is used for the budget calculation. |
budgets[]. 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. |
budgets[]. 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. |
budgets[]. 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. budgets[].expenseBudget includes only one of the fields resetPeriod , startDate
|
budgets[]. expenseBudget. startDate |
string budgets[].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. |
budgets[]. balanceBudget |
object Balance budget specification. budgets[] includes only one of the fields costBudget , expenseBudget , balanceBudget |
budgets[]. balanceBudget. amount |
string Required. Max balance threshold of the budget. Amount currency is the same as corresponding BillingAccount.currency. |
budgets[]. 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. |
budgets[]. balanceBudget. thresholdRules[] |
object List of the |
budgets[]. balanceBudget. thresholdRules[]. type |
string Required. Type of the rule. Define the unit of the [ThesholdRule.amount].
|
budgets[]. balanceBudget. thresholdRules[]. amount |
string Required. Amount of the rule.
|
budgets[]. balanceBudget. thresholdRules[]. notificationUserAccountIds[] |
string IDs of the UserAccount. Specified users will be be notified if the threshold exceeds. |
budgets[]. balanceBudget. startDate |
string Start_date of the budget. Must be the first day of a month and must be formatted like YYYY-MM-DD. |
budgets[]. 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. |
nextPageToken | string This token allows you to get the next page of results for list requests. If the number of results is larger than pageSize, use nextPageToken as the value for the pageToken query parameter in the next list request. Each subsequent list request will have its own nextPageToken to continue paging through the results. |