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 | Yes |
Name | string | Template Name | Yes |
ProductKey | string | Product type. Refer to ListMonitorProduct to get the list of monitored product types. | 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.ucloud-global.com/?Action=CreateAlertStrategyTemplate
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=LUqXxWzo
&Name=toClNjME
&ProductKey=QvuqQPnH
&RuleSet=uhaPcSIK
&Remark=rvprBErx
&ProductKey=flfeYwfB
&RuleSet.N.=qNTKPTWM
&Remark=TWPNwENU
&RuleSet.N.ThresholdCompare=4
&RuleSet.N.ThresholdValue=1
&RuleSet.N.TriggerCount=2
&RuleSet.N.SendPeriodType=YVXzlvUP
&RuleSet.N.SendInterval=9
&RuleSet.N.Level=sIRbdnIl
&RuleSet.N.Status=6
&RuleSet.N.ThresholdCompare=1
&RuleSet.N.ThresholdValue=9
&RuleSet.N.TriggerCount=3
&RuleSet.N.SendPeriodType=PlxxGEcG
&RuleSet.N.SendInterval=1
&RuleSet.N.Level=BvjvWNQm
&RuleSet.N.Status=5
Response Example
{
"Action": "CreateAlertStrategyTemplateResponse",
"RetCode": 0,
"TemplateID": 8
}