Add site monitoring dial DNS_ match_ rule.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2021-11-19 Version: 1.36.938
|
||||
- Add site monitoring dial DNS_ match_ rule.
|
||||
|
||||
2021-11-17 Version: 1.36.937
|
||||
- Update apm interface parameter.
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace AlibabaCloud
|
||||
CreateSiteMonitorRequest();
|
||||
~CreateSiteMonitorRequest();
|
||||
|
||||
std::string getReportProject()const;
|
||||
void setReportProject(const std::string& reportProject);
|
||||
std::string getTaskName()const;
|
||||
void setTaskName(const std::string& taskName);
|
||||
std::string getAlertIds()const;
|
||||
@@ -55,6 +57,7 @@ namespace AlibabaCloud
|
||||
void setInterval(const std::string& interval);
|
||||
|
||||
private:
|
||||
std::string reportProject_;
|
||||
std::string taskName_;
|
||||
std::string alertIds_;
|
||||
std::string address_;
|
||||
|
||||
@@ -40,8 +40,8 @@ namespace AlibabaCloud
|
||||
std::string endTime;
|
||||
std::string ruleId;
|
||||
std::string startTime;
|
||||
std::string period;
|
||||
std::string evaluationCount;
|
||||
std::string period;
|
||||
std::string _namespace;
|
||||
std::string statistics;
|
||||
std::string metricName;
|
||||
@@ -80,9 +80,9 @@ namespace AlibabaCloud
|
||||
Info info;
|
||||
Warn warn;
|
||||
};
|
||||
std::string noEffectiveInterval;
|
||||
std::string silenceTime;
|
||||
std::string contactGroups;
|
||||
std::string noEffectiveInterval;
|
||||
std::string mailSubject;
|
||||
std::string ruleId;
|
||||
std::string period;
|
||||
|
||||
@@ -43,8 +43,8 @@ namespace AlibabaCloud
|
||||
std::string requestId;
|
||||
std::vector<std::string> notifyTargetList;
|
||||
std::string code;
|
||||
std::string detail;
|
||||
bool success;
|
||||
std::string detail;
|
||||
};
|
||||
std::vector<ChannelResult::Result> resultList;
|
||||
std::string channel;
|
||||
@@ -74,6 +74,11 @@ namespace AlibabaCloud
|
||||
std::string code;
|
||||
std::string url;
|
||||
};
|
||||
struct SendResult
|
||||
{
|
||||
std::vector<std::string> value;
|
||||
std::string key;
|
||||
};
|
||||
std::string groupName;
|
||||
std::vector<std::string> contactALIIWWList;
|
||||
std::string message;
|
||||
@@ -84,14 +89,15 @@ namespace AlibabaCloud
|
||||
std::string metricName;
|
||||
std::vector<std::string> contactSMSList;
|
||||
SendDetail sendDetail;
|
||||
std::vector<Alarm::SendResult> sendResultList;
|
||||
std::string ruleName;
|
||||
std::vector<std::string> contactGroups;
|
||||
std::vector<std::string> dingdingWebhookList;
|
||||
std::string instanceId;
|
||||
std::string blackListName;
|
||||
std::vector<Alarm::DimensionsItem> dimensions;
|
||||
std::string levelChange;
|
||||
std::string blackListUUID;
|
||||
std::string levelChange;
|
||||
std::vector<std::string> contactOnCallList;
|
||||
std::string _namespace;
|
||||
std::vector<std::string> contactDingList;
|
||||
@@ -114,7 +120,6 @@ namespace AlibabaCloud
|
||||
std::string getMessage()const;
|
||||
int getPageSize()const;
|
||||
int getPageNumber()const;
|
||||
int getTotal()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
@@ -125,7 +130,6 @@ namespace AlibabaCloud
|
||||
std::string message_;
|
||||
int pageSize_;
|
||||
int pageNumber_;
|
||||
int total_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace AlibabaCloud
|
||||
std::string tagValueMatchFunction;
|
||||
};
|
||||
std::string status;
|
||||
std::vector<std::string> contactGroupList;
|
||||
std::string matchExpressFilterRelation;
|
||||
std::string dynamicTagRuleId;
|
||||
std::vector<std::string> templateIdList;
|
||||
|
||||
@@ -43,6 +43,8 @@ namespace AlibabaCloud
|
||||
void setPageNumber(int pageNumber);
|
||||
int getPageSize()const;
|
||||
void setPageSize(int pageSize);
|
||||
std::string getIds()const;
|
||||
void setIds(const std::string& ids);
|
||||
long getId()const;
|
||||
void setId(long id);
|
||||
|
||||
@@ -51,6 +53,7 @@ namespace AlibabaCloud
|
||||
std::string taskName_;
|
||||
int pageNumber_;
|
||||
int pageSize_;
|
||||
std::string ids_;
|
||||
long id_;
|
||||
|
||||
};
|
||||
|
||||
@@ -36,6 +36,23 @@ namespace AlibabaCloud
|
||||
{
|
||||
struct AlertTemplate
|
||||
{
|
||||
struct CompositeExpression
|
||||
{
|
||||
struct ExpressionListItem
|
||||
{
|
||||
std::string metricName;
|
||||
std::string comparisonOperator;
|
||||
int period;
|
||||
std::string id;
|
||||
std::string statistics;
|
||||
std::string threshold;
|
||||
};
|
||||
int times;
|
||||
std::string expressionRaw;
|
||||
std::string level;
|
||||
std::string expressionListJoin;
|
||||
std::vector<ExpressionListItem> expressionList;
|
||||
};
|
||||
struct Escalations
|
||||
{
|
||||
struct Info
|
||||
@@ -66,8 +83,10 @@ namespace AlibabaCloud
|
||||
std::string metricName;
|
||||
std::string category;
|
||||
Escalations escalations;
|
||||
std::string _namespace;
|
||||
CompositeExpression compositeExpression;
|
||||
std::string webhook;
|
||||
std::string _namespace;
|
||||
std::string noDataPolicy;
|
||||
std::string ruleName;
|
||||
std::string selector;
|
||||
};
|
||||
@@ -76,8 +95,8 @@ namespace AlibabaCloud
|
||||
std::string description;
|
||||
std::string systemEventTemplates;
|
||||
std::string restVersion;
|
||||
std::string templateId;
|
||||
std::string processMonitorTemplates;
|
||||
std::string templateId;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ namespace AlibabaCloud
|
||||
std::string cookie;
|
||||
bool enable_operator_dns;
|
||||
bool proxy_protocol;
|
||||
std::string dns_match_rule;
|
||||
float failure_rate;
|
||||
int match_rule;
|
||||
std::string acceptable_response_code;
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace AlibabaCloud
|
||||
std::string cookie;
|
||||
int ping_num;
|
||||
bool enable_operator_dns;
|
||||
std::string dns_match_rule;
|
||||
long traceroute;
|
||||
float failure_rate;
|
||||
int port;
|
||||
|
||||
@@ -39,10 +39,13 @@ namespace AlibabaCloud
|
||||
void setInstanceIds(const std::vector<std::string>& instanceIds);
|
||||
bool getForce()const;
|
||||
void setForce(bool force);
|
||||
std::string getInstallCommand()const;
|
||||
void setInstallCommand(const std::string& installCommand);
|
||||
|
||||
private:
|
||||
std::vector<std::string> instanceIds_;
|
||||
bool force_;
|
||||
std::string installCommand_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -47,6 +47,8 @@ namespace AlibabaCloud
|
||||
void setEventName(const std::string& eventName);
|
||||
std::string getEmailSubject()const;
|
||||
void setEmailSubject(const std::string& emailSubject);
|
||||
std::string getMetricName()const;
|
||||
void setMetricName(const std::string& metricName);
|
||||
std::string getPeriod()const;
|
||||
void setPeriod(const std::string& period);
|
||||
std::string getContactGroups()const;
|
||||
@@ -65,6 +67,7 @@ namespace AlibabaCloud
|
||||
std::string effectiveInterval_;
|
||||
std::string eventName_;
|
||||
std::string emailSubject_;
|
||||
std::string metricName_;
|
||||
std::string period_;
|
||||
std::string contactGroups_;
|
||||
std::string level_;
|
||||
|
||||
@@ -32,6 +32,10 @@ namespace AlibabaCloud
|
||||
class ALIBABACLOUD_CMS_EXPORT PutGroupMetricRuleResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Result
|
||||
{
|
||||
std::string ruleId;
|
||||
};
|
||||
|
||||
|
||||
PutGroupMetricRuleResult();
|
||||
@@ -40,6 +44,7 @@ namespace AlibabaCloud
|
||||
std::string getMessage()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
Result getResult()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
@@ -47,6 +52,7 @@ namespace AlibabaCloud
|
||||
std::string message_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
Result result_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -69,6 +69,8 @@ namespace AlibabaCloud
|
||||
void setGroupId(const std::string& groupId);
|
||||
std::string getTumblingwindows()const;
|
||||
void setTumblingwindows(const std::string& tumblingwindows);
|
||||
std::string getGroupBy()const;
|
||||
void setGroupBy(const std::string& groupBy);
|
||||
std::string getValueFilterRelation()const;
|
||||
void setValueFilterRelation(const std::string& valueFilterRelation);
|
||||
std::string getUnit()const;
|
||||
@@ -89,6 +91,7 @@ namespace AlibabaCloud
|
||||
std::string metricName_;
|
||||
std::string groupId_;
|
||||
std::string tumblingwindows_;
|
||||
std::string groupBy_;
|
||||
std::string valueFilterRelation_;
|
||||
std::string unit_;
|
||||
std::vector<Groupbys> groupbys_;
|
||||
|
||||
@@ -27,6 +27,17 @@ CreateSiteMonitorRequest::CreateSiteMonitorRequest() :
|
||||
CreateSiteMonitorRequest::~CreateSiteMonitorRequest()
|
||||
{}
|
||||
|
||||
std::string CreateSiteMonitorRequest::getReportProject()const
|
||||
{
|
||||
return reportProject_;
|
||||
}
|
||||
|
||||
void CreateSiteMonitorRequest::setReportProject(const std::string& reportProject)
|
||||
{
|
||||
reportProject_ = reportProject;
|
||||
setParameter("ReportProject", reportProject);
|
||||
}
|
||||
|
||||
std::string CreateSiteMonitorRequest::getTaskName()const
|
||||
{
|
||||
return taskName_;
|
||||
|
||||
@@ -43,10 +43,10 @@ void CreateSiteMonitorResult::parse(const std::string &payload)
|
||||
for (auto valueCreateResultListCreateResultListItem : allCreateResultListNode)
|
||||
{
|
||||
CreateResultListItem createResultListObject;
|
||||
if(!valueCreateResultListCreateResultListItem["TaskName"].isNull())
|
||||
createResultListObject.taskName = valueCreateResultListCreateResultListItem["TaskName"].asString();
|
||||
if(!valueCreateResultListCreateResultListItem["TaskId"].isNull())
|
||||
createResultListObject.taskId = valueCreateResultListCreateResultListItem["TaskId"].asString();
|
||||
if(!valueCreateResultListCreateResultListItem["TaskName"].isNull())
|
||||
createResultListObject.taskName = valueCreateResultListCreateResultListItem["TaskName"].asString();
|
||||
createResultList_.push_back(createResultListObject);
|
||||
}
|
||||
auto dataNode = value["Data"];
|
||||
@@ -54,12 +54,12 @@ void CreateSiteMonitorResult::parse(const std::string &payload)
|
||||
for (auto dataNodeAttachAlertResultContact : allAttachAlertResultNode)
|
||||
{
|
||||
Data::Contact contactObject;
|
||||
if(!dataNodeAttachAlertResultContact["Code"].isNull())
|
||||
contactObject.code = dataNodeAttachAlertResultContact["Code"].asString();
|
||||
if(!dataNodeAttachAlertResultContact["Message"].isNull())
|
||||
contactObject.message = dataNodeAttachAlertResultContact["Message"].asString();
|
||||
if(!dataNodeAttachAlertResultContact["RequestId"].isNull())
|
||||
contactObject.requestId = dataNodeAttachAlertResultContact["RequestId"].asString();
|
||||
if(!dataNodeAttachAlertResultContact["Code"].isNull())
|
||||
contactObject.code = dataNodeAttachAlertResultContact["Code"].asString();
|
||||
if(!dataNodeAttachAlertResultContact["Success"].isNull())
|
||||
contactObject.success = dataNodeAttachAlertResultContact["Success"].asString();
|
||||
if(!dataNodeAttachAlertResultContact["RuleId"].isNull())
|
||||
|
||||
@@ -42,12 +42,12 @@ void DeleteMetricRuleTemplateResult::parse(const std::string &payload)
|
||||
auto resourceNode = value["Resource"];
|
||||
if(!resourceNode["TemplateId"].isNull())
|
||||
resource_.templateId = resourceNode["TemplateId"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -43,110 +43,110 @@ void DescribeActiveMetricRuleListResult::parse(const std::string &payload)
|
||||
for (auto valueDatapointsAlarm : allDatapointsNode)
|
||||
{
|
||||
Alarm datapointsObject;
|
||||
if(!valueDatapointsAlarm["RuleId"].isNull())
|
||||
datapointsObject.ruleId = valueDatapointsAlarm["RuleId"].asString();
|
||||
if(!valueDatapointsAlarm["Namespace"].isNull())
|
||||
datapointsObject._namespace = valueDatapointsAlarm["Namespace"].asString();
|
||||
if(!valueDatapointsAlarm["MetricName"].isNull())
|
||||
datapointsObject.metricName = valueDatapointsAlarm["MetricName"].asString();
|
||||
if(!valueDatapointsAlarm["Period"].isNull())
|
||||
datapointsObject.period = valueDatapointsAlarm["Period"].asString();
|
||||
if(!valueDatapointsAlarm["Statistics"].isNull())
|
||||
datapointsObject.statistics = valueDatapointsAlarm["Statistics"].asString();
|
||||
if(!valueDatapointsAlarm["ComparisonOperator"].isNull())
|
||||
datapointsObject.comparisonOperator = valueDatapointsAlarm["ComparisonOperator"].asString();
|
||||
if(!valueDatapointsAlarm["Threshold"].isNull())
|
||||
datapointsObject.threshold = valueDatapointsAlarm["Threshold"].asString();
|
||||
if(!valueDatapointsAlarm["EvaluationCount"].isNull())
|
||||
datapointsObject.evaluationCount = valueDatapointsAlarm["EvaluationCount"].asString();
|
||||
if(!valueDatapointsAlarm["StartTime"].isNull())
|
||||
datapointsObject.startTime = valueDatapointsAlarm["StartTime"].asString();
|
||||
if(!valueDatapointsAlarm["EndTime"].isNull())
|
||||
datapointsObject.endTime = valueDatapointsAlarm["EndTime"].asString();
|
||||
if(!valueDatapointsAlarm["SilenceTime"].isNull())
|
||||
datapointsObject.silenceTime = valueDatapointsAlarm["SilenceTime"].asString();
|
||||
if(!valueDatapointsAlarm["Enable"].isNull())
|
||||
datapointsObject.enable = valueDatapointsAlarm["Enable"].asString();
|
||||
if(!valueDatapointsAlarm["MetricName"].isNull())
|
||||
datapointsObject.metricName = valueDatapointsAlarm["MetricName"].asString();
|
||||
if(!valueDatapointsAlarm["EvaluationCount"].isNull())
|
||||
datapointsObject.evaluationCount = valueDatapointsAlarm["EvaluationCount"].asString();
|
||||
if(!valueDatapointsAlarm["Webhook"].isNull())
|
||||
datapointsObject.webhook = valueDatapointsAlarm["Webhook"].asString();
|
||||
if(!valueDatapointsAlarm["State"].isNull())
|
||||
datapointsObject.state = valueDatapointsAlarm["State"].asString();
|
||||
if(!valueDatapointsAlarm["ContactGroups"].isNull())
|
||||
datapointsObject.contactGroups = valueDatapointsAlarm["ContactGroups"].asString();
|
||||
if(!valueDatapointsAlarm["Webhook"].isNull())
|
||||
datapointsObject.webhook = valueDatapointsAlarm["Webhook"].asString();
|
||||
if(!valueDatapointsAlarm["Namespace"].isNull())
|
||||
datapointsObject._namespace = valueDatapointsAlarm["Namespace"].asString();
|
||||
if(!valueDatapointsAlarm["RuleName"].isNull())
|
||||
datapointsObject.ruleName = valueDatapointsAlarm["RuleName"].asString();
|
||||
if(!valueDatapointsAlarm["RuleId"].isNull())
|
||||
datapointsObject.ruleId = valueDatapointsAlarm["RuleId"].asString();
|
||||
if(!valueDatapointsAlarm["Period"].isNull())
|
||||
datapointsObject.period = valueDatapointsAlarm["Period"].asString();
|
||||
if(!valueDatapointsAlarm["ComparisonOperator"].isNull())
|
||||
datapointsObject.comparisonOperator = valueDatapointsAlarm["ComparisonOperator"].asString();
|
||||
if(!valueDatapointsAlarm["EndTime"].isNull())
|
||||
datapointsObject.endTime = valueDatapointsAlarm["EndTime"].asString();
|
||||
if(!valueDatapointsAlarm["StartTime"].isNull())
|
||||
datapointsObject.startTime = valueDatapointsAlarm["StartTime"].asString();
|
||||
if(!valueDatapointsAlarm["Threshold"].isNull())
|
||||
datapointsObject.threshold = valueDatapointsAlarm["Threshold"].asString();
|
||||
if(!valueDatapointsAlarm["Statistics"].isNull())
|
||||
datapointsObject.statistics = valueDatapointsAlarm["Statistics"].asString();
|
||||
if(!valueDatapointsAlarm["Enable"].isNull())
|
||||
datapointsObject.enable = valueDatapointsAlarm["Enable"].asString();
|
||||
datapoints_.push_back(datapointsObject);
|
||||
}
|
||||
auto allAlertListNode = value["AlertList"]["Alert"];
|
||||
for (auto valueAlertListAlert : allAlertListNode)
|
||||
{
|
||||
Alert alertListObject;
|
||||
if(!valueAlertListAlert["RuleId"].isNull())
|
||||
alertListObject.ruleId = valueAlertListAlert["RuleId"].asString();
|
||||
if(!valueAlertListAlert["Namespace"].isNull())
|
||||
alertListObject._namespace = valueAlertListAlert["Namespace"].asString();
|
||||
if(!valueAlertListAlert["SilenceTime"].isNull())
|
||||
alertListObject.silenceTime = valueAlertListAlert["SilenceTime"].asString();
|
||||
if(!valueAlertListAlert["MetricName"].isNull())
|
||||
alertListObject.metricName = valueAlertListAlert["MetricName"].asString();
|
||||
if(!valueAlertListAlert["Period"].isNull())
|
||||
alertListObject.period = valueAlertListAlert["Period"].asString();
|
||||
if(!valueAlertListAlert["Webhook"].isNull())
|
||||
alertListObject.webhook = valueAlertListAlert["Webhook"].asString();
|
||||
if(!valueAlertListAlert["ContactGroups"].isNull())
|
||||
alertListObject.contactGroups = valueAlertListAlert["ContactGroups"].asString();
|
||||
if(!valueAlertListAlert["Namespace"].isNull())
|
||||
alertListObject._namespace = valueAlertListAlert["Namespace"].asString();
|
||||
if(!valueAlertListAlert["EffectiveInterval"].isNull())
|
||||
alertListObject.effectiveInterval = valueAlertListAlert["EffectiveInterval"].asString();
|
||||
if(!valueAlertListAlert["NoEffectiveInterval"].isNull())
|
||||
alertListObject.noEffectiveInterval = valueAlertListAlert["NoEffectiveInterval"].asString();
|
||||
if(!valueAlertListAlert["SilenceTime"].isNull())
|
||||
alertListObject.silenceTime = valueAlertListAlert["SilenceTime"].asString();
|
||||
if(!valueAlertListAlert["EnableState"].isNull())
|
||||
alertListObject.enableState = valueAlertListAlert["EnableState"].asString() == "true";
|
||||
if(!valueAlertListAlert["AlertState"].isNull())
|
||||
alertListObject.alertState = valueAlertListAlert["AlertState"].asString();
|
||||
if(!valueAlertListAlert["ContactGroups"].isNull())
|
||||
alertListObject.contactGroups = valueAlertListAlert["ContactGroups"].asString();
|
||||
if(!valueAlertListAlert["Webhook"].isNull())
|
||||
alertListObject.webhook = valueAlertListAlert["Webhook"].asString();
|
||||
if(!valueAlertListAlert["MailSubject"].isNull())
|
||||
alertListObject.mailSubject = valueAlertListAlert["MailSubject"].asString();
|
||||
if(!valueAlertListAlert["RuleName"].isNull())
|
||||
alertListObject.ruleName = valueAlertListAlert["RuleName"].asString();
|
||||
if(!valueAlertListAlert["Resources"].isNull())
|
||||
alertListObject.resources = valueAlertListAlert["Resources"].asString();
|
||||
if(!valueAlertListAlert["RuleId"].isNull())
|
||||
alertListObject.ruleId = valueAlertListAlert["RuleId"].asString();
|
||||
if(!valueAlertListAlert["Period"].isNull())
|
||||
alertListObject.period = valueAlertListAlert["Period"].asString();
|
||||
if(!valueAlertListAlert["AlertState"].isNull())
|
||||
alertListObject.alertState = valueAlertListAlert["AlertState"].asString();
|
||||
if(!valueAlertListAlert["Dimensions"].isNull())
|
||||
alertListObject.dimensions = valueAlertListAlert["Dimensions"].asString();
|
||||
if(!valueAlertListAlert["EnableState"].isNull())
|
||||
alertListObject.enableState = valueAlertListAlert["EnableState"].asString() == "true";
|
||||
if(!valueAlertListAlert["Resources"].isNull())
|
||||
alertListObject.resources = valueAlertListAlert["Resources"].asString();
|
||||
auto escalationsNode = value["Escalations"];
|
||||
auto infoNode = escalationsNode["Info"];
|
||||
if(!infoNode["ComparisonOperator"].isNull())
|
||||
alertListObject.escalations.info.comparisonOperator = infoNode["ComparisonOperator"].asString();
|
||||
if(!infoNode["Statistics"].isNull())
|
||||
alertListObject.escalations.info.statistics = infoNode["Statistics"].asString();
|
||||
if(!infoNode["Threshold"].isNull())
|
||||
alertListObject.escalations.info.threshold = infoNode["Threshold"].asString();
|
||||
if(!infoNode["Times"].isNull())
|
||||
alertListObject.escalations.info.times = infoNode["Times"].asString();
|
||||
if(!infoNode["Threshold"].isNull())
|
||||
alertListObject.escalations.info.threshold = infoNode["Threshold"].asString();
|
||||
if(!infoNode["Statistics"].isNull())
|
||||
alertListObject.escalations.info.statistics = infoNode["Statistics"].asString();
|
||||
auto warnNode = escalationsNode["Warn"];
|
||||
if(!warnNode["ComparisonOperator"].isNull())
|
||||
alertListObject.escalations.warn.comparisonOperator = warnNode["ComparisonOperator"].asString();
|
||||
if(!warnNode["Statistics"].isNull())
|
||||
alertListObject.escalations.warn.statistics = warnNode["Statistics"].asString();
|
||||
if(!warnNode["Threshold"].isNull())
|
||||
alertListObject.escalations.warn.threshold = warnNode["Threshold"].asString();
|
||||
if(!warnNode["Times"].isNull())
|
||||
alertListObject.escalations.warn.times = warnNode["Times"].asString();
|
||||
if(!warnNode["Threshold"].isNull())
|
||||
alertListObject.escalations.warn.threshold = warnNode["Threshold"].asString();
|
||||
if(!warnNode["Statistics"].isNull())
|
||||
alertListObject.escalations.warn.statistics = warnNode["Statistics"].asString();
|
||||
auto criticalNode = escalationsNode["Critical"];
|
||||
if(!criticalNode["ComparisonOperator"].isNull())
|
||||
alertListObject.escalations.critical.comparisonOperator = criticalNode["ComparisonOperator"].asString();
|
||||
if(!criticalNode["Statistics"].isNull())
|
||||
alertListObject.escalations.critical.statistics = criticalNode["Statistics"].asString();
|
||||
if(!criticalNode["Threshold"].isNull())
|
||||
alertListObject.escalations.critical.threshold = criticalNode["Threshold"].asString();
|
||||
if(!criticalNode["Times"].isNull())
|
||||
alertListObject.escalations.critical.times = criticalNode["Times"].asString();
|
||||
if(!criticalNode["Threshold"].isNull())
|
||||
alertListObject.escalations.critical.threshold = criticalNode["Threshold"].asString();
|
||||
if(!criticalNode["Statistics"].isNull())
|
||||
alertListObject.escalations.critical.statistics = criticalNode["Statistics"].asString();
|
||||
alertList_.push_back(alertListObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -43,42 +43,42 @@ void DescribeAlertLogListResult::parse(const std::string &payload)
|
||||
for (auto valueAlertLogListAlarm : allAlertLogListNode)
|
||||
{
|
||||
Alarm alertLogListObject;
|
||||
if(!valueAlertLogListAlarm["RuleId"].isNull())
|
||||
alertLogListObject.ruleId = valueAlertLogListAlarm["RuleId"].asString();
|
||||
if(!valueAlertLogListAlarm["RuleName"].isNull())
|
||||
alertLogListObject.ruleName = valueAlertLogListAlarm["RuleName"].asString();
|
||||
if(!valueAlertLogListAlarm["Namespace"].isNull())
|
||||
alertLogListObject._namespace = valueAlertLogListAlarm["Namespace"].asString();
|
||||
if(!valueAlertLogListAlarm["Product"].isNull())
|
||||
alertLogListObject.product = valueAlertLogListAlarm["Product"].asString();
|
||||
if(!valueAlertLogListAlarm["EventName"].isNull())
|
||||
alertLogListObject.eventName = valueAlertLogListAlarm["EventName"].asString();
|
||||
if(!valueAlertLogListAlarm["GroupId"].isNull())
|
||||
alertLogListObject.groupId = valueAlertLogListAlarm["GroupId"].asString();
|
||||
if(!valueAlertLogListAlarm["GroupName"].isNull())
|
||||
alertLogListObject.groupName = valueAlertLogListAlarm["GroupName"].asString();
|
||||
if(!valueAlertLogListAlarm["MetricName"].isNull())
|
||||
alertLogListObject.metricName = valueAlertLogListAlarm["MetricName"].asString();
|
||||
if(!valueAlertLogListAlarm["InstanceId"].isNull())
|
||||
alertLogListObject.instanceId = valueAlertLogListAlarm["InstanceId"].asString();
|
||||
if(!valueAlertLogListAlarm["InstanceName"].isNull())
|
||||
alertLogListObject.instanceName = valueAlertLogListAlarm["InstanceName"].asString();
|
||||
if(!valueAlertLogListAlarm["Level"].isNull())
|
||||
alertLogListObject.level = valueAlertLogListAlarm["Level"].asString();
|
||||
if(!valueAlertLogListAlarm["LevelChange"].isNull())
|
||||
alertLogListObject.levelChange = valueAlertLogListAlarm["LevelChange"].asString();
|
||||
if(!valueAlertLogListAlarm["SendStatus"].isNull())
|
||||
alertLogListObject.sendStatus = valueAlertLogListAlarm["SendStatus"].asString();
|
||||
if(!valueAlertLogListAlarm["AlertTime"].isNull())
|
||||
alertLogListObject.alertTime = valueAlertLogListAlarm["AlertTime"].asString();
|
||||
if(!valueAlertLogListAlarm["Message"].isNull())
|
||||
alertLogListObject.message = valueAlertLogListAlarm["Message"].asString();
|
||||
if(!valueAlertLogListAlarm["EventName"].isNull())
|
||||
alertLogListObject.eventName = valueAlertLogListAlarm["EventName"].asString();
|
||||
if(!valueAlertLogListAlarm["Product"].isNull())
|
||||
alertLogListObject.product = valueAlertLogListAlarm["Product"].asString();
|
||||
if(!valueAlertLogListAlarm["BlackListUUID"].isNull())
|
||||
alertLogListObject.blackListUUID = valueAlertLogListAlarm["BlackListUUID"].asString();
|
||||
if(!valueAlertLogListAlarm["Message"].isNull())
|
||||
alertLogListObject.message = valueAlertLogListAlarm["Message"].asString();
|
||||
if(!valueAlertLogListAlarm["Namespace"].isNull())
|
||||
alertLogListObject._namespace = valueAlertLogListAlarm["Namespace"].asString();
|
||||
if(!valueAlertLogListAlarm["LevelChange"].isNull())
|
||||
alertLogListObject.levelChange = valueAlertLogListAlarm["LevelChange"].asString();
|
||||
if(!valueAlertLogListAlarm["InstanceId"].isNull())
|
||||
alertLogListObject.instanceId = valueAlertLogListAlarm["InstanceId"].asString();
|
||||
if(!valueAlertLogListAlarm["RuleName"].isNull())
|
||||
alertLogListObject.ruleName = valueAlertLogListAlarm["RuleName"].asString();
|
||||
if(!valueAlertLogListAlarm["RuleId"].isNull())
|
||||
alertLogListObject.ruleId = valueAlertLogListAlarm["RuleId"].asString();
|
||||
if(!valueAlertLogListAlarm["BlackListName"].isNull())
|
||||
alertLogListObject.blackListName = valueAlertLogListAlarm["BlackListName"].asString();
|
||||
if(!valueAlertLogListAlarm["GroupName"].isNull())
|
||||
alertLogListObject.groupName = valueAlertLogListAlarm["GroupName"].asString();
|
||||
if(!valueAlertLogListAlarm["GroupId"].isNull())
|
||||
alertLogListObject.groupId = valueAlertLogListAlarm["GroupId"].asString();
|
||||
if(!valueAlertLogListAlarm["AlertTime"].isNull())
|
||||
alertLogListObject.alertTime = valueAlertLogListAlarm["AlertTime"].asString();
|
||||
if(!valueAlertLogListAlarm["InstanceName"].isNull())
|
||||
alertLogListObject.instanceName = valueAlertLogListAlarm["InstanceName"].asString();
|
||||
if(!valueAlertLogListAlarm["BlackListDetail"].isNull())
|
||||
alertLogListObject.blackListDetail = valueAlertLogListAlarm["BlackListDetail"].asString();
|
||||
if(!valueAlertLogListAlarm["Level"].isNull())
|
||||
alertLogListObject.level = valueAlertLogListAlarm["Level"].asString();
|
||||
if(!valueAlertLogListAlarm["SendStatus"].isNull())
|
||||
alertLogListObject.sendStatus = valueAlertLogListAlarm["SendStatus"].asString();
|
||||
auto allExtendedInfoNode = valueAlertLogListAlarm["ExtendedInfo"]["ExtInfo"];
|
||||
for (auto valueAlertLogListAlarmExtendedInfoExtInfo : allExtendedInfoNode)
|
||||
{
|
||||
@@ -103,14 +103,25 @@ void DescribeAlertLogListResult::parse(const std::string &payload)
|
||||
for (auto valueAlertLogListAlarmWebhookListWebhookListItem : allWebhookListNode)
|
||||
{
|
||||
Alarm::WebhookListItem webhookListObject;
|
||||
if(!valueAlertLogListAlarmWebhookListWebhookListItem["url"].isNull())
|
||||
webhookListObject.url = valueAlertLogListAlarmWebhookListWebhookListItem["url"].asString();
|
||||
if(!valueAlertLogListAlarmWebhookListWebhookListItem["code"].isNull())
|
||||
webhookListObject.code = valueAlertLogListAlarmWebhookListWebhookListItem["code"].asString();
|
||||
if(!valueAlertLogListAlarmWebhookListWebhookListItem["url"].isNull())
|
||||
webhookListObject.url = valueAlertLogListAlarmWebhookListWebhookListItem["url"].asString();
|
||||
if(!valueAlertLogListAlarmWebhookListWebhookListItem["message"].isNull())
|
||||
webhookListObject.message = valueAlertLogListAlarmWebhookListWebhookListItem["message"].asString();
|
||||
alertLogListObject.webhookList.push_back(webhookListObject);
|
||||
}
|
||||
auto allSendResultListNode = valueAlertLogListAlarm["SendResultList"]["SendResult"];
|
||||
for (auto valueAlertLogListAlarmSendResultListSendResult : allSendResultListNode)
|
||||
{
|
||||
Alarm::SendResult sendResultListObject;
|
||||
if(!valueAlertLogListAlarmSendResultListSendResult["Key"].isNull())
|
||||
sendResultListObject.key = valueAlertLogListAlarmSendResultListSendResult["Key"].asString();
|
||||
auto allValue = value["Value"]["Value"];
|
||||
for (auto value : allValue)
|
||||
sendResultListObject.value.push_back(value.asString());
|
||||
alertLogListObject.sendResultList.push_back(sendResultListObject);
|
||||
}
|
||||
auto sendDetailNode = value["SendDetail"];
|
||||
if(!sendDetailNode["ResultCode"].isNull())
|
||||
alertLogListObject.sendDetail.resultCode = sendDetailNode["ResultCode"].asString();
|
||||
@@ -126,12 +137,12 @@ void DescribeAlertLogListResult::parse(const std::string &payload)
|
||||
Alarm::SendDetail::ChannelResult::Result resultListObject;
|
||||
if(!sendDetailNodeChannelResultListChannelResultResultListResult["Code"].isNull())
|
||||
resultListObject.code = sendDetailNodeChannelResultListChannelResultResultListResult["Code"].asString();
|
||||
if(!sendDetailNodeChannelResultListChannelResultResultListResult["Detail"].isNull())
|
||||
resultListObject.detail = sendDetailNodeChannelResultListChannelResultResultListResult["Detail"].asString();
|
||||
if(!sendDetailNodeChannelResultListChannelResultResultListResult["Success"].isNull())
|
||||
resultListObject.success = sendDetailNodeChannelResultListChannelResultResultListResult["Success"].asString() == "true";
|
||||
if(!sendDetailNodeChannelResultListChannelResultResultListResult["RequestId"].isNull())
|
||||
resultListObject.requestId = sendDetailNodeChannelResultListChannelResultResultListResult["RequestId"].asString();
|
||||
if(!sendDetailNodeChannelResultListChannelResultResultListResult["Success"].isNull())
|
||||
resultListObject.success = sendDetailNodeChannelResultListChannelResultResultListResult["Success"].asString() == "true";
|
||||
if(!sendDetailNodeChannelResultListChannelResultResultListResult["Detail"].isNull())
|
||||
resultListObject.detail = sendDetailNodeChannelResultListChannelResultResultListResult["Detail"].asString();
|
||||
auto allNotifyTargetList = value["notifyTargetList"]["NotifyTarget"];
|
||||
for (auto value : allNotifyTargetList)
|
||||
resultListObject.notifyTargetList.push_back(value.asString());
|
||||
@@ -140,12 +151,21 @@ void DescribeAlertLogListResult::parse(const std::string &payload)
|
||||
alertLogListObject.sendDetail.channelResultList.push_back(channelResultObject);
|
||||
}
|
||||
auto escalationNode = value["Escalation"];
|
||||
if(!escalationNode["Times"].isNull())
|
||||
alertLogListObject.escalation.times = std::stoi(escalationNode["Times"].asString());
|
||||
if(!escalationNode["Expression"].isNull())
|
||||
alertLogListObject.escalation.expression = escalationNode["Expression"].asString();
|
||||
if(!escalationNode["Times"].isNull())
|
||||
alertLogListObject.escalation.times = std::stoi(escalationNode["Times"].asString());
|
||||
if(!escalationNode["Level"].isNull())
|
||||
alertLogListObject.escalation.level = escalationNode["Level"].asString();
|
||||
auto allDingdingWebhookList = value["DingdingWebhookList"]["ContactDingList"];
|
||||
for (auto value : allDingdingWebhookList)
|
||||
alertLogListObject.dingdingWebhookList.push_back(value.asString());
|
||||
auto allContactOnCallList = value["ContactOnCallList"]["ContactOnCallList"];
|
||||
for (auto value : allContactOnCallList)
|
||||
alertLogListObject.contactOnCallList.push_back(value.asString());
|
||||
auto allContactMailList = value["ContactMailList"]["ContactMailList"];
|
||||
for (auto value : allContactMailList)
|
||||
alertLogListObject.contactMailList.push_back(value.asString());
|
||||
auto allContactGroups = value["ContactGroups"]["ContactGroup"];
|
||||
for (auto value : allContactGroups)
|
||||
alertLogListObject.contactGroups.push_back(value.asString());
|
||||
@@ -155,32 +175,21 @@ void DescribeAlertLogListResult::parse(const std::string &payload)
|
||||
auto allContactSMSList = value["ContactSMSList"]["ContactSMSList"];
|
||||
for (auto value : allContactSMSList)
|
||||
alertLogListObject.contactSMSList.push_back(value.asString());
|
||||
auto allContactOnCallList = value["ContactOnCallList"]["ContactOnCallList"];
|
||||
for (auto value : allContactOnCallList)
|
||||
alertLogListObject.contactOnCallList.push_back(value.asString());
|
||||
auto allContactMailList = value["ContactMailList"]["ContactMailList"];
|
||||
for (auto value : allContactMailList)
|
||||
alertLogListObject.contactMailList.push_back(value.asString());
|
||||
auto allContactDingList = value["ContactDingList"]["ContactDingList"];
|
||||
for (auto value : allContactDingList)
|
||||
alertLogListObject.contactDingList.push_back(value.asString());
|
||||
auto allDingdingWebhookList = value["DingdingWebhookList"]["ContactDingList"];
|
||||
for (auto value : allDingdingWebhookList)
|
||||
alertLogListObject.dingdingWebhookList.push_back(value.asString());
|
||||
alertLogList_.push_back(alertLogListObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stoi(value["Total"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -204,11 +213,6 @@ int DescribeAlertLogListResult::getPageNumber()const
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
int DescribeAlertLogListResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogListResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
|
||||
@@ -43,29 +43,32 @@ void DescribeDynamicTagRuleListResult::parse(const std::string &payload)
|
||||
for (auto valueTagGroupListTagGroup : allTagGroupListNode)
|
||||
{
|
||||
TagGroup tagGroupListObject;
|
||||
if(!valueTagGroupListTagGroup["DynamicTagRuleId"].isNull())
|
||||
tagGroupListObject.dynamicTagRuleId = valueTagGroupListTagGroup["DynamicTagRuleId"].asString();
|
||||
if(!valueTagGroupListTagGroup["TagKey"].isNull())
|
||||
tagGroupListObject.tagKey = valueTagGroupListTagGroup["TagKey"].asString();
|
||||
if(!valueTagGroupListTagGroup["RegionId"].isNull())
|
||||
tagGroupListObject.regionId = valueTagGroupListTagGroup["RegionId"].asString();
|
||||
if(!valueTagGroupListTagGroup["MatchExpressFilterRelation"].isNull())
|
||||
tagGroupListObject.matchExpressFilterRelation = valueTagGroupListTagGroup["MatchExpressFilterRelation"].asString();
|
||||
if(!valueTagGroupListTagGroup["Status"].isNull())
|
||||
tagGroupListObject.status = valueTagGroupListTagGroup["Status"].asString();
|
||||
if(!valueTagGroupListTagGroup["MatchExpressFilterRelation"].isNull())
|
||||
tagGroupListObject.matchExpressFilterRelation = valueTagGroupListTagGroup["MatchExpressFilterRelation"].asString();
|
||||
if(!valueTagGroupListTagGroup["RegionId"].isNull())
|
||||
tagGroupListObject.regionId = valueTagGroupListTagGroup["RegionId"].asString();
|
||||
if(!valueTagGroupListTagGroup["TagKey"].isNull())
|
||||
tagGroupListObject.tagKey = valueTagGroupListTagGroup["TagKey"].asString();
|
||||
if(!valueTagGroupListTagGroup["DynamicTagRuleId"].isNull())
|
||||
tagGroupListObject.dynamicTagRuleId = valueTagGroupListTagGroup["DynamicTagRuleId"].asString();
|
||||
auto allMatchExpressNode = valueTagGroupListTagGroup["MatchExpress"]["MatchExpressItem"];
|
||||
for (auto valueTagGroupListTagGroupMatchExpressMatchExpressItem : allMatchExpressNode)
|
||||
{
|
||||
TagGroup::MatchExpressItem matchExpressObject;
|
||||
if(!valueTagGroupListTagGroupMatchExpressMatchExpressItem["TagValueMatchFunction"].isNull())
|
||||
matchExpressObject.tagValueMatchFunction = valueTagGroupListTagGroupMatchExpressMatchExpressItem["TagValueMatchFunction"].asString();
|
||||
if(!valueTagGroupListTagGroupMatchExpressMatchExpressItem["TagValue"].isNull())
|
||||
matchExpressObject.tagValue = valueTagGroupListTagGroupMatchExpressMatchExpressItem["TagValue"].asString();
|
||||
if(!valueTagGroupListTagGroupMatchExpressMatchExpressItem["TagValueMatchFunction"].isNull())
|
||||
matchExpressObject.tagValueMatchFunction = valueTagGroupListTagGroupMatchExpressMatchExpressItem["TagValueMatchFunction"].asString();
|
||||
tagGroupListObject.matchExpress.push_back(matchExpressObject);
|
||||
}
|
||||
auto allTemplateIdList = value["TemplateIdList"]["TemplateIdList"];
|
||||
for (auto value : allTemplateIdList)
|
||||
tagGroupListObject.templateIdList.push_back(value.asString());
|
||||
auto allContactGroupList = value["ContactGroupList"]["ContactGroupList"];
|
||||
for (auto value : allContactGroupList)
|
||||
tagGroupListObject.contactGroupList.push_back(value.asString());
|
||||
tagGroupList_.push_back(tagGroupListObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
@@ -74,12 +77,12 @@ void DescribeDynamicTagRuleListResult::parse(const std::string &payload)
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stoi(value["Total"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = value["PageNumber"].asString();
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = value["PageSize"].asString();
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = value["PageNumber"].asString();
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stoi(value["Total"].asString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,17 @@ void DescribeHostAvailabilityListRequest::setPageSize(int pageSize)
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeHostAvailabilityListRequest::getIds()const
|
||||
{
|
||||
return ids_;
|
||||
}
|
||||
|
||||
void DescribeHostAvailabilityListRequest::setIds(const std::string& ids)
|
||||
{
|
||||
ids_ = ids;
|
||||
setParameter("Ids", ids);
|
||||
}
|
||||
|
||||
long DescribeHostAvailabilityListRequest::getId()const
|
||||
{
|
||||
return id_;
|
||||
|
||||
@@ -40,72 +40,101 @@ void DescribeMetricRuleTemplateAttributeResult::parse(const std::string &payload
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resourceNode = value["Resource"];
|
||||
if(!resourceNode["Name"].isNull())
|
||||
resource_.name = resourceNode["Name"].asString();
|
||||
if(!resourceNode["TemplateId"].isNull())
|
||||
resource_.templateId = resourceNode["TemplateId"].asString();
|
||||
if(!resourceNode["RestVersion"].isNull())
|
||||
resource_.restVersion = resourceNode["RestVersion"].asString();
|
||||
if(!resourceNode["Description"].isNull())
|
||||
resource_.description = resourceNode["Description"].asString();
|
||||
if(!resourceNode["SystemEventTemplates"].isNull())
|
||||
resource_.systemEventTemplates = resourceNode["SystemEventTemplates"].asString();
|
||||
if(!resourceNode["ProcessMonitorTemplates"].isNull())
|
||||
resource_.processMonitorTemplates = resourceNode["ProcessMonitorTemplates"].asString();
|
||||
if(!resourceNode["Name"].isNull())
|
||||
resource_.name = resourceNode["Name"].asString();
|
||||
if(!resourceNode["RestVersion"].isNull())
|
||||
resource_.restVersion = resourceNode["RestVersion"].asString();
|
||||
if(!resourceNode["HostAvailabilityTemplates"].isNull())
|
||||
resource_.hostAvailabilityTemplates = resourceNode["HostAvailabilityTemplates"].asString();
|
||||
if(!resourceNode["TemplateId"].isNull())
|
||||
resource_.templateId = resourceNode["TemplateId"].asString();
|
||||
auto allAlertTemplatesNode = resourceNode["AlertTemplates"]["AlertTemplate"];
|
||||
for (auto resourceNodeAlertTemplatesAlertTemplate : allAlertTemplatesNode)
|
||||
{
|
||||
Resource::AlertTemplate alertTemplateObject;
|
||||
if(!resourceNodeAlertTemplatesAlertTemplate["RuleName"].isNull())
|
||||
alertTemplateObject.ruleName = resourceNodeAlertTemplatesAlertTemplate["RuleName"].asString();
|
||||
if(!resourceNodeAlertTemplatesAlertTemplate["Category"].isNull())
|
||||
alertTemplateObject.category = resourceNodeAlertTemplatesAlertTemplate["Category"].asString();
|
||||
if(!resourceNodeAlertTemplatesAlertTemplate["Namespace"].isNull())
|
||||
alertTemplateObject._namespace = resourceNodeAlertTemplatesAlertTemplate["Namespace"].asString();
|
||||
if(!resourceNodeAlertTemplatesAlertTemplate["MetricName"].isNull())
|
||||
alertTemplateObject.metricName = resourceNodeAlertTemplatesAlertTemplate["MetricName"].asString();
|
||||
if(!resourceNodeAlertTemplatesAlertTemplate["Selector"].isNull())
|
||||
alertTemplateObject.selector = resourceNodeAlertTemplatesAlertTemplate["Selector"].asString();
|
||||
if(!resourceNodeAlertTemplatesAlertTemplate["Webhook"].isNull())
|
||||
alertTemplateObject.webhook = resourceNodeAlertTemplatesAlertTemplate["Webhook"].asString();
|
||||
if(!resourceNodeAlertTemplatesAlertTemplate["Namespace"].isNull())
|
||||
alertTemplateObject._namespace = resourceNodeAlertTemplatesAlertTemplate["Namespace"].asString();
|
||||
if(!resourceNodeAlertTemplatesAlertTemplate["Category"].isNull())
|
||||
alertTemplateObject.category = resourceNodeAlertTemplatesAlertTemplate["Category"].asString();
|
||||
if(!resourceNodeAlertTemplatesAlertTemplate["RuleName"].isNull())
|
||||
alertTemplateObject.ruleName = resourceNodeAlertTemplatesAlertTemplate["RuleName"].asString();
|
||||
if(!resourceNodeAlertTemplatesAlertTemplate["NoDataPolicy"].isNull())
|
||||
alertTemplateObject.noDataPolicy = resourceNodeAlertTemplatesAlertTemplate["NoDataPolicy"].asString();
|
||||
auto compositeExpressionNode = value["CompositeExpression"];
|
||||
if(!compositeExpressionNode["Level"].isNull())
|
||||
alertTemplateObject.compositeExpression.level = compositeExpressionNode["Level"].asString();
|
||||
if(!compositeExpressionNode["ExpressionListJoin"].isNull())
|
||||
alertTemplateObject.compositeExpression.expressionListJoin = compositeExpressionNode["ExpressionListJoin"].asString();
|
||||
if(!compositeExpressionNode["ExpressionRaw"].isNull())
|
||||
alertTemplateObject.compositeExpression.expressionRaw = compositeExpressionNode["ExpressionRaw"].asString();
|
||||
if(!compositeExpressionNode["Times"].isNull())
|
||||
alertTemplateObject.compositeExpression.times = std::stoi(compositeExpressionNode["Times"].asString());
|
||||
auto allExpressionListNode = compositeExpressionNode["ExpressionList"]["ExpressionListItem"];
|
||||
for (auto compositeExpressionNodeExpressionListExpressionListItem : allExpressionListNode)
|
||||
{
|
||||
Resource::AlertTemplate::CompositeExpression::ExpressionListItem expressionListItemObject;
|
||||
if(!compositeExpressionNodeExpressionListExpressionListItem["MetricName"].isNull())
|
||||
expressionListItemObject.metricName = compositeExpressionNodeExpressionListExpressionListItem["MetricName"].asString();
|
||||
if(!compositeExpressionNodeExpressionListExpressionListItem["ComparisonOperator"].isNull())
|
||||
expressionListItemObject.comparisonOperator = compositeExpressionNodeExpressionListExpressionListItem["ComparisonOperator"].asString();
|
||||
if(!compositeExpressionNodeExpressionListExpressionListItem["Statistics"].isNull())
|
||||
expressionListItemObject.statistics = compositeExpressionNodeExpressionListExpressionListItem["Statistics"].asString();
|
||||
if(!compositeExpressionNodeExpressionListExpressionListItem["Threshold"].isNull())
|
||||
expressionListItemObject.threshold = compositeExpressionNodeExpressionListExpressionListItem["Threshold"].asString();
|
||||
if(!compositeExpressionNodeExpressionListExpressionListItem["Period"].isNull())
|
||||
expressionListItemObject.period = std::stoi(compositeExpressionNodeExpressionListExpressionListItem["Period"].asString());
|
||||
if(!compositeExpressionNodeExpressionListExpressionListItem["Id"].isNull())
|
||||
expressionListItemObject.id = compositeExpressionNodeExpressionListExpressionListItem["Id"].asString();
|
||||
alertTemplateObject.compositeExpression.expressionList.push_back(expressionListItemObject);
|
||||
}
|
||||
auto escalationsNode = value["Escalations"];
|
||||
auto infoNode = escalationsNode["Info"];
|
||||
if(!infoNode["Statistics"].isNull())
|
||||
alertTemplateObject.escalations.info.statistics = infoNode["Statistics"].asString();
|
||||
if(!infoNode["ComparisonOperator"].isNull())
|
||||
alertTemplateObject.escalations.info.comparisonOperator = infoNode["ComparisonOperator"].asString();
|
||||
if(!infoNode["Threshold"].isNull())
|
||||
alertTemplateObject.escalations.info.threshold = infoNode["Threshold"].asString();
|
||||
if(!infoNode["Times"].isNull())
|
||||
alertTemplateObject.escalations.info.times = std::stoi(infoNode["Times"].asString());
|
||||
if(!infoNode["Threshold"].isNull())
|
||||
alertTemplateObject.escalations.info.threshold = infoNode["Threshold"].asString();
|
||||
if(!infoNode["Statistics"].isNull())
|
||||
alertTemplateObject.escalations.info.statistics = infoNode["Statistics"].asString();
|
||||
auto warnNode = escalationsNode["Warn"];
|
||||
if(!warnNode["Statistics"].isNull())
|
||||
alertTemplateObject.escalations.warn.statistics = warnNode["Statistics"].asString();
|
||||
if(!warnNode["ComparisonOperator"].isNull())
|
||||
alertTemplateObject.escalations.warn.comparisonOperator = warnNode["ComparisonOperator"].asString();
|
||||
if(!warnNode["Threshold"].isNull())
|
||||
alertTemplateObject.escalations.warn.threshold = warnNode["Threshold"].asString();
|
||||
if(!warnNode["Times"].isNull())
|
||||
alertTemplateObject.escalations.warn.times = std::stoi(warnNode["Times"].asString());
|
||||
if(!warnNode["Threshold"].isNull())
|
||||
alertTemplateObject.escalations.warn.threshold = warnNode["Threshold"].asString();
|
||||
if(!warnNode["Statistics"].isNull())
|
||||
alertTemplateObject.escalations.warn.statistics = warnNode["Statistics"].asString();
|
||||
auto criticalNode = escalationsNode["Critical"];
|
||||
if(!criticalNode["Statistics"].isNull())
|
||||
alertTemplateObject.escalations.critical.statistics = criticalNode["Statistics"].asString();
|
||||
if(!criticalNode["ComparisonOperator"].isNull())
|
||||
alertTemplateObject.escalations.critical.comparisonOperator = criticalNode["ComparisonOperator"].asString();
|
||||
if(!criticalNode["Threshold"].isNull())
|
||||
alertTemplateObject.escalations.critical.threshold = criticalNode["Threshold"].asString();
|
||||
if(!criticalNode["Times"].isNull())
|
||||
alertTemplateObject.escalations.critical.times = std::stoi(criticalNode["Times"].asString());
|
||||
if(!criticalNode["Threshold"].isNull())
|
||||
alertTemplateObject.escalations.critical.threshold = criticalNode["Threshold"].asString();
|
||||
if(!criticalNode["Statistics"].isNull())
|
||||
alertTemplateObject.escalations.critical.statistics = criticalNode["Statistics"].asString();
|
||||
resource_.alertTemplates.push_back(alertTemplateObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -119,6 +119,8 @@ void DescribeSiteMonitorAttributeResult::parse(const std::string &payload)
|
||||
siteMonitors_.optionJson.authentication = std::stoi(optionJsonNode["authentication"].asString());
|
||||
if(!optionJsonNode["match_rule"].isNull())
|
||||
siteMonitors_.optionJson.match_rule = std::stoi(optionJsonNode["match_rule"].asString());
|
||||
if(!optionJsonNode["dns_match_rule"].isNull())
|
||||
siteMonitors_.optionJson.dns_match_rule = optionJsonNode["dns_match_rule"].asString();
|
||||
if(!optionJsonNode["ipv6_task"].isNull())
|
||||
siteMonitors_.optionJson.ipv6_task = optionJsonNode["ipv6_task"].asString();
|
||||
if(!optionJsonNode["request_content"].isNull())
|
||||
|
||||
@@ -88,6 +88,8 @@ void DescribeSiteMonitorListResult::parse(const std::string &payload)
|
||||
siteMonitorsObject.optionsJson.http_method = optionsJsonNode["http_method"].asString();
|
||||
if(!optionsJsonNode["match_rule"].isNull())
|
||||
siteMonitorsObject.optionsJson.match_rule = std::stoi(optionsJsonNode["match_rule"].asString());
|
||||
if(!optionsJsonNode["dns_match_rule"].isNull())
|
||||
siteMonitorsObject.optionsJson.dns_match_rule = optionsJsonNode["dns_match_rule"].asString();
|
||||
if(!optionsJsonNode["request_content"].isNull())
|
||||
siteMonitorsObject.optionsJson.request_content = optionsJsonNode["request_content"].asString();
|
||||
if(!optionsJsonNode["username"].isNull())
|
||||
|
||||
@@ -51,3 +51,14 @@ void InstallMonitoringAgentRequest::setForce(bool force)
|
||||
setParameter("Force", force ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string InstallMonitoringAgentRequest::getInstallCommand()const
|
||||
{
|
||||
return installCommand_;
|
||||
}
|
||||
|
||||
void InstallMonitoringAgentRequest::setInstallCommand(const std::string& installCommand)
|
||||
{
|
||||
installCommand_ = installCommand;
|
||||
setParameter("InstallCommand", installCommand);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,12 +39,12 @@ void PutContactGroupResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -39,12 +39,12 @@ void PutContactResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -93,6 +93,17 @@ void PutCustomEventRuleRequest::setEmailSubject(const std::string& emailSubject)
|
||||
setParameter("EmailSubject", emailSubject);
|
||||
}
|
||||
|
||||
std::string PutCustomEventRuleRequest::getMetricName()const
|
||||
{
|
||||
return metricName_;
|
||||
}
|
||||
|
||||
void PutCustomEventRuleRequest::setMetricName(const std::string& metricName)
|
||||
{
|
||||
metricName_ = metricName;
|
||||
setParameter("MetricName", metricName);
|
||||
}
|
||||
|
||||
std::string PutCustomEventRuleRequest::getPeriod()const
|
||||
{
|
||||
return period_;
|
||||
|
||||
@@ -39,12 +39,12 @@ void PutCustomEventRuleResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,9 @@ void PutGroupMetricRuleResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultNode = value["Result"];
|
||||
if(!resultNode["RuleId"].isNull())
|
||||
result_.ruleId = resultNode["RuleId"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
@@ -63,3 +66,8 @@ bool PutGroupMetricRuleResult::getSuccess()const
|
||||
return success_;
|
||||
}
|
||||
|
||||
PutGroupMetricRuleResult::Result PutGroupMetricRuleResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
|
||||
@@ -121,6 +121,17 @@ void PutLogMonitorRequest::setTumblingwindows(const std::string& tumblingwindows
|
||||
setParameter("Tumblingwindows", tumblingwindows);
|
||||
}
|
||||
|
||||
std::string PutLogMonitorRequest::getGroupBy()const
|
||||
{
|
||||
return groupBy_;
|
||||
}
|
||||
|
||||
void PutLogMonitorRequest::setGroupBy(const std::string& groupBy)
|
||||
{
|
||||
groupBy_ = groupBy;
|
||||
setParameter("GroupBy", groupBy);
|
||||
}
|
||||
|
||||
std::string PutLogMonitorRequest::getValueFilterRelation()const
|
||||
{
|
||||
return valueFilterRelation_;
|
||||
|
||||
@@ -43,10 +43,10 @@ void PutLogMonitorResult::parse(const std::string &payload)
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["LogId"].isNull())
|
||||
logId_ = value["LogId"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user