Skip to Content
Cloud Monitor(CloudWatch)CreateAlertStrategy

CreateAlertStrategy - CreateAlertStrategy

Overview

CreateAlertStrategy

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is CreateAlertStrategy.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 ID. Leave blank for the default project, sub-accounts must fill in. Please refer to the GetProjectList APIYes
NamestringAlert Strategy NameYes
ProductKeystringProduct type. Refer to ListMonitorProduct to get the list of monitored product types.Yes
ObjectTypeintObjectTypeYes
ConfigModeintConfigModeYes
Resources.NstringResourcesNo
ResourceGroupIDs.NintResourceGroupIDsNo
Tags.N.Keystringtag keyNo
Tags.N.Operatorstringtag operatorNo
Values.Nstringtag valueNo
TemplateIdintTemplateIdNo
RuleSet.N.MetricIDintRule Metric ID. Refer to the list of metrics returned under this type of product GetProductMetricsNo
RuleSet.N.ThresholdCompareintThreshold comparison method. Enumeration value comparison method: 1->= 2-<= 3-> 4-< 5-== 6-!=No
RuleSet.N.ThresholdValueintAlert Rule ThresholdValueNo
RuleSet.N.TriggerCountintAlert Rule TriggerCountNo
RuleSet.N.SendPeriodTypestringTrigger cycle. Enumeration values: continuous Continuous, exponent Exponential, single Non-repeatingNo
RuleSet.N.LevelstringAlert level. Enumeration value: P0, P1, P2, P3No
RuleSet.N.StatusintAlert Rule StatusNo
RuleSet.N.SendIntervalintSilent period (required when the alarm period is set to Continuous)No
NotifyTypestringNotifyTypeNo
NotifyUserIDs.NintNotifyUserIDsNo
NotifyGroupIDs.NintNotifyGroupIDsNo
NotifyChannelDs.NstringNotifyChannelDsNo
CallbackLanguagestringCallbackLanguageNo
CallbackUrls.NstringCallbackUrlsNo

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
DataAlertStrategyIdCreate Alert Strategy Return ObjectNo

Data Model

AlertStrategyId

Field NameTypeDescription InformationRequired
AlertStrategyIDintAlertStrategyIdNo

Example

Request Example

https://api.genesissai.com/?Action=CreateAlertStrategy &Region=cn-zj &Zone=cn-zj-01 &ProjectId=wQzVpMKH &Name=aMtbGsoi &ProductKey=aimMEstF &ObjectType=cVlUqdlo &Name=CEyaaxRn &ProductKey=cMfAOPHv &ObjectType=qIlyxnMl &Resources=GHMEDxZd &ResourceGroupIDs=NtMeYivb &Tags=gAUnBrer &ConfigMode=shiTfGjt &TemplateId=ejKhnjxe &RuleSet=RLErYqsa &NotifyType=YpYuSZaR &NotifyUserIDs=GmJRfOnL &NotifyGroupIDs=sDkHomlx &NotifyChannelDs=vcqcBLDy &CallbackLanguage=WjVxebho &CallbackUrls=JpBIGAiC &Tags.N.Operator=iIvLyhfR &Tags.N.Values.N.0=dvkInIoI &RuleSet.N.ThresholdCompare=7 &RuleSet.N.ThresholdValue=7 &RuleSet.N.TriggerCount=2 &RuleSet.N.SendPeriodType=QpKiRoKU &RuleSet.N.Level=jFTScowr &RuleSet.N.Status=8 &RuleSet.N.SendInterval=2

Response Example

{ "Action": "CreateAlertStrategyResponse", "Data": {}, "RetCode": 0 }