# Quota

A Quota is a limit on protocol usage for a day or a month. You can manage the use of the protocol with a Quota.

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

\ <br>

## Quota

**Quota Methods:**

| Method                                                                                                               | Request                                                                                                                                  | Response                                                                                                                 |
| -------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| [**create**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#create) | [CreateQuotaRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#createquotarequest) | [QuotaInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#quotainfo)   |
| [**update**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#update) | [UpdateQuotaRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#updatequotarequest) | [QuotaInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#quotainfo)   |
| [**delete**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#delete) | [QuotaRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#quotarequest)             | [Empty](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#empty)           |
| [**get**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#get)       | [QuotaRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#quotarequest)             | [QuotaInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#quotainfo)   |
| [**list**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#list)     | [QuotaQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#quotaquery)                 | [QuotasInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#quotasinfo) |
| [**stat**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#stat)     | [QuotaStatQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#quotastatquery)         | [Struct](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#struct)         |

<br>

### create

Creates a new Quota limiting the use of a selected Protocol for a day or a month. If the parameter `limit` has no value, it will be deemed unlimited. If a Protocol has not set a Quota, the default Quota set in the Config will be applied.

> **POST** /notification/v1/quota/create

{{< tabs " create " >}}

{{< tab "Request Example" >}}

[CreateQuotaRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#createquotarequest)

* **protocol\_id** (string) `Required`
* **limit** (Struct) `Required`

  *The information about Quota limitation.*
* **domain\_id** (string) `Required`

  *The ID of domain.*

{{< highlight json >}} { "protocol\_id": "protocol-123456789012", "limit": { "day": 5.0, "month": 7.0 } } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

[QuotaInfo](#QUOTAINFO)

* **quota\_id** (string) `Required`

  The ID of Quota.
* **protocol\_id** (string) `Required`

  The ID of Protocol.
* **limit** (Struct) `Required`

  The information about Quota limitation.
* **domain\_id** (string) `Required`

  The ID of domain

{{< highlight json >}} { "quota\_id": "quota-123456789012", "protocol\_id": "protocol-123456789012", "limit": { "day": 5.0, "month": 7.0 }, "domain\_id": "domain-123456789012" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

<br>

### update

Updates a specific Quota. You can make changes in Quota `limit`, managing the use of the Protocol.

> **POST** /notification/v1/quota/update

{{< tabs " update " >}}

{{< tab "Request Example" >}}

[UpdateQuotaRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#updatequotarequest)

* **quota\_id** (string) `Required`

  *The ID of Quota.*
* **limit** (Struct) `Required`

  *The information about Quota limitation.*
* **domain\_id** (string) `Required`

{{< highlight json >}} { "quota\_id": "quota-123456789012", "limit": { "day": 10.0, "month": 15.0 } } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

[QuotaInfo](#QUOTAINFO)

* **quota\_id** (string) `Required`

  The ID of Quota.
* **protocol\_id** (string) `Required`

  The ID of Protocol.
* **limit** (Struct) `Required`

  The information about Quota limitation.
* **domain\_id** (string) `Required`

  The ID of domain

{{< highlight json >}} { "quota\_id": "quota-123456789012", "protocol\_id": "protocol-123456789012", "limit": { "day": 5.0, "month": 7.0 }, "domain\_id": "domain-123456789012" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

<br>

### delete

Deletes a specific Quota. The default Quota set in the Config will be applied to the Protocol you deleted the Quota of.

> **POST** /notification/v1/quota/delete

{{< tabs " delete " >}}

{{< tab "Request Example" >}}

[QuotaRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#quotarequest)

* **quota\_id** (string) `Required`

  *The ID of Quota.*
* **domain\_id** (string) `Required`

  *The ID of domain.*

{{< highlight json >}} { "quota\_id": "quota-123456789012" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

<br>

### get

Gets a specific Quota. Prints detailed information about the Quota, including the `limit` and the Protocol limited by the Quota.

> **POST** /notification/v1/quota/get

{{< tabs " get " >}}

{{< tab "Request Example" >}}

[QuotaRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#quotarequest)

* **quota\_id** (string) `Required`

  *The ID of Quota.*
* **domain\_id** (string) `Required`

  *The ID of domain.*

{{< highlight json >}} { "quota\_id": "quota-123456789012" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

[QuotaInfo](#QUOTAINFO)

* **quota\_id** (string) `Required`

  The ID of Quota.
* **protocol\_id** (string) `Required`

  The ID of Protocol.
* **limit** (Struct) `Required`

  The information about Quota limitation.
* **domain\_id** (string) `Required`

  The ID of domain

{{< highlight json >}} { "quota\_id": "quota-123456789012", "protocol\_id": "protocol-123456789012", "limit": { "day": 5.0, "month": 7.0 }, "domain\_id": "domain-123456789012" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

<br>

### list

Gets a list of all Quotas. You can use a query to get a filtered list of Quotas.

> **POST** /notification/v1/quota/list

{{< tabs " list " >}}

{{< tab "Request Example" >}}

[QuotaQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/notification/v1/Quota/README.md#quotaquery)

* **domain\_id** (string) `Required`

  *The ID of domain.*
* **query** (Query)

  *Query format provided by SpaceONE. Please check the link for more information.*
* **quota\_id** (string)

  *The ID of Quota.*
* **protocol\_id** (string)

  *The ID of Protocol.*

{{< highlight json >}} { "query": {} } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

[QuotasInfo](#QUOTASINFO)

* **results** (QuotaInfo) `Repeated` `Required`

  List of queried Quota.
* **total\_count** (int32) `Required`

  Total counts of queried Quota.

{{< highlight json >}} { "results": \[ { "quota\_id": "quota-123456789012", "protocol\_id": "protocol-123456789012", "limit": { "day": 10.0, "month": 15.0 }, "domain\_id": "domain-123456789012" }, { "quota\_id": "quota-987654321098", "protocol\_id": "protocol-987654321098", "limit": { "day": 5.0, "month": 7.0 }, "domain\_id": "domain-123456789012" } ], "total\_count": 2 } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

<br>

### stat

> **POST** /notification/v1/quota/stat

\ <br>

## Message

### CreateQuotaRequest

* **protocol\_id** (string) `Required`
* **limit** (Struct) `Required`

  *The information about Quota limitation.*
* **domain\_id** (string) `Required`

  *The ID of domain.*

  <br>

### QuotaInfo

* **quota\_id** (string) `Required`

  *The ID of Quota.*
* **protocol\_id** (string) `Required`

  *The ID of Protocol.*
* **limit** (Struct) `Required`

  *The information about Quota limitation.*
* **domain\_id** (string) `Required`

  *The ID of domain*

  <br>

### QuotaQuery

* **domain\_id** (string) `Required`

  *The ID of domain.*
* **query** (Query)

  *Query format provided by SpaceONE. Please check the link for more information.*
* **quota\_id** (string)

  *The ID of Quota.*
* **protocol\_id** (string)

  *The ID of Protocol.*

  <br>

### QuotaRequest

* **quota\_id** (string) `Required`

  *The ID of Quota.*
* **domain\_id** (string) `Required`

  *The ID of domain.*

  <br>

### QuotaStatQuery

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

  *Statistics Query format provided by SpaceONE. Please check the link for more information.*
* **domain\_id** (string) `Required`

  *The ID of domain.*

  <br>

### QuotasInfo

* **results** (QuotaInfo) `Repeated` `Required`

  *List of queried Quota.*
* **total\_count** (int32) `Required`

  *Total counts of queried Quota.*

  <br>

### UpdateQuotaRequest

* **quota\_id** (string) `Required`

  *The ID of Quota.*
* **limit** (Struct) `Required`

  *The information about Quota limitation.*
* **domain\_id** (string) `Required`

  <br>
