Support GetPhysicalDatabase API.

This commit is contained in:
sdk-team
2021-04-22 00:53:39 +00:00
parent 127ebd7d3a
commit 9f6ab32ea8
12 changed files with 342 additions and 6 deletions

View File

@@ -1,3 +1,6 @@
2021-04-22 Version: 1.36.694
- Support GetPhysicalDatabase API.
2021-04-21 Version: 1.36.693
- Add API to list repo members with group inherited info.

View File

@@ -1 +1 @@
1.36.693
1.36.694

View File

@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<Api name="GetOrderBaseInfo" status="online" version="2018-11-01" product="dms-enterprise" authType="AK" parameterType="Single" showJsonItemName="true" visibility="Public" responseLog="enable" keepClientResourceOwnerId="true"><Parameters><Parameter name="requestId" tagName="RequestId" type="String" required="false" tagPosition="System" checkBlank="false"/><Parameter name="callerUid" tagName="callerUid" type="Long" required="false" tagPosition="System" checkBlank="false"/><Parameter name="tid" tagName="Tid" type="Long" required="false" tagPosition="Query" docRequired="true" checkBlank="false" visibility="Public"/><Parameter name="orderId" tagName="OrderId" type="Long" required="true" tagPosition="Query" docRequired="true" checkBlank="false" visibility="Public"/><Parameter name="IspSignatureSecretKey" tagName="IspSignatureSecretKey" type="String" required="false" tagPosition="System" checkBlank="false"/><Parameter name="IspSignature" tagName="IspSignature" type="String" required="false" tagPosition="System" checkBlank="false"/><Parameter name="apiName" tagName="Action" type="String" required="false" tagPosition="System" checkBlank="false"/><Parameter name="regionId" tagName="RegionId" type="String" required="false" tagPosition="Host" docRequired="false" checkBlank="false" defaultValue="center"/><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"/></Parameters><IspProtocol protocol="http" retries="-1" timeout="10000" httpHost="http://api-dms-share-${regionId}.aliyun-inc.com/worknode/openapi/order/detail" sign="true" signKeyName="dms-enterprise-prod" signPolicy="Local" resultType="Object"/><ErrorMapping exceptionExpress="success=false,errorCode,message,httpStatusCode"/><IsvProtocol protocol="HTTP|HTTPS" method="POST|GET"/><ResultMapping><Member tagName="RequestId" visibility="Public" type="String" name="requestId" nullToEmpty="false"/><Member tagName="ErrorCode" visibility="Public" type="String" name="errorCode" nullToEmpty="false"/><Member tagName="ErrorMessage" visibility="Public" type="String" name="message" nullToEmpty="false"/><Member tagName="Success" visibility="Public" type="Boolean" name="success" nullToEmpty="false"/><Struct tagName="OrderBaseInfo" visibility="Public" name="data" nullToEmpty="false"><Member tagName="StatusDesc" visibility="Public" type="String" name="statusDesc"/><Member tagName="WorkflowStatusDesc" visibility="Public" type="String" name="workflowStatusDesc"/><Member tagName="Comment" visibility="Public" type="String" name="comment"/><Member tagName="CreateTime" visibility="Public" type="String" name="gmtCreate"/><Member tagName="WorkflowInstanceId" visibility="Public" type="Long" name="workflowInstanceId"/><Member tagName="Committer" visibility="Public" type="String" name="committer"/><Member tagName="OrderId" visibility="Public" type="Long" name="id"/><Member tagName="LastModifyTime" visibility="Public" type="String" name="gmtModified"/><Member tagName="PluginType" visibility="Public" type="String" name="pluginType"/><Member tagName="StatusCode" visibility="Public" type="String" name="statusCode"/><Member tagName="CommitterId" visibility="Public" type="Long" name="committerId"/><List tagName="RelatedUserList" visibility="Public" itemName="UserIds" name="relatedUserList" type="String"/><List tagName="RelatedUserNickList" visibility="Public" itemName="UserNicks" name="relatedUserNickList" type="String"/></Struct></ResultMapping><FlowControl controlUnit="Second" apiDefault="200"/></Api>
<Api name="GetOrderBaseInfo" status="online" version="2018-11-01" product="dms-enterprise" authType="AK" showJsonItemName="true" visibility="Public" responseLog="enable" keepClientResourceOwnerId="true"><Parameters><Parameter name="requestId" tagName="RequestId" type="String" required="false" tagPosition="System" checkBlank="false"/><Parameter name="callerUid" tagName="callerUid" type="Long" required="false" tagPosition="System" checkBlank="false"/><Parameter name="tid" tagName="Tid" type="Long" required="false" tagPosition="Query" docRequired="true" checkBlank="false" visibility="Public"/><Parameter name="orderId" tagName="OrderId" type="Long" required="true" tagPosition="Query" docRequired="true" checkBlank="false" visibility="Public"/><Parameter name="IspSignatureSecretKey" tagName="IspSignatureSecretKey" type="String" required="false" tagPosition="System" checkBlank="false"/><Parameter name="IspSignature" tagName="IspSignature" type="String" required="false" tagPosition="System" checkBlank="false"/><Parameter name="apiName" tagName="Action" type="String" required="false" tagPosition="System" checkBlank="false"/><Parameter name="regionId" tagName="RegionId" type="String" required="false" tagPosition="Host" docRequired="false" checkBlank="false" defaultValue="center"/><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"/></Parameters><IspProtocol protocol="http" retries="-1" timeout="10000" httpHost="http://api-dms-share-${regionId}.aliyun-inc.com/worknode/openapi/order/detail" sign="true" signKeyName="dms-enterprise-prod" signPolicy="Local" resultType="Object"/><ErrorMapping exceptionExpress="success=false,errorCode,message,httpStatusCode"/><IsvProtocol protocol="HTTP|HTTPS" method="POST|GET"/><ResultMapping><Member tagName="RequestId" visibility="Public" type="String" name="requestId" nullToEmpty="false"/><Member tagName="ErrorCode" visibility="Public" type="String" name="errorCode" nullToEmpty="false"/><Member tagName="ErrorMessage" visibility="Public" type="String" name="message" nullToEmpty="false"/><Member tagName="Success" visibility="Public" type="Boolean" name="success" nullToEmpty="false"/><Struct tagName="OrderBaseInfo" visibility="Public" name="data" nullToEmpty="false"><Member tagName="StatusDesc" visibility="Public" type="String" name="statusDesc"/><Member tagName="WorkflowStatusDesc" visibility="Public" type="String" name="workflowStatusDesc"/><Member tagName="Comment" visibility="Public" type="String" name="comment"/><Member tagName="CreateTime" visibility="Public" type="String" name="gmtCreate"/><Member tagName="WorkflowInstanceId" visibility="Public" type="Long" name="workflowInstanceId"/><Member tagName="Committer" visibility="Public" type="String" name="committer"/><Member tagName="OrderId" visibility="Public" type="Long" name="id"/><Member tagName="LastModifyTime" visibility="Public" type="String" name="gmtModified"/><Member tagName="PluginType" visibility="Public" type="String" name="pluginType"/><Member tagName="StatusCode" visibility="Public" type="String" name="statusCode"/><Member tagName="CommitterId" visibility="Public" type="Long" name="committerId"/><List tagName="RelatedUserList" visibility="Public" itemName="UserIds" name="relatedUserList" type="String"/><List tagName="RelatedUserNickList" visibility="Public" itemName="UserNicks" name="relatedUserNickList" type="String"/></Struct></ResultMapping><FlowControl controlUnit="Second" apiDefault="1000"/></Api>

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<Api name="GetPhysicalDatabase" status="online" version="2018-11-01" product="dms-enterprise" authType="AK" showJsonItemName="true" visibility="Public" responseLog="enable" keepClientResourceOwnerId="true"><Parameters><Parameter name="requestId" tagName="RequestId" type="String" required="false" tagPosition="System" checkBlank="false"/><Parameter name="dbId" tagName="DbId" type="Long" required="true" tagPosition="Query" docRequired="true" checkBlank="false" minValue="1" maxValue="9223372036854775807" visibility="Public"/><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/getByDbId" sign="true" signKeyName="dms-enterprise-prod" signPolicy="Local" resultType="Object"/><ErrorMapping exceptionExpress="success=false,errorCode,message,httpStatusCode"/><IsvProtocol protocol="HTTP|HTTPS" method="POST|GET"/><ResultMapping><Member tagName="RequestId" visibility="Public" type="String" name="requestId" nullToEmpty="false"/><Member tagName="ErrorCode" visibility="Public" type="String" name="errorCode" nullToEmpty="false"/><Member tagName="ErrorMessage" visibility="Public" type="String" name="message" nullToEmpty="false"/><Member tagName="Success" visibility="Public" type="Boolean" name="success" nullToEmpty="false"/><Struct tagName="Database" visibility="Public" name="data" nullToEmpty="false"><Member tagName="SearchName" visibility="Public" type="String" name="searchName"/><Member tagName="InstanceId" visibility="Public" type="String" name="instanceId"/><Member tagName="Port" visibility="Public" type="Integer" name="port"/><Member tagName="Encoding" visibility="Public" type="String" name="encoding"/><Member tagName="Host" visibility="Public" type="String" name="host"/><Member tagName="DatabaseId" visibility="Public" type="String" name="dbId"/><Member tagName="DbType" visibility="Public" type="String" name="dbType"/><Member tagName="EnvType" visibility="Public" type="String" name="envType"/><Member tagName="Sid" visibility="Public" type="String" name="sid"/><Member tagName="DbaName" visibility="Public" type="String" name="dbaName"/><Member tagName="DbaId" visibility="Public" type="String" name="dbaId"/><Member tagName="State" visibility="Public" type="String" name="state"/><Member tagName="CatalogName" visibility="Public" type="String" name="catalogName"/><Member tagName="SchemaName" visibility="Public" type="String" name="schemaName"/><List tagName="OwnerNameList" visibility="Public" itemName="OwnerNames" name="ownerNames"/><List tagName="OwnerIdList" visibility="Public" itemName="OwnerIds" name="ownerIds"/></Struct></ResultMapping><FlowControl controlUnit="Second" apiDefault="200"/></Api>

View File

@@ -95,6 +95,8 @@ set(dms-enterprise_public_header_model
include/alibabacloud/dms-enterprise/model/GetOwnerApplyOrderDetailResult.h
include/alibabacloud/dms-enterprise/model/GetPermApplyOrderDetailRequest.h
include/alibabacloud/dms-enterprise/model/GetPermApplyOrderDetailResult.h
include/alibabacloud/dms-enterprise/model/GetPhysicalDatabaseRequest.h
include/alibabacloud/dms-enterprise/model/GetPhysicalDatabaseResult.h
include/alibabacloud/dms-enterprise/model/GetStructSyncExecSqlDetailRequest.h
include/alibabacloud/dms-enterprise/model/GetStructSyncExecSqlDetailResult.h
include/alibabacloud/dms-enterprise/model/GetStructSyncJobAnalyzeResultRequest.h
@@ -254,6 +256,8 @@ set(dms-enterprise_src
src/model/GetOwnerApplyOrderDetailResult.cc
src/model/GetPermApplyOrderDetailRequest.cc
src/model/GetPermApplyOrderDetailResult.cc
src/model/GetPhysicalDatabaseRequest.cc
src/model/GetPhysicalDatabaseResult.cc
src/model/GetStructSyncExecSqlDetailRequest.cc
src/model/GetStructSyncExecSqlDetailResult.cc
src/model/GetStructSyncJobAnalyzeResultRequest.cc

View File

@@ -96,6 +96,8 @@
#include "model/GetOwnerApplyOrderDetailResult.h"
#include "model/GetPermApplyOrderDetailRequest.h"
#include "model/GetPermApplyOrderDetailResult.h"
#include "model/GetPhysicalDatabaseRequest.h"
#include "model/GetPhysicalDatabaseResult.h"
#include "model/GetStructSyncExecSqlDetailRequest.h"
#include "model/GetStructSyncExecSqlDetailResult.h"
#include "model/GetStructSyncJobAnalyzeResultRequest.h"
@@ -298,6 +300,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::GetPermApplyOrderDetailResult> GetPermApplyOrderDetailOutcome;
typedef std::future<GetPermApplyOrderDetailOutcome> GetPermApplyOrderDetailOutcomeCallable;
typedef std::function<void(const Dms_enterpriseClient*, const Model::GetPermApplyOrderDetailRequest&, const GetPermApplyOrderDetailOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetPermApplyOrderDetailAsyncHandler;
typedef Outcome<Error, Model::GetPhysicalDatabaseResult> GetPhysicalDatabaseOutcome;
typedef std::future<GetPhysicalDatabaseOutcome> GetPhysicalDatabaseOutcomeCallable;
typedef std::function<void(const Dms_enterpriseClient*, const Model::GetPhysicalDatabaseRequest&, const GetPhysicalDatabaseOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetPhysicalDatabaseAsyncHandler;
typedef Outcome<Error, Model::GetStructSyncExecSqlDetailResult> GetStructSyncExecSqlDetailOutcome;
typedef std::future<GetStructSyncExecSqlDetailOutcome> GetStructSyncExecSqlDetailOutcomeCallable;
typedef std::function<void(const Dms_enterpriseClient*, const Model::GetStructSyncExecSqlDetailRequest&, const GetStructSyncExecSqlDetailOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetStructSyncExecSqlDetailAsyncHandler;
@@ -537,6 +542,9 @@ namespace AlibabaCloud
GetPermApplyOrderDetailOutcome getPermApplyOrderDetail(const Model::GetPermApplyOrderDetailRequest &request)const;
void getPermApplyOrderDetailAsync(const Model::GetPermApplyOrderDetailRequest& request, const GetPermApplyOrderDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetPermApplyOrderDetailOutcomeCallable getPermApplyOrderDetailCallable(const Model::GetPermApplyOrderDetailRequest& request) const;
GetPhysicalDatabaseOutcome getPhysicalDatabase(const Model::GetPhysicalDatabaseRequest &request)const;
void getPhysicalDatabaseAsync(const Model::GetPhysicalDatabaseRequest& request, const GetPhysicalDatabaseAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetPhysicalDatabaseOutcomeCallable getPhysicalDatabaseCallable(const Model::GetPhysicalDatabaseRequest& request) const;
GetStructSyncExecSqlDetailOutcome getStructSyncExecSqlDetail(const Model::GetStructSyncExecSqlDetailRequest &request)const;
void getStructSyncExecSqlDetailAsync(const Model::GetStructSyncExecSqlDetailRequest& request, const GetStructSyncExecSqlDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetStructSyncExecSqlDetailOutcomeCallable getStructSyncExecSqlDetailCallable(const Model::GetStructSyncExecSqlDetailRequest& request) const;

View 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.
*/
#ifndef ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETPHYSICALDATABASEREQUEST_H_
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETPHYSICALDATABASEREQUEST_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 GetPhysicalDatabaseRequest : public RpcServiceRequest
{
public:
GetPhysicalDatabaseRequest();
~GetPhysicalDatabaseRequest();
long getDbId()const;
void setDbId(long dbId);
long getTid()const;
void setTid(long tid);
private:
long dbId_;
long tid_;
};
}
}
}
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETPHYSICALDATABASEREQUEST_H_

View File

@@ -0,0 +1,76 @@
/*
* 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_GETPHYSICALDATABASERESULT_H_
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETPHYSICALDATABASERESULT_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 GetPhysicalDatabaseResult : public ServiceResult
{
public:
struct Database
{
std::string searchName;
std::string instanceId;
int port;
std::string encoding;
std::string host;
std::string databaseId;
std::string dbType;
std::string envType;
std::string sid;
std::string dbaName;
std::string dbaId;
std::string state;
std::string catalogName;
std::vector<std::string> ownerNameList;
std::string schemaName;
std::vector<std::string> ownerIdList;
};
GetPhysicalDatabaseResult();
explicit GetPhysicalDatabaseResult(const std::string &payload);
~GetPhysicalDatabaseResult();
Database getDatabase()const;
std::string getErrorCode()const;
std::string getErrorMessage()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
Database database_;
std::string errorCode_;
std::string errorMessage_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETPHYSICALDATABASERESULT_H_

View File

@@ -31,21 +31,21 @@ Dms_enterpriseClient::Dms_enterpriseClient(const Credentials &credentials, const
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "dms-enterprise");
}
Dms_enterpriseClient::Dms_enterpriseClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "dms-enterprise");
}
Dms_enterpriseClient::Dms_enterpriseClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "dms-enterprise");
}
Dms_enterpriseClient::~Dms_enterpriseClient()
@@ -1383,6 +1383,42 @@ Dms_enterpriseClient::GetPermApplyOrderDetailOutcomeCallable Dms_enterpriseClien
return task->get_future();
}
Dms_enterpriseClient::GetPhysicalDatabaseOutcome Dms_enterpriseClient::getPhysicalDatabase(const GetPhysicalDatabaseRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetPhysicalDatabaseOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetPhysicalDatabaseOutcome(GetPhysicalDatabaseResult(outcome.result()));
else
return GetPhysicalDatabaseOutcome(outcome.error());
}
void Dms_enterpriseClient::getPhysicalDatabaseAsync(const GetPhysicalDatabaseRequest& request, const GetPhysicalDatabaseAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getPhysicalDatabase(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::GetPhysicalDatabaseOutcomeCallable Dms_enterpriseClient::getPhysicalDatabaseCallable(const GetPhysicalDatabaseRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetPhysicalDatabaseOutcome()>>(
[this, request]()
{
return this->getPhysicalDatabase(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::GetStructSyncExecSqlDetailOutcome Dms_enterpriseClient::getStructSyncExecSqlDetail(const GetStructSyncExecSqlDetailRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View 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/GetPhysicalDatabaseRequest.h>
using AlibabaCloud::Dms_enterprise::Model::GetPhysicalDatabaseRequest;
GetPhysicalDatabaseRequest::GetPhysicalDatabaseRequest() :
RpcServiceRequest("dms-enterprise", "2018-11-01", "GetPhysicalDatabase")
{
setMethod(HttpRequest::Method::Post);
}
GetPhysicalDatabaseRequest::~GetPhysicalDatabaseRequest()
{}
long GetPhysicalDatabaseRequest::getDbId()const
{
return dbId_;
}
void GetPhysicalDatabaseRequest::setDbId(long dbId)
{
dbId_ = dbId;
setParameter("DbId", std::to_string(dbId));
}
long GetPhysicalDatabaseRequest::getTid()const
{
return tid_;
}
void GetPhysicalDatabaseRequest::setTid(long tid)
{
tid_ = tid;
setParameter("Tid", std::to_string(tid));
}

View File

@@ -0,0 +1,105 @@
/*
* 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/GetPhysicalDatabaseResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
GetPhysicalDatabaseResult::GetPhysicalDatabaseResult() :
ServiceResult()
{}
GetPhysicalDatabaseResult::GetPhysicalDatabaseResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetPhysicalDatabaseResult::~GetPhysicalDatabaseResult()
{}
void GetPhysicalDatabaseResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto databaseNode = value["Database"];
if(!databaseNode["SearchName"].isNull())
database_.searchName = databaseNode["SearchName"].asString();
if(!databaseNode["InstanceId"].isNull())
database_.instanceId = databaseNode["InstanceId"].asString();
if(!databaseNode["Port"].isNull())
database_.port = std::stoi(databaseNode["Port"].asString());
if(!databaseNode["Encoding"].isNull())
database_.encoding = databaseNode["Encoding"].asString();
if(!databaseNode["Host"].isNull())
database_.host = databaseNode["Host"].asString();
if(!databaseNode["DatabaseId"].isNull())
database_.databaseId = databaseNode["DatabaseId"].asString();
if(!databaseNode["DbType"].isNull())
database_.dbType = databaseNode["DbType"].asString();
if(!databaseNode["EnvType"].isNull())
database_.envType = databaseNode["EnvType"].asString();
if(!databaseNode["Sid"].isNull())
database_.sid = databaseNode["Sid"].asString();
if(!databaseNode["DbaName"].isNull())
database_.dbaName = databaseNode["DbaName"].asString();
if(!databaseNode["DbaId"].isNull())
database_.dbaId = databaseNode["DbaId"].asString();
if(!databaseNode["State"].isNull())
database_.state = databaseNode["State"].asString();
if(!databaseNode["CatalogName"].isNull())
database_.catalogName = databaseNode["CatalogName"].asString();
if(!databaseNode["SchemaName"].isNull())
database_.schemaName = databaseNode["SchemaName"].asString();
auto allOwnerNameList = databaseNode["OwnerNameList"]["OwnerNames"];
for (auto value : allOwnerNameList)
database_.ownerNameList.push_back(value.asString());
auto allOwnerIdList = databaseNode["OwnerIdList"]["OwnerIds"];
for (auto value : allOwnerIdList)
database_.ownerIdList.push_back(value.asString());
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";
}
GetPhysicalDatabaseResult::Database GetPhysicalDatabaseResult::getDatabase()const
{
return database_;
}
std::string GetPhysicalDatabaseResult::getErrorCode()const
{
return errorCode_;
}
std::string GetPhysicalDatabaseResult::getErrorMessage()const
{
return errorMessage_;
}
bool GetPhysicalDatabaseResult::getSuccess()const
{
return success_;
}

View File

@@ -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="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>
<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="GetPhysicalDatabase"/><Api name="GetStructSyncExecSqlDetail"/><Api name="CheckFinishMission"/><Api name="DeleteInstance"/><Api name="GetTableDBTopology"/></Apis></Version>