# Resource Group

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

## ResourceGroup

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

| Method                | Request                                                   | Response                                                                                                           |
| --------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| [**create**](#create) | [CreateResourceGroupRequest](#createresourcegrouprequest) | [ResourceGroupInfo](#resourcegroupinfo)                                                                            |
| [**update**](#update) | [UpdateResourceGroupRequest](#updateresourcegrouprequest) | [ResourceGroupInfo](#resourcegroupinfo)                                                                            |
| [**delete**](#delete) | [ResourceGroupRequest](#resourcegrouprequest)             | [google.protobuf.Empty](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto)   |
| [**get**](#get)       | [GetResourceGroupRequest](#getresourcegrouprequest)       | [ResourceGroupInfo](#resourcegroupinfo)                                                                            |
| [**list**](#list)     | [ResourceGroupQuery](#resourcegroupquery)                 | [ResourceGroupsInfo](#resourcegroupsinfo)                                                                          |
| [**stat**](#stat)     | [ResourceGroupStatQuery](#resourcegroupstatquery)         | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |

### create

> **POST** /inventory/v1/resource-groups

| Type     | Message                                                   |
| -------- | --------------------------------------------------------- |
| Request  | [CreateResourceGroupRequest](#createresourcegrouprequest) |
| Response | [ResourceGroupInfo](#resourcegroupinfo)                   |

### update

> **PUT** /inventory/v1/resource-group/{resource\_group\_id}

| Type     | Message                                                   |
| -------- | --------------------------------------------------------- |
| Request  | [UpdateResourceGroupRequest](#updateresourcegrouprequest) |
| Response | [ResourceGroupInfo](#resourcegroupinfo)                   |

### delete

> **DELETE** /inventory/v1/resource-group/{resource\_group\_id}

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

### get

> **GET** /inventory/v1/resource-group/{resource\_group\_id}

| Type     | Message                                             |
| -------- | --------------------------------------------------- |
| Request  | [GetResourceGroupRequest](#getresourcegrouprequest) |
| Response | [ResourceGroupInfo](#resourcegroupinfo)             |

### list

> **GET** /inventory/v1/resource-groups
>
> **POST** /inventory/v1/resource-groups/search

| Type     | Message                                   |
| -------- | ----------------------------------------- |
| Request  | [ResourceGroupQuery](#resourcegroupquery) |
| Response | [ResourceGroupsInfo](#resourcegroupsinfo) |

### stat

> **POST** /inventory/v1/resource-groups/stat

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

##

## Message

### CreateResourceGroupRequest

| Field       | Type                                                                                                               | Required | Description |
| ----------- | ------------------------------------------------------------------------------------------------------------------ | :------: | ----------- |
| name        | string                                                                                                             |     ✔    |             |
| resources   | [list of Resource](#resource)                                                                                      |     ✔    |             |
| 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) |     ✘    |             |
| project\_id | string                                                                                                             |     ✔    |             |
| domain\_id  | string                                                                                                             |     ✔    |             |

### GetResourceGroupRequest

| Field               | Type           | Required | Description |
| ------------------- | -------------- | :------: | ----------- |
| resource\_group\_id | string         |     ✔    |             |
| domain\_id          | string         |     ✔    |             |
| only                | list of string |     ✘    |             |

### Resource

| Field          | Type                                                                                                | Required | Description |
| -------------- | --------------------------------------------------------------------------------------------------- | :------: | ----------- |
| resource\_type | string                                                                                              |     ✔    |             |
| filter         | [google.protobuf.ListValue](https://developers.google.com/protocol-buffers/docs/reference/overview) |     ✘    |             |
| keyword        | string                                                                                              |     ✘    |             |

### ResourceGroupInfo

| Field               | Type                                                                                                               | Description |
| ------------------- | ------------------------------------------------------------------------------------------------------------------ | ----------- |
| resource\_group\_id | string                                                                                                             |             |
| name                | string                                                                                                             |             |
| resources           | [list of Resource](#resource)                                                                                      |             |
| 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) |             |
| project\_id         | string                                                                                                             |             |
| domain\_id          | string                                                                                                             |             |
| created\_at         | string                                                                                                             |             |

### ResourceGroupQuery

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

### ResourceGroupRequest

| Field               | Type   | Required | Description |
| ------------------- | ------ | :------: | ----------- |
| resource\_group\_id | string |     ✔    |             |
| domain\_id          | string |     ✔    |             |

### ResourceGroupStatQuery

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

### ResourceGroupsInfo

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

### UpdateResourceGroupRequest

| Field               | Type                                                                                                               | Required | Description |
| ------------------- | ------------------------------------------------------------------------------------------------------------------ | :------: | ----------- |
| resource\_group\_id | string                                                                                                             |     ✔    |             |
| name                | string                                                                                                             |     ✘    |             |
| resources           | [list of Resource](#resource)                                                                                      |     ✘    |             |
| 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) |     ✘    |             |
| release\_project    | bool                                                                                                               |     ✘    |             |
| project\_id         | string                                                                                                             |     ✘    |             |
| 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/inventory/v1/resource-group.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.
