CreateAlertStrategyTemplate - CreateAlertStrategyTemplate
Overview
CreateAlertStrategyTemplate
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is CreateAlertStrategyTemplate . | Yes |
PublicKey | string | The user’s public key can be obtained from Console  | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | Yes |
Name | string | Template Name | Yes |
ProductKey | string | ProductKey, SeeProduct Introduce  | 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. Enumeration value comparison method: 1:>= 2:<= 3:> 4:< 5:== 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: continuous exponent 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 | Create 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.surfercloud.com/?Action=CreateAlertStrategyTemplate
&ProjectId=pTKUYkHe
&Name=IFqEXhrk
&ProductKey=tIEzPRln
&RuleSet.N.MetricID=8
&RuleSet.N.ThresholdCompare=1
&RuleSet.N.ThresholdValue=1
&RuleSet.N.TriggerCount=6
&RuleSet.N.SendPeriodType=rQFwFYOx
&RuleSet.N.Level=zPfiXYdy
&RuleSet.N.Status=4
&RuleSet.N.SendInterval=8
&Remark=KvhtYeRp
Response Example
{
"Action": "CreateAlertStrategyTemplateResponse",
"Data": {},
"RetCode": 0
}