Procházet zdrojové kódy

Edit GetStack api.

sdk-team před 6 roky
rodič
revize
5d7cb923d0

+ 3 - 0
CHANGELOG

@@ -1,3 +1,6 @@
+2020-07-31 Version: 1.36.547
+- Edit GetStack api.
+
 2020-07-30 Version: 1.36.546
 - Add Smart Cloudauth API.
 

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.546
+1.36.547

+ 3 - 0
arms/include/alibabacloud/arms/model/DeleteTraceAppRequest.h

@@ -39,12 +39,15 @@ namespace AlibabaCloud
 				void setRegionId(const std::string& regionId);
 				std::string getAppId()const;
 				void setAppId(const std::string& appId);
+				std::string getPid()const;
+				void setPid(const std::string& pid);
 				std::string getType()const;
 				void setType(const std::string& type);
 
             private:
 				std::string regionId_;
 				std::string appId_;
+				std::string pid_;
 				std::string type_;
 
 			};

+ 3 - 0
arms/include/alibabacloud/arms/model/GetStackRequest.h

@@ -41,11 +41,14 @@ namespace AlibabaCloud
 				void setRegionId(const std::string& regionId);
 				std::string getRpcID()const;
 				void setRpcID(const std::string& rpcID);
+				std::string getPid()const;
+				void setPid(const std::string& pid);
 
             private:
 				std::string traceID_;
 				std::string regionId_;
 				std::string rpcID_;
+				std::string pid_;
 
 			};
 		}

+ 2 - 2
arms/include/alibabacloud/arms/model/GetStackResult.h

@@ -34,14 +34,14 @@ namespace AlibabaCloud
 			public:
 				struct StackInfoItem
 				{
-					struct ExtInfoItem
+					struct ExtInfo
 					{
 						std::string type;
 						std::string info;
 					};
 					std::string line;
 					std::string serviceName;
-					std::vector<StackInfoItem::ExtInfoItem> extInfo;
+					ExtInfo extInfo;
 					std::string rpcId;
 					long startTime;
 					long duration;

+ 3 - 3
arms/include/alibabacloud/arms/model/ImportCustomAlertRulesRequest.h

@@ -41,17 +41,17 @@ namespace AlibabaCloud
 				void setRegionId(const std::string& regionId);
 				std::string getContactGroupIds()const;
 				void setContactGroupIds(const std::string& contactGroupIds);
+				std::string getTemplateAlertConfig()const;
+				void setTemplateAlertConfig(const std::string& templateAlertConfig);
 				std::string getProxyUserId()const;
 				void setProxyUserId(const std::string& proxyUserId);
-				std::string getTemplageAlertConfig()const;
-				void setTemplageAlertConfig(const std::string& templageAlertConfig);
 
             private:
 				bool isAutoStart_;
 				std::string regionId_;
 				std::string contactGroupIds_;
+				std::string templateAlertConfig_;
 				std::string proxyUserId_;
-				std::string templageAlertConfig_;
 
 			};
 		}

+ 5 - 0
arms/include/alibabacloud/arms/model/SearchAlertRulesResult.h

@@ -40,6 +40,8 @@ namespace AlibabaCloud
 						{
 							std::string alarmContentTemplate;
 							std::string alarmContentSubTitle;
+							std::string content;
+							std::string subTitle;
 						};
 						struct AlertRule
 						{
@@ -80,11 +82,14 @@ namespace AlibabaCloud
 						MetricParam metricParam;
 						int alertVersion;
 						long taskId;
+						std::string contactGroupIds;
 						std::string config;
 						long createTime;
 						std::vector<std::string> alertWays;
+						std::string title;
 						std::string taskStatus;
 						AlarmContext alarmContext;
+						std::vector<std::string> alertWay;
 						int alertType;
 						std::string contactGroupIdList;
 						Notice notice;

+ 11 - 0
arms/src/model/DeleteTraceAppRequest.cc

@@ -49,6 +49,17 @@ void DeleteTraceAppRequest::setAppId(const std::string& appId)
 	setParameter("AppId", appId);
 }
 
+std::string DeleteTraceAppRequest::getPid()const
+{
+	return pid_;
+}
+
+void DeleteTraceAppRequest::setPid(const std::string& pid)
+{
+	pid_ = pid;
+	setParameter("Pid", pid);
+}
+
 std::string DeleteTraceAppRequest::getType()const
 {
 	return type_;

+ 11 - 0
arms/src/model/GetStackRequest.cc

@@ -60,3 +60,14 @@ void GetStackRequest::setRpcID(const std::string& rpcID)
 	setParameter("RpcID", rpcID);
 }
 
+std::string GetStackRequest::getPid()const
+{
+	return pid_;
+}
+
+void GetStackRequest::setPid(const std::string& pid)
+{
+	pid_ = pid;
+	setParameter("Pid", pid);
+}
+

+ 5 - 10
arms/src/model/GetStackResult.cc

@@ -57,16 +57,11 @@ void GetStackResult::parse(const std::string &payload)
 			stackInfoObject.exception = valueStackInfoStackInfoItem["Exception"].asString();
 		if(!valueStackInfoStackInfoItem["Line"].isNull())
 			stackInfoObject.line = valueStackInfoStackInfoItem["Line"].asString();
-		auto allExtInfoNode = allStackInfoNode["ExtInfo"]["ExtInfoItem"];
-		for (auto allStackInfoNodeExtInfoExtInfoItem : allExtInfoNode)
-		{
-			StackInfoItem::ExtInfoItem extInfoObject;
-			if(!allStackInfoNodeExtInfoExtInfoItem["Type"].isNull())
-				extInfoObject.type = allStackInfoNodeExtInfoExtInfoItem["Type"].asString();
-			if(!allStackInfoNodeExtInfoExtInfoItem["Info"].isNull())
-				extInfoObject.info = allStackInfoNodeExtInfoExtInfoItem["Info"].asString();
-			stackInfoObject.extInfo.push_back(extInfoObject);
-		}
+		auto extInfoNode = value["ExtInfo"];
+		if(!extInfoNode["Type"].isNull())
+			stackInfoObject.extInfo.type = extInfoNode["Type"].asString();
+		if(!extInfoNode["Info"].isNull())
+			stackInfoObject.extInfo.info = extInfoNode["Info"].asString();
 		stackInfo_.push_back(stackInfoObject);
 	}
 

+ 10 - 10
arms/src/model/ImportCustomAlertRulesRequest.cc

@@ -60,25 +60,25 @@ void ImportCustomAlertRulesRequest::setContactGroupIds(const std::string& contac
 	setParameter("ContactGroupIds", contactGroupIds);
 }
 
-std::string ImportCustomAlertRulesRequest::getProxyUserId()const
+std::string ImportCustomAlertRulesRequest::getTemplateAlertConfig()const
 {
-	return proxyUserId_;
+	return templateAlertConfig_;
 }
 
-void ImportCustomAlertRulesRequest::setProxyUserId(const std::string& proxyUserId)
+void ImportCustomAlertRulesRequest::setTemplateAlertConfig(const std::string& templateAlertConfig)
 {
-	proxyUserId_ = proxyUserId;
-	setParameter("ProxyUserId", proxyUserId);
+	templateAlertConfig_ = templateAlertConfig;
+	setParameter("TemplateAlertConfig", templateAlertConfig);
 }
 
-std::string ImportCustomAlertRulesRequest::getTemplageAlertConfig()const
+std::string ImportCustomAlertRulesRequest::getProxyUserId()const
 {
-	return templageAlertConfig_;
+	return proxyUserId_;
 }
 
-void ImportCustomAlertRulesRequest::setTemplageAlertConfig(const std::string& templageAlertConfig)
+void ImportCustomAlertRulesRequest::setProxyUserId(const std::string& proxyUserId)
 {
-	templageAlertConfig_ = templageAlertConfig;
-	setParameter("TemplageAlertConfig", templageAlertConfig);
+	proxyUserId_ = proxyUserId;
+	setParameter("ProxyUserId", proxyUserId);
 }
 

+ 11 - 0
arms/src/model/SearchAlertRulesResult.cc

@@ -78,11 +78,19 @@ void SearchAlertRulesResult::parse(const std::string &payload)
 			alertRuleEntityObject.updateTime = std::stol(pageBeanNodeAlertRulesAlertRuleEntity["UpdateTime"].asString());
 		if(!pageBeanNodeAlertRulesAlertRuleEntity["UserId"].isNull())
 			alertRuleEntityObject.userId = pageBeanNodeAlertRulesAlertRuleEntity["UserId"].asString();
+		if(!pageBeanNodeAlertRulesAlertRuleEntity["Title"].isNull())
+			alertRuleEntityObject.title = pageBeanNodeAlertRulesAlertRuleEntity["Title"].asString();
+		if(!pageBeanNodeAlertRulesAlertRuleEntity["ContactGroupIds"].isNull())
+			alertRuleEntityObject.contactGroupIds = pageBeanNodeAlertRulesAlertRuleEntity["ContactGroupIds"].asString();
 		auto alarmContextNode = value["AlarmContext"];
 		if(!alarmContextNode["AlarmContentTemplate"].isNull())
 			alertRuleEntityObject.alarmContext.alarmContentTemplate = alarmContextNode["AlarmContentTemplate"].asString();
 		if(!alarmContextNode["AlarmContentSubTitle"].isNull())
 			alertRuleEntityObject.alarmContext.alarmContentSubTitle = alarmContextNode["AlarmContentSubTitle"].asString();
+		if(!alarmContextNode["Content"].isNull())
+			alertRuleEntityObject.alarmContext.content = alarmContextNode["Content"].asString();
+		if(!alarmContextNode["SubTitle"].isNull())
+			alertRuleEntityObject.alarmContext.subTitle = alarmContextNode["SubTitle"].asString();
 		auto alertRuleNode = value["AlertRule"];
 		if(!alertRuleNode["Operator"].isNull())
 			alertRuleEntityObject.alertRule._operator = alertRuleNode["Operator"].asString();
@@ -137,6 +145,9 @@ void SearchAlertRulesResult::parse(const std::string &payload)
 		auto allAlertWays = value["AlertWays"]["AlertWay"];
 		for (auto value : allAlertWays)
 			alertRuleEntityObject.alertWays.push_back(value.asString());
+		auto allAlertWay = value["AlertWay"]["AlertWay"];
+		for (auto value : allAlertWay)
+			alertRuleEntityObject.alertWay.push_back(value.asString());
 		pageBean_.alertRules.push_back(alertRuleEntityObject);
 	}