# DataSourceAccount

A DataSourceAccount is a resource that for routing cost data from a specific account to a workspace, project, service account.

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

\
\


## DataSourceAccount

**DataSourceAccount Methods:**

| Method                                                                                                                              | Request                                                                                                                                                                       | Response                                                                                                                                                      |
| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**update**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/DataSourceAccount/README.md#update)   | [UpdateDataSourceAccountRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/DataSourceAccount/README.md#updatedatasourceaccountrequest) | [DataSourceAccountInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/DataSourceAccount/README.md#datasourceaccountinfo)   |
| [**reset**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/DataSourceAccount/README.md#reset)     | [ResetDataSourceAccountRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/DataSourceAccount/README.md#resetdatasourceaccountrequest)   | [Empty](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/DataSourceAccount/README.md#empty)                                   |
| [**get**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/DataSourceAccount/README.md#get)         | [DataSourceAccountRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/DataSourceAccount/README.md#datasourceaccountrequest)             | [DataSourceAccountInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/DataSourceAccount/README.md#datasourceaccountinfo)   |
| [**list**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/DataSourceAccount/README.md#list)       | [DataSourceAccountQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/DataSourceAccount/README.md#datasourceaccountquery)                 | [DataSourceAccountsInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/DataSourceAccount/README.md#datasourceaccountsinfo) |
| [**analyze**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/DataSourceAccount/README.md#analyze) | [DataSourceAccountAnalyzeQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/DataSourceAccount/README.md#datasourceaccountanalyzequery)   | [Struct](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/DataSourceAccount/README.md#struct)                                 |
| [**stat**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/DataSourceAccount/README.md#stat)       | [DataSourceAccountStatQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/DataSourceAccount/README.md#datasourceaccountstatquery)         | [Struct](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/DataSourceAccount/README.md#struct)                                 |

\


### update

Update a DataSourceAccount with the specified DataSourceAccount ID related to the DataSource.

> **POST** /cost-analysis/v1/data-source-account/update

\{{< tabs " update " >\}}

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

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

* **data\_source\_id** (string) `Required`
*   **account\_id** (string) `Required`

    _account\_id is the unique identifier of each CSP account.(e.g. Azure Tenant ID)_
* **workspace\_id** (string)

\{{< highlight json >\}} { "data\_source\_id": "ds-faaa11aa1111", "account\_id": "111069360300", "workspace\_id": "ws-aaaa11aa1111" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### reset

Reset a DataSourceAccount state and linked workspace with the specified DataSourceAccount ID related to the DataSource.

> **POST** /cost-analysis/v1/data-source-account/reset

\{{< tabs " reset " >\}}

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

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

*   **data\_source\_id** (string) `Required`

    _data\_source\_id is the unique identifier of each data source._
* **account\_id** (string)
*   **reset\_sync** (bool)

    _if sync\_state is true, it will reset the sync state of the data source account._

\{{< highlight json >\}} { "data\_source\_id": "ds-faaa11aa1111", "account\_id": "111069360300", "sync\_state": true } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### get

Get a DataSourceAccount with the specified DataSourceAccount ID related to the DataSource.

> **POST** /cost-analysis/v1/data-source-account/get

\


### list

> **POST** /cost-analysis/v1/data-source-account/list

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

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

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

* **query** (Query)
* **data\_source\_id** (string)
* **account\_id** (string)
* **workspace\_id** (string)
* **project\_id** (string)
* **service\_account\_id** (string)

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

\{{< /tabs >\}}

\


### analyze

> **POST** /cost-analysis/v1/data-source-account/analyze

\


### stat

> **POST** /cost-analysis/v1/data-source-account/stat

\
\


## Message

### DataSourceAccountAnalyzeQuery

* **query** (TimeSeriesAnalyzeQuery) `Required`
* **data\_source\_id** (string) `Required`
* **account\_id** (string) `Required`
*   **workspace\_id** (string) `Required`

    \


### DataSourceAccountInfo

* **account\_id** (string) `Required`
* **data\_source\_id** (string) `Required`
* **name** (string) `Required`
* **is\_sync** (bool) `Required`
* **is\_linked** (bool) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **v\_workspace\_id** (string) `Required`
* **created\_at** (string) `Required`
* **updated\_at** (string) `Required`
*   **last\_synced\_at** (string) `Required`

    \


### DataSourceAccountQuery

* **query** (Query)
* **data\_source\_id** (string)
* **account\_id** (string)
* **workspace\_id** (string)
* **project\_id** (string)
*   **service\_account\_id** (string)

    \


### DataSourceAccountRequest

* **data\_source\_account\_id** (string) `Required`
*   **account\_id** (string) `Required`

    \


### DataSourceAccountStatQuery

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

    \


### DataSourceAccountsInfo

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

    \


### ResetDataSourceAccountRequest

*   **data\_source\_id** (string) `Required`

    _data\_source\_id is the unique identifier of each data source._
* **account\_id** (string)
*   **reset\_sync** (bool)

    _if sync\_state is true, it will reset the sync state of the data source account._

    \


### UpdateDataSourceAccountRequest

* **data\_source\_id** (string) `Required`
*   **account\_id** (string) `Required`

    _account\_id is the unique identifier of each CSP account.(e.g. Azure Tenant ID)_
*   **workspace\_id** (string)

    \
