> 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/service-account.md).

# Service Account

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

## ServiceAccount

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

| Method                | Request                                                     | Response                                                                                                           |
| --------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| [**create**](#create) | [CreateServiceAccountRequest](#createserviceaccountrequest) | [ServiceAccountInfo](#serviceaccountinfo)                                                                          |
| [**update**](#update) | [UpdateServiceAccountRequest](#updateserviceaccountrequest) | [ServiceAccountInfo](#serviceaccountinfo)                                                                          |
| [**delete**](#delete) | [ServiceAccountRequest](#serviceaccountrequest)             | [google.protobuf.Empty](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto)   |
| [**get**](#get)       | [GetServiceAccountRequest](#getserviceaccountrequest)       | [ServiceAccountInfo](#serviceaccountinfo)                                                                          |
| [**list**](#list)     | [ServiceAccountQuery](#serviceaccountquery)                 | [ServiceAccountsInfo](#serviceaccountsinfo)                                                                        |
| [**stat**](#stat)     | [ServiceAccountStatQuery](#serviceaccountstatquery)         | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |

### create

> **POST** /identity/v1/service-accounts

| Type     | Message                                                     |
| -------- | ----------------------------------------------------------- |
| Request  | [CreateServiceAccountRequest](#createserviceaccountrequest) |
| Response | [ServiceAccountInfo](#serviceaccountinfo)                   |

### update

> **PUT** /identity/v1/service-account/{service\_account\_id}

| Type     | Message                                                     |
| -------- | ----------------------------------------------------------- |
| Request  | [UpdateServiceAccountRequest](#updateserviceaccountrequest) |
| Response | [ServiceAccountInfo](#serviceaccountinfo)                   |

### delete

> **DELETE** /identity/v1/service-account/{service\_account\_id}

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

### get

> **GET** /identity/v1/service-account/{service\_account\_id}

| Type     | Message                                               |
| -------- | ----------------------------------------------------- |
| Request  | [GetServiceAccountRequest](#getserviceaccountrequest) |
| Response | [ServiceAccountInfo](#serviceaccountinfo)             |

### list

> **GET** /identity/v1/service-accounts
>
> **POST** /identity/v1/service-accounts/search

| Type     | Message                                     |
| -------- | ------------------------------------------- |
| Request  | [ServiceAccountQuery](#serviceaccountquery) |
| Response | [ServiceAccountsInfo](#serviceaccountsinfo) |

### stat

> **POST** /identity/v1/service-accounts/stat

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

##

## Message

### CreateServiceAccountRequest

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

### GetServiceAccountRequest

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

### ServiceAccountInfo

| Field                | Type                                                                                                               | Description |
| -------------------- | ------------------------------------------------------------------------------------------------------------------ | ----------- |
| service\_account\_id | string                                                                                                             |             |
| name                 | string                                                                                                             |             |
| data                 | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |
| provider             | string                                                                                                             |             |
| project\_info        | [ProjectInfo](#projectinfo)                                                                                        |             |
| domain\_id           | string                                                                                                             |             |
| tags                 | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |
| created\_at          | string                                                                                                             |             |

### ServiceAccountQuery

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

### ServiceAccountRequest

| Field                | Type   | Required | Description |
| -------------------- | ------ | :------: | ----------- |
| service\_account\_id | string |     ✔    |             |
| domain\_id           | string |     ✔    |             |

### ServiceAccountStatQuery

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

### ServiceAccountsInfo

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

### UpdateServiceAccountRequest

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