# Cloud Service Type

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

## CloudServiceType

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

| NO | Method                     | Request Type                                                      | Response Type                                                                                                      | Description |
| -- | -------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ----------- |
| 1  | [**create**](#create)      | [CreateCloudServiceTypeRequest](#createcloudservicetyperequest)   | [CloudServiceTypeInfo](#cloudservicetypeinfo)                                                                      |             |
| 2  | [**update**](#update)      | [UpdateCloudServiceTypeRequest](#updatecloudservicetyperequest)   | [CloudServiceTypeInfo](#cloudservicetypeinfo)                                                                      |             |
| 3  | [**pin\_data**](#pin_data) | [PinCloudServiceTypeDataRequest](#pincloudservicetypedatarequest) | [CloudServiceTypeInfo](#cloudservicetypeinfo)                                                                      |             |
| 4  | [**delete**](#delete)      | [CloudServiceTypeRequest](#cloudservicetyperequest)               | [google.protobuf.Empty](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto)   |             |
| 5  | [**get**](#get)            | [GetCloudServiceTypeRequest](#getcloudservicetyperequest)         | [CloudServiceTypeInfo](#cloudservicetypeinfo)                                                                      |             |
| 6  | [**list**](#list)          | [CloudServiceTypeQuery](#cloudservicetypequery)                   | [CloudServiceTypesInfo](#cloudservicetypesinfo)                                                                    |             |
| 7  | [**stat**](#stat)          | [CloudServiceTypeStatQuery](#cloudservicetypestatquery)           | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |

### create

> **POST** /inventory/v1/cloud-service-types

| Type     | Message                                                         |
| -------- | --------------------------------------------------------------- |
| Request  | [CreateCloudServiceTypeRequest](#createcloudservicetyperequest) |
| Response | [CloudServiceTypeInfo](#cloudservicetypeinfo)                   |

### update

> **PUT** /inventory/v1/cloud-service-type/{cloud\_service\_type\_id}

| Type     | Message                                                         |
| -------- | --------------------------------------------------------------- |
| Request  | [UpdateCloudServiceTypeRequest](#updatecloudservicetyperequest) |
| Response | [CloudServiceTypeInfo](#cloudservicetypeinfo)                   |

### pin\_data

> **PUT** /inventory/v1/cloud-service-type/{cloud\_service\_type\_id}/pin-data

| Type     | Message                                                           |
| -------- | ----------------------------------------------------------------- |
| Request  | [PinCloudServiceTypeDataRequest](#pincloudservicetypedatarequest) |
| Response | [CloudServiceTypeInfo](#cloudservicetypeinfo)                     |

### delete

> **DELETE** /inventory/v1/cloud-service-type/{cloud\_service\_type\_id}

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

### get

> **GET** /inventory/v1/cloud-service-type/{cloud\_service\_type\_id}

| Type     | Message                                                   |
| -------- | --------------------------------------------------------- |
| Request  | [GetCloudServiceTypeRequest](#getcloudservicetyperequest) |
| Response | [CloudServiceTypeInfo](#cloudservicetypeinfo)             |

### list

> **GET** /inventory/v1/cloud-service-types
>
> **POST** /inventory/v1/cloud-service-types/search

| Type     | Message                                         |
| -------- | ----------------------------------------------- |
| Request  | [CloudServiceTypeQuery](#cloudservicetypequery) |
| Response | [CloudServiceTypesInfo](#cloudservicetypesinfo) |

### stat

> **POST** /inventory/v1/cloud-service-types/stat

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

## Message

### CloudServiceTypeInfo

| No | Field                    | Type                                                                                                               | Description |
| -- | ------------------------ | ------------------------------------------------------------------------------------------------------------------ | ----------- |
| 1  | cloud\_service\_type\_id | string                                                                                                             |             |
| 2  | name                     | string                                                                                                             |             |
| 3  | provider                 | string                                                                                                             |             |
| 4  | group                    | string                                                                                                             |             |
| 5  | service\_code            | string                                                                                                             |             |
| 6  | is\_primary              | bool                                                                                                               |             |
| 7  | is\_major                | bool                                                                                                               |             |
| 8  | resource\_type           | string                                                                                                             |             |
| 9  | metadata                 | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |
| 10 | tags                     | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |
| 11 | labels                   | [google.protobuf.ListValue](https://developers.google.com/protocol-buffers/docs/reference/overview)                |             |
| 12 | collection\_info         | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |
| 13 | domain\_id               | string                                                                                                             |             |
| 14 | created\_at              | string                                                                                                             |             |
| 15 | updated\_at              | string                                                                                                             |             |

### CloudServiceTypeQuery

| No | Field                    | Type                                                                                               | Required | Description |
| -- | ------------------------ | -------------------------------------------------------------------------------------------------- | -------- | ----------- |
| 1  | query                    | [spaceone.api.core.v1.Query](https://spaceone-dev.gitbook.io/api-reference/common-v1/search-query) | ❌        |             |
| 2  | cloud\_service\_type\_id | string                                                                                             | ❌        |             |
| 3  | name                     | string                                                                                             | ❌        |             |
| 4  | provider                 | string                                                                                             | ❌        |             |
| 5  | group                    | string                                                                                             | ❌        |             |
| 6  | service\_code            | string                                                                                             | ❌        |             |
| 7  | is\_primary              | bool                                                                                               | ❌        |             |
| 8  | is\_major                | bool                                                                                               | ❌        |             |
| 9  | resource\_type           | string                                                                                             | ❌        |             |
| 10 | domain\_id               | string                                                                                             | ✅        |             |

### CloudServiceTypeRequest

| No | Field                    | Type   | Required | Description |
| -- | ------------------------ | ------ | -------- | ----------- |
| 1  | cloud\_service\_type\_id | string | ✅        |             |
| 2  | domain\_id               | string | ✅        |             |

### CloudServiceTypeStatQuery

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

### CloudServiceTypesInfo

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

### CreateCloudServiceTypeRequest

| No | Field          | Type                                                                                                               | Required | Description |
| -- | -------------- | ------------------------------------------------------------------------------------------------------------------ | -------- | ----------- |
| 1  | name           | string                                                                                                             | ✅        |             |
| 2  | provider       | string                                                                                                             | ✅        |             |
| 3  | group          | string                                                                                                             | ✅        |             |
| 4  | service\_code  | string                                                                                                             | ❌        |             |
| 5  | is\_primary    | bool                                                                                                               | ❌        |             |
| 6  | is\_major      | bool                                                                                                               | ❌        |             |
| 7  | resource\_type | string                                                                                                             | ❌        |             |
| 8  | metadata       | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ❌        |             |
| 9  | labels         | [google.protobuf.ListValue](https://developers.google.com/protocol-buffers/docs/reference/overview)                | ❌        |             |
| 10 | tags           | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ❌        |             |
| 11 | domain\_id     | string                                                                                                             | ✅        |             |

### GetCloudServiceTypeRequest

| No | Field                    | Type           | Required | Description |
| -- | ------------------------ | -------------- | -------- | ----------- |
| 1  | cloud\_service\_type\_id | string         | ✅        |             |
| 2  | domain\_id               | string         | ✅        |             |
| 3  | only                     | list of string | ❌        |             |

### PinCloudServiceTypeDataRequest

| No | Field                    | Type           | Required | Description |
| -- | ------------------------ | -------------- | -------- | ----------- |
| 1  | cloud\_service\_type\_id | string         | ✅        |             |
| 2  | keys                     | list of string | ✅        |             |
| 3  | domain\_id               | string         | ✅        |             |

### UpdateCloudServiceTypeRequest

| No | Field                    | Type                                                                                                               | Required | Description |
| -- | ------------------------ | ------------------------------------------------------------------------------------------------------------------ | -------- | ----------- |
| 1  | cloud\_service\_type\_id | string                                                                                                             | ✅        |             |
| 2  | service\_code            | string                                                                                                             | ❌        |             |
| 3  | is\_primary              | bool                                                                                                               | ❌        |             |
| 4  | is\_major                | bool                                                                                                               | ❌        |             |
| 5  | resource\_type           | string                                                                                                             | ❌        |             |
| 6  | metadata                 | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ❌        |             |
| 7  | labels                   | [google.protobuf.ListValue](https://developers.google.com/protocol-buffers/docs/reference/overview)                | ❌        |             |
| 8  | tags                     | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ❌        |             |
| 9  | domain\_id               | string                                                                                                             | ✅        |             |
