Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
Billing
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Activate the paid version
    • Purchase a committed volume of services (CVoS)
    • Activate a promo code
    • View usage details
    • Top up your personal account
    • Link another bank card
    • Unlink a card
    • Link a cloud to a billing account
    • Change the payment method
    • Understand your payment invoice
    • View your payment history
    • Change your billing account data
    • Create a new billing account
    • Delete billing account
    • Get expense details by folder
    • View details in Yandex DataLens
    • Enable notifications
    • Enable electronic document management
    • Download reporting documents
    • Yandex Query integration
  • Concepts
    • All concepts
    • Promo code
    • Billing threshold
    • Billing accounts
      • Overview
      • Statuses
    • Personal account
    • Grant
    • Trial period
    • Committed volume of services (CVoS)
    • Free tier of serverless ecosystem
    • Budget
    • Agreement
    • Glossary
  • Paying for resources
    • General information
    • For individuals
      • How resources are paid for and funds are debited
      • Billing cycle
    • For businesses and individual entrepreneurs
      • Payment methods
        • Bank account transfers
        • Bank card transfer
    • Billing cycle
    • Reporting documents
      • General information
      • Report
      • Payment invoice
      • Invoice
      • Electronic document management
    • Payment currency
  • Tutorials
    • Creating a trigger for budgets that invokes a function to stop VM instances
  • Access management
  • Pricing policy
  • Questions and answers
    • General questions
    • Questions about an agreement
    • Questions about payment
    • Questions about the billing account
    • Questions about the trial period and paid version
    • Questions about working with non-residents of Russia or Kazakhstan
    • All questions on one page
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • BillingAccountService
      • BudgetService
      • CustomerService
      • ServiceService
      • SkuService
      • OperationService
    • REST
      • Overview
      • BillingAccount
        • Overview
        • bindBillableObject
        • get
        • list
        • listAccessBindings
        • listBillableObjectBindings
        • updateAccessBindings
      • Budget
        • Overview
        • create
        • get
        • list
      • Customer
        • Overview
        • activate
        • createResellerServed
        • invite
        • list
        • suspend
      • Service
        • Overview
        • get
        • list
      • Sku
        • Overview
        • get
        • list
  1. API reference
  2. REST
  3. Budget
  4. list

Billing API, REST: Budget.list

Written by
Yandex Cloud
  • HTTP request
  • Query parameters
  • Response

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 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

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.
  • CREATING: The budget is being created.
  • ACTIVE: The budget is active.
  • FINISHED: The budget is finished.
budgets[].
costBudget
object
Cost budget specification.
budgets[] includes only one of the fields costBudget, expenseBudget, balanceBudget
budgets[].
costBudget.
amount
string

Max cost threshold of the budget. Amount currency is the same as corresponding BillingAccount.currency.

budgets[].
costBudget.
notificationUserAccountIds[]
string

IDs of the UserAccount. Specified users will be be notified if the budget exceeds.

budgets[].
costBudget.
thresholdRules[]
object

List of the ThresholdRule. Rules define intermediate cost thresholds of the budget.

budgets[].
costBudget.
thresholdRules[].
type
string

Type of the rule.

Define the unit of the [ThesholdRule.amount].

  • PERCENT: Percent.
  • AMOUNT: The same as budget amount.
budgets[].
costBudget.
thresholdRules[].
amount
string

Amount of the rule.

  • Must be less than 100 if type is PERCENT.
  • Must be less than budget's amount if type is AMOUNT.
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 expense 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

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

  • MONTHLY: Reset budget every month.
  • QUARTER: Reset budget every quarter.
  • ANNUALLY: Reset budget every year.
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

Max expense threshold of the budget. Amount currency is the same as corresponding BillingAccount.currency.

budgets[].
expenseBudget.
notificationUserAccountIds[]
string

IDs of the UserAccount. Specified users will be be notified if the budget exceeds.

budgets[].
expenseBudget.
thresholdRules[]
object

List of the ThresholdRule. Rules define intermediate expense thresholds of the budget.

budgets[].
expenseBudget.
thresholdRules[].
type
string

Type of the rule.

Define the unit of the [ThesholdRule.amount].

  • PERCENT: Percent.
  • AMOUNT: The same as budget amount.
budgets[].
expenseBudget.
thresholdRules[].
amount
string

Amount of the rule.

  • Must be less than 100 if type is PERCENT.
  • Must be less than budget's amount if type is AMOUNT.
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 cost 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

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

  • MONTHLY: Reset budget every month.
  • QUARTER: Reset budget every quarter.
  • ANNUALLY: Reset budget every year.
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

Max balance threshold of the budget. Amount currency is the same as corresponding BillingAccount.currency.

budgets[].
balanceBudget.
notificationUserAccountIds[]
string

IDs of the UserAccount. Specified users will be be notified if the budget exceeds.

budgets[].
balanceBudget.
thresholdRules[]
object

List of the ThresholdRule. Rules define intermediate balance thresholds of the budget.

budgets[].
balanceBudget.
thresholdRules[].
type
string

Type of the rule.

Define the unit of the [ThesholdRule.amount].

  • PERCENT: Percent.
  • AMOUNT: The same as budget amount.
budgets[].
balanceBudget.
thresholdRules[].
amount
string

Amount of the rule.

  • Must be less than 100 if type is PERCENT.
  • Must be less than budget's amount if type is AMOUNT.
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

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.

Was the article helpful?

Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
In this article:
  • HTTP request
  • Query parameters
  • Response