# Cost Query Set

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

## CostQuerySet

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

| Method                | Request                                                 | Response                                                                                                           |
| --------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| [**create**](#create) | [CreateCostQuerySetRequest](#createcostquerysetrequest) | [CostQuerySetInfo](#costquerysetinfo)                                                                              |
| [**update**](#update) | [UpdateCostQuerySetRequest](#updatecostquerysetrequest) | [CostQuerySetInfo](#costquerysetinfo)                                                                              |
| [**delete**](#delete) | [CostQuerySetRequest](#costquerysetrequest)             | [google.protobuf.Empty](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto)   |
| [**get**](#get)       | [GetCostQuerySetRequest](#getcostquerysetrequest)       | [CostQuerySetInfo](#costquerysetinfo)                                                                              |
| [**list**](#list)     | [CostQuerySetQuery](#costquerysetquery)                 | [CostQuerySetsInfo](#costquerysetsinfo)                                                                            |
| [**stat**](#stat)     | [CostQuerySetStatQuery](#costquerysetstatquery)         | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |

### create

> **POST** /cost-analysis/v1/cost-query-sets

| Type     | Message                                                 |
| -------- | ------------------------------------------------------- |
| Request  | [CreateCostQuerySetRequest](#createcostquerysetrequest) |
| Response | [CostQuerySetInfo](#costquerysetinfo)                   |

### update

> **PUT** /cost-analysis/v1/cost-query-set/{cost\_query\_set\_id}

| Type     | Message                                                 |
| -------- | ------------------------------------------------------- |
| Request  | [UpdateCostQuerySetRequest](#updatecostquerysetrequest) |
| Response | [CostQuerySetInfo](#costquerysetinfo)                   |

### delete

> **DELETE** /cost-analysis/v1/cost-query-set/{cost\_query\_set\_id}

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

### get

> **GET** /cost-analysis/v1/cost-query-set/{cost\_query\_set\_id}

| Type     | Message                                           |
| -------- | ------------------------------------------------- |
| Request  | [GetCostQuerySetRequest](#getcostquerysetrequest) |
| Response | [CostQuerySetInfo](#costquerysetinfo)             |

### list

> **GET** /cost-analysis/v1/cost-query-sets
>
> **POST** /cost-analysis/v1/cost-query-sets/search

| Type     | Message                                 |
| -------- | --------------------------------------- |
| Request  | [CostQuerySetQuery](#costquerysetquery) |
| Response | [CostQuerySetsInfo](#costquerysetsinfo) |

### stat

> **POST** /cost-analysis/v1/cost-query-sets/stat

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

##

## Message

### CostQuerySetInfo

| Field                | Type                                                                                                               | Description |
| -------------------- | ------------------------------------------------------------------------------------------------------------------ | ----------- |
| cost\_query\_set\_id | string                                                                                                             |             |
| name                 | string                                                                                                             |             |
| options              | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |
| tags                 | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |
| user\_id             | string                                                                                                             |             |
| domain\_id           | string                                                                                                             |             |
| created\_at          | string                                                                                                             |             |
| updated\_at          | string                                                                                                             |             |

### CostQuerySetQuery

| Field                | Type                                                                                               | Required | Description |
| -------------------- | -------------------------------------------------------------------------------------------------- | :------: | ----------- |
| query                | [spaceone.api.core.v1.Query](https://spaceone-dev.gitbook.io/api-reference/common-v1/search-query) |     ✘    |             |
| cost\_query\_set\_id | string                                                                                             |     ✘    |             |
| name                 | string                                                                                             |     ✘    |             |
| user\_id             | string                                                                                             |     ✘    |             |
| domain\_id           | string                                                                                             |     ✔    |             |

### CostQuerySetRequest

| Field                | Type   | Required | Description |
| -------------------- | ------ | :------: | ----------- |
| cost\_query\_set\_id | string |     ✔    |             |
| domain\_id           | string |     ✔    |             |

### CostQuerySetStatQuery

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

### CostQuerySetsInfo

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

### CreateCostQuerySetRequest

| Field      | Type                                                                                                               | Required | Description |
| ---------- | ------------------------------------------------------------------------------------------------------------------ | :------: | ----------- |
| name       | string                                                                                                             |     ✔    |             |
| options    | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |     ✔    |             |
| tags       | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |     ✘    |             |
| domain\_id | string                                                                                                             |     ✔    |             |

### GetCostQuerySetRequest

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

### UpdateCostQuerySetRequest

| Field                | Type                                                                                                               | Required | Description |
| -------------------- | ------------------------------------------------------------------------------------------------------------------ | :------: | ----------- |
| cost\_query\_set\_id | string                                                                                                             |     ✔    |             |
| name                 | string                                                                                                             |     ✘    |             |
| options              | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |     ✘    |             |
| 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/cost-query-set.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.
