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

# ServiceAccount

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

\ <br>

## ServiceAccount

**ServiceAccount Methods:**

| Method                                                                                                                                              | Request                                                                                                                                                                     | Response                                                                                                                                        |
| --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| [**create**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#create)                           | [CreateServiceAccountRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#createserviceaccountrequest)             | [ServiceAccountInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#serviceaccountinfo)   |
| [**update**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#update)                           | [UpdateServiceAccountRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#updateserviceaccountrequest)             | [ServiceAccountInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#serviceaccountinfo)   |
| [**update\_secret\_data**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#update_secret_data) | [UpdateServiceAccountSecretRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#updateserviceaccountsecretrequest) | [ServiceAccountInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#serviceaccountinfo)   |
| [**delete\_secret\_data**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#delete_secret_data) | [ServiceAccountRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#serviceaccountrequest)                         | [ServiceAccountInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#serviceaccountinfo)   |
| [**delete**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#delete)                           | [ServiceAccountRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#serviceaccountrequest)                         | [Empty](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#empty)                             |
| [**get**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#get)                                 | [ServiceAccountRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#serviceaccountrequest)                         | [ServiceAccountInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#serviceaccountinfo)   |
| [**list**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#list)                               | [ServiceAccountSearchQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#serviceaccountsearchquery)                 | [ServiceAccountsInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#serviceaccountsinfo) |
| [**stat**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#stat)                               | [ServiceAccountStatQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#serviceaccountstatquery)                     | [Struct](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#struct)                           |

<br>

### create

> **POST** /identity/v2/service-account/create

{{< tabs " create " >}}

{{< tab "Request Example" >}}

[CreateServiceAccountRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#createserviceaccountrequest)

* **name** (string) `Required`
* **data** (Struct) `Required`
* **provider** (string) `Required`
* **project\_id** (string) `Required`
* **secret\_schema\_id** (string)
* **secret\_data** (Struct)
* **tags** (Struct)
* **trusted\_account\_id** (string)

{{< highlight json >}} { "name": "woony-service-account", "data": { "account\_id": "a1b2c3d4e5f6" }, "provider": "aws", "secret\_schema\_id": "aws-secret-access-key", "secret\_data": { "aws\_access\_key\_id": "a1b2c3d4e5f6", "aws\_secret\_access\_key": "a1b2c3d4e5f6" }, "project\_id": "project-a1b2c3d4e5f6" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

[ServiceAccountInfo](#SERVICEACCOUNTINFO)

* **service\_account\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **data** (Struct) `Required`
* **provider** (string) `Required`
* **tags** (Struct) `Required`
* **reference\_id** (string) `Required`
* **is\_managed** (bool) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **project\_id** (string) `Required`
* **trusted\_account\_id** (string) `Required`
* **secret\_schema\_id** (string) `Required`
* **secret\_id** (string) `Required`
* **created\_at** (string) `Required`
* **last\_synced\_at** (string) `Required`
* **deleted\_at** (string) `Required`
* **inactivated\_at** (string) `Required`

{{< highlight json >}} { "created\_at": "2024-11-18T05:39:08.732Z", "data": { "account\_id": "a1b2c3d4e5f6" }, "domain\_id": "domain-a1b2c3d4e5f6", "name": "test-service-account", "project\_id": "project-a1b2c3d4e5f6", "provider": "aws", "secret\_id": "secret-a1b2c3d4e5f6", "secret\_schema\_id": "aws-secret-access-key", "service\_account\_id": "sa-a1b2c3d4e5f6", "state": "ACTIVE", "workspace\_id": "workspace-a1b2c3d4e5f6" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

<br>

### update

> **POST** /identity/v2/service-account/update

{{< tabs " update " >}}

{{< tab "Request Example" >}}

[UpdateServiceAccountRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#updateserviceaccountrequest)

* **service\_account\_id** (string) `Required`
* **name** (string)
* **data** (Struct)
* **tags** (Struct)
* **project\_id** (string)

{{< highlight json >}} { "service\_account\_id": "sa-a1b2c3d4e5f6", "project\_id": "project-a1b2c3d4e5f6" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

[ServiceAccountInfo](#SERVICEACCOUNTINFO)

* **service\_account\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **data** (Struct) `Required`
* **provider** (string) `Required`
* **tags** (Struct) `Required`
* **reference\_id** (string) `Required`
* **is\_managed** (bool) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **project\_id** (string) `Required`
* **trusted\_account\_id** (string) `Required`
* **secret\_schema\_id** (string) `Required`
* **secret\_id** (string) `Required`
* **created\_at** (string) `Required`
* **last\_synced\_at** (string) `Required`
* **deleted\_at** (string) `Required`
* **inactivated\_at** (string) `Required`

{{< highlight json >}} { "created\_at": "2024-11-18T05:39:08.732Z", "data": { "account\_id": "a1b2c3d4e5f6" }, "domain\_id": "domain-a1b2c3d4e5f6", "name": "test-service-account", "project\_id": "project-a1b2c3d4e5f6", "provider": "aws", "secret\_id": "secret-a1b2c3d4e5f6", "secret\_schema\_id": "aws-secret-access-key", "service\_account\_id": "sa-a1b2c3d4e5f6", "state": "ACTIVE", "workspace\_id": "workspace-a1b2c3d4e5f6" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

<br>

### update\_secret\_data

> **POST** /identity/v2/service-account/update-secret-data

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

{{< tab "Request Example" >}}

[UpdateServiceAccountSecretRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#updateserviceaccountsecretrequest)

* **service\_account\_id** (string) `Required`
* **secret\_schema\_id** (string) `Required`
* **secret\_data** (Struct) `Required`
* **trusted\_account\_id** (string)

{{< highlight json >}} { "service\_account\_id": "sa-a1b2c3d4e5f6", "secret\_schema\_id": "aws-secret-access-key", "secret\_data": { "aws\_access\_key\_id": "a1b2c3d4e5f6", "aws\_secret\_access\_key": "a1b2c3d4e5f6" } } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

[ServiceAccountInfo](#SERVICEACCOUNTINFO)

* **service\_account\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **data** (Struct) `Required`
* **provider** (string) `Required`
* **tags** (Struct) `Required`
* **reference\_id** (string) `Required`
* **is\_managed** (bool) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **project\_id** (string) `Required`
* **trusted\_account\_id** (string) `Required`
* **secret\_schema\_id** (string) `Required`
* **secret\_id** (string) `Required`
* **created\_at** (string) `Required`
* **last\_synced\_at** (string) `Required`
* **deleted\_at** (string) `Required`
* **inactivated\_at** (string) `Required`

{{< highlight json >}} { "created\_at": "2024-11-18T05:39:08.732Z", "data": { "account\_id": "a1b2c3d4e5f6" }, "domain\_id": "domain-a1b2c3d4e5f6", "name": "test-service-account", "project\_id": "project-a1b2c3d4e5f6", "provider": "aws", "secret\_id": "secret-a1b2c3d4e5f6", "secret\_schema\_id": "aws-secret-access-key", "service\_account\_id": "sa-a1b2c3d4e5f6", "state": "ACTIVE", "workspace\_id": "workspace-a1b2c3d4e5f6" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

<br>

### delete\_secret\_data

> **POST** /identity/v2/service-account/delete-secret-data

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

{{< tab "Request Example" >}}

[ServiceAccountRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#serviceaccountrequest)

* **service\_account\_id** (string) `Required`

{{< highlight json >}} { "service\_account\_id": "sa-a1b2c3d4e5f6" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

[ServiceAccountInfo](#SERVICEACCOUNTINFO)

* **service\_account\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **data** (Struct) `Required`
* **provider** (string) `Required`
* **tags** (Struct) `Required`
* **reference\_id** (string) `Required`
* **is\_managed** (bool) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **project\_id** (string) `Required`
* **trusted\_account\_id** (string) `Required`
* **secret\_schema\_id** (string) `Required`
* **secret\_id** (string) `Required`
* **created\_at** (string) `Required`
* **last\_synced\_at** (string) `Required`
* **deleted\_at** (string) `Required`
* **inactivated\_at** (string) `Required`

{{< highlight json >}} { "created\_at": "2024-11-18T05:39:08.732Z", "data": { "account\_id": "a1b2c3d4e5f6" }, "domain\_id": "domain-a1b2c3d4e5f6", "name": "test-service-account", "project\_id": "project-a1b2c3d4e5f6", "provider": "aws", "secret\_id": "secret-a1b2c3d4e5f6", "secret\_schema\_id": "aws-secret-access-key", "service\_account\_id": "sa-a1b2c3d4e5f6", "state": "ACTIVE", "workspace\_id": "workspace-a1b2c3d4e5f6" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

<br>

### delete

> **POST** /identity/v2/service-account/delete

{{< tabs " delete " >}}

{{< tab "Request Example" >}}

[ServiceAccountRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#serviceaccountrequest)

* **service\_account\_id** (string) `Required`

{{< highlight json >}} { "service\_account\_id": "sa-a1b2c3d4e5f6" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

<br>

### get

> **POST** /identity/v2/service-account/get

{{< tabs " get " >}}

{{< tab "Request Example" >}}

[ServiceAccountRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#serviceaccountrequest)

* **service\_account\_id** (string) `Required`

{{< highlight json >}} { "service\_account\_id": "sa-a1b2c3d4e5f6" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

[ServiceAccountInfo](#SERVICEACCOUNTINFO)

* **service\_account\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **data** (Struct) `Required`
* **provider** (string) `Required`
* **tags** (Struct) `Required`
* **reference\_id** (string) `Required`
* **is\_managed** (bool) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **project\_id** (string) `Required`
* **trusted\_account\_id** (string) `Required`
* **secret\_schema\_id** (string) `Required`
* **secret\_id** (string) `Required`
* **created\_at** (string) `Required`
* **last\_synced\_at** (string) `Required`
* **deleted\_at** (string) `Required`
* **inactivated\_at** (string) `Required`

{{< highlight json >}} { "created\_at": "2024-11-18T05:39:08.732Z", "data": { "account\_id": "a1b2c3d4e5f6" }, "domain\_id": "domain-a1b2c3d4e5f6", "name": "test-service-account", "project\_id": "project-a1b2c3d4e5f6", "provider": "aws", "secret\_id": "secret-a1b2c3d4e5f6", "secret\_schema\_id": "aws-secret-access-key", "service\_account\_id": "sa-a1b2c3d4e5f6", "state": "ACTIVE", "workspace\_id": "workspace-a1b2c3d4e5f6" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

<br>

### list

> **POST** /identity/v2/service-account/list

{{< tabs " list " >}}

{{< tab "Request Example" >}}

[ServiceAccountSearchQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/ServiceAccount/README.md#serviceaccountsearchquery)

* **query** (Query)
* **service\_account\_id** (string)
* **name** (string)
* **state** (string)
* **provider** (string)
* **workspace\_id** (string)
* **project\_id** (string)
* **trusted\_account\_id** (string)
* **secret\_schema\_id** (string)
* **secret\_id** (string)

{{< highlight json >}} { "provider": "aws", "query": { "page": { "start": 1, "limit": 10 }, "sort": \[ { "key": "created\_at", "desc": true } ] } } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

[ServiceAccountsInfo](#SERVICEACCOUNTSINFO)

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

{{< highlight json >}} { "results": \[ { "created\_at": "2024-11-18T06:03:09.191Z", "data": { "account\_id": "a1b2c3d4e5f6" }, "domain\_id": "domain-a1b2c3d4e5f6", "name": "woony-service-account", "project\_id": "project-a1b2c3d4e5f6", "provider": "aws", "service\_account\_id": "sa-a1b2c3d4e5f6", "state": "ACTIVE", "tags": {}, "workspace\_id": "workspace-a1b2c3d4e5f6" }, { "created\_at": "2024-11-18T05:48:49.783Z", "data": { "account\_id": "g7h8i9j1k2l3" }, "domain\_id": "domain-a1b2c3d4e5f6", "name": "cloudforet-service-account", "project\_id": "project-g7h8i9j1k2l3", "provider": "aws", "secret\_id": "secret-g7h8i9j1k2l3", "secret\_schema\_id": "aws-secret-access-key", "service\_account\_id": "sa-g7h8i9j1k2l3", "state": "ACTIVE", "tags": {}, "workspace\_id": "workspace-g7h8i9j1k2l3" } ], "total\_count": 2 } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

<br>

### stat

> **POST** /identity/v2/service-account/stat

\ <br>

## Message

### CreateServiceAccountRequest

* **name** (string) `Required`
* **data** (Struct) `Required`
* **provider** (string) `Required`
* **project\_id** (string) `Required`
* **secret\_schema\_id** (string)
* **secret\_data** (Struct)
* **tags** (Struct)
* **trusted\_account\_id** (string)

  <br>

### ServiceAccountInfo

* **service\_account\_id** (string) `Required`
* **name** (string) `Required`
* **state** (State) `Required`
* **data** (Struct) `Required`
* **provider** (string) `Required`
* **tags** (Struct) `Required`
* **reference\_id** (string) `Required`
* **is\_managed** (bool) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **project\_id** (string) `Required`
* **trusted\_account\_id** (string) `Required`
* **secret\_schema\_id** (string) `Required`
* **secret\_id** (string) `Required`
* **created\_at** (string) `Required`
* **last\_synced\_at** (string) `Required`
* **deleted\_at** (string) `Required`
* **inactivated\_at** (string) `Required`

  <br>

### ServiceAccountRequest

* **service\_account\_id** (string) `Required`

  <br>

### ServiceAccountSearchQuery

* **query** (Query)
* **service\_account\_id** (string)
* **name** (string)
* **state** (string)
* **provider** (string)
* **workspace\_id** (string)
* **project\_id** (string)
* **trusted\_account\_id** (string)
* **secret\_schema\_id** (string)
* **secret\_id** (string)

  <br>

### ServiceAccountStatQuery

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

  <br>

### ServiceAccountsInfo

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

  <br>

### UpdateServiceAccountRequest

* **service\_account\_id** (string) `Required`
* **name** (string)
* **data** (Struct)
* **tags** (Struct)
* **project\_id** (string)

  <br>

### UpdateServiceAccountSecretRequest

* **service\_account\_id** (string) `Required`
* **secret\_schema\_id** (string) `Required`
* **secret\_data** (Struct) `Required`
* **trusted\_account\_id** (string)

  <br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://cloudforet.gitbook.io/cloudforet-apis/content/en/identity/v2/serviceaccount.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.
