# CloudServiceStats

A CloudServiceStats is statistics data created from from cloud service query sets.

> **Package : spaceone.api.inventory.v1**

\ <br>

## CloudServiceStats

**CloudServiceStats Methods:**

| Method                                                                                                                          | Request                                                                                                                                                                 | Response                                                                                                                                                |
| ------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**list**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceStats/README.md#list)       | [CloudServiceStatsQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceStats/README.md#cloudservicestatsquery)               | [CloudServiceStatsInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceStats/README.md#cloudservicestatsinfo) |
| [**analyze**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceStats/README.md#analyze) | [CloudServiceStatsAnalyzeQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceStats/README.md#cloudservicestatsanalyzequery) | [Struct](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceStats/README.md#struct)                               |
| [**stat**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceStats/README.md#stat)       | [CloudServiceStatsStatQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceStats/README.md#cloudservicestatsstatquery)       | [Struct](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceStats/README.md#struct)                               |

<br>

### list

Gets a list of raw statistics data. You can use a query to get a filtered list of statistics data.

> **POST** /inventory/v1/cloud-service-stats/list

{{< tabs " list " >}}

{{< tab "Request Example" >}}

[CloudServiceStatsQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceStats/README.md#cloudservicestatsquery)

* **query\_set\_id** (string) `Required`
* **query** (Query)
* **provider** (string)
* **cloud\_service\_group** (string)
* **cloud\_service\_type** (string)
* **region\_code** (string)
* **account** (string)
* **workspace\_id** (string)
* **project\_id** (string)

{{< highlight json >}} { "query": , "query\_set\_id": "query-set-abcd1234", "provider": "aws", "cloud\_service\_group": "EC2", "cloud\_service\_type": "Instance", "region\_code": "us-east-1", "account": "aws-account-id", "project\_id": "project-abcd1234" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

[CloudServiceStatsInfo](#CLOUDSERVICESTATSINFO)

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

{{< highlight json >}} { "results": \[ { "query\_set\_id": "query-set-abcd1234", "key": "Disk Size", "data": { "Disk Size": 1040, "Memory Size": 1024, "CPU": 2 }, "unit": { "Disk Size": "GB", "Memory": "GB", "CPU": "Core" }, "provider": "aws", "cloud\_service\_group": "EC2", "cloud\_service\_type": "Instance", "region\_code": "us-east-1", "account": "aws-account-id", "additional\_info": { "instance\_type": "t2.micro" }, "project\_id": "project-abcd1234", "domain\_id": "domain-58010aa2e451", "created\_date": "2022-06-22" }, {...} ], "total\_count": 2 } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

<br>

### analyze

> **POST** /inventory/v1/cloud-service-stats/analyze

<br>

### stat

> **POST** /inventory/v1/cloud-service-stats/stat

\ <br>

## Message

### CloudServiceStatInfo

* **query\_set\_id** (string) `Required`
* **data** (Struct) `Required`
* **unit** (Struct) `Required`
* **provider** (string) `Required`
* **cloud\_service\_group** (string) `Required`
* **cloud\_service\_type** (string) `Required`
* **region\_code** (string) `Required`
* **account** (string) `Required`
* **additional\_info** (Struct) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **project\_id** (string) `Required`
* **created\_date** (string) `Required`

  <br>

### CloudServiceStatsAnalyzeQuery

* **query** (TimeSeriesAnalyzeQuery) `Required`
* **query\_set\_id** (string) `Required`

  <br>

### CloudServiceStatsInfo

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

  <br>

### CloudServiceStatsQuery

* **query\_set\_id** (string) `Required`
* **query** (Query)
* **provider** (string)
* **cloud\_service\_group** (string)
* **cloud\_service\_type** (string)
* **region\_code** (string)
* **account** (string)
* **workspace\_id** (string)
* **project\_id** (string)

  <br>

### CloudServiceStatsStatQuery

* **query** (StatisticsQuery) `Required`
* **query\_set\_id** (string)

  <br>


---

# 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://cloudforet.gitbook.io/cloudforet-apis/content/en/inventory/v1/cloudservicestats.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.
