# CloudServiceQuerySet

A CloudServiceQuerySet is query set for storing statistics data of CloudService.

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

\
\


## CloudServiceQuerySet

**CloudServiceQuerySet Methods:**

| Method                                                                                                                             | Request                                                                                                                                                                            | Response                                                                                                                                                           |
| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [**create**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#create)   | [CreateCloudServiceQuerySetRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#createcloudservicequerysetrequest) | [CloudServiceQuerySetInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#cloudservicequerysetinfo)   |
| [**update**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#update)   | [UpdateCloudServiceQuerySetRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#updatecloudservicequerysetrequest) | [CloudServiceQuerySetInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#cloudservicequerysetinfo)   |
| [**delete**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#delete)   | [CloudServiceQuerySetRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#cloudservicequerysetrequest)             | [Empty](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#empty)                                         |
| [**run**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#run)         | [CloudServiceQuerySetRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#cloudservicequerysetrequest)             | [Empty](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#empty)                                         |
| [**test**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#test)       | [CloudServiceQuerySetRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#cloudservicequerysetrequest)             | [Struct](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#struct)                                       |
| [**enable**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#enable)   | [CloudServiceQuerySetRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#cloudservicequerysetrequest)             | [CloudServiceQuerySetInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#cloudservicequerysetinfo)   |
| [**disable**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#disable) | [CloudServiceQuerySetRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#cloudservicequerysetrequest)             | [CloudServiceQuerySetInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#cloudservicequerysetinfo)   |
| [**get**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#get)         | [CloudServiceQuerySetRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#cloudservicequerysetrequest)             | [CloudServiceQuerySetInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#cloudservicequerysetinfo)   |
| [**list**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#list)       | [CloudServiceQuerySetQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#cloudservicequerysetquery)                 | [CloudServiceQuerySetsInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#cloudservicequerysetsinfo) |
| [**stat**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#stat)       | [CloudServiceQuerySetStatQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#cloudservicequerysetstatquery)         | [Struct](https://github.com/cloudforet-io/api-doc/blob/master/content/en/inventory/v1/CloudServiceQuerySet/README.md#struct)                                       |

\


### create

Create a new query set. Periodic statistics data is created based on the query set. `query` parameters refer to AnalyzeQuery.

> **POST** /inventory/v1/cloud-service-query-set/create

\{{< tabs " create " >\}}

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

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

* **name** (string) `Required`
* **query\_options** (AnalyzeQuery) `Required`
* **provider** (string) `Required`
* **cloud\_service\_group** (string) `Required`
* **cloud\_service\_type** (string) `Required`
* **resource\_group** (ResourceGroup) `Required`
* **unit** (Struct)
* **tags** (Struct)
* **workspace\_id** (string)

\{{< highlight json >\}} { "name": "EC2 Count by Instance Type", "query\_options": "", "unit": { "Disk Size": "GB", "Memory": "GB", "CPU": "Core" }, "provider": "aws", "cloud\_service\_group": "EC2", "cloud\_service\_type": "Instance", "tags": { "foo": "bar" } } \{{< /highlight >\}} \{{< /tab >\}}

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

[CloudServiceQuerySetInfo](#CLOUDSERVICEQUERYSETINFO)

* **query\_set\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **query\_options** (AnalyzeQuery) `Required`
* **query\_type** (QueryType) `Required`
* **unit** (Struct) `Required`
* **data\_keys** (string) `Repeated` `Required`
* **additional\_info\_keys** (string) `Repeated` `Required`
* **provider** (string) `Required`
* **cloud\_service\_group** (string) `Required`
* **cloud\_service\_type** (string) `Required`
* **tags** (Struct) `Required`
* **resource\_group** (ResourceGroup) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **created\_at** (string) `Required`
* **updated\_at** (string) `Required`

\{{< highlight json >\}} { "query\_set\_id": "query-set-abcd1234", "name": "EC2 Count by Instance Type", "state": "ENABLED", "query\_options": "", "query\_type": "MANAGED", "unit": { "Disk Size": "GB", "Memory": "GB", "CPU": "Core" }, "data\_keys": \[ "Disk Size", "Memory", "CPU ], "additional\_info\_keys": \[ "instance\_type" ], "provider": "aws", "cloud\_service\_group": "EC2", "cloud\_service\_type": "Instance", "tags": { "foo": "bar" }, "domain\_id": "domain-58010aa2e451", "created\_at": "2022-06-22T01:38:16.301Z" "updated\_at": "2023-03-16T06:00:00.000Z" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### update

Update a specific query set. You can only update the query set of custom type.

> **POST** /inventory/v1/cloud-service-query-set/update

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

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

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

* **query\_set\_id** (string) `Required`
* **name** (string)
* **query\_options** (AnalyzeQuery)
* **unit** (Struct)
* **tags** (Struct)

\{{< highlight json >\}} { "query\_set\_id": "query-set-abcd1234", "name": "Changed Name", "query\_options": "", "unit": { "Disk Size": "GB", "Memory": "GB", "CPU": "Core" }, "tags": { "changed\_key": "changed\_value" } } \{{< /highlight >\}} \{{< /tab >\}}

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

[CloudServiceQuerySetInfo](#CLOUDSERVICEQUERYSETINFO)

* **query\_set\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **query\_options** (AnalyzeQuery) `Required`
* **query\_type** (QueryType) `Required`
* **unit** (Struct) `Required`
* **data\_keys** (string) `Repeated` `Required`
* **additional\_info\_keys** (string) `Repeated` `Required`
* **provider** (string) `Required`
* **cloud\_service\_group** (string) `Required`
* **cloud\_service\_type** (string) `Required`
* **tags** (Struct) `Required`
* **resource\_group** (ResourceGroup) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **created\_at** (string) `Required`
* **updated\_at** (string) `Required`

\{{< highlight json >\}} { "query\_set\_id": "query-set-abcd1234", "name": "EC2 Count by Instance Type", "state": "ENABLED", "query\_options": "", "query\_type": "MANAGED", "unit": { "Disk Size": "GB", "Memory": "GB", "CPU": "Core" }, "data\_keys": \[ "Disk Size", "Memory", "CPU ], "additional\_info\_keys": \[ "instance\_type" ], "provider": "aws", "cloud\_service\_group": "EC2", "cloud\_service\_type": "Instance", "tags": { "foo": "bar" }, "domain\_id": "domain-58010aa2e451", "created\_at": "2022-06-22T01:38:16.301Z" "updated\_at": "2023-03-16T06:00:00.000Z" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### delete

Delete a specific query set.

> **POST** /inventory/v1/cloud-service-query-set/delete

\{{< tabs " delete " >\}}

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

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

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

\{{< highlight json >\}} { "query\_set\_id": "query-set-abcd1234" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### run

Run a specific query set and store the result in the statistics data.

> **POST** /inventory/v1/cloud-service-query-set/run

\{{< tabs " run " >\}}

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

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

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

\{{< highlight json >\}} { "query\_set\_id": "query-set-abcd1234" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### test

Run a specific query set and store the result in the statistics data.

> **POST** /inventory/v1/cloud-service-query-set/test

\{{< tabs " test " >\}}

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

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

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

\{{< highlight json >\}} { "query\_set\_id": "query-set-abcd1234" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### enable

Enable a specific query set.

> **POST** /inventory/v1/cloud-service-query-set/enable

\{{< tabs " enable " >\}}

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

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

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

\{{< highlight json >\}} { "query\_set\_id": "query-set-abcd1234" } \{{< /highlight >\}} \{{< /tab >\}}

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

[CloudServiceQuerySetInfo](#CLOUDSERVICEQUERYSETINFO)

* **query\_set\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **query\_options** (AnalyzeQuery) `Required`
* **query\_type** (QueryType) `Required`
* **unit** (Struct) `Required`
* **data\_keys** (string) `Repeated` `Required`
* **additional\_info\_keys** (string) `Repeated` `Required`
* **provider** (string) `Required`
* **cloud\_service\_group** (string) `Required`
* **cloud\_service\_type** (string) `Required`
* **tags** (Struct) `Required`
* **resource\_group** (ResourceGroup) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **created\_at** (string) `Required`
* **updated\_at** (string) `Required`

\{{< highlight json >\}} { "query\_set\_id": "query-set-abcd1234", "name": "EC2 Count by Instance Type", "state": "ENABLED", "query\_options": "", "query\_type": "MANAGED", "unit": { "Disk Size": "GB", "Memory": "GB", "CPU": "Core" }, "data\_keys": \[ "Disk Size", "Memory", "CPU ], "additional\_info\_keys": \[ "instance\_type" ], "provider": "aws", "cloud\_service\_group": "EC2", "cloud\_service\_type": "Instance", "tags": { "foo": "bar" }, "domain\_id": "domain-58010aa2e451", "created\_at": "2022-06-22T01:38:16.301Z" "updated\_at": "2023-03-16T06:00:00.000Z" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### disable

Disable a specific query set. query set is not executed when disabled.

> **POST** /inventory/v1/cloud-service-query-set/disable

\{{< tabs " disable " >\}}

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

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

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

\{{< highlight json >\}} { "query\_set\_id": "query-set-abcd1234" } \{{< /highlight >\}} \{{< /tab >\}}

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

[CloudServiceQuerySetInfo](#CLOUDSERVICEQUERYSETINFO)

* **query\_set\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **query\_options** (AnalyzeQuery) `Required`
* **query\_type** (QueryType) `Required`
* **unit** (Struct) `Required`
* **data\_keys** (string) `Repeated` `Required`
* **additional\_info\_keys** (string) `Repeated` `Required`
* **provider** (string) `Required`
* **cloud\_service\_group** (string) `Required`
* **cloud\_service\_type** (string) `Required`
* **tags** (Struct) `Required`
* **resource\_group** (ResourceGroup) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **created\_at** (string) `Required`
* **updated\_at** (string) `Required`

\{{< highlight json >\}} { "query\_set\_id": "query-set-abcd1234", "name": "EC2 Count by Instance Type", "state": "ENABLED", "query\_options": "", "query\_type": "MANAGED", "unit": { "Disk Size": "GB", "Memory": "GB", "CPU": "Core" }, "data\_keys": \[ "Disk Size", "Memory", "CPU ], "additional\_info\_keys": \[ "instance\_type" ], "provider": "aws", "cloud\_service\_group": "EC2", "cloud\_service\_type": "Instance", "tags": { "foo": "bar" }, "domain\_id": "domain-58010aa2e451", "created\_at": "2022-06-22T01:38:16.301Z" "updated\_at": "2023-03-16T06:00:00.000Z" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### get

Get a specific query set.

> **POST** /inventory/v1/cloud-service-query-set/get

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

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

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

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

\{{< highlight json >\}} { "query\_set\_id": "query-set-abcd1234" } \{{< /highlight >\}} \{{< /tab >\}}

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

[CloudServiceQuerySetInfo](#CLOUDSERVICEQUERYSETINFO)

* **query\_set\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **query\_options** (AnalyzeQuery) `Required`
* **query\_type** (QueryType) `Required`
* **unit** (Struct) `Required`
* **data\_keys** (string) `Repeated` `Required`
* **additional\_info\_keys** (string) `Repeated` `Required`
* **provider** (string) `Required`
* **cloud\_service\_group** (string) `Required`
* **cloud\_service\_type** (string) `Required`
* **tags** (Struct) `Required`
* **resource\_group** (ResourceGroup) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **created\_at** (string) `Required`
* **updated\_at** (string) `Required`

\{{< highlight json >\}} { "query\_set\_id": "query-set-abcd1234", "name": "EC2 Count by Instance Type", "state": "ENABLED", "query\_options": "", "query\_type": "MANAGED", "unit": { "Disk Size": "GB", "Memory": "GB", "CPU": "Core" }, "data\_keys": \[ "Disk Size", "Memory", "CPU ], "additional\_info\_keys": \[ "instance\_type" ], "provider": "aws", "cloud\_service\_group": "EC2", "cloud\_service\_type": "Instance", "tags": { "foo": "bar" }, "domain\_id": "domain-58010aa2e451", "created\_at": "2022-06-22T01:38:16.301Z" "updated\_at": "2023-03-16T06:00:00.000Z" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### list

Gets a list of all query sets. You can use a query to get a filtered list of query sets.

> **POST** /inventory/v1/cloud-service-query-set/list

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

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

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

* **query** (Query)
* **query\_set\_id** (string)
* **name** (string)
* **state** (State)
* **query\_type** (QueryType)
* **provider** (string)
* **cloud\_service\_group** (string)
* **cloud\_service\_type** (string)
* **workspace\_id** (string)

\{{< highlight json >\}} { "query": , "query\_set\_id": "query-set-abcd1234", "name": "EC2 Count by Instance Type", "state": "ENABLED", "query\_type": "MANAGED", "provider": "aws", "cloud\_service\_group": "EC2", "cloud\_service\_type": "Instance", "resource\_group": "DOMAIN", } \{{< /highlight >\}} \{{< /tab >\}}

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

[CloudServiceQuerySetsInfo](#CLOUDSERVICEQUERYSETSINFO)

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

\{{< highlight json >\}} { "results": \[ { "query\_set\_id": "query-set-abcd1234", "name": "EC2 Count by Instance Type", "state": "ENABLED", "query\_type": "MANAGED", "query\_options": "", "unit": { "Disk Size": "GB", "Memory": "GB", "CPU": "Core" }, "data\_keys": \[ "Disk Size", "Memory", "CPU ], "additional\_info\_keys": \[ "instance\_type" ], "provider": "aws", "cloud\_service\_group": "EC2", "cloud\_service\_type": "Instance", "tags": { "foo": "bar" }, "domain\_id": "domain-58010aa2e451", "created\_at": "2022-06-22T01:38:16.301Z", "updated\_at": "2023-03-16T06:00:00.000Z" }, {...} ], "total\_count": 2 } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### stat

> **POST** /inventory/v1/cloud-service-query-set/stat

\
\


## Message

### CloudServiceQuerySetInfo

* **query\_set\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **query\_options** (AnalyzeQuery) `Required`
* **query\_type** (QueryType) `Required`
* **unit** (Struct) `Required`
* **data\_keys** (string) `Repeated` `Required`
* **additional\_info\_keys** (string) `Repeated` `Required`
* **provider** (string) `Required`
* **cloud\_service\_group** (string) `Required`
* **cloud\_service\_type** (string) `Required`
* **tags** (Struct) `Required`
* **resource\_group** (ResourceGroup) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **created\_at** (string) `Required`
*   **updated\_at** (string) `Required`

    \


### CloudServiceQuerySetQuery

* **query** (Query)
* **query\_set\_id** (string)
* **name** (string)
* **state** (State)
* **query\_type** (QueryType)
* **provider** (string)
* **cloud\_service\_group** (string)
* **cloud\_service\_type** (string)
*   **workspace\_id** (string)

    \


### CloudServiceQuerySetRequest

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

    \


### CloudServiceQuerySetStatQuery

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

    \


### CloudServiceQuerySetsInfo

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

    \


### CreateCloudServiceQuerySetRequest

* **name** (string) `Required`
* **query\_options** (AnalyzeQuery) `Required`
* **provider** (string) `Required`
* **cloud\_service\_group** (string) `Required`
* **cloud\_service\_type** (string) `Required`
* **resource\_group** (ResourceGroup) `Required`
* **unit** (Struct)
* **tags** (Struct)
*   **workspace\_id** (string)

    \


### UpdateCloudServiceQuerySetRequest

* **query\_set\_id** (string) `Required`
* **name** (string)
* **query\_options** (AnalyzeQuery)
* **unit** (Struct)
*   **tags** (Struct)

    \
