diff --git a/CHANGELOG b/CHANGELOG index da5d2f2da..f34ce9881 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2021-07-08 Version: 1.36.814 +- Generated 2019-01-01 for `Cassandra`. + 2021-07-08 Version: 1.36.813 - Support APP auth. diff --git a/VERSION b/VERSION index e8387a25b..e81d2b8c3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.813 \ No newline at end of file +1.36.814 \ No newline at end of file diff --git a/cassandra/CMakeLists.txt b/cassandra/CMakeLists.txt index 09a8ddad3..18a9619c6 100644 --- a/cassandra/CMakeLists.txt +++ b/cassandra/CMakeLists.txt @@ -109,6 +109,8 @@ set(cassandra_public_header_model include/alibabacloud/cassandra/model/ModifyParameterResult.h include/alibabacloud/cassandra/model/ModifySecurityGroupsRequest.h include/alibabacloud/cassandra/model/ModifySecurityGroupsResult.h + include/alibabacloud/cassandra/model/MoveResourceGroupRequest.h + include/alibabacloud/cassandra/model/MoveResourceGroupResult.h include/alibabacloud/cassandra/model/PurgeClusterRequest.h include/alibabacloud/cassandra/model/PurgeClusterResult.h include/alibabacloud/cassandra/model/RebootClusterRequest.h @@ -216,6 +218,8 @@ set(cassandra_src src/model/ModifyParameterResult.cc src/model/ModifySecurityGroupsRequest.cc src/model/ModifySecurityGroupsResult.cc + src/model/MoveResourceGroupRequest.cc + src/model/MoveResourceGroupResult.cc src/model/PurgeClusterRequest.cc src/model/PurgeClusterResult.cc src/model/RebootClusterRequest.cc diff --git a/cassandra/include/alibabacloud/cassandra/CassandraClient.h b/cassandra/include/alibabacloud/cassandra/CassandraClient.h index 9611d286c..705ed7765 100644 --- a/cassandra/include/alibabacloud/cassandra/CassandraClient.h +++ b/cassandra/include/alibabacloud/cassandra/CassandraClient.h @@ -110,6 +110,8 @@ #include "model/ModifyParameterResult.h" #include "model/ModifySecurityGroupsRequest.h" #include "model/ModifySecurityGroupsResult.h" +#include "model/MoveResourceGroupRequest.h" +#include "model/MoveResourceGroupResult.h" #include "model/PurgeClusterRequest.h" #include "model/PurgeClusterResult.h" #include "model/RebootClusterRequest.h" @@ -267,6 +269,9 @@ namespace AlibabaCloud typedef Outcome ModifySecurityGroupsOutcome; typedef std::future ModifySecurityGroupsOutcomeCallable; typedef std::function&)> ModifySecurityGroupsAsyncHandler; + typedef Outcome MoveResourceGroupOutcome; + typedef std::future MoveResourceGroupOutcomeCallable; + typedef std::function&)> MoveResourceGroupAsyncHandler; typedef Outcome PurgeClusterOutcome; typedef std::future PurgeClusterOutcomeCallable; typedef std::function&)> PurgeClusterAsyncHandler; @@ -428,6 +433,9 @@ namespace AlibabaCloud ModifySecurityGroupsOutcome modifySecurityGroups(const Model::ModifySecurityGroupsRequest &request)const; void modifySecurityGroupsAsync(const Model::ModifySecurityGroupsRequest& request, const ModifySecurityGroupsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ModifySecurityGroupsOutcomeCallable modifySecurityGroupsCallable(const Model::ModifySecurityGroupsRequest& request) const; + MoveResourceGroupOutcome moveResourceGroup(const Model::MoveResourceGroupRequest &request)const; + void moveResourceGroupAsync(const Model::MoveResourceGroupRequest& request, const MoveResourceGroupAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + MoveResourceGroupOutcomeCallable moveResourceGroupCallable(const Model::MoveResourceGroupRequest& request) const; PurgeClusterOutcome purgeCluster(const Model::PurgeClusterRequest &request)const; void purgeClusterAsync(const Model::PurgeClusterRequest& request, const PurgeClusterAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; PurgeClusterOutcomeCallable purgeClusterCallable(const Model::PurgeClusterRequest& request) const; diff --git a/cassandra/include/alibabacloud/cassandra/model/AllocatePublicContactPointsRequest.h b/cassandra/include/alibabacloud/cassandra/model/AllocatePublicContactPointsRequest.h index 04f869d61..af5178c32 100644 --- a/cassandra/include/alibabacloud/cassandra/model/AllocatePublicContactPointsRequest.h +++ b/cassandra/include/alibabacloud/cassandra/model/AllocatePublicContactPointsRequest.h @@ -35,12 +35,15 @@ namespace AlibabaCloud AllocatePublicContactPointsRequest(); ~AllocatePublicContactPointsRequest(); + std::string getClientToken()const; + void setClientToken(const std::string& clientToken); std::string getDataCenterId()const; void setDataCenterId(const std::string& dataCenterId); std::string getClusterId()const; void setClusterId(const std::string& clusterId); private: + std::string clientToken_; std::string dataCenterId_; std::string clusterId_; diff --git a/cassandra/include/alibabacloud/cassandra/model/CreateBackupPlanRequest.h b/cassandra/include/alibabacloud/cassandra/model/CreateBackupPlanRequest.h index ec3a8b43d..2146c2581 100644 --- a/cassandra/include/alibabacloud/cassandra/model/CreateBackupPlanRequest.h +++ b/cassandra/include/alibabacloud/cassandra/model/CreateBackupPlanRequest.h @@ -35,6 +35,8 @@ namespace AlibabaCloud CreateBackupPlanRequest(); ~CreateBackupPlanRequest(); + std::string getClientToken()const; + void setClientToken(const std::string& clientToken); int getRetentionPeriod()const; void setRetentionPeriod(int retentionPeriod); std::string getDataCenterId()const; @@ -49,6 +51,7 @@ namespace AlibabaCloud void setBackupPeriod(const std::string& backupPeriod); private: + std::string clientToken_; int retentionPeriod_; std::string dataCenterId_; bool active_; diff --git a/cassandra/include/alibabacloud/cassandra/model/CreateClusterRequest.h b/cassandra/include/alibabacloud/cassandra/model/CreateClusterRequest.h index 932457a44..e1630ae6d 100644 --- a/cassandra/include/alibabacloud/cassandra/model/CreateClusterRequest.h +++ b/cassandra/include/alibabacloud/cassandra/model/CreateClusterRequest.h @@ -39,6 +39,8 @@ namespace AlibabaCloud void setClientToken(const std::string& clientToken); std::string getClusterName()const; void setClusterName(const std::string& clusterName); + std::string getResourceGroupId()const; + void setResourceGroupId(const std::string& resourceGroupId); std::string getPassword()const; void setPassword(const std::string& password); std::string getRegionId()const; @@ -75,6 +77,7 @@ namespace AlibabaCloud private: std::string clientToken_; std::string clusterName_; + std::string resourceGroupId_; std::string password_; std::string regionId_; std::string instanceType_; diff --git a/cassandra/include/alibabacloud/cassandra/model/DescribeClusterResult.h b/cassandra/include/alibabacloud/cassandra/model/DescribeClusterResult.h index 1beb6387c..fb08dbc3c 100644 --- a/cassandra/include/alibabacloud/cassandra/model/DescribeClusterResult.h +++ b/cassandra/include/alibabacloud/cassandra/model/DescribeClusterResult.h @@ -43,6 +43,7 @@ namespace AlibabaCloud std::string majorVersion; int autoRenewPeriod; std::string createdTime; + std::string resourceGroupId; std::string clusterId; std::string minorVersion; std::string payType; diff --git a/cassandra/include/alibabacloud/cassandra/model/DescribeClustersRequest.h b/cassandra/include/alibabacloud/cassandra/model/DescribeClustersRequest.h index 5e3270703..321a7224d 100644 --- a/cassandra/include/alibabacloud/cassandra/model/DescribeClustersRequest.h +++ b/cassandra/include/alibabacloud/cassandra/model/DescribeClustersRequest.h @@ -45,6 +45,8 @@ namespace AlibabaCloud void setClusterName(const std::string& clusterName); int getPageNumber()const; void setPageNumber(int pageNumber); + std::string getResourceGroupId()const; + void setResourceGroupId(const std::string& resourceGroupId); std::string getRegionId()const; void setRegionId(const std::string& regionId); int getPageSize()const; @@ -55,6 +57,7 @@ namespace AlibabaCloud private: std::string clusterName_; int pageNumber_; + std::string resourceGroupId_; std::string regionId_; int pageSize_; std::vector tag_; diff --git a/cassandra/include/alibabacloud/cassandra/model/DescribeClustersResult.h b/cassandra/include/alibabacloud/cassandra/model/DescribeClustersResult.h index ad81b7055..8b85a9e2c 100644 --- a/cassandra/include/alibabacloud/cassandra/model/DescribeClustersResult.h +++ b/cassandra/include/alibabacloud/cassandra/model/DescribeClustersResult.h @@ -43,6 +43,7 @@ namespace AlibabaCloud std::string majorVersion; int autoRenewPeriod; std::string createdTime; + std::string resourceGroupId; std::string clusterId; std::string minorVersion; std::string payType; diff --git a/cassandra/include/alibabacloud/cassandra/model/MoveResourceGroupRequest.h b/cassandra/include/alibabacloud/cassandra/model/MoveResourceGroupRequest.h new file mode 100644 index 000000000..58914d533 --- /dev/null +++ b/cassandra/include/alibabacloud/cassandra/model/MoveResourceGroupRequest.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_CASSANDRA_MODEL_MOVERESOURCEGROUPREQUEST_H_ +#define ALIBABACLOUD_CASSANDRA_MODEL_MOVERESOURCEGROUPREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cassandra + { + namespace Model + { + class ALIBABACLOUD_CASSANDRA_EXPORT MoveResourceGroupRequest : public RpcServiceRequest + { + + public: + MoveResourceGroupRequest(); + ~MoveResourceGroupRequest(); + + std::string getClusterId()const; + void setClusterId(const std::string& clusterId); + std::string getNewResourceGroupId()const; + void setNewResourceGroupId(const std::string& newResourceGroupId); + + private: + std::string clusterId_; + std::string newResourceGroupId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CASSANDRA_MODEL_MOVERESOURCEGROUPREQUEST_H_ \ No newline at end of file diff --git a/cassandra/include/alibabacloud/cassandra/model/MoveResourceGroupResult.h b/cassandra/include/alibabacloud/cassandra/model/MoveResourceGroupResult.h new file mode 100644 index 000000000..2bf6dade0 --- /dev/null +++ b/cassandra/include/alibabacloud/cassandra/model/MoveResourceGroupResult.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_CASSANDRA_MODEL_MOVERESOURCEGROUPRESULT_H_ +#define ALIBABACLOUD_CASSANDRA_MODEL_MOVERESOURCEGROUPRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cassandra + { + namespace Model + { + class ALIBABACLOUD_CASSANDRA_EXPORT MoveResourceGroupResult : public ServiceResult + { + public: + + + MoveResourceGroupResult(); + explicit MoveResourceGroupResult(const std::string &payload); + ~MoveResourceGroupResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_CASSANDRA_MODEL_MOVERESOURCEGROUPRESULT_H_ \ No newline at end of file diff --git a/cassandra/src/CassandraClient.cc b/cassandra/src/CassandraClient.cc index db98bc628..83ce74155 100644 --- a/cassandra/src/CassandraClient.cc +++ b/cassandra/src/CassandraClient.cc @@ -1635,6 +1635,42 @@ CassandraClient::ModifySecurityGroupsOutcomeCallable CassandraClient::modifySecu return task->get_future(); } +CassandraClient::MoveResourceGroupOutcome CassandraClient::moveResourceGroup(const MoveResourceGroupRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return MoveResourceGroupOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return MoveResourceGroupOutcome(MoveResourceGroupResult(outcome.result())); + else + return MoveResourceGroupOutcome(outcome.error()); +} + +void CassandraClient::moveResourceGroupAsync(const MoveResourceGroupRequest& request, const MoveResourceGroupAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, moveResourceGroup(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CassandraClient::MoveResourceGroupOutcomeCallable CassandraClient::moveResourceGroupCallable(const MoveResourceGroupRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->moveResourceGroup(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CassandraClient::PurgeClusterOutcome CassandraClient::purgeCluster(const PurgeClusterRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/cassandra/src/model/AllocatePublicContactPointsRequest.cc b/cassandra/src/model/AllocatePublicContactPointsRequest.cc index a4d1213d9..8fda056fc 100644 --- a/cassandra/src/model/AllocatePublicContactPointsRequest.cc +++ b/cassandra/src/model/AllocatePublicContactPointsRequest.cc @@ -27,6 +27,17 @@ AllocatePublicContactPointsRequest::AllocatePublicContactPointsRequest() : AllocatePublicContactPointsRequest::~AllocatePublicContactPointsRequest() {} +std::string AllocatePublicContactPointsRequest::getClientToken()const +{ + return clientToken_; +} + +void AllocatePublicContactPointsRequest::setClientToken(const std::string& clientToken) +{ + clientToken_ = clientToken; + setParameter("ClientToken", clientToken); +} + std::string AllocatePublicContactPointsRequest::getDataCenterId()const { return dataCenterId_; diff --git a/cassandra/src/model/CreateBackupPlanRequest.cc b/cassandra/src/model/CreateBackupPlanRequest.cc index aee78e9d5..e6192ff9e 100644 --- a/cassandra/src/model/CreateBackupPlanRequest.cc +++ b/cassandra/src/model/CreateBackupPlanRequest.cc @@ -27,6 +27,17 @@ CreateBackupPlanRequest::CreateBackupPlanRequest() : CreateBackupPlanRequest::~CreateBackupPlanRequest() {} +std::string CreateBackupPlanRequest::getClientToken()const +{ + return clientToken_; +} + +void CreateBackupPlanRequest::setClientToken(const std::string& clientToken) +{ + clientToken_ = clientToken; + setParameter("ClientToken", clientToken); +} + int CreateBackupPlanRequest::getRetentionPeriod()const { return retentionPeriod_; diff --git a/cassandra/src/model/CreateClusterRequest.cc b/cassandra/src/model/CreateClusterRequest.cc index 62429c1bd..6b8e21af8 100644 --- a/cassandra/src/model/CreateClusterRequest.cc +++ b/cassandra/src/model/CreateClusterRequest.cc @@ -49,6 +49,17 @@ void CreateClusterRequest::setClusterName(const std::string& clusterName) setParameter("ClusterName", clusterName); } +std::string CreateClusterRequest::getResourceGroupId()const +{ + return resourceGroupId_; +} + +void CreateClusterRequest::setResourceGroupId(const std::string& resourceGroupId) +{ + resourceGroupId_ = resourceGroupId; + setParameter("ResourceGroupId", resourceGroupId); +} + std::string CreateClusterRequest::getPassword()const { return password_; diff --git a/cassandra/src/model/DescribeClusterResult.cc b/cassandra/src/model/DescribeClusterResult.cc index 197853bab..02c34078d 100644 --- a/cassandra/src/model/DescribeClusterResult.cc +++ b/cassandra/src/model/DescribeClusterResult.cc @@ -70,6 +70,8 @@ void DescribeClusterResult::parse(const std::string &payload) cluster_.autoRenewal = clusterNode["AutoRenewal"].asString() == "true"; if(!clusterNode["AutoRenewPeriod"].isNull()) cluster_.autoRenewPeriod = std::stoi(clusterNode["AutoRenewPeriod"].asString()); + if(!clusterNode["ResourceGroupId"].isNull()) + cluster_.resourceGroupId = clusterNode["ResourceGroupId"].asString(); auto allTagsNode = clusterNode["Tags"]["Tag"]; for (auto clusterNodeTagsTag : allTagsNode) { diff --git a/cassandra/src/model/DescribeClustersRequest.cc b/cassandra/src/model/DescribeClustersRequest.cc index 52ceed031..10692e206 100644 --- a/cassandra/src/model/DescribeClustersRequest.cc +++ b/cassandra/src/model/DescribeClustersRequest.cc @@ -49,6 +49,17 @@ void DescribeClustersRequest::setPageNumber(int pageNumber) setParameter("PageNumber", std::to_string(pageNumber)); } +std::string DescribeClustersRequest::getResourceGroupId()const +{ + return resourceGroupId_; +} + +void DescribeClustersRequest::setResourceGroupId(const std::string& resourceGroupId) +{ + resourceGroupId_ = resourceGroupId; + setParameter("ResourceGroupId", resourceGroupId); +} + std::string DescribeClustersRequest::getRegionId()const { return regionId_; diff --git a/cassandra/src/model/DescribeClustersResult.cc b/cassandra/src/model/DescribeClustersResult.cc index 343d278cb..fc9775233 100644 --- a/cassandra/src/model/DescribeClustersResult.cc +++ b/cassandra/src/model/DescribeClustersResult.cc @@ -67,6 +67,8 @@ void DescribeClustersResult::parse(const std::string &payload) clustersObject.autoRenewal = valueClustersCluster["AutoRenewal"].asString() == "true"; if(!valueClustersCluster["AutoRenewPeriod"].isNull()) clustersObject.autoRenewPeriod = std::stoi(valueClustersCluster["AutoRenewPeriod"].asString()); + if(!valueClustersCluster["ResourceGroupId"].isNull()) + clustersObject.resourceGroupId = valueClustersCluster["ResourceGroupId"].asString(); auto allTagsNode = valueClustersCluster["Tags"]["Tag"]; for (auto valueClustersClusterTagsTag : allTagsNode) { diff --git a/cassandra/src/model/MoveResourceGroupRequest.cc b/cassandra/src/model/MoveResourceGroupRequest.cc new file mode 100644 index 000000000..f6253cdb3 --- /dev/null +++ b/cassandra/src/model/MoveResourceGroupRequest.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 + +using AlibabaCloud::Cassandra::Model::MoveResourceGroupRequest; + +MoveResourceGroupRequest::MoveResourceGroupRequest() : + RpcServiceRequest("cassandra", "2019-01-01", "MoveResourceGroup") +{ + setMethod(HttpRequest::Method::Post); +} + +MoveResourceGroupRequest::~MoveResourceGroupRequest() +{} + +std::string MoveResourceGroupRequest::getClusterId()const +{ + return clusterId_; +} + +void MoveResourceGroupRequest::setClusterId(const std::string& clusterId) +{ + clusterId_ = clusterId; + setParameter("ClusterId", clusterId); +} + +std::string MoveResourceGroupRequest::getNewResourceGroupId()const +{ + return newResourceGroupId_; +} + +void MoveResourceGroupRequest::setNewResourceGroupId(const std::string& newResourceGroupId) +{ + newResourceGroupId_ = newResourceGroupId; + setParameter("NewResourceGroupId", newResourceGroupId); +} + diff --git a/cassandra/src/model/MoveResourceGroupResult.cc b/cassandra/src/model/MoveResourceGroupResult.cc new file mode 100644 index 000000000..31230e9a9 --- /dev/null +++ b/cassandra/src/model/MoveResourceGroupResult.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 +#include + +using namespace AlibabaCloud::Cassandra; +using namespace AlibabaCloud::Cassandra::Model; + +MoveResourceGroupResult::MoveResourceGroupResult() : + ServiceResult() +{} + +MoveResourceGroupResult::MoveResourceGroupResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +MoveResourceGroupResult::~MoveResourceGroupResult() +{} + +void MoveResourceGroupResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} +