sdk-team 6 лет назад
Родитель
Сommit
1ac661d847

+ 5 - 0
CHANGELOG

@@ -1,3 +1,8 @@
+2020-07-15 Version: 1.36.519
+- Edit ListTraceApp api.
+- Edit SearchTraceAppByName api.
+- Edut SearchTraceAppByPage api.
+
 2020-07-15 Version: 1.36.518
 - Modify ConfigureBackupPlan.
 - Modify DescribeFullBackupList.

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.518
+1.36.519

+ 4 - 0
arms/CMakeLists.txt

@@ -29,6 +29,8 @@ set(arms_public_header_model
 	include/alibabacloud/arms/model/CheckDataConsistencyResult.h
 	include/alibabacloud/arms/model/CheckServiceLinkedRoleForDeletingRequest.h
 	include/alibabacloud/arms/model/CheckServiceLinkedRoleForDeletingResult.h
+	include/alibabacloud/arms/model/ConfigAppRequest.h
+	include/alibabacloud/arms/model/ConfigAppResult.h
 	include/alibabacloud/arms/model/CreateAlertContactRequest.h
 	include/alibabacloud/arms/model/CreateAlertContactResult.h
 	include/alibabacloud/arms/model/CreateAlertContactGroupRequest.h
@@ -122,6 +124,8 @@ set(arms_src
 	src/model/CheckDataConsistencyResult.cc
 	src/model/CheckServiceLinkedRoleForDeletingRequest.cc
 	src/model/CheckServiceLinkedRoleForDeletingResult.cc
+	src/model/ConfigAppRequest.cc
+	src/model/ConfigAppResult.cc
 	src/model/CreateAlertContactRequest.cc
 	src/model/CreateAlertContactResult.cc
 	src/model/CreateAlertContactGroupRequest.cc

+ 8 - 0
arms/include/alibabacloud/arms/ARMSClient.h

@@ -30,6 +30,8 @@
 #include "model/CheckDataConsistencyResult.h"
 #include "model/CheckServiceLinkedRoleForDeletingRequest.h"
 #include "model/CheckServiceLinkedRoleForDeletingResult.h"
+#include "model/ConfigAppRequest.h"
+#include "model/ConfigAppResult.h"
 #include "model/CreateAlertContactRequest.h"
 #include "model/CreateAlertContactResult.h"
 #include "model/CreateAlertContactGroupRequest.h"
@@ -133,6 +135,9 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::CheckServiceLinkedRoleForDeletingResult> CheckServiceLinkedRoleForDeletingOutcome;
 			typedef std::future<CheckServiceLinkedRoleForDeletingOutcome> CheckServiceLinkedRoleForDeletingOutcomeCallable;
 			typedef std::function<void(const ARMSClient*, const Model::CheckServiceLinkedRoleForDeletingRequest&, const CheckServiceLinkedRoleForDeletingOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CheckServiceLinkedRoleForDeletingAsyncHandler;
+			typedef Outcome<Error, Model::ConfigAppResult> ConfigAppOutcome;
+			typedef std::future<ConfigAppOutcome> ConfigAppOutcomeCallable;
+			typedef std::function<void(const ARMSClient*, const Model::ConfigAppRequest&, const ConfigAppOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ConfigAppAsyncHandler;
 			typedef Outcome<Error, Model::CreateAlertContactResult> CreateAlertContactOutcome;
 			typedef std::future<CreateAlertContactOutcome> CreateAlertContactOutcomeCallable;
 			typedef std::function<void(const ARMSClient*, const Model::CreateAlertContactRequest&, const CreateAlertContactOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateAlertContactAsyncHandler;
@@ -273,6 +278,9 @@ namespace AlibabaCloud
 			CheckServiceLinkedRoleForDeletingOutcome checkServiceLinkedRoleForDeleting(const Model::CheckServiceLinkedRoleForDeletingRequest &request)const;
 			void checkServiceLinkedRoleForDeletingAsync(const Model::CheckServiceLinkedRoleForDeletingRequest& request, const CheckServiceLinkedRoleForDeletingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			CheckServiceLinkedRoleForDeletingOutcomeCallable checkServiceLinkedRoleForDeletingCallable(const Model::CheckServiceLinkedRoleForDeletingRequest& request) const;
+			ConfigAppOutcome configApp(const Model::ConfigAppRequest &request)const;
+			void configAppAsync(const Model::ConfigAppRequest& request, const ConfigAppAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			ConfigAppOutcomeCallable configAppCallable(const Model::ConfigAppRequest& request) const;
 			CreateAlertContactOutcome createAlertContact(const Model::CreateAlertContactRequest &request)const;
 			void createAlertContactAsync(const Model::CreateAlertContactRequest& request, const CreateAlertContactAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			CreateAlertContactOutcomeCallable createAlertContactCallable(const Model::CreateAlertContactRequest& request) const;

+ 54 - 0
arms/include/alibabacloud/arms/model/ConfigAppRequest.h

@@ -0,0 +1,54 @@
+/*
+ * Copyright 2009-2017 Alibaba Cloud All rights reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ALIBABACLOUD_ARMS_MODEL_CONFIGAPPREQUEST_H_
+#define ALIBABACLOUD_ARMS_MODEL_CONFIGAPPREQUEST_H_
+
+#include <string>
+#include <vector>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <alibabacloud/arms/ARMSExport.h>
+
+namespace AlibabaCloud
+{
+	namespace ARMS
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_ARMS_EXPORT ConfigAppRequest : public RpcServiceRequest
+			{
+
+			public:
+				ConfigAppRequest();
+				~ConfigAppRequest();
+
+				std::string getAppIds()const;
+				void setAppIds(const std::string& appIds);
+				std::string getRegionId()const;
+				void setRegionId(const std::string& regionId);
+				bool getEnable()const;
+				void setEnable(bool enable);
+
+            private:
+				std::string appIds_;
+				std::string regionId_;
+				bool enable_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_ARMS_MODEL_CONFIGAPPREQUEST_H_

+ 51 - 0
arms/include/alibabacloud/arms/model/ConfigAppResult.h

@@ -0,0 +1,51 @@
+/*
+ * Copyright 2009-2017 Alibaba Cloud All rights reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ALIBABACLOUD_ARMS_MODEL_CONFIGAPPRESULT_H_
+#define ALIBABACLOUD_ARMS_MODEL_CONFIGAPPRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/arms/ARMSExport.h>
+
+namespace AlibabaCloud
+{
+	namespace ARMS
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_ARMS_EXPORT ConfigAppResult : public ServiceResult
+			{
+			public:
+
+
+				ConfigAppResult();
+				explicit ConfigAppResult(const std::string &payload);
+				~ConfigAppResult();
+				std::string getData()const;
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+				std::string data_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_ARMS_MODEL_CONFIGAPPRESULT_H_

+ 1 - 0
arms/include/alibabacloud/arms/model/ListTraceAppsResult.h

@@ -40,6 +40,7 @@ namespace AlibabaCloud
 					long createTime;
 					long updateTime;
 					std::string pid;
+					bool show;
 					std::string regionId;
 					std::string appName;
 				};

+ 1 - 0
arms/include/alibabacloud/arms/model/SearchTraceAppByNameResult.h

@@ -40,6 +40,7 @@ namespace AlibabaCloud
 					long createTime;
 					long updateTime;
 					std::string pid;
+					bool show;
 					std::string regionId;
 					std::string appName;
 				};

+ 1 - 0
arms/include/alibabacloud/arms/model/SearchTraceAppByPageResult.h

@@ -42,6 +42,7 @@ namespace AlibabaCloud
 						long createTime;
 						long updateTime;
 						std::string pid;
+						bool show;
 						std::string regionId;
 						std::string appName;
 					};

+ 36 - 0
arms/src/ARMSClient.cc

@@ -195,6 +195,42 @@ ARMSClient::CheckServiceLinkedRoleForDeletingOutcomeCallable ARMSClient::checkSe
 	return task->get_future();
 }
 
+ARMSClient::ConfigAppOutcome ARMSClient::configApp(const ConfigAppRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return ConfigAppOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return ConfigAppOutcome(ConfigAppResult(outcome.result()));
+	else
+		return ConfigAppOutcome(outcome.error());
+}
+
+void ARMSClient::configAppAsync(const ConfigAppRequest& request, const ConfigAppAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, configApp(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+ARMSClient::ConfigAppOutcomeCallable ARMSClient::configAppCallable(const ConfigAppRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<ConfigAppOutcome()>>(
+			[this, request]()
+			{
+			return this->configApp(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
 ARMSClient::CreateAlertContactOutcome ARMSClient::createAlertContact(const CreateAlertContactRequest &request) const
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();

+ 62 - 0
arms/src/model/ConfigAppRequest.cc

@@ -0,0 +1,62 @@
+/*
+ * Copyright 2009-2017 Alibaba Cloud All rights reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <alibabacloud/arms/model/ConfigAppRequest.h>
+
+using AlibabaCloud::ARMS::Model::ConfigAppRequest;
+
+ConfigAppRequest::ConfigAppRequest() :
+	RpcServiceRequest("arms", "2019-08-08", "ConfigApp")
+{
+	setMethod(HttpRequest::Method::Post);
+}
+
+ConfigAppRequest::~ConfigAppRequest()
+{}
+
+std::string ConfigAppRequest::getAppIds()const
+{
+	return appIds_;
+}
+
+void ConfigAppRequest::setAppIds(const std::string& appIds)
+{
+	appIds_ = appIds;
+	setParameter("AppIds", appIds);
+}
+
+std::string ConfigAppRequest::getRegionId()const
+{
+	return regionId_;
+}
+
+void ConfigAppRequest::setRegionId(const std::string& regionId)
+{
+	regionId_ = regionId;
+	setParameter("RegionId", regionId);
+}
+
+bool ConfigAppRequest::getEnable()const
+{
+	return enable_;
+}
+
+void ConfigAppRequest::setEnable(bool enable)
+{
+	enable_ = enable;
+	setParameter("Enable", enable ? "true" : "false");
+}
+

+ 51 - 0
arms/src/model/ConfigAppResult.cc

@@ -0,0 +1,51 @@
+/*
+ * Copyright 2009-2017 Alibaba Cloud All rights reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <alibabacloud/arms/model/ConfigAppResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::ARMS;
+using namespace AlibabaCloud::ARMS::Model;
+
+ConfigAppResult::ConfigAppResult() :
+	ServiceResult()
+{}
+
+ConfigAppResult::ConfigAppResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+ConfigAppResult::~ConfigAppResult()
+{}
+
+void ConfigAppResult::parse(const std::string &payload)
+{
+	Json::Reader reader;
+	Json::Value value;
+	reader.parse(payload, value);
+	setRequestId(value["RequestId"].asString());
+	if(!value["Data"].isNull())
+		data_ = value["Data"].asString();
+
+}
+
+std::string ConfigAppResult::getData()const
+{
+	return data_;
+}
+

+ 2 - 0
arms/src/model/ListTraceAppsResult.cc

@@ -59,6 +59,8 @@ void ListTraceAppsResult::parse(const std::string &payload)
 			traceAppsObject.updateTime = std::stol(valueTraceAppsTraceApp["UpdateTime"].asString());
 		if(!valueTraceAppsTraceApp["RegionId"].isNull())
 			traceAppsObject.regionId = valueTraceAppsTraceApp["RegionId"].asString();
+		if(!valueTraceAppsTraceApp["Show"].isNull())
+			traceAppsObject.show = valueTraceAppsTraceApp["Show"].asString() == "true";
 		traceApps_.push_back(traceAppsObject);
 	}
 	if(!value["Success"].isNull())

+ 2 - 0
arms/src/model/SearchTraceAppByNameResult.cc

@@ -59,6 +59,8 @@ void SearchTraceAppByNameResult::parse(const std::string &payload)
 			traceAppsObject.createTime = std::stol(valueTraceAppsTraceApp["CreateTime"].asString());
 		if(!valueTraceAppsTraceApp["UpdateTime"].isNull())
 			traceAppsObject.updateTime = std::stol(valueTraceAppsTraceApp["UpdateTime"].asString());
+		if(!valueTraceAppsTraceApp["Show"].isNull())
+			traceAppsObject.show = valueTraceAppsTraceApp["Show"].asString() == "true";
 		traceApps_.push_back(traceAppsObject);
 	}
 

+ 2 - 0
arms/src/model/SearchTraceAppByPageResult.cc

@@ -66,6 +66,8 @@ void SearchTraceAppByPageResult::parse(const std::string &payload)
 			traceAppObject.createTime = std::stol(pageBeanNodeTraceAppsTraceApp["CreateTime"].asString());
 		if(!pageBeanNodeTraceAppsTraceApp["UpdateTime"].isNull())
 			traceAppObject.updateTime = std::stol(pageBeanNodeTraceAppsTraceApp["UpdateTime"].asString());
+		if(!pageBeanNodeTraceAppsTraceApp["Show"].isNull())
+			traceAppObject.show = pageBeanNodeTraceAppsTraceApp["Show"].asString() == "true";
 		pageBean_.traceApps.push_back(traceAppObject);
 	}