Support DryRunCluster For LakeVersion.
This commit is contained in:
@@ -179,6 +179,8 @@ set(adb_public_header_model
|
||||
include/alibabacloud/adb/model/KillProcessResult.h
|
||||
include/alibabacloud/adb/model/ListTagResourcesRequest.h
|
||||
include/alibabacloud/adb/model/ListTagResourcesResult.h
|
||||
include/alibabacloud/adb/model/MigrateDBClusterRequest.h
|
||||
include/alibabacloud/adb/model/MigrateDBClusterResult.h
|
||||
include/alibabacloud/adb/model/ModifyAccountDescriptionRequest.h
|
||||
include/alibabacloud/adb/model/ModifyAccountDescriptionResult.h
|
||||
include/alibabacloud/adb/model/ModifyAuditLogConfigRequest.h
|
||||
@@ -386,6 +388,8 @@ set(adb_src
|
||||
src/model/KillProcessResult.cc
|
||||
src/model/ListTagResourcesRequest.cc
|
||||
src/model/ListTagResourcesResult.cc
|
||||
src/model/MigrateDBClusterRequest.cc
|
||||
src/model/MigrateDBClusterResult.cc
|
||||
src/model/ModifyAccountDescriptionRequest.cc
|
||||
src/model/ModifyAccountDescriptionResult.cc
|
||||
src/model/ModifyAuditLogConfigRequest.cc
|
||||
|
||||
@@ -180,6 +180,8 @@
|
||||
#include "model/KillProcessResult.h"
|
||||
#include "model/ListTagResourcesRequest.h"
|
||||
#include "model/ListTagResourcesResult.h"
|
||||
#include "model/MigrateDBClusterRequest.h"
|
||||
#include "model/MigrateDBClusterResult.h"
|
||||
#include "model/ModifyAccountDescriptionRequest.h"
|
||||
#include "model/ModifyAccountDescriptionResult.h"
|
||||
#include "model/ModifyAuditLogConfigRequest.h"
|
||||
@@ -472,6 +474,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::ListTagResourcesResult> ListTagResourcesOutcome;
|
||||
typedef std::future<ListTagResourcesOutcome> ListTagResourcesOutcomeCallable;
|
||||
typedef std::function<void(const AdbClient*, const Model::ListTagResourcesRequest&, const ListTagResourcesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTagResourcesAsyncHandler;
|
||||
typedef Outcome<Error, Model::MigrateDBClusterResult> MigrateDBClusterOutcome;
|
||||
typedef std::future<MigrateDBClusterOutcome> MigrateDBClusterOutcomeCallable;
|
||||
typedef std::function<void(const AdbClient*, const Model::MigrateDBClusterRequest&, const MigrateDBClusterOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MigrateDBClusterAsyncHandler;
|
||||
typedef Outcome<Error, Model::ModifyAccountDescriptionResult> ModifyAccountDescriptionOutcome;
|
||||
typedef std::future<ModifyAccountDescriptionOutcome> ModifyAccountDescriptionOutcomeCallable;
|
||||
typedef std::function<void(const AdbClient*, const Model::ModifyAccountDescriptionRequest&, const ModifyAccountDescriptionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyAccountDescriptionAsyncHandler;
|
||||
@@ -783,6 +788,9 @@ namespace AlibabaCloud
|
||||
ListTagResourcesOutcome listTagResources(const Model::ListTagResourcesRequest &request)const;
|
||||
void listTagResourcesAsync(const Model::ListTagResourcesRequest& request, const ListTagResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListTagResourcesOutcomeCallable listTagResourcesCallable(const Model::ListTagResourcesRequest& request) const;
|
||||
MigrateDBClusterOutcome migrateDBCluster(const Model::MigrateDBClusterRequest &request)const;
|
||||
void migrateDBClusterAsync(const Model::MigrateDBClusterRequest& request, const MigrateDBClusterAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
MigrateDBClusterOutcomeCallable migrateDBClusterCallable(const Model::MigrateDBClusterRequest& request) const;
|
||||
ModifyAccountDescriptionOutcome modifyAccountDescription(const Model::ModifyAccountDescriptionRequest &request)const;
|
||||
void modifyAccountDescriptionAsync(const Model::ModifyAccountDescriptionRequest& request, const ModifyAccountDescriptionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ModifyAccountDescriptionOutcomeCallable modifyAccountDescriptionCallable(const Model::ModifyAccountDescriptionRequest& request) const;
|
||||
|
||||
@@ -38,6 +38,8 @@ public:
|
||||
void setRegionId(const std::string ®ionId);
|
||||
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 getDBClusterVersion() const;
|
||||
@@ -46,16 +48,20 @@ public:
|
||||
void setOwnerId(long ownerId);
|
||||
std::string getZoneId() const;
|
||||
void setZoneId(const std::string &zoneId);
|
||||
bool getMigrate() const;
|
||||
void setMigrate(bool migrate);
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string accessKeyId_;
|
||||
std::string regionId_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string dBClusterId_;
|
||||
std::string ownerAccount_;
|
||||
std::string dBClusterVersion_;
|
||||
long ownerId_;
|
||||
std::string zoneId_;
|
||||
bool migrate_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Adb
|
||||
|
||||
@@ -34,6 +34,8 @@ public:
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getAccessKeyId() const;
|
||||
void setAccessKeyId(const std::string &accessKeyId);
|
||||
std::string getRegionId() const;
|
||||
void setRegionId(const std::string ®ionId);
|
||||
std::string getSchemaName() const;
|
||||
void setSchemaName(const std::string &schemaName);
|
||||
std::string getResourceOwnerAccount() const;
|
||||
@@ -48,6 +50,7 @@ public:
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string accessKeyId_;
|
||||
std::string regionId_;
|
||||
std::string schemaName_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string dBClusterId_;
|
||||
|
||||
57
adb/include/alibabacloud/adb/model/MigrateDBClusterRequest.h
Normal file
57
adb/include/alibabacloud/adb/model/MigrateDBClusterRequest.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* 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_ADB_MODEL_MIGRATEDBCLUSTERREQUEST_H_
|
||||
#define ALIBABACLOUD_ADB_MODEL_MIGRATEDBCLUSTERREQUEST_H_
|
||||
|
||||
#include <alibabacloud/adb/AdbExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Adb {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ADB_EXPORT MigrateDBClusterRequest : public RpcServiceRequest {
|
||||
public:
|
||||
MigrateDBClusterRequest();
|
||||
~MigrateDBClusterRequest();
|
||||
long getResourceOwnerId() const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
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);
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string accessKeyId_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string dBClusterId_;
|
||||
std::string ownerAccount_;
|
||||
long ownerId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Adb
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ADB_MODEL_MIGRATEDBCLUSTERREQUEST_H_
|
||||
49
adb/include/alibabacloud/adb/model/MigrateDBClusterResult.h
Normal file
49
adb/include/alibabacloud/adb/model/MigrateDBClusterResult.h
Normal file
@@ -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_ADB_MODEL_MIGRATEDBCLUSTERRESULT_H_
|
||||
#define ALIBABACLOUD_ADB_MODEL_MIGRATEDBCLUSTERRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/adb/AdbExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Adb
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ADB_EXPORT MigrateDBClusterResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
MigrateDBClusterResult();
|
||||
explicit MigrateDBClusterResult(const std::string &payload);
|
||||
~MigrateDBClusterResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ADB_MODEL_MIGRATEDBCLUSTERRESULT_H_
|
||||
@@ -2895,6 +2895,42 @@ AdbClient::ListTagResourcesOutcomeCallable AdbClient::listTagResourcesCallable(c
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AdbClient::MigrateDBClusterOutcome AdbClient::migrateDBCluster(const MigrateDBClusterRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return MigrateDBClusterOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return MigrateDBClusterOutcome(MigrateDBClusterResult(outcome.result()));
|
||||
else
|
||||
return MigrateDBClusterOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AdbClient::migrateDBClusterAsync(const MigrateDBClusterRequest& request, const MigrateDBClusterAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, migrateDBCluster(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AdbClient::MigrateDBClusterOutcomeCallable AdbClient::migrateDBClusterCallable(const MigrateDBClusterRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<MigrateDBClusterOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->migrateDBCluster(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AdbClient::ModifyAccountDescriptionOutcome AdbClient::modifyAccountDescription(const ModifyAccountDescriptionRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -61,6 +61,15 @@ void DescribeComputeResourceRequest::setResourceOwnerAccount(const std::string &
|
||||
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string DescribeComputeResourceRequest::getDBClusterId() const {
|
||||
return dBClusterId_;
|
||||
}
|
||||
|
||||
void DescribeComputeResourceRequest::setDBClusterId(const std::string &dBClusterId) {
|
||||
dBClusterId_ = dBClusterId;
|
||||
setParameter(std::string("DBClusterId"), dBClusterId);
|
||||
}
|
||||
|
||||
std::string DescribeComputeResourceRequest::getOwnerAccount() const {
|
||||
return ownerAccount_;
|
||||
}
|
||||
@@ -97,3 +106,12 @@ void DescribeComputeResourceRequest::setZoneId(const std::string &zoneId) {
|
||||
setParameter(std::string("ZoneId"), zoneId);
|
||||
}
|
||||
|
||||
bool DescribeComputeResourceRequest::getMigrate() const {
|
||||
return migrate_;
|
||||
}
|
||||
|
||||
void DescribeComputeResourceRequest::setMigrate(bool migrate) {
|
||||
migrate_ = migrate;
|
||||
setParameter(std::string("Migrate"), migrate ? "true" : "false");
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,15 @@ void DescribeTablesRequest::setAccessKeyId(const std::string &accessKeyId) {
|
||||
setParameter(std::string("AccessKeyId"), accessKeyId);
|
||||
}
|
||||
|
||||
std::string DescribeTablesRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DescribeTablesRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string DescribeTablesRequest::getSchemaName() const {
|
||||
return schemaName_;
|
||||
}
|
||||
|
||||
81
adb/src/model/MigrateDBClusterRequest.cc
Normal file
81
adb/src/model/MigrateDBClusterRequest.cc
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 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/adb/model/MigrateDBClusterRequest.h>
|
||||
|
||||
using AlibabaCloud::Adb::Model::MigrateDBClusterRequest;
|
||||
|
||||
MigrateDBClusterRequest::MigrateDBClusterRequest()
|
||||
: RpcServiceRequest("adb", "2019-03-15", "MigrateDBCluster") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
MigrateDBClusterRequest::~MigrateDBClusterRequest() {}
|
||||
|
||||
long MigrateDBClusterRequest::getResourceOwnerId() const {
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void MigrateDBClusterRequest::setResourceOwnerId(long resourceOwnerId) {
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string MigrateDBClusterRequest::getAccessKeyId() const {
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void MigrateDBClusterRequest::setAccessKeyId(const std::string &accessKeyId) {
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter(std::string("AccessKeyId"), accessKeyId);
|
||||
}
|
||||
|
||||
std::string MigrateDBClusterRequest::getResourceOwnerAccount() const {
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void MigrateDBClusterRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string MigrateDBClusterRequest::getDBClusterId() const {
|
||||
return dBClusterId_;
|
||||
}
|
||||
|
||||
void MigrateDBClusterRequest::setDBClusterId(const std::string &dBClusterId) {
|
||||
dBClusterId_ = dBClusterId;
|
||||
setParameter(std::string("DBClusterId"), dBClusterId);
|
||||
}
|
||||
|
||||
std::string MigrateDBClusterRequest::getOwnerAccount() const {
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void MigrateDBClusterRequest::setOwnerAccount(const std::string &ownerAccount) {
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter(std::string("OwnerAccount"), ownerAccount);
|
||||
}
|
||||
|
||||
long MigrateDBClusterRequest::getOwnerId() const {
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void MigrateDBClusterRequest::setOwnerId(long ownerId) {
|
||||
ownerId_ = ownerId;
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
44
adb/src/model/MigrateDBClusterResult.cc
Normal file
44
adb/src/model/MigrateDBClusterResult.cc
Normal file
@@ -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/adb/model/MigrateDBClusterResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Adb;
|
||||
using namespace AlibabaCloud::Adb::Model;
|
||||
|
||||
MigrateDBClusterResult::MigrateDBClusterResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
MigrateDBClusterResult::MigrateDBClusterResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
MigrateDBClusterResult::~MigrateDBClusterResult()
|
||||
{}
|
||||
|
||||
void MigrateDBClusterResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user