Support GetDBTopology API.
This commit is contained in:
2
dms-enterprise/2018-11-01/GetDBTopology.xml
Normal file
2
dms-enterprise/2018-11-01/GetDBTopology.xml
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Api name="GetDBTopology" status="online" version="2018-11-01" product="dms-enterprise" authType="AK" showJsonItemName="false" visibility="Public" fileTransfer="false" responseLog="enable" keepClientResourceOwnerId="true"><Parameters><Parameter name="dbId" tagName="LogicDbId" type="Long" required="true" tagPosition="Query" minValue="1" maxValue="9223372036854775807"/><Parameter name="requestId" tagName="RequestId" type="String" required="false" tagPosition="System"/><Parameter name="actionName" tagName="Action" type="String" required="false" tagPosition="System"/><Parameter name="callerUid" tagName="callerUid" type="Long" required="false" tagPosition="System"/><Parameter name="IspSignatureSecretKey" tagName="IspSignatureSecretKey" type="String" required="false" tagPosition="System"/><Parameter name="IspSignature" tagName="IspSignature" type="String" required="false" tagPosition="System"/><Parameter name="accessKeyId" tagName="AccessKeyId" type="String" required="false" tagPosition="System"/><Parameter name="securityToken" tagName="SecurityToken" type="String" required="false" tagPosition="System"/><Parameter name="callerType" tagName="callerType" type="String" required="false" tagPosition="System"/><Parameter name="stsTokenCallerUid" tagName="stsTokenCallerUid" type="Long" required="false" tagPosition="System"/><Parameter name="tid" tagName="Tid" type="Long" required="false" tagPosition="Query" minValue="1" maxValue="9223372036854775807"/><Parameter name="regionId" tagName="RegionId" type="String" required="false" tagPosition="Host" defaultValue="center"/></Parameters><IspProtocol protocol="http" retries="-1" timeout="10000" httpHost="http://api-dms-share-${regionId}.aliyun-inc.com/worknode/openapi/meta/database/logic/getDBTopology" sign="true" signKeyName="dms-enterprise-prod" signPolicy="Local" resultType="Object"/><ErrorMapping exceptionExpress="success=false,errorCode,message,httpStatusCode"/><IsvProtocol protocol="HTTP|HTTPS" method="GET|POST"/><ResultMapping><Member tagName="RequestId" type="String" name="requestId"/><Member tagName="ErrorCode" type="String" name="errorCode"/><Member tagName="ErrorMessage" type="String" name="message"/><Member tagName="Success" type="Boolean" name="success"/><Struct tagName="DBTopology" name="data"><Member tagName="LogicDbId" type="Long" name="dbId"/><Member tagName="SearchName" type="String" name="searchName"/><Member tagName="Alias" type="String" name="alias"/><Member tagName="LogicDbName" type="String" name="schemaName"/><Member tagName="EnvType" type="String" name="envType"/><Member tagName="DbType" type="String" name="dbType"/><Array tagName="DBTopologyInfoList" itemName="DBTopologyInfo" name="dbTopologyInfoList"><Member tagName="InstanceSource" type="String" name="instanceSource"/><Member tagName="InstanceResourceId" type="String" name="instanceResourceId"/><Member tagName="InstanceId" type="Long" name="instanceId"/><Member tagName="SearchName" type="String" name="dbSearchName"/><Member tagName="DbId" type="Long" name="dbId"/><Member tagName="CatalogName" type="String" name="catalogName"/><Member tagName="RegionId" type="String" name="idc"/><Member tagName="EnvType" type="String" name="envType"/><Member tagName="DbType" type="String" name="dbType"/><Member tagName="SchemaName" type="String" name="schemaName"/></Array></Struct></ResultMapping><FlowControl controlUnit="Second" apiDefault="100" userDefault="100"/></Api>
|
||||
@@ -61,6 +61,8 @@ set(dms-enterprise_public_header_model
|
||||
include/alibabacloud/dms-enterprise/model/ExecuteStructSyncResult.h
|
||||
include/alibabacloud/dms-enterprise/model/GetApprovalDetailRequest.h
|
||||
include/alibabacloud/dms-enterprise/model/GetApprovalDetailResult.h
|
||||
include/alibabacloud/dms-enterprise/model/GetDBTopologyRequest.h
|
||||
include/alibabacloud/dms-enterprise/model/GetDBTopologyResult.h
|
||||
include/alibabacloud/dms-enterprise/model/GetDataCorrectBackupFilesRequest.h
|
||||
include/alibabacloud/dms-enterprise/model/GetDataCorrectBackupFilesResult.h
|
||||
include/alibabacloud/dms-enterprise/model/GetDataCorrectOrderDetailRequest.h
|
||||
@@ -218,6 +220,8 @@ set(dms-enterprise_src
|
||||
src/model/ExecuteStructSyncResult.cc
|
||||
src/model/GetApprovalDetailRequest.cc
|
||||
src/model/GetApprovalDetailResult.cc
|
||||
src/model/GetDBTopologyRequest.cc
|
||||
src/model/GetDBTopologyResult.cc
|
||||
src/model/GetDataCorrectBackupFilesRequest.cc
|
||||
src/model/GetDataCorrectBackupFilesResult.cc
|
||||
src/model/GetDataCorrectOrderDetailRequest.cc
|
||||
|
||||
@@ -62,6 +62,8 @@
|
||||
#include "model/ExecuteStructSyncResult.h"
|
||||
#include "model/GetApprovalDetailRequest.h"
|
||||
#include "model/GetApprovalDetailResult.h"
|
||||
#include "model/GetDBTopologyRequest.h"
|
||||
#include "model/GetDBTopologyResult.h"
|
||||
#include "model/GetDataCorrectBackupFilesRequest.h"
|
||||
#include "model/GetDataCorrectBackupFilesResult.h"
|
||||
#include "model/GetDataCorrectOrderDetailRequest.h"
|
||||
@@ -245,6 +247,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::GetApprovalDetailResult> GetApprovalDetailOutcome;
|
||||
typedef std::future<GetApprovalDetailOutcome> GetApprovalDetailOutcomeCallable;
|
||||
typedef std::function<void(const Dms_enterpriseClient*, const Model::GetApprovalDetailRequest&, const GetApprovalDetailOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetApprovalDetailAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetDBTopologyResult> GetDBTopologyOutcome;
|
||||
typedef std::future<GetDBTopologyOutcome> GetDBTopologyOutcomeCallable;
|
||||
typedef std::function<void(const Dms_enterpriseClient*, const Model::GetDBTopologyRequest&, const GetDBTopologyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetDBTopologyAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetDataCorrectBackupFilesResult> GetDataCorrectBackupFilesOutcome;
|
||||
typedef std::future<GetDataCorrectBackupFilesOutcome> GetDataCorrectBackupFilesOutcomeCallable;
|
||||
typedef std::function<void(const Dms_enterpriseClient*, const Model::GetDataCorrectBackupFilesRequest&, const GetDataCorrectBackupFilesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetDataCorrectBackupFilesAsyncHandler;
|
||||
@@ -481,6 +486,9 @@ namespace AlibabaCloud
|
||||
GetApprovalDetailOutcome getApprovalDetail(const Model::GetApprovalDetailRequest &request)const;
|
||||
void getApprovalDetailAsync(const Model::GetApprovalDetailRequest& request, const GetApprovalDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetApprovalDetailOutcomeCallable getApprovalDetailCallable(const Model::GetApprovalDetailRequest& request) const;
|
||||
GetDBTopologyOutcome getDBTopology(const Model::GetDBTopologyRequest &request)const;
|
||||
void getDBTopologyAsync(const Model::GetDBTopologyRequest& request, const GetDBTopologyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetDBTopologyOutcomeCallable getDBTopologyCallable(const Model::GetDBTopologyRequest& request) const;
|
||||
GetDataCorrectBackupFilesOutcome getDataCorrectBackupFiles(const Model::GetDataCorrectBackupFilesRequest &request)const;
|
||||
void getDataCorrectBackupFilesAsync(const Model::GetDataCorrectBackupFilesRequest& request, const GetDataCorrectBackupFilesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetDataCorrectBackupFilesOutcomeCallable getDataCorrectBackupFilesCallable(const Model::GetDataCorrectBackupFilesRequest& request) const;
|
||||
|
||||
@@ -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_DMS_ENTERPRISE_MODEL_GETDBTOPOLOGYREQUEST_H_
|
||||
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETDBTOPOLOGYREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/dms-enterprise/Dms_enterpriseExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Dms_enterprise
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT GetDBTopologyRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
GetDBTopologyRequest();
|
||||
~GetDBTopologyRequest();
|
||||
|
||||
long getLogicDbId()const;
|
||||
void setLogicDbId(long logicDbId);
|
||||
long getTid()const;
|
||||
void setTid(long tid);
|
||||
|
||||
private:
|
||||
long logicDbId_;
|
||||
long tid_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETDBTOPOLOGYREQUEST_H_
|
||||
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* 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_DMS_ENTERPRISE_MODEL_GETDBTOPOLOGYRESULT_H_
|
||||
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETDBTOPOLOGYRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/dms-enterprise/Dms_enterpriseExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Dms_enterprise
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT GetDBTopologyResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct DBTopology
|
||||
{
|
||||
struct DBTopologyInfo
|
||||
{
|
||||
std::string instanceSource;
|
||||
std::string instanceResourceId;
|
||||
long instanceId;
|
||||
std::string searchName;
|
||||
long dbId;
|
||||
std::string catalogName;
|
||||
std::string regionId;
|
||||
std::string envType;
|
||||
std::string dbType;
|
||||
std::string schemaName;
|
||||
};
|
||||
long logicDbId;
|
||||
std::string searchName;
|
||||
std::string alias;
|
||||
std::string logicDbName;
|
||||
std::vector<DBTopologyInfo> dBTopologyInfoList;
|
||||
std::string envType;
|
||||
std::string dbType;
|
||||
};
|
||||
|
||||
|
||||
GetDBTopologyResult();
|
||||
explicit GetDBTopologyResult(const std::string &payload);
|
||||
~GetDBTopologyResult();
|
||||
DBTopology getDBTopology()const;
|
||||
std::string getErrorCode()const;
|
||||
std::string getErrorMessage()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
DBTopology dBTopology_;
|
||||
std::string errorCode_;
|
||||
std::string errorMessage_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETDBTOPOLOGYRESULT_H_
|
||||
@@ -771,6 +771,42 @@ Dms_enterpriseClient::GetApprovalDetailOutcomeCallable Dms_enterpriseClient::get
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Dms_enterpriseClient::GetDBTopologyOutcome Dms_enterpriseClient::getDBTopology(const GetDBTopologyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetDBTopologyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetDBTopologyOutcome(GetDBTopologyResult(outcome.result()));
|
||||
else
|
||||
return GetDBTopologyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Dms_enterpriseClient::getDBTopologyAsync(const GetDBTopologyRequest& request, const GetDBTopologyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getDBTopology(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Dms_enterpriseClient::GetDBTopologyOutcomeCallable Dms_enterpriseClient::getDBTopologyCallable(const GetDBTopologyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetDBTopologyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getDBTopology(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Dms_enterpriseClient::GetDataCorrectBackupFilesOutcome Dms_enterpriseClient::getDataCorrectBackupFiles(const GetDataCorrectBackupFilesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
51
dms-enterprise/src/model/GetDBTopologyRequest.cc
Normal file
51
dms-enterprise/src/model/GetDBTopologyRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/dms-enterprise/model/GetDBTopologyRequest.h>
|
||||
|
||||
using AlibabaCloud::Dms_enterprise::Model::GetDBTopologyRequest;
|
||||
|
||||
GetDBTopologyRequest::GetDBTopologyRequest() :
|
||||
RpcServiceRequest("dms-enterprise", "2018-11-01", "GetDBTopology")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetDBTopologyRequest::~GetDBTopologyRequest()
|
||||
{}
|
||||
|
||||
long GetDBTopologyRequest::getLogicDbId()const
|
||||
{
|
||||
return logicDbId_;
|
||||
}
|
||||
|
||||
void GetDBTopologyRequest::setLogicDbId(long logicDbId)
|
||||
{
|
||||
logicDbId_ = logicDbId;
|
||||
setParameter("LogicDbId", std::to_string(logicDbId));
|
||||
}
|
||||
|
||||
long GetDBTopologyRequest::getTid()const
|
||||
{
|
||||
return tid_;
|
||||
}
|
||||
|
||||
void GetDBTopologyRequest::setTid(long tid)
|
||||
{
|
||||
tid_ = tid;
|
||||
setParameter("Tid", std::to_string(tid));
|
||||
}
|
||||
|
||||
109
dms-enterprise/src/model/GetDBTopologyResult.cc
Normal file
109
dms-enterprise/src/model/GetDBTopologyResult.cc
Normal file
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
* 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/dms-enterprise/model/GetDBTopologyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dms_enterprise;
|
||||
using namespace AlibabaCloud::Dms_enterprise::Model;
|
||||
|
||||
GetDBTopologyResult::GetDBTopologyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetDBTopologyResult::GetDBTopologyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetDBTopologyResult::~GetDBTopologyResult()
|
||||
{}
|
||||
|
||||
void GetDBTopologyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dBTopologyNode = value["DBTopology"];
|
||||
if(!dBTopologyNode["LogicDbId"].isNull())
|
||||
dBTopology_.logicDbId = std::stol(dBTopologyNode["LogicDbId"].asString());
|
||||
if(!dBTopologyNode["SearchName"].isNull())
|
||||
dBTopology_.searchName = dBTopologyNode["SearchName"].asString();
|
||||
if(!dBTopologyNode["Alias"].isNull())
|
||||
dBTopology_.alias = dBTopologyNode["Alias"].asString();
|
||||
if(!dBTopologyNode["LogicDbName"].isNull())
|
||||
dBTopology_.logicDbName = dBTopologyNode["LogicDbName"].asString();
|
||||
if(!dBTopologyNode["EnvType"].isNull())
|
||||
dBTopology_.envType = dBTopologyNode["EnvType"].asString();
|
||||
if(!dBTopologyNode["DbType"].isNull())
|
||||
dBTopology_.dbType = dBTopologyNode["DbType"].asString();
|
||||
auto allDBTopologyInfoListNode = dBTopologyNode["DBTopologyInfoList"]["DBTopologyInfo"];
|
||||
for (auto dBTopologyNodeDBTopologyInfoListDBTopologyInfo : allDBTopologyInfoListNode)
|
||||
{
|
||||
DBTopology::DBTopologyInfo dBTopologyInfoObject;
|
||||
if(!dBTopologyNodeDBTopologyInfoListDBTopologyInfo["InstanceSource"].isNull())
|
||||
dBTopologyInfoObject.instanceSource = dBTopologyNodeDBTopologyInfoListDBTopologyInfo["InstanceSource"].asString();
|
||||
if(!dBTopologyNodeDBTopologyInfoListDBTopologyInfo["InstanceResourceId"].isNull())
|
||||
dBTopologyInfoObject.instanceResourceId = dBTopologyNodeDBTopologyInfoListDBTopologyInfo["InstanceResourceId"].asString();
|
||||
if(!dBTopologyNodeDBTopologyInfoListDBTopologyInfo["InstanceId"].isNull())
|
||||
dBTopologyInfoObject.instanceId = std::stol(dBTopologyNodeDBTopologyInfoListDBTopologyInfo["InstanceId"].asString());
|
||||
if(!dBTopologyNodeDBTopologyInfoListDBTopologyInfo["SearchName"].isNull())
|
||||
dBTopologyInfoObject.searchName = dBTopologyNodeDBTopologyInfoListDBTopologyInfo["SearchName"].asString();
|
||||
if(!dBTopologyNodeDBTopologyInfoListDBTopologyInfo["DbId"].isNull())
|
||||
dBTopologyInfoObject.dbId = std::stol(dBTopologyNodeDBTopologyInfoListDBTopologyInfo["DbId"].asString());
|
||||
if(!dBTopologyNodeDBTopologyInfoListDBTopologyInfo["CatalogName"].isNull())
|
||||
dBTopologyInfoObject.catalogName = dBTopologyNodeDBTopologyInfoListDBTopologyInfo["CatalogName"].asString();
|
||||
if(!dBTopologyNodeDBTopologyInfoListDBTopologyInfo["RegionId"].isNull())
|
||||
dBTopologyInfoObject.regionId = dBTopologyNodeDBTopologyInfoListDBTopologyInfo["RegionId"].asString();
|
||||
if(!dBTopologyNodeDBTopologyInfoListDBTopologyInfo["EnvType"].isNull())
|
||||
dBTopologyInfoObject.envType = dBTopologyNodeDBTopologyInfoListDBTopologyInfo["EnvType"].asString();
|
||||
if(!dBTopologyNodeDBTopologyInfoListDBTopologyInfo["DbType"].isNull())
|
||||
dBTopologyInfoObject.dbType = dBTopologyNodeDBTopologyInfoListDBTopologyInfo["DbType"].asString();
|
||||
if(!dBTopologyNodeDBTopologyInfoListDBTopologyInfo["SchemaName"].isNull())
|
||||
dBTopologyInfoObject.schemaName = dBTopologyNodeDBTopologyInfoListDBTopologyInfo["SchemaName"].asString();
|
||||
dBTopology_.dBTopologyInfoList.push_back(dBTopologyInfoObject);
|
||||
}
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
GetDBTopologyResult::DBTopology GetDBTopologyResult::getDBTopology()const
|
||||
{
|
||||
return dBTopology_;
|
||||
}
|
||||
|
||||
std::string GetDBTopologyResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string GetDBTopologyResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool GetDBTopologyResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Version name="2018-11-01" product="dms-enterprise" apiStyle="RPC" isolationType="outer"><Parameters/><ErrorMapping exceptionExpress="success=false,errorCode,message,httpStatusCode"><ErrorCodes><ErrorCode errorCode="InstanceExisted" errorMessage="The specified instance already exists." code="InstanceExisted" type="user" httpCode="403"/><ErrorCode errorCode="InstanceNoEnoughNumber" errorMessage="The maximum number of instances allowed for the enterprise is exceeded." code="InstanceNoEnoughNumber" type="user" httpCode="403"/><ErrorCode errorCode="InternalError" errorMessage="Internal server error." code="InternalError" type="user" httpCode="500"/><ErrorCode errorCode="NoPermission" errorMessage="You are not authorized to perform this operation." code="NoPermission" type="user" httpCode="403"/><ErrorCode errorCode="NotSupportYet" errorMessage="This feature is not supported." code="NotSupportYet" type="user" httpCode="403"/><ErrorCode errorCode="SecurityRuleNotExist" errorMessage="The specified security rule does not exist." code="SecurityRuleNotExist" type="user" httpCode="404"/><ErrorCode errorCode="TenantExpired" errorMessage="The tenant has expired." code="TenantExpired" type="user" httpCode="404"/><ErrorCode errorCode="TenantNotExist" errorMessage="The specified tenant does not exist." code="TenantNotExist" type="user" httpCode="404"/><ErrorCode errorCode="TenantStatusIllegal" errorMessage="The tenant status is invalid." code="TenantStatusIllegal" type="user" httpCode="404"/><ErrorCode errorCode="UserExisted" errorMessage="The specified user already exists." code="UserExisted" type="user" httpCode="403"/><ErrorCode errorCode="UserNoEnoughNumber" errorMessage="The maximum number of users allowed for the enterprise is exceeded." code="UserNoEnoughNumber" type="user" httpCode="403"/><ErrorCode errorCode="UserNotExist" errorMessage="The specified user does not exist." code="UserNotExist" type="user" httpCode="404"/><ErrorCode errorCode="UserStatusIllegal" errorMessage="The user status is invalid." code="UserStatusIllegal" type="user" httpCode="404"/></ErrorCodes></ErrorMapping><Apis><Api name="SubmitStructSyncOrderApproval"/><Api name="ListDatabaseUserPermssions"/><Api name="ListSensitiveColumns"/><Api name="ListUsers"/><Api name="SubmitOrderApproval"/><Api name="GrantUserPermission"/><Api name="GetMetaTableDetailInfo"/><Api name="GetDataCorrectSQLFile"/><Api name="CreateFreeLockCorrectOrder"/><Api name="CreateOrder"/><Api name="ListDatabases"/><Api name="ListUserPermissions"/><Api name="ListWorkFlowTemplates"/><Api name="GetDataExportOrderDetail"/><Api name="ListInstances"/><Api name="GetUserUploadFileJob"/><Api name="ListDDLPublishRecords"/><Api name="GetStructSyncJobDetail"/><Api name="CreateUploadOSSFileJob"/><Api name="SearchDatabase"/><Api name="SyncDatabaseMeta"/><Api name="GetUser"/><Api name="ExecuteStructSync"/><Api name="GetDataCorrectOrderDetail"/><Api name="ListColumns"/><Api name="RevokeUserPermission"/><Api name="GetMetaTableColumn"/><Api name="EnableUser"/><Api name="UpdateInstance"/><Api name="ExecuteScript"/><Api name="ListDBTaskSQLJobDetail"/><Api name="DisableUser"/><Api name="GetApprovalDetail"/><Api name="GetUserActiveTenant"/><Api name="RegisterUser"/><Api name="GetInstance"/><Api name="GetPermApplyOrderDetail"/><Api name="ListIndexes"/><Api name="ListLogicTables"/><Api name="GetTableTopology"/><Api name="GetDataExportDownloadURL"/><Api name="CreateDataCronClearOrder"/><Api name="CreatePublishGroupTask"/><Api name="GetDatabase"/><Api name="GetOwnerApplyOrderDetail"/><Api name="GetOpLog"/><Api name="SearchTable"/><Api name="ListDBTaskSQLJob"/><Api name="DeleteUser"/><Api name="GetDataCronClearTaskDetailList"/><Api name="GetStructSyncJobAnalyzeResult"/><Api name="ApproveOrder"/><Api name="GetDataCorrectTaskDetail"/><Api name="CreateUploadFileJob"/><Api name="ListLogicDatabases"/><Api name="CreateDataImportOrder"/><Api name="CloseOrder"/><Api name="SyncInstanceMeta"/><Api name="ListOrders"/><Api name="GetOrderBaseInfo"/><Api name="ListUserTenants"/><Api name="SetOwners"/><Api name="CreateDataCorrectOrder"/><Api name="GetLogicDatabase"/><Api name="GetDataCorrectBackupFiles"/><Api name="RegisterInstance"/><Api name="CreateStructSyncOrder"/><Api name="ExecuteDataExport"/><Api name="ExecuteDataCorrect"/><Api name="ListTables"/><Api name="ListWorkFlowNodes"/><Api name="GetStructSyncOrderDetail"/><Api name="ListSensitiveColumnsDetail"/><Api name="UpdateUser"/><Api name="GetStructSyncExecSqlDetail"/><Api name="CheckFinishMission"/><Api name="DeleteInstance"/><Api name="GetTableDBTopology"/></Apis></Version>
|
||||
<Version name="2018-11-01" product="dms-enterprise" apiStyle="RPC" isolationType="outer"><Parameters/><ErrorMapping exceptionExpress="success=false,errorCode,message,httpStatusCode"><ErrorCodes><ErrorCode errorCode="InstanceExisted" errorMessage="The specified instance already exists." code="InstanceExisted" type="user" httpCode="403"/><ErrorCode errorCode="InstanceNoEnoughNumber" errorMessage="The maximum number of instances allowed for the enterprise is exceeded." code="InstanceNoEnoughNumber" type="user" httpCode="403"/><ErrorCode errorCode="InternalError" errorMessage="Internal server error." code="InternalError" type="user" httpCode="500"/><ErrorCode errorCode="NoPermission" errorMessage="You are not authorized to perform this operation." code="NoPermission" type="user" httpCode="403"/><ErrorCode errorCode="NotSupportYet" errorMessage="This feature is not supported." code="NotSupportYet" type="user" httpCode="403"/><ErrorCode errorCode="SecurityRuleNotExist" errorMessage="The specified security rule does not exist." code="SecurityRuleNotExist" type="user" httpCode="404"/><ErrorCode errorCode="TenantExpired" errorMessage="The tenant has expired." code="TenantExpired" type="user" httpCode="404"/><ErrorCode errorCode="TenantNotExist" errorMessage="The specified tenant does not exist." code="TenantNotExist" type="user" httpCode="404"/><ErrorCode errorCode="TenantStatusIllegal" errorMessage="The tenant status is invalid." code="TenantStatusIllegal" type="user" httpCode="404"/><ErrorCode errorCode="UserExisted" errorMessage="The specified user already exists." code="UserExisted" type="user" httpCode="403"/><ErrorCode errorCode="UserNoEnoughNumber" errorMessage="The maximum number of users allowed for the enterprise is exceeded." code="UserNoEnoughNumber" type="user" httpCode="403"/><ErrorCode errorCode="UserNotExist" errorMessage="The specified user does not exist." code="UserNotExist" type="user" httpCode="404"/><ErrorCode errorCode="UserStatusIllegal" errorMessage="The user status is invalid." code="UserStatusIllegal" type="user" httpCode="404"/></ErrorCodes></ErrorMapping><Apis><Api name="SubmitStructSyncOrderApproval"/><Api name="ListDatabaseUserPermssions"/><Api name="ListSensitiveColumns"/><Api name="ListUsers"/><Api name="SubmitOrderApproval"/><Api name="GrantUserPermission"/><Api name="GetMetaTableDetailInfo"/><Api name="GetDataCorrectSQLFile"/><Api name="CreateFreeLockCorrectOrder"/><Api name="CreateOrder"/><Api name="ListDatabases"/><Api name="ListUserPermissions"/><Api name="ListWorkFlowTemplates"/><Api name="GetDataExportOrderDetail"/><Api name="ListInstances"/><Api name="GetUserUploadFileJob"/><Api name="ListDDLPublishRecords"/><Api name="GetStructSyncJobDetail"/><Api name="CreateUploadOSSFileJob"/><Api name="SearchDatabase"/><Api name="GetDBTopology"/><Api name="SyncDatabaseMeta"/><Api name="GetUser"/><Api name="ExecuteStructSync"/><Api name="GetDataCorrectOrderDetail"/><Api name="ListColumns"/><Api name="RevokeUserPermission"/><Api name="GetMetaTableColumn"/><Api name="EnableUser"/><Api name="UpdateInstance"/><Api name="ExecuteScript"/><Api name="ListDBTaskSQLJobDetail"/><Api name="DisableUser"/><Api name="GetApprovalDetail"/><Api name="GetUserActiveTenant"/><Api name="RegisterUser"/><Api name="GetInstance"/><Api name="GetPermApplyOrderDetail"/><Api name="ListIndexes"/><Api name="ListLogicTables"/><Api name="GetTableTopology"/><Api name="GetDataExportDownloadURL"/><Api name="CreateDataCronClearOrder"/><Api name="CreatePublishGroupTask"/><Api name="GetDatabase"/><Api name="GetOwnerApplyOrderDetail"/><Api name="GetOpLog"/><Api name="SearchTable"/><Api name="ListDBTaskSQLJob"/><Api name="DeleteUser"/><Api name="GetDataCronClearTaskDetailList"/><Api name="GetStructSyncJobAnalyzeResult"/><Api name="ApproveOrder"/><Api name="GetDataCorrectTaskDetail"/><Api name="CreateUploadFileJob"/><Api name="ListLogicDatabases"/><Api name="CreateDataImportOrder"/><Api name="CloseOrder"/><Api name="SyncInstanceMeta"/><Api name="ListOrders"/><Api name="GetOrderBaseInfo"/><Api name="ListUserTenants"/><Api name="SetOwners"/><Api name="CreateDataCorrectOrder"/><Api name="GetLogicDatabase"/><Api name="GetDataCorrectBackupFiles"/><Api name="RegisterInstance"/><Api name="CreateStructSyncOrder"/><Api name="ExecuteDataExport"/><Api name="ExecuteDataCorrect"/><Api name="ListTables"/><Api name="ListWorkFlowNodes"/><Api name="GetStructSyncOrderDetail"/><Api name="ListSensitiveColumnsDetail"/><Api name="UpdateUser"/><Api name="GetStructSyncExecSqlDetail"/><Api name="CheckFinishMission"/><Api name="DeleteInstance"/><Api name="GetTableDBTopology"/></Apis></Version>
|
||||
Reference in New Issue
Block a user