# Budget

> **Package : spaceone.api.cost\_analysis.v1**

## Budget

{% hint style="info" %}
**Budget Methods:**
{% endhint %}

| Method                                     | Request                                                       | Response                                                                                                           |
| ------------------------------------------ | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| [**create**](#create)                      | [CreateBudgetRequest](#createbudgetrequest)                   | [BudgetInfo](#budgetinfo)                                                                                          |
| [**update**](#update)                      | [UpdateBudgetRequest](#updatebudgetrequest)                   | [BudgetInfo](#budgetinfo)                                                                                          |
| [**set\_notification**](#set_notification) | [SetBudgetNotificationRequest](#setbudgetnotificationrequest) | [BudgetInfo](#budgetinfo)                                                                                          |
| [**delete**](#delete)                      | [BudgetRequest](#budgetrequest)                               | [google.protobuf.Empty](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto)   |
| [**get**](#get)                            | [GetBudgetRequest](#getbudgetrequest)                         | [BudgetInfo](#budgetinfo)                                                                                          |
| [**list**](#list)                          | [BudgetQuery](#budgetquery)                                   | [BudgetsInfo](#budgetsinfo)                                                                                        |
| [**stat**](#stat)                          | [BudgetStatQuery](#budgetstatquery)                           | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |

### create

> **POST** /cost-analysis/v1/budgets

| Type     | Message                                     |
| -------- | ------------------------------------------- |
| Request  | [CreateBudgetRequest](#createbudgetrequest) |
| Response | [BudgetInfo](#budgetinfo)                   |

### update

> **PUT** /cost-analysis/v1/budget/{budget\_id}

| Type     | Message                                     |
| -------- | ------------------------------------------- |
| Request  | [UpdateBudgetRequest](#updatebudgetrequest) |
| Response | [BudgetInfo](#budgetinfo)                   |

### set\_notification

> **PUT** /cost-analysis/v1/budget/{budget\_id}/notification

| Type     | Message                                                       |
| -------- | ------------------------------------------------------------- |
| Request  | [SetBudgetNotificationRequest](#setbudgetnotificationrequest) |
| Response | [BudgetInfo](#budgetinfo)                                     |

### delete

> **DELETE** /cost-analysis/v1/budget/{budget\_id}

| Type     | Message                                                                                                          |
| -------- | ---------------------------------------------------------------------------------------------------------------- |
| Request  | [BudgetRequest](#budgetrequest)                                                                                  |
| Response | [google.protobuf.Empty](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto) |

### get

> **GET** /cost-analysis/v1/budget/{budget\_id}

| Type     | Message                               |
| -------- | ------------------------------------- |
| Request  | [GetBudgetRequest](#getbudgetrequest) |
| Response | [BudgetInfo](#budgetinfo)             |

### list

> **GET** /cost-analysis/v1/budgets
>
> **POST** /cost-analysis/v1/budgets/search

| Type     | Message                     |
| -------- | --------------------------- |
| Request  | [BudgetQuery](#budgetquery) |
| Response | [BudgetsInfo](#budgetsinfo) |

### stat

> **POST** /cost-analysis/v1/budgets/stat

| Type     | Message                                                                                                            |
| -------- | ------------------------------------------------------------------------------------------------------------------ |
| Request  | [BudgetStatQuery](#budgetstatquery)                                                                                |
| Response | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |

##

## Message

### BudgetInfo

| Field                   | Type                                                                                                               | Description |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------ | ----------- |
| budget\_id              | string                                                                                                             |             |
| name                    | string                                                                                                             |             |
| limit                   | float                                                                                                              |             |
| planned\_limits         | [list of PlannedLimit](#plannedlimit)                                                                              |             |
| total\_usage\_usd\_cost | float                                                                                                              |             |
| cost\_types             | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |
| time\_unit              | <ul><li>NONE</li><li>TOTAL</li><li>MONTHLY</li><li>YEARLY</li></ul>                                                |             |
| start                   | string                                                                                                             |             |
| end                     | string                                                                                                             |             |
| notifications           | [list of BudgetNotification](#budgetnotification)                                                                  |             |
| tags                    | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |
| project\_id             | string                                                                                                             |             |
| project\_group\_id      | string                                                                                                             |             |
| domain\_id              | string                                                                                                             |             |
| created\_at             | string                                                                                                             |             |
| updated\_at             | string                                                                                                             |             |

### BudgetNotification

| Field              | Type                                                                        | Description |
| ------------------ | --------------------------------------------------------------------------- | ----------- |
| threshold          | float                                                                       |             |
| unit               | <ul><li>UNIT\_NONE</li><li>PERCENT</li><li>ACTUAL\_COST</li></ul>           |             |
| notification\_type | <ul><li>NOTIFICATION\_TYPE\_NONE</li><li>CRITICAL</li><li>WARNING</li></ul> |             |

### BudgetQuery

| Field              | Type                                                                                               | Required | Description |
| ------------------ | -------------------------------------------------------------------------------------------------- | -------- | ----------- |
| query              | [spaceone.api.core.v1.Query](https://spaceone-dev.gitbook.io/api-reference/common-v1/search-query) | ✘        |             |
| budget\_id         | string                                                                                             | ✘        |             |
| name               | string                                                                                             | ✘        |             |
| project\_id        | string                                                                                             | ✘        |             |
| project\_group\_id | string                                                                                             | ✘        |             |
| time\_unit         | <ul><li>NONE</li><li>TOTAL</li><li>MONTHLY</li><li>YEARLY</li></ul>                                | ✘        |             |
| domain\_id         | string                                                                                             | ✔        |             |

### BudgetRequest

| Field      | Type   | Required | Description |
| ---------- | ------ | :------: | ----------- |
| budget\_id | string |     ✔    |             |
| domain\_id | string |     ✔    |             |

### BudgetStatQuery

| Field      | Type                                                                                                             | Required | Description |
| ---------- | ---------------------------------------------------------------------------------------------------------------- | :------: | ----------- |
| query      | [spaceone.api.core.v1.StatisticsQuery](https://spaceone-dev.gitbook.io/api-reference/common-v1/statistics-query) |     ✔    |             |
| domain\_id | string                                                                                                           |     ✔    |             |

### BudgetsInfo

| Field        | Type                                                                                            | Description |
| ------------ | ----------------------------------------------------------------------------------------------- | ----------- |
| results      | [list of BudgetInfo](#budgetinfo)                                                               |             |
| total\_count | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto) |             |

### CreateBudgetRequest

| Field              | Type                                                                                                               | Required | Description |
| ------------------ | ------------------------------------------------------------------------------------------------------------------ | -------- | ----------- |
| name               | string                                                                                                             | ✘        |             |
| limit              | float                                                                                                              | ✘        |             |
| planned\_limits    | [list of PlannedLimit](#plannedlimit)                                                                              | ✘        |             |
| cost\_types        | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ✘        |             |
| time\_unit         | <ul><li>NONE</li><li>TOTAL</li><li>MONTHLY</li><li>YEARLY</li></ul>                                                | ✔        |             |
| start              | string                                                                                                             | ✔        |             |
| end                | string                                                                                                             | ✔        |             |
| notifications      | [list of BudgetNotification](#budgetnotification)                                                                  | ✘        |             |
| tags               | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ✘        |             |
| project\_id        | string                                                                                                             | ✘        |             |
| project\_group\_id | string                                                                                                             | ✘        |             |
| domain\_id         | string                                                                                                             | ✔        |             |

### GetBudgetRequest

| Field      | Type           | Required | Description |
| ---------- | -------------- | :------: | ----------- |
| budget\_id | string         |     ✔    |             |
| domain\_id | string         |     ✔    |             |
| only       | list of string |     ✘    |             |

### PlannedLimit

| Field | Type   | Description |
| ----- | ------ | ----------- |
| date  | string |             |
| limit | float  |             |

### SetBudgetNotificationRequest

| Field         | Type                                              | Required | Description |
| ------------- | ------------------------------------------------- | :------: | ----------- |
| budget\_id    | string                                            |     ✔    |             |
| notifications | [list of BudgetNotification](#budgetnotification) |     ✔    |             |
| domain\_id    | string                                            |     ✔    |             |

### UpdateBudgetRequest

| Field           | Type                                                                                                               | Required | Description |
| --------------- | ------------------------------------------------------------------------------------------------------------------ | :------: | ----------- |
| budget\_id      | string                                                                                                             |     ✔    |             |
| name            | string                                                                                                             |     ✘    |             |
| limit           | float                                                                                                              |     ✘    |             |
| planned\_limits | [list of PlannedLimit](#plannedlimit)                                                                              |     ✘    |             |
| end             | string                                                                                                             |     ✘    |             |
| tags            | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |     ✘    |             |
| domain\_id      | string                                                                                                             |     ✔    |             |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://spaceone-dev.gitbook.io/spaceone-apis/cost_analysis/v1/budget.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
