# UpdateAlertStrategyTemplate - UpdateAlertStrategyTemplate

## Overview

UpdateAlertStrategyTemplate






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `UpdateAlertStrategyTemplate`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.scloudsg.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **ProjectId** | string | Project ID. Leave blank for the default project, sub-accounts must fill in. Please refer to [GetProjectList API](/docs/api/summary/get_project_list) |**Yes**|
| **TemplateID** | int | TemplateID |**Yes**|
| **Name** | string | Template Name |**Yes**|
| **ProductKey** | string | ProductKey， See[Product Introduce](https://docs.ucloud.cn/cloudwatch/metric/intro) |**Yes**|
| **RuleSet.N.MetricID** | int | Rule Metric ID. Refer to the metric list returned under this type of product GetProductMetrics |**Yes**|
| **RuleSet.N.ThresholdCompare** | int | Threshold comparison method.<br />Enumeration value comparison method: <br />1->=<br />2-<= <br />3-> <br />4-< <br />5-== <br />6-!= |**Yes**|
| **RuleSet.N.ThresholdValue** | int | Alert Rule ThresholdValue |**Yes**|
| **RuleSet.N.TriggerCount** | int | Alert Rule TriggerCount |**Yes**|
| **RuleSet.N.SendPeriodType** | string | Trigger SendPeriodType. Enumeration value: <br />continuous <br />exponent <br />single  |**Yes**|
| **RuleSet.N.Level** | string | Alert level. Enumeration value: P0, P1, P2, P3 |**Yes**|
| **RuleSet.N.Status** | int | Alert Rule Status  |**Yes**|
| **RuleSet.N.SendInterval** | int | Silent period (required when the alarm period is set to Continuous) |No|
| **Remark** | string | Remark |No|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|
| **Data** | [*AlertTemplate*](#alerttemplate) | Update Alert Template Return Object |No|

#### Data Model


#### AlertTemplate

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **TemplateID** | int | Alert Template ID |**Yes**|

## Example

### Request Example
    
```
https://api.scloudsg.com/?Action=UpdateAlertStrategyTemplate
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=cAZsbmqT
&TemplateID=3
&TemplateID=4
&Name=CNeRHdFx
&ProductKey=ppYYTKTv
&RuleSet.N.MetricID=1
&RuleSet.N.ThresholdCompare=3
&RuleSet.N.ThresholdValue=4
&RuleSet.N.TriggerCount=5
&RuleSet.N.SendPeriodType=ZalBbMqu
&RuleSet.N.Level=ZRRqqzYt
&RuleSet.N.Status=5
&RuleSet.N.SendInterval=3
&Remark=SgubaXNC
```

### Response Example
    
```json
{
  "Action": "UpdateAlertStrategyTemplateResponse",
  "Data": {},
  "RetCode": 0
}
```





