# Escalation Policy

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

## EscalationPolicy

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

| NO | Method                           | Request Type                                                    | Response Type                                                                                                      | Description |
| -- | -------------------------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ----------- |
| 1  | [**create**](#create)            | [CreateEscalationPolicyRequest](#createescalationpolicyrequest) | [EscalationPolicyInfo](#escalationpolicyinfo)                                                                      |             |
| 2  | [**update**](#update)            | [UpdateEscalationPolicyRequest](#updateescalationpolicyrequest) | [EscalationPolicyInfo](#escalationpolicyinfo)                                                                      |             |
| 3  | [**set\_default**](#set_default) | [EscalationPolicyRequest](#escalationpolicyrequest)             | [EscalationPolicyInfo](#escalationpolicyinfo)                                                                      |             |
| 4  | [**delete**](#delete)            | [EscalationPolicyRequest](#escalationpolicyrequest)             | [google.protobuf.Empty](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto)   |             |
| 5  | [**get**](#get)                  | [GetEscalationPolicyRequest](#getescalationpolicyrequest)       | [EscalationPolicyInfo](#escalationpolicyinfo)                                                                      |             |
| 6  | [**list**](#list)                | [EscalationPolicyQuery](#escalationpolicyquery)                 | [EscalationPoliciesInfo](#escalationpoliciesinfo)                                                                  |             |
| 7  | [**stat**](#stat)                | [EscalationPolicyStatQuery](#escalationpolicystatquery)         | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |

### create

> **POST** /monitoring/v1/escalation-policies

| Type     | Message                                                         |
| -------- | --------------------------------------------------------------- |
| Request  | [CreateEscalationPolicyRequest](#createescalationpolicyrequest) |
| Response | [EscalationPolicyInfo](#escalationpolicyinfo)                   |

### update

> **PUT** /monitoring/v1/escalation-policy/{escalation\_policy\_id}

| Type     | Message                                                         |
| -------- | --------------------------------------------------------------- |
| Request  | [UpdateEscalationPolicyRequest](#updateescalationpolicyrequest) |
| Response | [EscalationPolicyInfo](#escalationpolicyinfo)                   |

### set\_default

> **PUT** /monitoring/v1/escalation-policy/{escalation\_policy\_id}/set-default

| Type     | Message                                             |
| -------- | --------------------------------------------------- |
| Request  | [EscalationPolicyRequest](#escalationpolicyrequest) |
| Response | [EscalationPolicyInfo](#escalationpolicyinfo)       |

### delete

> **DELETE** /monitoring/v1/escalation-policy/{escalation\_policy\_id}

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

### get

> **GET** /monitoring/v1/escalation-policy/{escalation\_policy\_id}

| Type     | Message                                                   |
| -------- | --------------------------------------------------------- |
| Request  | [GetEscalationPolicyRequest](#getescalationpolicyrequest) |
| Response | [EscalationPolicyInfo](#escalationpolicyinfo)             |

### list

> **GET** /monitoring/v1/escalation-policies
>
> **POST** /monitoring/v1/escalation-policies/search

| Type     | Message                                           |
| -------- | ------------------------------------------------- |
| Request  | [EscalationPolicyQuery](#escalationpolicyquery)   |
| Response | [EscalationPoliciesInfo](#escalationpoliciesinfo) |

### stat

> **POST** /monitoring/v1/escalation-policies/stat

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

## Message

### CreateEscalationPolicyRequest

| No | Field             | Type                                                                                                               | Required | Description |
| -- | ----------------- | ------------------------------------------------------------------------------------------------------------------ | -------- | ----------- |
| 1  | name              | string                                                                                                             | ✅        |             |
| 2  | rules             | [list of EscalationPolicyRule](#escalationpolicyrule)                                                              | ✅        |             |
| 3  | repeat\_count     | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto)                    | ❌        |             |
| 4  | finish\_condition | <ul><li>FINISH\_CONDITION\_NONE</li><li>ALL</li><li>HIGH\_ONLY</li></ul>                                           | ❌        |             |
| 5  | project\_id       | string                                                                                                             | ❌        |             |
| 6  | tags              | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ❌        |             |
| 7  | domain\_id        | string                                                                                                             | ✅        |             |

### EscalationPoliciesInfo

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

### EscalationPolicyInfo

| No | Field                  | Type                                                                                                               | Description |
| -- | ---------------------- | ------------------------------------------------------------------------------------------------------------------ | ----------- |
| 1  | escalation\_policy\_id | string                                                                                                             |             |
| 2  | name                   | string                                                                                                             |             |
| 3  | is\_default            | bool                                                                                                               |             |
| 4  | rules                  | [list of EscalationPolicyRule](#escalationpolicyrule)                                                              |             |
| 5  | repeat\_count          | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto)                    |             |
| 6  | project\_id            | string                                                                                                             |             |
| 7  | tags                   | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |
| 8  | domain\_id             | string                                                                                                             |             |
| 9  | created\_at            | string                                                                                                             |             |

### EscalationPolicyQuery

| No | Field                  | Type                                                                                               | Required | Description |
| -- | ---------------------- | -------------------------------------------------------------------------------------------------- | -------- | ----------- |
| 1  | query                  | [spaceone.api.core.v1.Query](https://spaceone-dev.gitbook.io/api-reference/common-v1/search-query) | ❌        |             |
| 2  | escalation\_policy\_id | string                                                                                             | ❌        |             |
| 3  | name                   | string                                                                                             | ❌        |             |
| 4  | domain\_id             | string                                                                                             | ✅        |             |

### EscalationPolicyRequest

| No | Field                  | Type   | Required | Description |
| -- | ---------------------- | ------ | -------- | ----------- |
| 1  | escalation\_policy\_id | string | ✅        |             |
| 2  | domain\_id             | string | ✅        |             |

### EscalationPolicyRule

| No | Field               | Type                                                                                            | Description |
| -- | ------------------- | ----------------------------------------------------------------------------------------------- | ----------- |
| 1  | notification\_level | <ul><li>NONE</li><li>ALL</li><li>LV1</li><li>LV2</li><li>LV3</li><li>LV4</li><li>LV5</li></ul>  |             |
| 2  | escalate\_minutes   | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto) |             |

### EscalationPolicyStatQuery

| 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                                                                                                           | ✅        |             |

### GetEscalationPolicyRequest

| No | Field                  | Type           | Required | Description |
| -- | ---------------------- | -------------- | -------- | ----------- |
| 1  | escalation\_policy\_id | string         | ✅        |             |
| 2  | domain\_id             | string         | ✅        |             |
| 3  | only                   | list of string | ❌        |             |

### UpdateEscalationPolicyRequest

| No | Field                  | Type                                                                                                               | Required | Description |
| -- | ---------------------- | ------------------------------------------------------------------------------------------------------------------ | -------- | ----------- |
| 1  | escalation\_policy\_id | string                                                                                                             | ✅        |             |
| 2  | name                   | string                                                                                                             | ❌        |             |
| 3  | rules                  | [list of EscalationPolicyRule](#escalationpolicyrule)                                                              | ❌        |             |
| 4  | repeat\_count          | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto)                    | ❌        |             |
| 5  | finish\_condition      | <ul><li>FINISH\_CONDITION\_NONE</li><li>ALL</li><li>HIGH\_ONLY</li></ul>                                           | ❌        |             |
| 6  | tags                   | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ❌        |             |
| 7  | domain\_id             | string                                                                                                             | ✅        |             |
