Răsfoiți Sursa

Support RefreshProxyLevel.

sdk-team 4 ani în urmă
părinte
comite
5dbd88a76d

+ 3 - 0
CHANGELOG

@@ -1,3 +1,6 @@
+2022-02-22 Version: 1.36.1063
+- Support RefreshProxyLevel.
+
 2022-02-21 Version: 1.36.1062
 - Add event tasks.
 - DescribeInstance taskProgress.

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.1062
+1.36.1063

+ 4 - 0
polardb/CMakeLists.txt

@@ -213,6 +213,8 @@ set(polardb_public_header_model
 	include/alibabacloud/polardb/model/ModifyMaskingRulesResult.h
 	include/alibabacloud/polardb/model/ModifyPendingMaintenanceActionRequest.h
 	include/alibabacloud/polardb/model/ModifyPendingMaintenanceActionResult.h
+	include/alibabacloud/polardb/model/RefreshProxyLevelRequest.h
+	include/alibabacloud/polardb/model/RefreshProxyLevelResult.h
 	include/alibabacloud/polardb/model/RemoveDBClusterFromGDNRequest.h
 	include/alibabacloud/polardb/model/RemoveDBClusterFromGDNResult.h
 	include/alibabacloud/polardb/model/ResetAccountRequest.h
@@ -430,6 +432,8 @@ set(polardb_src
 	src/model/ModifyMaskingRulesResult.cc
 	src/model/ModifyPendingMaintenanceActionRequest.cc
 	src/model/ModifyPendingMaintenanceActionResult.cc
+	src/model/RefreshProxyLevelRequest.cc
+	src/model/RefreshProxyLevelResult.cc
 	src/model/RemoveDBClusterFromGDNRequest.cc
 	src/model/RemoveDBClusterFromGDNResult.cc
 	src/model/ResetAccountRequest.cc

+ 8 - 0
polardb/include/alibabacloud/polardb/PolardbClient.h

@@ -214,6 +214,8 @@
 #include "model/ModifyMaskingRulesResult.h"
 #include "model/ModifyPendingMaintenanceActionRequest.h"
 #include "model/ModifyPendingMaintenanceActionResult.h"
+#include "model/RefreshProxyLevelRequest.h"
+#include "model/RefreshProxyLevelResult.h"
 #include "model/RemoveDBClusterFromGDNRequest.h"
 #include "model/RemoveDBClusterFromGDNResult.h"
 #include "model/ResetAccountRequest.h"
@@ -533,6 +535,9 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::ModifyPendingMaintenanceActionResult> ModifyPendingMaintenanceActionOutcome;
 			typedef std::future<ModifyPendingMaintenanceActionOutcome> ModifyPendingMaintenanceActionOutcomeCallable;
 			typedef std::function<void(const PolardbClient*, const Model::ModifyPendingMaintenanceActionRequest&, const ModifyPendingMaintenanceActionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyPendingMaintenanceActionAsyncHandler;
+			typedef Outcome<Error, Model::RefreshProxyLevelResult> RefreshProxyLevelOutcome;
+			typedef std::future<RefreshProxyLevelOutcome> RefreshProxyLevelOutcomeCallable;
+			typedef std::function<void(const PolardbClient*, const Model::RefreshProxyLevelRequest&, const RefreshProxyLevelOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RefreshProxyLevelAsyncHandler;
 			typedef Outcome<Error, Model::RemoveDBClusterFromGDNResult> RemoveDBClusterFromGDNOutcome;
 			typedef std::future<RemoveDBClusterFromGDNOutcome> RemoveDBClusterFromGDNOutcomeCallable;
 			typedef std::function<void(const PolardbClient*, const Model::RemoveDBClusterFromGDNRequest&, const RemoveDBClusterFromGDNOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RemoveDBClusterFromGDNAsyncHandler;
@@ -859,6 +864,9 @@ namespace AlibabaCloud
 			ModifyPendingMaintenanceActionOutcome modifyPendingMaintenanceAction(const Model::ModifyPendingMaintenanceActionRequest &request)const;
 			void modifyPendingMaintenanceActionAsync(const Model::ModifyPendingMaintenanceActionRequest& request, const ModifyPendingMaintenanceActionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			ModifyPendingMaintenanceActionOutcomeCallable modifyPendingMaintenanceActionCallable(const Model::ModifyPendingMaintenanceActionRequest& request) const;
+			RefreshProxyLevelOutcome refreshProxyLevel(const Model::RefreshProxyLevelRequest &request)const;
+			void refreshProxyLevelAsync(const Model::RefreshProxyLevelRequest& request, const RefreshProxyLevelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			RefreshProxyLevelOutcomeCallable refreshProxyLevelCallable(const Model::RefreshProxyLevelRequest& request) const;
 			RemoveDBClusterFromGDNOutcome removeDBClusterFromGDN(const Model::RemoveDBClusterFromGDNRequest &request)const;
 			void removeDBClusterFromGDNAsync(const Model::RemoveDBClusterFromGDNRequest& request, const RemoveDBClusterFromGDNAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			RemoveDBClusterFromGDNOutcomeCallable removeDBClusterFromGDNCallable(const Model::RemoveDBClusterFromGDNRequest& request) const;

+ 3 - 0
polardb/include/alibabacloud/polardb/model/ModifyDBNodeClassRequest.h

@@ -57,6 +57,8 @@ namespace AlibabaCloud
 				void setPlannedStartTime(const std::string& plannedStartTime);
 				std::string getModifyType()const;
 				void setModifyType(const std::string& modifyType);
+				std::string getSubCategory()const;
+				void setSubCategory(const std::string& subCategory);
 
             private:
 				long resourceOwnerId_;
@@ -70,6 +72,7 @@ namespace AlibabaCloud
 				long ownerId_;
 				std::string plannedStartTime_;
 				std::string modifyType_;
+				std::string subCategory_;
 
 			};
 		}

+ 75 - 0
polardb/include/alibabacloud/polardb/model/RefreshProxyLevelRequest.h

@@ -0,0 +1,75 @@
+/*
+ * 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_POLARDB_MODEL_REFRESHPROXYLEVELREQUEST_H_
+#define ALIBABACLOUD_POLARDB_MODEL_REFRESHPROXYLEVELREQUEST_H_
+
+#include <string>
+#include <vector>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <alibabacloud/polardb/PolardbExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Polardb
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_POLARDB_EXPORT RefreshProxyLevelRequest : public RpcServiceRequest
+			{
+
+			public:
+				RefreshProxyLevelRequest();
+				~RefreshProxyLevelRequest();
+
+				long getResourceOwnerId()const;
+				void setResourceOwnerId(long resourceOwnerId);
+				std::string getPlannedEndTime()const;
+				void setPlannedEndTime(const std::string& plannedEndTime);
+				std::string getAccessKeyId()const;
+				void setAccessKeyId(const std::string& accessKeyId);
+				std::string getProxyTargetClass()const;
+				void setProxyTargetClass(const std::string& proxyTargetClass);
+				std::string getResourceOwnerAccount()const;
+				void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
+				std::string getDBClusterId()const;
+				void setDBClusterId(const std::string& dBClusterId);
+				std::string getOwnerAccount()const;
+				void setOwnerAccount(const std::string& ownerAccount);
+				long getOwnerId()const;
+				void setOwnerId(long ownerId);
+				std::string getPlannedStartTime()const;
+				void setPlannedStartTime(const std::string& plannedStartTime);
+				bool getFromTimeService()const;
+				void setFromTimeService(bool fromTimeService);
+
+            private:
+				long resourceOwnerId_;
+				std::string plannedEndTime_;
+				std::string accessKeyId_;
+				std::string proxyTargetClass_;
+				std::string resourceOwnerAccount_;
+				std::string dBClusterId_;
+				std::string ownerAccount_;
+				long ownerId_;
+				std::string plannedStartTime_;
+				bool fromTimeService_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_POLARDB_MODEL_REFRESHPROXYLEVELREQUEST_H_

+ 49 - 0
polardb/include/alibabacloud/polardb/model/RefreshProxyLevelResult.h

@@ -0,0 +1,49 @@
+/*
+ * 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_POLARDB_MODEL_REFRESHPROXYLEVELRESULT_H_
+#define ALIBABACLOUD_POLARDB_MODEL_REFRESHPROXYLEVELRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/polardb/PolardbExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Polardb
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_POLARDB_EXPORT RefreshProxyLevelResult : public ServiceResult
+			{
+			public:
+
+
+				RefreshProxyLevelResult();
+				explicit RefreshProxyLevelResult(const std::string &payload);
+				~RefreshProxyLevelResult();
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_POLARDB_MODEL_REFRESHPROXYLEVELRESULT_H_

+ 39 - 3
polardb/src/PolardbClient.cc

@@ -31,21 +31,21 @@ PolardbClient::PolardbClient(const Credentials &credentials, const ClientConfigu
 	RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
 {
 	auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
-	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "polardb");
+	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
 }
 
 PolardbClient::PolardbClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
 	RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
 {
 	auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
-	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "polardb");
+	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
 }
 
 PolardbClient::PolardbClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
 	RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
 {
 	auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
-	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "polardb");
+	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
 }
 
 PolardbClient::~PolardbClient()
@@ -3507,6 +3507,42 @@ PolardbClient::ModifyPendingMaintenanceActionOutcomeCallable PolardbClient::modi
 	return task->get_future();
 }
 
+PolardbClient::RefreshProxyLevelOutcome PolardbClient::refreshProxyLevel(const RefreshProxyLevelRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return RefreshProxyLevelOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return RefreshProxyLevelOutcome(RefreshProxyLevelResult(outcome.result()));
+	else
+		return RefreshProxyLevelOutcome(outcome.error());
+}
+
+void PolardbClient::refreshProxyLevelAsync(const RefreshProxyLevelRequest& request, const RefreshProxyLevelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, refreshProxyLevel(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+PolardbClient::RefreshProxyLevelOutcomeCallable PolardbClient::refreshProxyLevelCallable(const RefreshProxyLevelRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<RefreshProxyLevelOutcome()>>(
+			[this, request]()
+			{
+			return this->refreshProxyLevel(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
 PolardbClient::RemoveDBClusterFromGDNOutcome PolardbClient::removeDBClusterFromGDN(const RemoveDBClusterFromGDNRequest &request) const
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();

+ 11 - 0
polardb/src/model/ModifyDBNodeClassRequest.cc

@@ -148,3 +148,14 @@ void ModifyDBNodeClassRequest::setModifyType(const std::string& modifyType)
 	setParameter("ModifyType", modifyType);
 }
 
+std::string ModifyDBNodeClassRequest::getSubCategory()const
+{
+	return subCategory_;
+}
+
+void ModifyDBNodeClassRequest::setSubCategory(const std::string& subCategory)
+{
+	subCategory_ = subCategory;
+	setParameter("SubCategory", subCategory);
+}
+

+ 139 - 0
polardb/src/model/RefreshProxyLevelRequest.cc

@@ -0,0 +1,139 @@
+/*
+ * 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/polardb/model/RefreshProxyLevelRequest.h>
+
+using AlibabaCloud::Polardb::Model::RefreshProxyLevelRequest;
+
+RefreshProxyLevelRequest::RefreshProxyLevelRequest() :
+	RpcServiceRequest("polardb", "2017-08-01", "RefreshProxyLevel")
+{
+	setMethod(HttpRequest::Method::Post);
+}
+
+RefreshProxyLevelRequest::~RefreshProxyLevelRequest()
+{}
+
+long RefreshProxyLevelRequest::getResourceOwnerId()const
+{
+	return resourceOwnerId_;
+}
+
+void RefreshProxyLevelRequest::setResourceOwnerId(long resourceOwnerId)
+{
+	resourceOwnerId_ = resourceOwnerId;
+	setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
+}
+
+std::string RefreshProxyLevelRequest::getPlannedEndTime()const
+{
+	return plannedEndTime_;
+}
+
+void RefreshProxyLevelRequest::setPlannedEndTime(const std::string& plannedEndTime)
+{
+	plannedEndTime_ = plannedEndTime;
+	setParameter("PlannedEndTime", plannedEndTime);
+}
+
+std::string RefreshProxyLevelRequest::getAccessKeyId()const
+{
+	return accessKeyId_;
+}
+
+void RefreshProxyLevelRequest::setAccessKeyId(const std::string& accessKeyId)
+{
+	accessKeyId_ = accessKeyId;
+	setParameter("AccessKeyId", accessKeyId);
+}
+
+std::string RefreshProxyLevelRequest::getProxyTargetClass()const
+{
+	return proxyTargetClass_;
+}
+
+void RefreshProxyLevelRequest::setProxyTargetClass(const std::string& proxyTargetClass)
+{
+	proxyTargetClass_ = proxyTargetClass;
+	setParameter("ProxyTargetClass", proxyTargetClass);
+}
+
+std::string RefreshProxyLevelRequest::getResourceOwnerAccount()const
+{
+	return resourceOwnerAccount_;
+}
+
+void RefreshProxyLevelRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
+{
+	resourceOwnerAccount_ = resourceOwnerAccount;
+	setParameter("ResourceOwnerAccount", resourceOwnerAccount);
+}
+
+std::string RefreshProxyLevelRequest::getDBClusterId()const
+{
+	return dBClusterId_;
+}
+
+void RefreshProxyLevelRequest::setDBClusterId(const std::string& dBClusterId)
+{
+	dBClusterId_ = dBClusterId;
+	setParameter("DBClusterId", dBClusterId);
+}
+
+std::string RefreshProxyLevelRequest::getOwnerAccount()const
+{
+	return ownerAccount_;
+}
+
+void RefreshProxyLevelRequest::setOwnerAccount(const std::string& ownerAccount)
+{
+	ownerAccount_ = ownerAccount;
+	setParameter("OwnerAccount", ownerAccount);
+}
+
+long RefreshProxyLevelRequest::getOwnerId()const
+{
+	return ownerId_;
+}
+
+void RefreshProxyLevelRequest::setOwnerId(long ownerId)
+{
+	ownerId_ = ownerId;
+	setParameter("OwnerId", std::to_string(ownerId));
+}
+
+std::string RefreshProxyLevelRequest::getPlannedStartTime()const
+{
+	return plannedStartTime_;
+}
+
+void RefreshProxyLevelRequest::setPlannedStartTime(const std::string& plannedStartTime)
+{
+	plannedStartTime_ = plannedStartTime;
+	setParameter("PlannedStartTime", plannedStartTime);
+}
+
+bool RefreshProxyLevelRequest::getFromTimeService()const
+{
+	return fromTimeService_;
+}
+
+void RefreshProxyLevelRequest::setFromTimeService(bool fromTimeService)
+{
+	fromTimeService_ = fromTimeService;
+	setParameter("FromTimeService", fromTimeService ? "true" : "false");
+}
+

+ 44 - 0
polardb/src/model/RefreshProxyLevelResult.cc

@@ -0,0 +1,44 @@
+/*
+ * 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/polardb/model/RefreshProxyLevelResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Polardb;
+using namespace AlibabaCloud::Polardb::Model;
+
+RefreshProxyLevelResult::RefreshProxyLevelResult() :
+	ServiceResult()
+{}
+
+RefreshProxyLevelResult::RefreshProxyLevelResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+RefreshProxyLevelResult::~RefreshProxyLevelResult()
+{}
+
+void RefreshProxyLevelResult::parse(const std::string &payload)
+{
+	Json::Reader reader;
+	Json::Value value;
+	reader.parse(payload, value);
+	setRequestId(value["RequestId"].asString());
+
+}
+