diff --git a/CHANGELOG b/CHANGELOG index bacb233b4..da08a03d1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2022-01-26 Version: 1.36.1044 +- Fix some bugs. + 2022-01-25 Version: 1.36.1043 - Create Lindorm Open api. diff --git a/VERSION b/VERSION index 68c14d308..2e464ce47 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1043 \ No newline at end of file +1.36.1044 \ No newline at end of file diff --git a/polardb/CMakeLists.txt b/polardb/CMakeLists.txt index b2e0cf929..b55f6ee51 100644 --- a/polardb/CMakeLists.txt +++ b/polardb/CMakeLists.txt @@ -121,6 +121,8 @@ set(polardb_public_header_model include/alibabacloud/polardb/model/DescribeDBLinksResult.h include/alibabacloud/polardb/model/DescribeDBNodePerformanceRequest.h include/alibabacloud/polardb/model/DescribeDBNodePerformanceResult.h + include/alibabacloud/polardb/model/DescribeDBProxyPerformanceRequest.h + include/alibabacloud/polardb/model/DescribeDBProxyPerformanceResult.h include/alibabacloud/polardb/model/DescribeDatabasesRequest.h include/alibabacloud/polardb/model/DescribeDatabasesResult.h include/alibabacloud/polardb/model/DescribeDetachedBackupsRequest.h @@ -163,6 +165,8 @@ set(polardb_public_header_model include/alibabacloud/polardb/model/GrantAccountPrivilegeResult.h include/alibabacloud/polardb/model/ListTagResourcesRequest.h include/alibabacloud/polardb/model/ListTagResourcesResult.h + include/alibabacloud/polardb/model/ListTagResourcesForRegionRequest.h + include/alibabacloud/polardb/model/ListTagResourcesForRegionResult.h include/alibabacloud/polardb/model/ModifyAccountDescriptionRequest.h include/alibabacloud/polardb/model/ModifyAccountDescriptionResult.h include/alibabacloud/polardb/model/ModifyAccountPasswordRequest.h @@ -199,6 +203,8 @@ set(polardb_public_header_model include/alibabacloud/polardb/model/ModifyDBEndpointAddressResult.h include/alibabacloud/polardb/model/ModifyDBNodeClassRequest.h include/alibabacloud/polardb/model/ModifyDBNodeClassResult.h + include/alibabacloud/polardb/model/ModifyDBNodeHotReplicaModeRequest.h + include/alibabacloud/polardb/model/ModifyDBNodeHotReplicaModeResult.h include/alibabacloud/polardb/model/ModifyGlobalDatabaseNetworkRequest.h include/alibabacloud/polardb/model/ModifyGlobalDatabaseNetworkResult.h include/alibabacloud/polardb/model/ModifyLogBackupPolicyRequest.h @@ -332,6 +338,8 @@ set(polardb_src src/model/DescribeDBLinksResult.cc src/model/DescribeDBNodePerformanceRequest.cc src/model/DescribeDBNodePerformanceResult.cc + src/model/DescribeDBProxyPerformanceRequest.cc + src/model/DescribeDBProxyPerformanceResult.cc src/model/DescribeDatabasesRequest.cc src/model/DescribeDatabasesResult.cc src/model/DescribeDetachedBackupsRequest.cc @@ -374,6 +382,8 @@ set(polardb_src src/model/GrantAccountPrivilegeResult.cc src/model/ListTagResourcesRequest.cc src/model/ListTagResourcesResult.cc + src/model/ListTagResourcesForRegionRequest.cc + src/model/ListTagResourcesForRegionResult.cc src/model/ModifyAccountDescriptionRequest.cc src/model/ModifyAccountDescriptionResult.cc src/model/ModifyAccountPasswordRequest.cc @@ -410,6 +420,8 @@ set(polardb_src src/model/ModifyDBEndpointAddressResult.cc src/model/ModifyDBNodeClassRequest.cc src/model/ModifyDBNodeClassResult.cc + src/model/ModifyDBNodeHotReplicaModeRequest.cc + src/model/ModifyDBNodeHotReplicaModeResult.cc src/model/ModifyGlobalDatabaseNetworkRequest.cc src/model/ModifyGlobalDatabaseNetworkResult.cc src/model/ModifyLogBackupPolicyRequest.cc diff --git a/polardb/include/alibabacloud/polardb/PolardbClient.h b/polardb/include/alibabacloud/polardb/PolardbClient.h index 4e29ba914..c0deda83a 100644 --- a/polardb/include/alibabacloud/polardb/PolardbClient.h +++ b/polardb/include/alibabacloud/polardb/PolardbClient.h @@ -122,6 +122,8 @@ #include "model/DescribeDBLinksResult.h" #include "model/DescribeDBNodePerformanceRequest.h" #include "model/DescribeDBNodePerformanceResult.h" +#include "model/DescribeDBProxyPerformanceRequest.h" +#include "model/DescribeDBProxyPerformanceResult.h" #include "model/DescribeDatabasesRequest.h" #include "model/DescribeDatabasesResult.h" #include "model/DescribeDetachedBackupsRequest.h" @@ -164,6 +166,8 @@ #include "model/GrantAccountPrivilegeResult.h" #include "model/ListTagResourcesRequest.h" #include "model/ListTagResourcesResult.h" +#include "model/ListTagResourcesForRegionRequest.h" +#include "model/ListTagResourcesForRegionResult.h" #include "model/ModifyAccountDescriptionRequest.h" #include "model/ModifyAccountDescriptionResult.h" #include "model/ModifyAccountPasswordRequest.h" @@ -200,6 +204,8 @@ #include "model/ModifyDBEndpointAddressResult.h" #include "model/ModifyDBNodeClassRequest.h" #include "model/ModifyDBNodeClassResult.h" +#include "model/ModifyDBNodeHotReplicaModeRequest.h" +#include "model/ModifyDBNodeHotReplicaModeResult.h" #include "model/ModifyGlobalDatabaseNetworkRequest.h" #include "model/ModifyGlobalDatabaseNetworkResult.h" #include "model/ModifyLogBackupPolicyRequest.h" @@ -389,6 +395,9 @@ namespace AlibabaCloud typedef Outcome DescribeDBNodePerformanceOutcome; typedef std::future DescribeDBNodePerformanceOutcomeCallable; typedef std::function&)> DescribeDBNodePerformanceAsyncHandler; + typedef Outcome DescribeDBProxyPerformanceOutcome; + typedef std::future DescribeDBProxyPerformanceOutcomeCallable; + typedef std::function&)> DescribeDBProxyPerformanceAsyncHandler; typedef Outcome DescribeDatabasesOutcome; typedef std::future DescribeDatabasesOutcomeCallable; typedef std::function&)> DescribeDatabasesAsyncHandler; @@ -452,6 +461,9 @@ namespace AlibabaCloud typedef Outcome ListTagResourcesOutcome; typedef std::future ListTagResourcesOutcomeCallable; typedef std::function&)> ListTagResourcesAsyncHandler; + typedef Outcome ListTagResourcesForRegionOutcome; + typedef std::future ListTagResourcesForRegionOutcomeCallable; + typedef std::function&)> ListTagResourcesForRegionAsyncHandler; typedef Outcome ModifyAccountDescriptionOutcome; typedef std::future ModifyAccountDescriptionOutcomeCallable; typedef std::function&)> ModifyAccountDescriptionAsyncHandler; @@ -506,6 +518,9 @@ namespace AlibabaCloud typedef Outcome ModifyDBNodeClassOutcome; typedef std::future ModifyDBNodeClassOutcomeCallable; typedef std::function&)> ModifyDBNodeClassAsyncHandler; + typedef Outcome ModifyDBNodeHotReplicaModeOutcome; + typedef std::future ModifyDBNodeHotReplicaModeOutcomeCallable; + typedef std::function&)> ModifyDBNodeHotReplicaModeAsyncHandler; typedef Outcome ModifyGlobalDatabaseNetworkOutcome; typedef std::future ModifyGlobalDatabaseNetworkOutcomeCallable; typedef std::function&)> ModifyGlobalDatabaseNetworkAsyncHandler; @@ -706,6 +721,9 @@ namespace AlibabaCloud DescribeDBNodePerformanceOutcome describeDBNodePerformance(const Model::DescribeDBNodePerformanceRequest &request)const; void describeDBNodePerformanceAsync(const Model::DescribeDBNodePerformanceRequest& request, const DescribeDBNodePerformanceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeDBNodePerformanceOutcomeCallable describeDBNodePerformanceCallable(const Model::DescribeDBNodePerformanceRequest& request) const; + DescribeDBProxyPerformanceOutcome describeDBProxyPerformance(const Model::DescribeDBProxyPerformanceRequest &request)const; + void describeDBProxyPerformanceAsync(const Model::DescribeDBProxyPerformanceRequest& request, const DescribeDBProxyPerformanceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeDBProxyPerformanceOutcomeCallable describeDBProxyPerformanceCallable(const Model::DescribeDBProxyPerformanceRequest& request) const; DescribeDatabasesOutcome describeDatabases(const Model::DescribeDatabasesRequest &request)const; void describeDatabasesAsync(const Model::DescribeDatabasesRequest& request, const DescribeDatabasesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeDatabasesOutcomeCallable describeDatabasesCallable(const Model::DescribeDatabasesRequest& request) const; @@ -769,6 +787,9 @@ namespace AlibabaCloud ListTagResourcesOutcome listTagResources(const Model::ListTagResourcesRequest &request)const; void listTagResourcesAsync(const Model::ListTagResourcesRequest& request, const ListTagResourcesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListTagResourcesOutcomeCallable listTagResourcesCallable(const Model::ListTagResourcesRequest& request) const; + ListTagResourcesForRegionOutcome listTagResourcesForRegion(const Model::ListTagResourcesForRegionRequest &request)const; + void listTagResourcesForRegionAsync(const Model::ListTagResourcesForRegionRequest& request, const ListTagResourcesForRegionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListTagResourcesForRegionOutcomeCallable listTagResourcesForRegionCallable(const Model::ListTagResourcesForRegionRequest& request) const; ModifyAccountDescriptionOutcome modifyAccountDescription(const Model::ModifyAccountDescriptionRequest &request)const; void modifyAccountDescriptionAsync(const Model::ModifyAccountDescriptionRequest& request, const ModifyAccountDescriptionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ModifyAccountDescriptionOutcomeCallable modifyAccountDescriptionCallable(const Model::ModifyAccountDescriptionRequest& request) const; @@ -823,6 +844,9 @@ namespace AlibabaCloud ModifyDBNodeClassOutcome modifyDBNodeClass(const Model::ModifyDBNodeClassRequest &request)const; void modifyDBNodeClassAsync(const Model::ModifyDBNodeClassRequest& request, const ModifyDBNodeClassAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ModifyDBNodeClassOutcomeCallable modifyDBNodeClassCallable(const Model::ModifyDBNodeClassRequest& request) const; + ModifyDBNodeHotReplicaModeOutcome modifyDBNodeHotReplicaMode(const Model::ModifyDBNodeHotReplicaModeRequest &request)const; + void modifyDBNodeHotReplicaModeAsync(const Model::ModifyDBNodeHotReplicaModeRequest& request, const ModifyDBNodeHotReplicaModeAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ModifyDBNodeHotReplicaModeOutcomeCallable modifyDBNodeHotReplicaModeCallable(const Model::ModifyDBNodeHotReplicaModeRequest& request) const; ModifyGlobalDatabaseNetworkOutcome modifyGlobalDatabaseNetwork(const Model::ModifyGlobalDatabaseNetworkRequest &request)const; void modifyGlobalDatabaseNetworkAsync(const Model::ModifyGlobalDatabaseNetworkRequest& request, const ModifyGlobalDatabaseNetworkAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ModifyGlobalDatabaseNetworkOutcomeCallable modifyGlobalDatabaseNetworkCallable(const Model::ModifyGlobalDatabaseNetworkRequest& request) const; diff --git a/polardb/include/alibabacloud/polardb/model/CreateDBNodesRequest.h b/polardb/include/alibabacloud/polardb/model/CreateDBNodesRequest.h index 7ce69712e..b8fc952ab 100644 --- a/polardb/include/alibabacloud/polardb/model/CreateDBNodesRequest.h +++ b/polardb/include/alibabacloud/polardb/model/CreateDBNodesRequest.h @@ -63,6 +63,8 @@ namespace AlibabaCloud void setPlannedStartTime(const std::string& plannedStartTime); std::vector getDBNode()const; void setDBNode(const std::vector& dBNode); + std::string getImciSwitch()const; + void setImciSwitch(const std::string& imciSwitch); private: long resourceOwnerId_; @@ -76,6 +78,7 @@ namespace AlibabaCloud long ownerId_; std::string plannedStartTime_; std::vector dBNode_; + std::string imciSwitch_; }; } diff --git a/polardb/include/alibabacloud/polardb/model/DescribeDBClusterAttributeResult.h b/polardb/include/alibabacloud/polardb/model/DescribeDBClusterAttributeResult.h index 2d3a6f7fe..ecdb1b452 100644 --- a/polardb/include/alibabacloud/polardb/model/DescribeDBClusterAttributeResult.h +++ b/polardb/include/alibabacloud/polardb/model/DescribeDBClusterAttributeResult.h @@ -39,8 +39,10 @@ namespace AlibabaCloud int maxConnections; std::string dBNodeRole; std::string creationTime; + std::string imciSwitch; std::string dBNodeId; int failoverPriority; + std::string hotReplicaMode; int maxIOPS; std::string dBNodeClass; }; @@ -59,6 +61,7 @@ namespace AlibabaCloud std::string getResourceGroupId()const; long getDataLevel1BackupChainSize()const; std::string getDBClusterId()const; + std::string getProxyStatus()const; std::string getDBType()const; std::string getDBClusterNetworkType()const; bool getIsLatestVersion()const; @@ -69,11 +72,13 @@ namespace AlibabaCloud std::string getMaintainTime()const; std::vector getTags()const; std::string getEngine()const; + std::string getStorageType()const; std::string getVPCId()const; std::string getDBClusterStatus()const; std::string getVSwitchId()const; std::string getDBClusterDescription()const; std::string getExpired()const; + std::string getProxyCpuCores()const; std::string getPayType()const; std::string getLockMode()const; long getStorageUsed()const; @@ -83,6 +88,7 @@ namespace AlibabaCloud std::string getSubCategory()const; long getSQLSize()const; std::string getRegionId()const; + std::string getProxyType()const; std::string getExpireTime()const; protected: @@ -93,6 +99,7 @@ namespace AlibabaCloud std::string resourceGroupId_; long dataLevel1BackupChainSize_; std::string dBClusterId_; + std::string proxyStatus_; std::string dBType_; std::string dBClusterNetworkType_; bool isLatestVersion_; @@ -103,11 +110,13 @@ namespace AlibabaCloud std::string maintainTime_; std::vector tags_; std::string engine_; + std::string storageType_; std::string vPCId_; std::string dBClusterStatus_; std::string vSwitchId_; std::string dBClusterDescription_; std::string expired_; + std::string proxyCpuCores_; std::string payType_; std::string lockMode_; long storageUsed_; @@ -117,6 +126,7 @@ namespace AlibabaCloud std::string subCategory_; long sQLSize_; std::string regionId_; + std::string proxyType_; std::string expireTime_; }; diff --git a/polardb/include/alibabacloud/polardb/model/DescribeDBClustersRequest.h b/polardb/include/alibabacloud/polardb/model/DescribeDBClustersRequest.h index 0cde17273..3c5b2a30d 100644 --- a/polardb/include/alibabacloud/polardb/model/DescribeDBClustersRequest.h +++ b/polardb/include/alibabacloud/polardb/model/DescribeDBClustersRequest.h @@ -49,6 +49,8 @@ namespace AlibabaCloud void setDBClusterStatus(const std::string& dBClusterStatus); int getPageNumber()const; void setPageNumber(int pageNumber); + std::string getDBNodeIds()const; + void setDBNodeIds(const std::string& dBNodeIds); std::string getAccessKeyId()const; void setAccessKeyId(const std::string& accessKeyId); std::string getResourceGroupId()const; @@ -67,6 +69,8 @@ namespace AlibabaCloud void setOwnerId(long ownerId); std::string getDBType()const; void setDBType(const std::string& dBType); + std::string getPayType()const; + void setPayType(const std::string& payType); std::string getDBClusterIds()const; void setDBClusterIds(const std::string& dBClusterIds); @@ -75,6 +79,7 @@ namespace AlibabaCloud std::string dBClusterDescription_; std::string dBClusterStatus_; int pageNumber_; + std::string dBNodeIds_; std::string accessKeyId_; std::string resourceGroupId_; std::string regionId_; @@ -84,6 +89,7 @@ namespace AlibabaCloud std::string ownerAccount_; long ownerId_; std::string dBType_; + std::string payType_; std::string dBClusterIds_; }; diff --git a/polardb/include/alibabacloud/polardb/model/DescribeDBProxyPerformanceRequest.h b/polardb/include/alibabacloud/polardb/model/DescribeDBProxyPerformanceRequest.h new file mode 100644 index 000000000..22e761910 --- /dev/null +++ b/polardb/include/alibabacloud/polardb/model/DescribeDBProxyPerformanceRequest.h @@ -0,0 +1,72 @@ +/* + * 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_DESCRIBEDBPROXYPERFORMANCEREQUEST_H_ +#define ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDBPROXYPERFORMANCEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Polardb + { + namespace Model + { + class ALIBABACLOUD_POLARDB_EXPORT DescribeDBProxyPerformanceRequest : public RpcServiceRequest + { + + public: + DescribeDBProxyPerformanceRequest(); + ~DescribeDBProxyPerformanceRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getStartTime()const; + void setStartTime(const std::string& startTime); + std::string getKey()const; + void setKey(const std::string& key); + 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); + std::string getEndTime()const; + void setEndTime(const std::string& endTime); + long getOwnerId()const; + void setOwnerId(long ownerId); + std::string getMetric()const; + void setMetric(const std::string& metric); + + private: + long resourceOwnerId_; + std::string startTime_; + std::string key_; + std::string resourceOwnerAccount_; + std::string dBClusterId_; + std::string ownerAccount_; + std::string endTime_; + long ownerId_; + std::string metric_; + + }; + } + } +} +#endif // !ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDBPROXYPERFORMANCEREQUEST_H_ \ No newline at end of file diff --git a/polardb/include/alibabacloud/polardb/model/DescribeDBProxyPerformanceResult.h b/polardb/include/alibabacloud/polardb/model/DescribeDBProxyPerformanceResult.h new file mode 100644 index 000000000..0564fcae9 --- /dev/null +++ b/polardb/include/alibabacloud/polardb/model/DescribeDBProxyPerformanceResult.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_DESCRIBEDBPROXYPERFORMANCERESULT_H_ +#define ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDBPROXYPERFORMANCERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Polardb + { + namespace Model + { + class ALIBABACLOUD_POLARDB_EXPORT DescribeDBProxyPerformanceResult : public ServiceResult + { + public: + struct PerformanceItem + { + struct PerformanceItemValue + { + std::string value; + long timestamp; + }; + std::string measurement; + std::string metricName; + std::vector points; + std::string dBNodeId; + }; + + + DescribeDBProxyPerformanceResult(); + explicit DescribeDBProxyPerformanceResult(const std::string &payload); + ~DescribeDBProxyPerformanceResult(); + std::vector getPerformanceKeys()const; + std::string getDBVersion()const; + std::string getEndTime()const; + std::string getStartTime()const; + std::string getDBClusterId()const; + std::string getDBType()const; + std::string getEngine()const; + + protected: + void parse(const std::string &payload); + private: + std::vector performanceKeys_; + std::string dBVersion_; + std::string endTime_; + std::string startTime_; + std::string dBClusterId_; + std::string dBType_; + std::string engine_; + + }; + } + } +} +#endif // !ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDBPROXYPERFORMANCERESULT_H_ \ No newline at end of file diff --git a/polardb/include/alibabacloud/polardb/model/DescribeSlowLogRecordsResult.h b/polardb/include/alibabacloud/polardb/model/DescribeSlowLogRecordsResult.h index 0cc8e9aba..0fcd2a95e 100644 --- a/polardb/include/alibabacloud/polardb/model/DescribeSlowLogRecordsResult.h +++ b/polardb/include/alibabacloud/polardb/model/DescribeSlowLogRecordsResult.h @@ -42,6 +42,7 @@ namespace AlibabaCloud long parseRowCounts; std::string dBNodeId; std::string hostAddress; + long queryTimeMS; std::string sQLText; }; diff --git a/polardb/include/alibabacloud/polardb/model/ListTagResourcesForRegionRequest.h b/polardb/include/alibabacloud/polardb/model/ListTagResourcesForRegionRequest.h new file mode 100644 index 000000000..919450eab --- /dev/null +++ b/polardb/include/alibabacloud/polardb/model/ListTagResourcesForRegionRequest.h @@ -0,0 +1,66 @@ +/* + * 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_LISTTAGRESOURCESFORREGIONREQUEST_H_ +#define ALIBABACLOUD_POLARDB_MODEL_LISTTAGRESOURCESFORREGIONREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Polardb + { + namespace Model + { + class ALIBABACLOUD_POLARDB_EXPORT ListTagResourcesForRegionRequest : public RpcServiceRequest + { + + public: + ListTagResourcesForRegionRequest(); + ~ListTagResourcesForRegionRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getNextToken()const; + void setNextToken(const std::string& nextToken); + std::string getResourceOwnerAccount()const; + void setResourceOwnerAccount(const std::string& resourceOwnerAccount); + std::string getOwnerAccount()const; + void setOwnerAccount(const std::string& ownerAccount); + long getOwnerId()const; + void setOwnerId(long ownerId); + + private: + long resourceOwnerId_; + std::string accessKeyId_; + std::string regionId_; + std::string nextToken_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_POLARDB_MODEL_LISTTAGRESOURCESFORREGIONREQUEST_H_ \ No newline at end of file diff --git a/polardb/include/alibabacloud/polardb/model/ListTagResourcesForRegionResult.h b/polardb/include/alibabacloud/polardb/model/ListTagResourcesForRegionResult.h new file mode 100644 index 000000000..93fbc55e1 --- /dev/null +++ b/polardb/include/alibabacloud/polardb/model/ListTagResourcesForRegionResult.h @@ -0,0 +1,60 @@ +/* + * 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_LISTTAGRESOURCESFORREGIONRESULT_H_ +#define ALIBABACLOUD_POLARDB_MODEL_LISTTAGRESOURCESFORREGIONRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Polardb + { + namespace Model + { + class ALIBABACLOUD_POLARDB_EXPORT ListTagResourcesForRegionResult : public ServiceResult + { + public: + struct TagResource + { + std::string resourceId; + std::string tagKey; + std::string resourceType; + std::string tagValue; + }; + + + ListTagResourcesForRegionResult(); + explicit ListTagResourcesForRegionResult(const std::string &payload); + ~ListTagResourcesForRegionResult(); + std::string getNextToken()const; + std::vector getTagResources()const; + + protected: + void parse(const std::string &payload); + private: + std::string nextToken_; + std::vector tagResources_; + + }; + } + } +} +#endif // !ALIBABACLOUD_POLARDB_MODEL_LISTTAGRESOURCESFORREGIONRESULT_H_ \ No newline at end of file diff --git a/polardb/include/alibabacloud/polardb/model/ModifyDBNodeHotReplicaModeRequest.h b/polardb/include/alibabacloud/polardb/model/ModifyDBNodeHotReplicaModeRequest.h new file mode 100644 index 000000000..c5bc1f889 --- /dev/null +++ b/polardb/include/alibabacloud/polardb/model/ModifyDBNodeHotReplicaModeRequest.h @@ -0,0 +1,69 @@ +/* + * 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_MODIFYDBNODEHOTREPLICAMODEREQUEST_H_ +#define ALIBABACLOUD_POLARDB_MODEL_MODIFYDBNODEHOTREPLICAMODEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Polardb + { + namespace Model + { + class ALIBABACLOUD_POLARDB_EXPORT ModifyDBNodeHotReplicaModeRequest : public RpcServiceRequest + { + + public: + ModifyDBNodeHotReplicaModeRequest(); + ~ModifyDBNodeHotReplicaModeRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getDBNodeId()const; + void setDBNodeId(const std::string& dBNodeId); + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + 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 getHotReplicaMode()const; + void setHotReplicaMode(const std::string& hotReplicaMode); + + private: + long resourceOwnerId_; + std::string dBNodeId_; + std::string accessKeyId_; + std::string resourceOwnerAccount_; + std::string dBClusterId_; + std::string ownerAccount_; + long ownerId_; + std::string hotReplicaMode_; + + }; + } + } +} +#endif // !ALIBABACLOUD_POLARDB_MODEL_MODIFYDBNODEHOTREPLICAMODEREQUEST_H_ \ No newline at end of file diff --git a/polardb/include/alibabacloud/polardb/model/ModifyDBNodeHotReplicaModeResult.h b/polardb/include/alibabacloud/polardb/model/ModifyDBNodeHotReplicaModeResult.h new file mode 100644 index 000000000..876c537f8 --- /dev/null +++ b/polardb/include/alibabacloud/polardb/model/ModifyDBNodeHotReplicaModeResult.h @@ -0,0 +1,53 @@ +/* + * 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_MODIFYDBNODEHOTREPLICAMODERESULT_H_ +#define ALIBABACLOUD_POLARDB_MODEL_MODIFYDBNODEHOTREPLICAMODERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Polardb + { + namespace Model + { + class ALIBABACLOUD_POLARDB_EXPORT ModifyDBNodeHotReplicaModeResult : public ServiceResult + { + public: + + + ModifyDBNodeHotReplicaModeResult(); + explicit ModifyDBNodeHotReplicaModeResult(const std::string &payload); + ~ModifyDBNodeHotReplicaModeResult(); + std::string getDBClusterId()const; + std::string getOrderId()const; + + protected: + void parse(const std::string &payload); + private: + std::string dBClusterId_; + std::string orderId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_POLARDB_MODEL_MODIFYDBNODEHOTREPLICAMODERESULT_H_ \ No newline at end of file diff --git a/polardb/src/PolardbClient.cc b/polardb/src/PolardbClient.cc index 58d519c12..414e86356 100644 --- a/polardb/src/PolardbClient.cc +++ b/polardb/src/PolardbClient.cc @@ -1851,6 +1851,42 @@ PolardbClient::DescribeDBNodePerformanceOutcomeCallable PolardbClient::describeD return task->get_future(); } +PolardbClient::DescribeDBProxyPerformanceOutcome PolardbClient::describeDBProxyPerformance(const DescribeDBProxyPerformanceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeDBProxyPerformanceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeDBProxyPerformanceOutcome(DescribeDBProxyPerformanceResult(outcome.result())); + else + return DescribeDBProxyPerformanceOutcome(outcome.error()); +} + +void PolardbClient::describeDBProxyPerformanceAsync(const DescribeDBProxyPerformanceRequest& request, const DescribeDBProxyPerformanceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeDBProxyPerformance(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +PolardbClient::DescribeDBProxyPerformanceOutcomeCallable PolardbClient::describeDBProxyPerformanceCallable(const DescribeDBProxyPerformanceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeDBProxyPerformance(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + PolardbClient::DescribeDatabasesOutcome PolardbClient::describeDatabases(const DescribeDatabasesRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -2607,6 +2643,42 @@ PolardbClient::ListTagResourcesOutcomeCallable PolardbClient::listTagResourcesCa return task->get_future(); } +PolardbClient::ListTagResourcesForRegionOutcome PolardbClient::listTagResourcesForRegion(const ListTagResourcesForRegionRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListTagResourcesForRegionOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListTagResourcesForRegionOutcome(ListTagResourcesForRegionResult(outcome.result())); + else + return ListTagResourcesForRegionOutcome(outcome.error()); +} + +void PolardbClient::listTagResourcesForRegionAsync(const ListTagResourcesForRegionRequest& request, const ListTagResourcesForRegionAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listTagResourcesForRegion(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +PolardbClient::ListTagResourcesForRegionOutcomeCallable PolardbClient::listTagResourcesForRegionCallable(const ListTagResourcesForRegionRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listTagResourcesForRegion(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + PolardbClient::ModifyAccountDescriptionOutcome PolardbClient::modifyAccountDescription(const ModifyAccountDescriptionRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -3255,6 +3327,42 @@ PolardbClient::ModifyDBNodeClassOutcomeCallable PolardbClient::modifyDBNodeClass return task->get_future(); } +PolardbClient::ModifyDBNodeHotReplicaModeOutcome PolardbClient::modifyDBNodeHotReplicaMode(const ModifyDBNodeHotReplicaModeRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ModifyDBNodeHotReplicaModeOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ModifyDBNodeHotReplicaModeOutcome(ModifyDBNodeHotReplicaModeResult(outcome.result())); + else + return ModifyDBNodeHotReplicaModeOutcome(outcome.error()); +} + +void PolardbClient::modifyDBNodeHotReplicaModeAsync(const ModifyDBNodeHotReplicaModeRequest& request, const ModifyDBNodeHotReplicaModeAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, modifyDBNodeHotReplicaMode(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +PolardbClient::ModifyDBNodeHotReplicaModeOutcomeCallable PolardbClient::modifyDBNodeHotReplicaModeCallable(const ModifyDBNodeHotReplicaModeRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->modifyDBNodeHotReplicaMode(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + PolardbClient::ModifyGlobalDatabaseNetworkOutcome PolardbClient::modifyGlobalDatabaseNetwork(const ModifyGlobalDatabaseNetworkRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/polardb/src/model/CreateDBNodesRequest.cc b/polardb/src/model/CreateDBNodesRequest.cc index 76ae26b13..ea024bc16 100644 --- a/polardb/src/model/CreateDBNodesRequest.cc +++ b/polardb/src/model/CreateDBNodesRequest.cc @@ -153,3 +153,14 @@ void CreateDBNodesRequest::setDBNode(const std::vector& dBNode) } } +std::string CreateDBNodesRequest::getImciSwitch()const +{ + return imciSwitch_; +} + +void CreateDBNodesRequest::setImciSwitch(const std::string& imciSwitch) +{ + imciSwitch_ = imciSwitch; + setParameter("ImciSwitch", imciSwitch); +} + diff --git a/polardb/src/model/DescribeDBClusterAttributeResult.cc b/polardb/src/model/DescribeDBClusterAttributeResult.cc index 8d5a202f2..ef2f63271 100644 --- a/polardb/src/model/DescribeDBClusterAttributeResult.cc +++ b/polardb/src/model/DescribeDBClusterAttributeResult.cc @@ -61,6 +61,10 @@ void DescribeDBClusterAttributeResult::parse(const std::string &payload) dBNodesObject.dBNodeStatus = valueDBNodesDBNode["DBNodeStatus"].asString(); if(!valueDBNodesDBNode["DBNodeId"].isNull()) dBNodesObject.dBNodeId = valueDBNodesDBNode["DBNodeId"].asString(); + if(!valueDBNodesDBNode["ImciSwitch"].isNull()) + dBNodesObject.imciSwitch = valueDBNodesDBNode["ImciSwitch"].asString(); + if(!valueDBNodesDBNode["HotReplicaMode"].isNull()) + dBNodesObject.hotReplicaMode = valueDBNodesDBNode["HotReplicaMode"].asString(); dBNodes_.push_back(dBNodesObject); } auto allTagsNode = value["Tags"]["Tag"]; @@ -129,6 +133,14 @@ void DescribeDBClusterAttributeResult::parse(const std::string &payload) subCategory_ = value["SubCategory"].asString(); if(!value["IsProxyLatestVersion"].isNull()) isProxyLatestVersion_ = value["IsProxyLatestVersion"].asString() == "true"; + if(!value["StorageType"].isNull()) + storageType_ = value["StorageType"].asString(); + if(!value["ProxyCpuCores"].isNull()) + proxyCpuCores_ = value["ProxyCpuCores"].asString(); + if(!value["ProxyType"].isNull()) + proxyType_ = value["ProxyType"].asString(); + if(!value["ProxyStatus"].isNull()) + proxyStatus_ = value["ProxyStatus"].asString(); } @@ -157,6 +169,11 @@ std::string DescribeDBClusterAttributeResult::getDBClusterId()const return dBClusterId_; } +std::string DescribeDBClusterAttributeResult::getProxyStatus()const +{ + return proxyStatus_; +} + std::string DescribeDBClusterAttributeResult::getDBType()const { return dBType_; @@ -207,6 +224,11 @@ std::string DescribeDBClusterAttributeResult::getEngine()const return engine_; } +std::string DescribeDBClusterAttributeResult::getStorageType()const +{ + return storageType_; +} + std::string DescribeDBClusterAttributeResult::getVPCId()const { return vPCId_; @@ -232,6 +254,11 @@ std::string DescribeDBClusterAttributeResult::getExpired()const return expired_; } +std::string DescribeDBClusterAttributeResult::getProxyCpuCores()const +{ + return proxyCpuCores_; +} + std::string DescribeDBClusterAttributeResult::getPayType()const { return payType_; @@ -277,6 +304,11 @@ std::string DescribeDBClusterAttributeResult::getRegionId()const return regionId_; } +std::string DescribeDBClusterAttributeResult::getProxyType()const +{ + return proxyType_; +} + std::string DescribeDBClusterAttributeResult::getExpireTime()const { return expireTime_; diff --git a/polardb/src/model/DescribeDBClustersRequest.cc b/polardb/src/model/DescribeDBClustersRequest.cc index 39c0116ed..2d5a6b5a7 100644 --- a/polardb/src/model/DescribeDBClustersRequest.cc +++ b/polardb/src/model/DescribeDBClustersRequest.cc @@ -71,6 +71,17 @@ void DescribeDBClustersRequest::setPageNumber(int pageNumber) setParameter("PageNumber", std::to_string(pageNumber)); } +std::string DescribeDBClustersRequest::getDBNodeIds()const +{ + return dBNodeIds_; +} + +void DescribeDBClustersRequest::setDBNodeIds(const std::string& dBNodeIds) +{ + dBNodeIds_ = dBNodeIds; + setParameter("DBNodeIds", dBNodeIds); +} + std::string DescribeDBClustersRequest::getAccessKeyId()const { return accessKeyId_; @@ -175,6 +186,17 @@ void DescribeDBClustersRequest::setDBType(const std::string& dBType) setParameter("DBType", dBType); } +std::string DescribeDBClustersRequest::getPayType()const +{ + return payType_; +} + +void DescribeDBClustersRequest::setPayType(const std::string& payType) +{ + payType_ = payType; + setParameter("PayType", payType); +} + std::string DescribeDBClustersRequest::getDBClusterIds()const { return dBClusterIds_; diff --git a/polardb/src/model/DescribeDBProxyPerformanceRequest.cc b/polardb/src/model/DescribeDBProxyPerformanceRequest.cc new file mode 100644 index 000000000..9dddb27c0 --- /dev/null +++ b/polardb/src/model/DescribeDBProxyPerformanceRequest.cc @@ -0,0 +1,128 @@ +/* + * 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 + +using AlibabaCloud::Polardb::Model::DescribeDBProxyPerformanceRequest; + +DescribeDBProxyPerformanceRequest::DescribeDBProxyPerformanceRequest() : + RpcServiceRequest("polardb", "2017-08-01", "DescribeDBProxyPerformance") +{ + setMethod(HttpRequest::Method::Post); +} + +DescribeDBProxyPerformanceRequest::~DescribeDBProxyPerformanceRequest() +{} + +long DescribeDBProxyPerformanceRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void DescribeDBProxyPerformanceRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string DescribeDBProxyPerformanceRequest::getStartTime()const +{ + return startTime_; +} + +void DescribeDBProxyPerformanceRequest::setStartTime(const std::string& startTime) +{ + startTime_ = startTime; + setParameter("StartTime", startTime); +} + +std::string DescribeDBProxyPerformanceRequest::getKey()const +{ + return key_; +} + +void DescribeDBProxyPerformanceRequest::setKey(const std::string& key) +{ + key_ = key; + setParameter("Key", key); +} + +std::string DescribeDBProxyPerformanceRequest::getResourceOwnerAccount()const +{ + return resourceOwnerAccount_; +} + +void DescribeDBProxyPerformanceRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) +{ + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter("ResourceOwnerAccount", resourceOwnerAccount); +} + +std::string DescribeDBProxyPerformanceRequest::getDBClusterId()const +{ + return dBClusterId_; +} + +void DescribeDBProxyPerformanceRequest::setDBClusterId(const std::string& dBClusterId) +{ + dBClusterId_ = dBClusterId; + setParameter("DBClusterId", dBClusterId); +} + +std::string DescribeDBProxyPerformanceRequest::getOwnerAccount()const +{ + return ownerAccount_; +} + +void DescribeDBProxyPerformanceRequest::setOwnerAccount(const std::string& ownerAccount) +{ + ownerAccount_ = ownerAccount; + setParameter("OwnerAccount", ownerAccount); +} + +std::string DescribeDBProxyPerformanceRequest::getEndTime()const +{ + return endTime_; +} + +void DescribeDBProxyPerformanceRequest::setEndTime(const std::string& endTime) +{ + endTime_ = endTime; + setParameter("EndTime", endTime); +} + +long DescribeDBProxyPerformanceRequest::getOwnerId()const +{ + return ownerId_; +} + +void DescribeDBProxyPerformanceRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + +std::string DescribeDBProxyPerformanceRequest::getMetric()const +{ + return metric_; +} + +void DescribeDBProxyPerformanceRequest::setMetric(const std::string& metric) +{ + metric_ = metric; + setParameter("Metric", metric); +} + diff --git a/polardb/src/model/DescribeDBProxyPerformanceResult.cc b/polardb/src/model/DescribeDBProxyPerformanceResult.cc new file mode 100644 index 000000000..2f1ac31cf --- /dev/null +++ b/polardb/src/model/DescribeDBProxyPerformanceResult.cc @@ -0,0 +1,113 @@ +/* + * 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 +#include + +using namespace AlibabaCloud::Polardb; +using namespace AlibabaCloud::Polardb::Model; + +DescribeDBProxyPerformanceResult::DescribeDBProxyPerformanceResult() : + ServiceResult() +{} + +DescribeDBProxyPerformanceResult::DescribeDBProxyPerformanceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeDBProxyPerformanceResult::~DescribeDBProxyPerformanceResult() +{} + +void DescribeDBProxyPerformanceResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allPerformanceKeysNode = value["PerformanceKeys"]["PerformanceItem"]; + for (auto valuePerformanceKeysPerformanceItem : allPerformanceKeysNode) + { + PerformanceItem performanceKeysObject; + if(!valuePerformanceKeysPerformanceItem["MetricName"].isNull()) + performanceKeysObject.metricName = valuePerformanceKeysPerformanceItem["MetricName"].asString(); + if(!valuePerformanceKeysPerformanceItem["Measurement"].isNull()) + performanceKeysObject.measurement = valuePerformanceKeysPerformanceItem["Measurement"].asString(); + if(!valuePerformanceKeysPerformanceItem["DBNodeId"].isNull()) + performanceKeysObject.dBNodeId = valuePerformanceKeysPerformanceItem["DBNodeId"].asString(); + auto allPointsNode = valuePerformanceKeysPerformanceItem["Points"]["PerformanceItemValue"]; + for (auto valuePerformanceKeysPerformanceItemPointsPerformanceItemValue : allPointsNode) + { + PerformanceItem::PerformanceItemValue pointsObject; + if(!valuePerformanceKeysPerformanceItemPointsPerformanceItemValue["Value"].isNull()) + pointsObject.value = valuePerformanceKeysPerformanceItemPointsPerformanceItemValue["Value"].asString(); + if(!valuePerformanceKeysPerformanceItemPointsPerformanceItemValue["Timestamp"].isNull()) + pointsObject.timestamp = std::stol(valuePerformanceKeysPerformanceItemPointsPerformanceItemValue["Timestamp"].asString()); + performanceKeysObject.points.push_back(pointsObject); + } + performanceKeys_.push_back(performanceKeysObject); + } + if(!value["DBVersion"].isNull()) + dBVersion_ = value["DBVersion"].asString(); + if(!value["EndTime"].isNull()) + endTime_ = value["EndTime"].asString(); + if(!value["StartTime"].isNull()) + startTime_ = value["StartTime"].asString(); + if(!value["DBClusterId"].isNull()) + dBClusterId_ = value["DBClusterId"].asString(); + if(!value["DBType"].isNull()) + dBType_ = value["DBType"].asString(); + if(!value["Engine"].isNull()) + engine_ = value["Engine"].asString(); + +} + +std::vector DescribeDBProxyPerformanceResult::getPerformanceKeys()const +{ + return performanceKeys_; +} + +std::string DescribeDBProxyPerformanceResult::getDBVersion()const +{ + return dBVersion_; +} + +std::string DescribeDBProxyPerformanceResult::getEndTime()const +{ + return endTime_; +} + +std::string DescribeDBProxyPerformanceResult::getStartTime()const +{ + return startTime_; +} + +std::string DescribeDBProxyPerformanceResult::getDBClusterId()const +{ + return dBClusterId_; +} + +std::string DescribeDBProxyPerformanceResult::getDBType()const +{ + return dBType_; +} + +std::string DescribeDBProxyPerformanceResult::getEngine()const +{ + return engine_; +} + diff --git a/polardb/src/model/DescribeSlowLogRecordsResult.cc b/polardb/src/model/DescribeSlowLogRecordsResult.cc index 8281aa365..1e7b79bf9 100644 --- a/polardb/src/model/DescribeSlowLogRecordsResult.cc +++ b/polardb/src/model/DescribeSlowLogRecordsResult.cc @@ -43,36 +43,38 @@ void DescribeSlowLogRecordsResult::parse(const std::string &payload) for (auto valueItemsSQLSlowRecord : allItemsNode) { SQLSlowRecord itemsObject; - if(!valueItemsSQLSlowRecord["HostAddress"].isNull()) - itemsObject.hostAddress = valueItemsSQLSlowRecord["HostAddress"].asString(); - if(!valueItemsSQLSlowRecord["DBName"].isNull()) - itemsObject.dBName = valueItemsSQLSlowRecord["DBName"].asString(); - if(!valueItemsSQLSlowRecord["SQLText"].isNull()) - itemsObject.sQLText = valueItemsSQLSlowRecord["SQLText"].asString(); - if(!valueItemsSQLSlowRecord["QueryTimes"].isNull()) - itemsObject.queryTimes = std::stol(valueItemsSQLSlowRecord["QueryTimes"].asString()); - if(!valueItemsSQLSlowRecord["LockTimes"].isNull()) - itemsObject.lockTimes = std::stol(valueItemsSQLSlowRecord["LockTimes"].asString()); - if(!valueItemsSQLSlowRecord["ParseRowCounts"].isNull()) - itemsObject.parseRowCounts = std::stol(valueItemsSQLSlowRecord["ParseRowCounts"].asString()); - if(!valueItemsSQLSlowRecord["ReturnRowCounts"].isNull()) - itemsObject.returnRowCounts = std::stol(valueItemsSQLSlowRecord["ReturnRowCounts"].asString()); if(!valueItemsSQLSlowRecord["ExecutionStartTime"].isNull()) itemsObject.executionStartTime = valueItemsSQLSlowRecord["ExecutionStartTime"].asString(); + if(!valueItemsSQLSlowRecord["HostAddress"].isNull()) + itemsObject.hostAddress = valueItemsSQLSlowRecord["HostAddress"].asString(); + if(!valueItemsSQLSlowRecord["QueryTimes"].isNull()) + itemsObject.queryTimes = std::stol(valueItemsSQLSlowRecord["QueryTimes"].asString()); + if(!valueItemsSQLSlowRecord["SQLText"].isNull()) + itemsObject.sQLText = valueItemsSQLSlowRecord["SQLText"].asString(); + if(!valueItemsSQLSlowRecord["ReturnRowCounts"].isNull()) + itemsObject.returnRowCounts = std::stol(valueItemsSQLSlowRecord["ReturnRowCounts"].asString()); + if(!valueItemsSQLSlowRecord["ParseRowCounts"].isNull()) + itemsObject.parseRowCounts = std::stol(valueItemsSQLSlowRecord["ParseRowCounts"].asString()); + if(!valueItemsSQLSlowRecord["DBName"].isNull()) + itemsObject.dBName = valueItemsSQLSlowRecord["DBName"].asString(); + if(!valueItemsSQLSlowRecord["LockTimes"].isNull()) + itemsObject.lockTimes = std::stol(valueItemsSQLSlowRecord["LockTimes"].asString()); if(!valueItemsSQLSlowRecord["DBNodeId"].isNull()) itemsObject.dBNodeId = valueItemsSQLSlowRecord["DBNodeId"].asString(); + if(!valueItemsSQLSlowRecord["QueryTimeMS"].isNull()) + itemsObject.queryTimeMS = std::stol(valueItemsSQLSlowRecord["QueryTimeMS"].asString()); items_.push_back(itemsObject); } + if(!value["TotalRecordCount"].isNull()) + totalRecordCount_ = std::stoi(value["TotalRecordCount"].asString()); + if(!value["PageRecordCount"].isNull()) + pageRecordCount_ = std::stoi(value["PageRecordCount"].asString()); + if(!value["PageNumber"].isNull()) + pageNumber_ = std::stoi(value["PageNumber"].asString()); if(!value["DBClusterId"].isNull()) dBClusterId_ = value["DBClusterId"].asString(); if(!value["Engine"].isNull()) engine_ = value["Engine"].asString(); - if(!value["TotalRecordCount"].isNull()) - totalRecordCount_ = std::stoi(value["TotalRecordCount"].asString()); - if(!value["PageNumber"].isNull()) - pageNumber_ = std::stoi(value["PageNumber"].asString()); - if(!value["PageRecordCount"].isNull()) - pageRecordCount_ = std::stoi(value["PageRecordCount"].asString()); } diff --git a/polardb/src/model/ListTagResourcesForRegionRequest.cc b/polardb/src/model/ListTagResourcesForRegionRequest.cc new file mode 100644 index 000000000..6921375c4 --- /dev/null +++ b/polardb/src/model/ListTagResourcesForRegionRequest.cc @@ -0,0 +1,106 @@ +/* + * 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 + +using AlibabaCloud::Polardb::Model::ListTagResourcesForRegionRequest; + +ListTagResourcesForRegionRequest::ListTagResourcesForRegionRequest() : + RpcServiceRequest("polardb", "2017-08-01", "ListTagResourcesForRegion") +{ + setMethod(HttpRequest::Method::Post); +} + +ListTagResourcesForRegionRequest::~ListTagResourcesForRegionRequest() +{} + +long ListTagResourcesForRegionRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void ListTagResourcesForRegionRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string ListTagResourcesForRegionRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void ListTagResourcesForRegionRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string ListTagResourcesForRegionRequest::getRegionId()const +{ + return regionId_; +} + +void ListTagResourcesForRegionRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string ListTagResourcesForRegionRequest::getNextToken()const +{ + return nextToken_; +} + +void ListTagResourcesForRegionRequest::setNextToken(const std::string& nextToken) +{ + nextToken_ = nextToken; + setParameter("NextToken", nextToken); +} + +std::string ListTagResourcesForRegionRequest::getResourceOwnerAccount()const +{ + return resourceOwnerAccount_; +} + +void ListTagResourcesForRegionRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) +{ + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter("ResourceOwnerAccount", resourceOwnerAccount); +} + +std::string ListTagResourcesForRegionRequest::getOwnerAccount()const +{ + return ownerAccount_; +} + +void ListTagResourcesForRegionRequest::setOwnerAccount(const std::string& ownerAccount) +{ + ownerAccount_ = ownerAccount; + setParameter("OwnerAccount", ownerAccount); +} + +long ListTagResourcesForRegionRequest::getOwnerId()const +{ + return ownerId_; +} + +void ListTagResourcesForRegionRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + diff --git a/polardb/src/model/ListTagResourcesForRegionResult.cc b/polardb/src/model/ListTagResourcesForRegionResult.cc new file mode 100644 index 000000000..0cb64b095 --- /dev/null +++ b/polardb/src/model/ListTagResourcesForRegionResult.cc @@ -0,0 +1,70 @@ +/* + * 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 +#include + +using namespace AlibabaCloud::Polardb; +using namespace AlibabaCloud::Polardb::Model; + +ListTagResourcesForRegionResult::ListTagResourcesForRegionResult() : + ServiceResult() +{} + +ListTagResourcesForRegionResult::ListTagResourcesForRegionResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListTagResourcesForRegionResult::~ListTagResourcesForRegionResult() +{} + +void ListTagResourcesForRegionResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allTagResourcesNode = value["TagResources"]["TagResource"]; + for (auto valueTagResourcesTagResource : allTagResourcesNode) + { + TagResource tagResourcesObject; + if(!valueTagResourcesTagResource["ResourceType"].isNull()) + tagResourcesObject.resourceType = valueTagResourcesTagResource["ResourceType"].asString(); + if(!valueTagResourcesTagResource["TagValue"].isNull()) + tagResourcesObject.tagValue = valueTagResourcesTagResource["TagValue"].asString(); + if(!valueTagResourcesTagResource["ResourceId"].isNull()) + tagResourcesObject.resourceId = valueTagResourcesTagResource["ResourceId"].asString(); + if(!valueTagResourcesTagResource["TagKey"].isNull()) + tagResourcesObject.tagKey = valueTagResourcesTagResource["TagKey"].asString(); + tagResources_.push_back(tagResourcesObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + +} + +std::string ListTagResourcesForRegionResult::getNextToken()const +{ + return nextToken_; +} + +std::vector ListTagResourcesForRegionResult::getTagResources()const +{ + return tagResources_; +} + diff --git a/polardb/src/model/ModifyDBNodeHotReplicaModeRequest.cc b/polardb/src/model/ModifyDBNodeHotReplicaModeRequest.cc new file mode 100644 index 000000000..8349af094 --- /dev/null +++ b/polardb/src/model/ModifyDBNodeHotReplicaModeRequest.cc @@ -0,0 +1,117 @@ +/* + * 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 + +using AlibabaCloud::Polardb::Model::ModifyDBNodeHotReplicaModeRequest; + +ModifyDBNodeHotReplicaModeRequest::ModifyDBNodeHotReplicaModeRequest() : + RpcServiceRequest("polardb", "2017-08-01", "ModifyDBNodeHotReplicaMode") +{ + setMethod(HttpRequest::Method::Post); +} + +ModifyDBNodeHotReplicaModeRequest::~ModifyDBNodeHotReplicaModeRequest() +{} + +long ModifyDBNodeHotReplicaModeRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void ModifyDBNodeHotReplicaModeRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string ModifyDBNodeHotReplicaModeRequest::getDBNodeId()const +{ + return dBNodeId_; +} + +void ModifyDBNodeHotReplicaModeRequest::setDBNodeId(const std::string& dBNodeId) +{ + dBNodeId_ = dBNodeId; + setParameter("DBNodeId", dBNodeId); +} + +std::string ModifyDBNodeHotReplicaModeRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void ModifyDBNodeHotReplicaModeRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string ModifyDBNodeHotReplicaModeRequest::getResourceOwnerAccount()const +{ + return resourceOwnerAccount_; +} + +void ModifyDBNodeHotReplicaModeRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) +{ + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter("ResourceOwnerAccount", resourceOwnerAccount); +} + +std::string ModifyDBNodeHotReplicaModeRequest::getDBClusterId()const +{ + return dBClusterId_; +} + +void ModifyDBNodeHotReplicaModeRequest::setDBClusterId(const std::string& dBClusterId) +{ + dBClusterId_ = dBClusterId; + setParameter("DBClusterId", dBClusterId); +} + +std::string ModifyDBNodeHotReplicaModeRequest::getOwnerAccount()const +{ + return ownerAccount_; +} + +void ModifyDBNodeHotReplicaModeRequest::setOwnerAccount(const std::string& ownerAccount) +{ + ownerAccount_ = ownerAccount; + setParameter("OwnerAccount", ownerAccount); +} + +long ModifyDBNodeHotReplicaModeRequest::getOwnerId()const +{ + return ownerId_; +} + +void ModifyDBNodeHotReplicaModeRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + +std::string ModifyDBNodeHotReplicaModeRequest::getHotReplicaMode()const +{ + return hotReplicaMode_; +} + +void ModifyDBNodeHotReplicaModeRequest::setHotReplicaMode(const std::string& hotReplicaMode) +{ + hotReplicaMode_ = hotReplicaMode; + setParameter("HotReplicaMode", hotReplicaMode); +} + diff --git a/polardb/src/model/ModifyDBNodeHotReplicaModeResult.cc b/polardb/src/model/ModifyDBNodeHotReplicaModeResult.cc new file mode 100644 index 000000000..1cd04ee15 --- /dev/null +++ b/polardb/src/model/ModifyDBNodeHotReplicaModeResult.cc @@ -0,0 +1,58 @@ +/* + * 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 +#include + +using namespace AlibabaCloud::Polardb; +using namespace AlibabaCloud::Polardb::Model; + +ModifyDBNodeHotReplicaModeResult::ModifyDBNodeHotReplicaModeResult() : + ServiceResult() +{} + +ModifyDBNodeHotReplicaModeResult::ModifyDBNodeHotReplicaModeResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ModifyDBNodeHotReplicaModeResult::~ModifyDBNodeHotReplicaModeResult() +{} + +void ModifyDBNodeHotReplicaModeResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["DBClusterId"].isNull()) + dBClusterId_ = value["DBClusterId"].asString(); + if(!value["OrderId"].isNull()) + orderId_ = value["OrderId"].asString(); + +} + +std::string ModifyDBNodeHotReplicaModeResult::getDBClusterId()const +{ + return dBClusterId_; +} + +std::string ModifyDBNodeHotReplicaModeResult::getOrderId()const +{ + return orderId_; +} +