> For the complete documentation index, see [llms.txt](https://spaceone-dev.gitbook.io/spaceone-apis/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://spaceone-dev.gitbook.io/spaceone-apis/identity/v1/role-binding.md).

# Role Binding

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

## RoleBinding

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

| Method                | Request                                               | Response                                                                                                           |
| --------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| [**create**](#create) | [CreateRoleBindingRequest](#createrolebindingrequest) | [RoleBindingInfo](#rolebindinginfo)                                                                                |
| [**update**](#update) | [UpdateRoleBindingRequest](#updaterolebindingrequest) | [RoleBindingInfo](#rolebindinginfo)                                                                                |
| [**delete**](#delete) | [RoleBindingRequest](#rolebindingrequest)             | [google.protobuf.Empty](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto)   |
| [**get**](#get)       | [GetRoleBindingRequest](#getrolebindingrequest)       | [RoleBindingInfo](#rolebindinginfo)                                                                                |
| [**list**](#list)     | [RoleBindingQuery](#rolebindingquery)                 | [RoleBindingsInfo](#rolebindingsinfo)                                                                              |
| [**stat**](#stat)     | [RoleBindingStatQuery](#rolebindingstatquery)         | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |

### create

> **POST** /identity/v1/role-bindings

| Type     | Message                                               |
| -------- | ----------------------------------------------------- |
| Request  | [CreateRoleBindingRequest](#createrolebindingrequest) |
| Response | [RoleBindingInfo](#rolebindinginfo)                   |

### update

> **PUT** /identity/v1/role-bindings/{role\_binding\_id}

| Type     | Message                                               |
| -------- | ----------------------------------------------------- |
| Request  | [UpdateRoleBindingRequest](#updaterolebindingrequest) |
| Response | [RoleBindingInfo](#rolebindinginfo)                   |

### delete

> **DELETE** /identity/v1/role-bindings/{role\_binding\_id}

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

### get

> **GET** /identity/v1/role-bindings/{role\_binding\_id}

| Type     | Message                                         |
| -------- | ----------------------------------------------- |
| Request  | [GetRoleBindingRequest](#getrolebindingrequest) |
| Response | [RoleBindingInfo](#rolebindinginfo)             |

### list

> **GET** /identity/v1/role-bindings
>
> **POST** /identity/v1/role-bindings/search

| Type     | Message                               |
| -------- | ------------------------------------- |
| Request  | [RoleBindingQuery](#rolebindingquery) |
| Response | [RoleBindingsInfo](#rolebindingsinfo) |

### stat

> **POST** /identity/v1/roles/stat

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

##

## Message

### CreateRoleBindingRequest

| Field              | Type                                                                                                               | Required | Description |
| ------------------ | ------------------------------------------------------------------------------------------------------------------ | :------: | ----------- |
| resource\_type     | string                                                                                                             |     ✔    |             |
| resource\_id       | string                                                                                                             |     ✔    |             |
| role\_id           | string                                                                                                             |     ✔    |             |
| project\_id        | string                                                                                                             |     ✘    |             |
| project\_group\_id | string                                                                                                             |     ✘    |             |
| labels             | [google.protobuf.ListValue](https://developers.google.com/protocol-buffers/docs/reference/overview)                |     ✘    |             |
| tags               | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |     ✘    |             |
| domain\_id         | string                                                                                                             |     ✔    |             |

### GetRoleBindingRequest

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

### RoleBindingInfo

| Field                | Type                                                                                                               | Description |
| -------------------- | ------------------------------------------------------------------------------------------------------------------ | ----------- |
| role\_binding\_id    | string                                                                                                             |             |
| resource\_type       | string                                                                                                             |             |
| resource\_id         | string                                                                                                             |             |
| role\_info           | [RoleInfo](#roleinfo)                                                                                              |             |
| project\_info        | [ProjectInfo](#projectinfo)                                                                                        |             |
| project\_group\_info | [ProjectGroupInfo](#projectgroupinfo)                                                                              |             |
| labels               | [google.protobuf.ListValue](https://developers.google.com/protocol-buffers/docs/reference/overview)                |             |
| tags                 | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |
| domain\_id           | string                                                                                                             |             |
| created\_at          | string                                                                                                             |             |

### RoleBindingQuery

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

### RoleBindingRequest

| Field             | Type   | Required | Description |
| ----------------- | ------ | :------: | ----------- |
| role\_binding\_id | string |     ✔    |             |
| domain\_id        | string |     ✔    |             |

### RoleBindingStatQuery

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

### RoleBindingsInfo

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

### UpdateRoleBindingRequest

| Field             | Type                                                                                                               | Required | Description |
| ----------------- | ------------------------------------------------------------------------------------------------------------------ | :------: | ----------- |
| role\_binding\_id | string                                                                                                             |     ✔    |             |
| labels            | [google.protobuf.ListValue](https://developers.google.com/protocol-buffers/docs/reference/overview)                |     ✘    |             |
| tags              | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |     ✘    |             |
| domain\_id        | string                                                                                                             |     ✔    |             |
