Skip to Content
Cloud Monitor(CloudWatch)CreateAlertStrategyTemplate

CreateAlertStrategyTemplate - CreateAlertStrategyTemplate

Overview

CreateAlertStrategyTemplate

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is CreateAlertStrategyTemplate.Yes
PublicKeystringThe user’s public key can be obtained from Console Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
ProjectIdstringProject IDYes
NamestringTemplate NameYes
ProductKeystringProduct type. Refer to ListMonitorProduct to get the list of monitored product types.Yes
RuleSet.N.MetricIDintRule Metric ID. Refer to the metric list returned under this type of product GetProductMetricsYes
RuleSet.N.ThresholdCompareintThreshold comparison method.
Enumeration value comparison method:
1->=
2-<=
3->
4-<
5-==
6-!=
Yes
RuleSet.N.ThresholdValueintAlert Rule ThresholdValueYes
RuleSet.N.TriggerCountintAlert Rule TriggerCountYes
RuleSet.N.SendPeriodTypestringTrigger SendPeriodType. Enumeration value:
continuous
exponent
single
Yes
RuleSet.N.LevelstringAlert level. Enumeration value: P0, P1, P2, P3Yes
RuleSet.N.StatusintAlert Rule StatusYes
RuleSet.N.SendIntervalint
Silent period (required when the alarm period is set to Continuous)
No
RemarkstringRemarkNo

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
DataAlertTemplateCreate Alert Template Return ObjectNo

Data Model

AlertTemplate

Field NameTypeDescription InformationRequired
TemplateIDintAlert Template IDYes

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 }