# UnifiedCost

Unified Cost service is a service that provides unified cost based on the cost data from various DataSources registered in each domain.

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

\
\


## UnifiedCost

**UnifiedCost Methods:**

| Method                                                                                                                        | Request                                                                                                                                                   | Response                                                                                                                                    |
| ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| [**get**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/UnifiedCost/README.md#get)         | [UnifiedCostRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/UnifiedCost/README.md#unifiedcostrequest)           | [UnifiedCostInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/UnifiedCost/README.md#unifiedcostinfo)   |
| [**list**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/UnifiedCost/README.md#list)       | [UnifiedCostQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/UnifiedCost/README.md#unifiedcostquery)               | [UnifiedCostsInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/UnifiedCost/README.md#unifiedcostsinfo) |
| [**analyze**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/UnifiedCost/README.md#analyze) | [UnifiedCostAnalyzeQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/UnifiedCost/README.md#unifiedcostanalyzequery) | [Struct](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/UnifiedCost/README.md#struct)                     |
| [**stat**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/UnifiedCost/README.md#stat)       | [UnifiedCostStatQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/UnifiedCost/README.md#unifiedcoststatquery)       | [Struct](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/UnifiedCost/README.md#struct)                     |

\


### get

> **POST** /cost-analysis/v1/unified-cost/get

\{{< tabs " get " >\}}

\{{< tab "Request Example" >\}}

[UnifiedCostRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/UnifiedCost/README.md#unifiedcostrequest)

* **unified\_cost\_id** (string) `Required`

\{{< highlight json >\}} { "unified\_cost\_id": "unified-cost-11153fceca11" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< tab "Response Example" >\}}

[UnifiedCostInfo](#UNIFIEDCOSTINFO)

* **unified\_cost\_id** (string) `Required`
* **cost** (Struct) `Required`
*   **billed\_month** (string) `Required`

    ex). 2021-01
*   **billed\_year** (string) `Required`

    ex). 2021
*   **aggregation\_date** (string) `Required`

    ex). 2021-01-01
* **exchange\_date** (string) `Required`
*   **exchange\_source** (string) `Required`

    ex). Yahoo Finance
*   **currency** (string) `Required`

    Original currency of cost
* **is\_confirmed** (bool) `Required`
* **provider** (string) `Required`
* **region\_code** (string) `Required`
* **region\_key** (string) `Required`
* **product** (string) `Required`
* **usage\_type** (string) `Required`
* **usage\_unit** (string) `Required`
* **service\_account\_name** (string) `Required`
* **data\_source\_name** (string) `Required`
* **project\_name** (string) `Required`
* **workspace\_name** (string) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **project\_id** (string) `Required`
* **data\_source\_id** (string) `Required`
* **service\_account\_id** (string) `Required`
* **created\_at** (string) `Required`

\{{< highlight json >\}} { "unified\_cost\_id": "unified-cost-11153fceca11", "cost": { "KRW": 13000, "USD": 1, "JPY": 100 }, "billed\_month": "2024-08", "billed\_year": "2024", "exchange\_date": "2024-08-14", "exchange\_source": "Yahoo Finance!", "aggregation\_date": "2024-08-15", "currency": "USD", "is\_confirmed": true, "provider": "aws", "region\_code": "AP2", "region\_key": "aws.AP2", "product": "AmazonS3", "data\_source\_name": "AWS", "workspace\_name": "SpaceONE", "data\_source\_id": "ds-1acca85666c1", "project\_id": project-1acca85666c1, "workspace\_id": "workspace-1acca85666c1", "domain\_id": "domain-1acca85666c1", "created\_at": "2024-09-30T08:00:03.945Z" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### list

> **POST** /cost-analysis/v1/unified-cost/list

\{{< tabs " list " >\}}

\{{< tab "Request Example" >\}}

[UnifiedCostQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/UnifiedCost/README.md#unifiedcostquery)

* **query** (Query)
* **unified\_cost\_id** (string)

\{{< highlight json >\}} { "query": {} } \{{< /highlight >\}} \{{< /tab >\}}

\{{< tab "Response Example" >\}}

[UnifiedCostsInfo](#UNIFIEDCOSTSINFO)

* **results** (UnifiedCostInfo) `Repeated` `Required`
* **total\_count** (int32) `Required`

\{{< highlight json >\}} { "results": \[ { "unified\_cost\_id": "unified-cost-11153fceca11", "cost": { "KRW": 13000, "USD": 1, "JPY": 100 }, "billed\_month": "2024-08", "billed\_year": "2024", "exchange\_date": "2024-08-14", "exchange\_source": "Yahoo Finance!", "aggregation\_date": "2024-08-15", "currency": "USD", "is\_confirmed": true, "provider": "aws", "region\_code": "AP2", "region\_key": "aws.AP2", "product": "AmazonS3", "data\_source\_name": "AWS", "workspace\_name": "SpaceONE", "data\_source\_id": "ds-1acca85666c1", "project\_id": project-1acca85666c1, "workspace\_id": "workspace-1acca85666c1", "domain\_id": "domain-1acca85666c1", "created\_at": "2024-09-30T08:00:03.945Z" } ], "total\_count": 1 } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### analyze

> **POST** /cost-analysis/v1/unified-cost/analyze

\{{< tabs " analyze " >\}}

\{{< tab "Request Example" >\}}

[UnifiedCostAnalyzeQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/UnifiedCost/README.md#unifiedcostanalyzequery)

* **query** (TimeSeriesAnalyzeQuery) `Required`
* **is\_confirmed** (bool) `Required`

\{{< highlight json >\}} { "query": {} } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### stat

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

\{{< tabs " stat " >\}}

\{{< tab "Request Example" >\}}

[UnifiedCostStatQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/UnifiedCost/README.md#unifiedcoststatquery)

* **query** (StatisticsQuery) `Required`

\{{< highlight json >\}} { "query": {} } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\
\


## Message

### UnifiedCostAnalyzeQuery

* **query** (TimeSeriesAnalyzeQuery) `Required`
*   **is\_confirmed** (bool) `Required`

    \


### UnifiedCostInfo

* **unified\_cost\_id** (string) `Required`
* **cost** (Struct) `Required`
*   **billed\_month** (string) `Required`

    _ex). 2021-01_
*   **billed\_year** (string) `Required`

    _ex). 2021_
*   **aggregation\_date** (string) `Required`

    _ex). 2021-01-01_
* **exchange\_date** (string) `Required`
*   **exchange\_source** (string) `Required`

    _ex). Yahoo Finance_
*   **currency** (string) `Required`

    _Original currency of cost_
* **is\_confirmed** (bool) `Required`
* **provider** (string) `Required`
* **region\_code** (string) `Required`
* **region\_key** (string) `Required`
* **product** (string) `Required`
* **usage\_type** (string) `Required`
* **usage\_unit** (string) `Required`
* **service\_account\_name** (string) `Required`
* **data\_source\_name** (string) `Required`
* **project\_name** (string) `Required`
* **workspace\_name** (string) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **project\_id** (string) `Required`
* **data\_source\_id** (string) `Required`
* **service\_account\_id** (string) `Required`
*   **created\_at** (string) `Required`

    \


### UnifiedCostQuery

* **query** (Query)
*   **unified\_cost\_id** (string)

    \


### UnifiedCostRequest

*   **unified\_cost\_id** (string) `Required`

    \


### UnifiedCostStatQuery

*   **query** (StatisticsQuery) `Required`

    \


### UnifiedCostsInfo

* **results** (UnifiedCostInfo) `Repeated` `Required`
*   **total\_count** (int32) `Required`

    \
